pict 1.0.310 → 1.0.312

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pict.min.js CHANGED
@@ -8,5 +8,5 @@
8
8
  *
9
9
  * @description Process text streams, parsing out meta-template expressions.
10
10
  */
11
- var n=e("./WordTree.js"),i=e("./StringParser.js");t.exports=class{constructor(){this.WordTree=new n,this.StringParser=new i,this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r){return this.WordTree.addPattern(e,t,r)}parseString(e,t){return this.StringParser.parseString(e,this.ParseTree,t)}}},{"./StringParser.js":147,"./WordTree.js":148}],147:[function(e,t,r){t.exports=class{constructor(){}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&t.Pattern.hasOwnProperty(e))t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(t.Pattern.PatternEnd.hasOwnProperty(e)){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),t.Pattern.hasOwnProperty("Parse"))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else t.PatternStartNode.PatternEnd.hasOwnProperty(e)?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if(t.Pattern.hasOwnProperty("PatternEnd")){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),t.Pattern.PatternEnd.hasOwnProperty(e)&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],t.Pattern.hasOwnProperty("Parse")))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(t.ParseTree.hasOwnProperty(e))return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}parseString(e,t,r){let n=this.newParserState(t);for(var i=0;i<e.length;i++)this.parseCharacter(e[i],n,r);return this.flushOutputBuffer(n),n.Output}}},{}],148:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return e.hasOwnProperty(t)||(e[t]={}),e[t]}addEndChild(e,t){return e.hasOwnProperty("PatternEnd")||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPattern(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let n=this.ParseTree;for(var i=0;i<e.length;i++)n=this.addChild(n,e[i],i);n.hasOwnProperty("PatternEnd")||(n.PatternEnd={});let s="string"==typeof t?t:e;for(let e=0;e<s.length;e++)n=this.addEndChild(n,s[e],e);return n.PatternStartString=e,n.PatternEndString=s,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:e=>e,!0}}},{}],149:[function(e,t,r){var n,i,s=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var l,h=[],u=!1,p=-1;function d(){u&&l&&(u=!1,l.length?h=l.concat(h):p=-1,h.length&&f())}function f(){if(!u){var e=c(d);u=!0;for(var t=h.length;t;){for(l=h,h=[];++p<t;)l&&l[p].run();p=-1,t=h.length}l=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function m(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new g(e,t)),1!==h.length||u||c(f)},g.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],150:[function(e,t,r){(function(e){(function(){!function(n){var i="object"==typeof r&&r&&!r.nodeType&&r,s="object"==typeof t&&t&&!t.nodeType&&t,o="object"==typeof e&&e;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var a,c,l=2147483647,h=36,u=/^xn--/,p=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function y(e){throw new RangeError(f[e])}function b(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+b((e=e.replace(d,".")).split("."),t).join(".")}function T(e){for(var t,r,n=[],i=0,s=e.length;i<s;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<s?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function S(e){return b(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;n+=h)e=g(e/35);return g(n+36*e/(e+38))}function A(e){var t,r,n,i,s,o,a,c,u,p,d,f=[],m=e.length,b=0,v=128,T=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&y("not-basic"),f.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<m;){for(s=b,o=1,a=h;i>=m&&y("invalid-input"),((c=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:h)>=h||c>g((l-b)/o))&&y("overflow"),b+=c*o,!(c<(u=a<=T?1:a>=T+26?26:a-T));a+=h)o>g(l/(p=h-u))&&y("overflow"),o*=p;T=w(b-s,t=f.length+1,0==s),g(b/t)>l-v&&y("overflow"),v+=g(b/t),b%=t,f.splice(b++,0,v)}return S(f)}function E(e){var t,r,n,i,s,o,a,c,u,p,d,f,b,v,S,A=[];for(f=(e=T(e)).length,t=128,r=0,s=72,o=0;o<f;++o)(d=e[o])<128&&A.push(m(d));for(n=i=A.length,i&&A.push("-");n<f;){for(a=l,o=0;o<f;++o)(d=e[o])>=t&&d<a&&(a=d);for(a-t>g((l-r)/(b=n+1))&&y("overflow"),r+=(a-t)*b,t=a,o=0;o<f;++o)if((d=e[o])<t&&++r>l&&y("overflow"),d==t){for(c=r,u=h;!(c<(p=u<=s?1:u>=s+26?26:u-s));u+=h)S=c-p,v=h-p,A.push(m(P(p+S%v,0))),c=g(S/v);A.push(m(P(c,0))),s=w(r,b,n==i),r=0,++n}++r,++t}return A.join("")}if(a={version:"1.4.1",ucs2:{decode:T,encode:S},decode:A,encode:E,toASCII:function(e){return v(e,(function(e){return p.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return v(e,(function(e){return u.test(e)?A(e.slice(4).toLowerCase()):e}))}},i&&s)if(t.exports==i)s.exports=a;else for(c in a)a.hasOwnProperty(c)&&(i[c]=a[c]);else n.punycode=a}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],151:[function(e,t,r){var n=String.prototype.replace,i=/%20/g,s="RFC1738",o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:s,RFC3986:o}},{}],152:[function(e,t,r){var n=e("./stringify"),i=e("./parse"),s=e("./formats");t.exports={formats:s,parse:i,stringify:n}},{"./formats":151,"./parse":153,"./stringify":154}],153:[function(e,t,r){var n=e("./utils"),i=Object.prototype.hasOwnProperty,s=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},l=function(e,t,r,s){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(o),h=l?o.slice(0,l.index):o,u=[];if(h){if(!r.plainObjects&&i.call(Object.prototype,h)&&!r.allowPrototypes)return;u.push(h)}for(var p=0;r.depth>0&&null!==(l=a.exec(o))&&p<r.depth;){if(p+=1,!r.plainObjects&&i.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}if(l){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+o.slice(l.index)+"]")}return function(e,t,r,i){var s=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");s=Array.isArray(t)&&t[o]?t[o].length:0}for(var a=i?t:c(t,r,s),l=e.length-1;l>=0;--l){var h,u=e[l];if("[]"===u&&r.parseArrays)h=r.allowEmptyArrays&&(""===a||r.strictNullHandling&&null===a)?[]:n.combine([],a);else{h=r.plainObjects?{__proto__:null}:{};var p="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,d=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,f=parseInt(d,10);r.parseArrays||""!==d?!isNaN(f)&&u!==d&&String(f)===d&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(h=[])[f]=a:"__proto__"!==d&&(h[d]=a):h={0:a}}a=h}return a}(u,t,r,s)}};t.exports=function(e,t){var r=function(e){if(!e)return o;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?o.charset:e.charset,r=void 0===e.duplicates?o.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||o.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:o.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var h="string"==typeof e?function(e,t){var r={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var h=t.parameterLimit===1/0?void 0:t.parameterLimit,u=l.split(t.delimiter,t.throwOnLimitExceeded?h+1:h);if(t.throwOnLimitExceeded&&u.length>h)throw new RangeError("Parameter limit exceeded. Only "+h+" parameter"+(1===h?"":"s")+" allowed.");var p,d=-1,f=t.charset;if(t.charsetSentinel)for(p=0;p<u.length;++p)0===u[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[p]?f="utf-8":"utf8=%26%2310003%3B"===u[p]&&(f="iso-8859-1"),d=p,p=u.length);for(p=0;p<u.length;++p)if(p!==d){var g,m,y=u[p],b=y.indexOf("]="),v=-1===b?y.indexOf("="):b+1;-1===v?(g=t.decoder(y,o.decoder,f,"key"),m=t.strictNullHandling?null:""):(g=t.decoder(y.slice(0,v),o.decoder,f,"key"),m=n.maybeMap(c(y.slice(v+1),t,s(r[g])?r[g].length:0),(function(e){return t.decoder(e,o.decoder,f,"value")}))),m&&t.interpretNumericEntities&&"iso-8859-1"===f&&(m=a(String(m))),y.indexOf("[]=")>-1&&(m=s(m)?[m]:m);var T=i.call(r,g);T&&"combine"===t.duplicates?r[g]=n.combine(r[g],m):T&&"last"!==t.duplicates||(r[g]=m)}return r}(e,r):e,u=r.plainObjects?{__proto__:null}:{},p=Object.keys(h),d=0;d<p.length;++d){var f=p[d],g=l(f,h[f],r,"string"==typeof e);u=n.merge(u,g,r)}return!0===r.allowSparse?u:n.compact(u)}},{"./utils":155}],154:[function(e,t,r){var n=e("side-channel"),i=e("./utils"),s=e("./formats"),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=Array.prototype.push,h=function(e,t){l.apply(e,c(t)?t:[t])},u=Date.prototype.toISOString,p=s.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:s.formatters[p],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f={},g=function e(t,r,s,o,a,l,u,p,g,m,y,b,v,T,S,P,w,A){for(var E,x=t,C=A,R=0,D=!1;void 0!==(C=C.get(f))&&!D;){var j=C.get(t);if(R+=1,void 0!==j){if(j===R)throw new RangeError("Cyclic object value");D=!0}void 0===C.get(f)&&(R=0)}if("function"==typeof m?x=m(r,x):x instanceof Date?x=v(x):"comma"===s&&c(x)&&(x=i.maybeMap(x,(function(e){return e instanceof Date?v(e):e}))),null===x){if(l)return g&&!P?g(r,d.encoder,w,"key",T):r;x=""}if("string"==typeof(E=x)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||i.isBuffer(x))return g?[S(P?r:g(r,d.encoder,w,"key",T))+"="+S(g(x,d.encoder,w,"value",T))]:[S(r)+"="+S(String(x))];var k,N=[];if(void 0===x)return N;if("comma"===s&&c(x))P&&g&&(x=i.maybeMap(x,g)),k=[{value:x.length>0?x.join(",")||null:void 0}];else if(c(m))k=m;else{var I=Object.keys(x);k=y?I.sort(y):I}var O=p?String(r).replace(/\./g,"%2E"):String(r),L=o&&c(x)&&1===x.length?O+"[]":O;if(a&&c(x)&&0===x.length)return L+"[]";for(var M=0;M<k.length;++M){var F=k[M],V="object"==typeof F&&F&&void 0!==F.value?F.value:x[F];if(!u||null!==V){var _=b&&p?String(F).replace(/\./g,"%2E"):String(F),B=c(x)?"function"==typeof s?s(L,_):L:L+(b?"."+_:"["+_+"]");A.set(t,R);var U=n();U.set(f,A),h(N,e(V,B,s,o,a,l,u,p,"comma"===s&&P&&c(x)?null:g,m,y,b,v,T,S,P,w,U))}}return N};t.exports=function(e,t){var r,i=e,l=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=s.default;if(void 0!==e.format){if(!o.call(s.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,i=s.formatters[r],l=d.filter;if(("function"==typeof e.filter||c(e.filter))&&(l=e.filter),n=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:h,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:l,format:r,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof l.filter?i=(0,l.filter)("",i):c(l.filter)&&(r=l.filter);var u=[];if("object"!=typeof i||null===i)return"";var p=a[l.arrayFormat],f="comma"===p&&l.commaRoundTrip;r||(r=Object.keys(i)),l.sort&&r.sort(l.sort);for(var m=n(),y=0;y<r.length;++y){var b=r[y],v=i[b];l.skipNulls&&null===v||h(u,g(v,b,p,f,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,m))}var T=u.join(l.delimiter),S=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),T.length>0?S+T:""}},{"./formats":151,"./utils":155,"side-channel":163}],155:[function(e,t,r){var n=e("./formats"),i=Object.prototype.hasOwnProperty,s=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},c=1024;t.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],o=i.obj[i.prop],a=Object.keys(o),c=0;c<a.length;++c){var l=a[c],h=o[l];"object"==typeof h&&null!==h&&-1===r.indexOf(h)&&(t.push({obj:o,prop:l}),r.push(h))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,s){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",h=0;h<a.length;h+=c){for(var u=a.length>=c?a.slice(h,h+c):a,p=[],d=0;d<u.length;++d){var f=u.charCodeAt(d);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===n.RFC1738&&(40===f||41===f)?p[p.length]=u.charAt(d):f<128?p[p.length]=o[f]:f<2048?p[p.length]=o[192|f>>6]+o[128|63&f]:f<55296||f>=57344?p[p.length]=o[224|f>>12]+o[128|f>>6&63]+o[128|63&f]:(d+=1,f=65536+((1023&f)<<10|1023&u.charCodeAt(d)),p[p.length]=o[240|f>>18]+o[128|f>>12&63]+o[128|f>>6&63]+o[128|63&f])}l+=p.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(s(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(s(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return s(t)&&!s(r)&&(o=a(t,n)),s(t)&&s(r)?(r.forEach((function(r,s){if(i.call(t,s)){var o=t[s];o&&"object"==typeof o&&r&&"object"==typeof r?t[s]=e(o,r,n):t.push(r)}else t[s]=r})),t):Object.keys(r).reduce((function(t,s){var o=r[s];return i.call(t,s)?t[s]=e(t[s],o,n):t[s]=o,t}),o)}}},{"./formats":151}],156:[function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,s){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var c=1e3;s&&"number"==typeof s.maxKeys&&(c=s.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var h=0;h<l;++h){var u,p,d,f,g=e[h].replace(a,"%20"),m=g.indexOf(r);m>=0?(u=g.substr(0,m),p=g.substr(m+1)):(u=g,p=""),d=decodeURIComponent(u),f=decodeURIComponent(p),n(o,d)?i(o[d])?o[d].push(f):o[d]=[o[d],f]:o[d]=f}return o};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],157:[function(e,t,r){var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?s(o(e),(function(o){var a=encodeURIComponent(n(o))+r;return i(e[o])?s(e[o],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[o]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],158:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":156,"./encode":157}],159:[function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:20}],160:[function(e,t,r){var n=e("object-inspect"),i=e("es-errors/type"),s=function(e,t,r){for(var n,i=e;null!=(n=i.next);i=n)if(n.key===t)return i.next=n.next,r||(n.next=e.next,e.next=n),n};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=function(e,t){if(e)return s(e,t,!0)}(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return function(e,t){if(e){var r=s(e,t);return r&&r.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!s(e,t)}(e,t)},set:function(t,r){e||(e={next:void 0}),function(e,t,r){var n=s(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(e,t,r)}};return t}},{"es-errors/type":47,"object-inspect":135}],161:[function(e,t,r){var n=e("get-intrinsic"),i=e("call-bound"),s=e("object-inspect"),o=e("es-errors/type"),a=n("%Map%",!0),c=i("Map.prototype.get",!0),l=i("Map.prototype.set",!0),h=i("Map.prototype.has",!0),u=i("Map.prototype.delete",!0),p=i("Map.prototype.size",!0);t.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+s(e))},delete:function(t){if(e){var r=u(e,t);return 0===p(e)&&(e=void 0),r}return!1},get:function(t){if(e)return c(e,t)},has:function(t){return!!e&&h(e,t)},set:function(t,r){e||(e=new a),l(e,t,r)}};return t}},{"call-bound":30,"es-errors/type":47,"get-intrinsic":103,"object-inspect":135}],162:[function(e,t,r){var n=e("get-intrinsic"),i=e("call-bound"),s=e("object-inspect"),o=e("side-channel-map"),a=e("es-errors/type"),c=n("%WeakMap%",!0),l=i("WeakMap.prototype.get",!0),h=i("WeakMap.prototype.set",!0),u=i("WeakMap.prototype.has",!0),p=i("WeakMap.prototype.delete",!0);t.exports=c?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+s(e))},delete:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(o&&t)return t.delete(r);return!1},get:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?l(e,r):t&&t.get(r)},has:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?u(e,r):!!t&&t.has(r)},set:function(r,n){c&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new c),h(e,r,n)):o&&(t||(t=o()),t.set(r,n))}};return r}:o},{"call-bound":30,"es-errors/type":47,"get-intrinsic":103,"object-inspect":135,"side-channel-map":161}],163:[function(e,t,r){var n=e("es-errors/type"),i=e("object-inspect"),s=e("side-channel-list"),o=e("side-channel-map"),a=e("side-channel-weakmap")||o||s;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=a()),e.set(t,r)}};return t}},{"es-errors/type":47,"object-inspect":135,"side-channel-list":160,"side-channel-map":161,"side-channel-weakmap":162}],164:[function(e,t,r){(function(e){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=function(t,r){var n=[];t.on("data",(function(e){n.push(e)})),t.once("end",(function(){r&&r(null,e.concat(n)),r=null})),t.once("error",(function(e){r&&r(e),r=null}))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20}],165:[function(e,t,r){(function(r){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=u;const n=e("simple-concat"),i=e("decompress-response"),s=e("http"),o=e("https"),a=e("once"),c=e("querystring"),l=e("url"),h=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function u(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=a(t),e.url){const{hostname:t,port:r,protocol:n,auth:i,path:s}=l.parse(e.url);delete e.url,t||r||n||i?Object.assign(e,{hostname:t,port:r,protocol:n,auth:i,path:s}):e.path=s}const n={"accept-encoding":"gzip, deflate"};let p;e.headers&&Object.keys(e.headers).forEach((t=>n[t.toLowerCase()]=e.headers[t])),e.headers=n,e.body?p=e.json&&!h(e.body)?JSON.stringify(e.body):e.body:e.form&&(p="string"==typeof e.form?e.form:c.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),p&&(e.method||(e.method="POST"),h(p)||(e.headers["content-length"]=r.byteLength(p)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const d=e.hostname,f=("https:"===e.protocol?o:s).request(e,(r=>{if(!1!==e.followRedirects&&r.statusCode>=300&&r.statusCode<400&&r.headers.location){e.url=r.headers.location,delete e.headers.host,r.resume();const n=l.parse(e.url).hostname;return null!==n&&n!==d&&(delete e.headers.cookie,delete e.headers.authorization),"POST"===e.method&&[301,302].includes(r.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):u(e,t)}const n="function"==typeof i&&"HEAD"!==e.method;t(null,n?i(r):r)}));return f.on("timeout",(()=>{f.abort(),t(new Error("Request timed out"))})),f.on("error",t),h(p)?p.on("error",t).pipe(f):f.end(p),f}u.concat=(e,t)=>u(e,((r,i)=>{if(r)return t(r);n(i,((r,n)=>{if(r)return t(r);if(e.json)try{n=JSON.parse(n.toString())}catch(r){return t(r,i,n)}t(null,i,n)}))})),["get","post","put","patch","head","delete"].forEach((e=>{u[e]=(t,r)=>("string"==typeof t&&(t={url:t}),u(Object.assign({method:e.toUpperCase()},t),r))}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,"decompress-response":18,http:166,https:112,once:136,querystring:158,"simple-concat":164,url:187}],166:[function(e,t,r){(function(t){(function(){var n=e("./lib/request"),i=e("./lib/response"),s=e("xtend"),o=e("builtin-status-codes"),a=e("url"),c=r;c.request=function(e,r){e="string"==typeof e?a.parse(e):s(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||i,c=e.hostname||e.host,l=e.port,h=e.path||"/";c&&-1!==c.indexOf(":")&&(c="["+c+"]"),e.url=(c?o+"//"+c:"")+(l?":"+l:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new n(e);return r&&u.on("response",r),u},c.get=function(e,t){var r=c.request(e,t);return r.end(),r},c.ClientRequest=n,c.IncomingMessage=i.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=o,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":168,"./lib/response":169,"builtin-status-codes":21,url:187,xtend:190}],167:[function(e,t,r){(function(e){(function(){var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function i(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function s(e){return"function"==typeof e}r.fetch=s(e.fetch)&&s(e.ReadableStream),r.writableStream=s(e.WritableStream),r.abortController=s(e.AbortController),r.arraybuffer=r.fetch||i("arraybuffer"),r.msstream=!r.fetch&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&s(n().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],168:[function(e,t,r){(function(r,n,i){(function(){var s=e("./capability"),o=e("inherits"),a=e("./response"),c=e("readable-stream"),l=a.IncomingMessage,h=a.readyStates;var u=t.exports=function(e){var t,r=this;c.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+i.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!s.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!s.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return s.fetch&&t?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&e?"arraybuffer":"text"}(t,n),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(u,c.Writable),u.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var i=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(i["content-type"]||{}).value||""}));var a=[];if(Object.keys(i).forEach((function(e){var t=i[e].name,r=i[e].value;Array.isArray(r)?r.forEach((function(e){a.push([t,e])})):a.push([t,r])})),"fetch"===e._mode){var c=null;if(s.abortController){var l=new AbortController;c=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:a,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new n.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(o)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},u.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},u.prototype._write=function(e,t,r){this._body.push(e),r()},u.prototype._resetTimers=function(e){var t=this;n.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},u.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(this,e,t,r)},u.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":167,"./response":169,_process:149,buffer:20,inherits:114,"readable-stream":184}],169:[function(e,t,r){(function(t,n,i){(function(){var s=e("./capability"),o=e("inherits"),a=e("readable-stream"),c=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=r.IncomingMessage=function(e,r,n,o){var c=this;if(a.Readable.call(c),c._mode=n,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===n){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),s.writableStream){var l=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){c._destroyed?r():c.push(i.from(e))?t():c._resumeFetch=t}))},close:function(){o(!0),c._destroyed||c.push(null)},abort:function(e){o(!0),c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(l).catch((function(e){o(!0),c._destroyed||c.emit("error",e)}))}catch(f){}}var h=r.body.getReader();function d(){h.read().then((function(e){c._destroyed||(o(e.done),e.done?c.push(null):(c.push(i.from(e.value)),d()))})).catch((function(e){o(!0),c._destroyed||c.emit("error",e)}))}d()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!s.overrideMimeType){var u=c.rawHeaders["mime-type"];if(u){var p=u.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};o(l,a.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,s=null;switch(t._mode){case"text":if((s=r.responseText).length>t._pos){var o=s.substr(t._pos);if("x-user-defined"===t._charset){for(var a=i.alloc(o.length),l=0;l<o.length;l++)a[l]=255&o.charCodeAt(l);t.push(a)}else t.push(o,t._charset);t._pos=s.length}break;case"arraybuffer":if(r.readyState!==c.DONE||!r.response)break;s=r.response,t.push(i.from(new Uint8Array(s)));break;case"moz-chunked-arraybuffer":if(s=r.response,r.readyState!==c.LOADING||!s)break;t.push(i.from(new Uint8Array(s)));break;case"ms-stream":if(s=r.response,r.readyState!==c.LOADING)break;var h=new n.MSStreamReader;h.onprogress=function(){h.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(h.result.slice(t._pos)))),t._pos=h.result.byteLength)},h.onload=function(){e(!0),t.push(null)},h.readAsArrayBuffer(s)}t._xhr.readyState===c.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":167,_process:149,buffer:20,inherits:114,"readable-stream":184}],170:[function(e,t,r){var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function s(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,o,a;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(s(t,"type"));else{var c=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(n," ").concat(s(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],171:[function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var i=e("./_stream_readable"),s=e("./_stream_writable");e("inherits")(l,i);for(var o=n(s.prototype),a=0;a<o.length;a++){var c=o[a];l.prototype[c]||(l.prototype[c]=s.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||r.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":173,"./_stream_writable":175,_process:149,inherits:114}],172:[function(e,t,r){t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":174,inherits:114}],173:[function(e,t,r){(function(r,n){(function(){var i;t.exports=E,E.ReadableState=A;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),a=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,h=e("util");l=h&&h.debuglog?h.debuglog("stream"):function(){};var u,p,d,f=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,y=e("../errors").codes,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,T=y.ERR_METHOD_NOT_IMPLEMENTED,S=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(E,o);var P=g.errorOrDestroy,w=["error","close","destroy","pause","resume"];function A(t,r,n){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",n),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=e("string_decoder/").StringDecoder),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function E(t){if(i=i||e("./_stream_duplex"),!(this instanceof E))return new E(t);var r=this instanceof i;this._readableState=new A(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function x(e,t,r,n,i){l("readableAddChunk",t);var s,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(l("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}(e,o);else if(i||(s=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(o,t)),s)P(e,s);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)o.endEmitted?P(e,new S):C(e,o,t,!0);else if(o.ended)P(e,new v);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?C(e,o,t,!1):N(e,o)):C(e,o,t,!1)}else n||(o.reading=!1,N(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&j(e)),N(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=g.destroy,E.prototype._undestroy=g.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),x(this,e,t,!1,r)},E.prototype.unshift=function(e){return x(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){u||(u=e("string_decoder/").StringDecoder);var r=new u(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function D(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(k,e))}function k(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function N(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(l("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function O(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){l("readable nexttick read 0"),e.read(0)}function M(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function V(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function _(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(B,t,e))}function B(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?_(this):j(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&_(this),null;var n,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=D(r,t))),null===(n=e>0?V(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&_(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){P(this,new T("_read()"))},E.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:m;function a(t,r){l("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),e.removeListener("close",f),e.removeListener("finish",g),e.removeListener("drain",h),e.removeListener("error",d),e.removeListener("unpipe",a),n.removeListener("end",c),n.removeListener("end",m),n.removeListener("data",p),u=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function c(){l("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",a);var h=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,F(e))}}(n);e.on("drain",h);var u=!1;function p(t){l("ondata");var r=e.write(t);l("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!u&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(t){l("onerror",t),m(),e.removeListener("error",d),0===s(e,"error")&&P(e,t)}function f(){e.removeListener("finish",g),m()}function g(){l("onfinish"),e.removeListener("close",f),m()}function m(){l("unpipe"),n.unpipe(e)}return n.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",g),e.emit("pipe",n),i.flowing||(l("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=U(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?j(this):i.reading||r.nextTick(L,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(O,this),n},E.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(O,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(M,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<w.length;s++)e.on(w[s],this.emit.bind(this,w[s]));return this._read=function(t){l("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=e("./internal/streams/async_iterator")),p(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=V,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,r){return void 0===d&&(d=e("./internal/streams/from")),d(E,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":170,"./_stream_duplex":171,"./internal/streams/async_iterator":176,"./internal/streams/buffer_list":177,"./internal/streams/destroy":178,"./internal/streams/from":180,"./internal/streams/state":182,"./internal/streams/stream":183,_process:149,buffer:20,events:50,inherits:114,"string_decoder/":185,util:18}],174:[function(e,t,r){t.exports=h;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);c.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(t,r){p(e,t,r)}))}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(h,c),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new i("_transform()"))},h.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":170,"./_stream_duplex":171,inherits:114}],175:[function(e,t,r){(function(r,n){(function(){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var s;t.exports=E,E.WritableState=A;var o={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),c=e("buffer").Buffer,l=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h,u=e("./internal/streams/destroy"),p=e("./internal/streams/state").getHighWaterMark,d=e("../errors").codes,f=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,T=d.ERR_STREAM_WRITE_AFTER_END,S=d.ERR_UNKNOWN_ENCODING,P=u.errorOrDestroy;function w(){}function A(t,n,o){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=n instanceof s),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=p(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,s=n.writecb;if("function"!=typeof s)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,s){--t.pendingcb,n?(r.nextTick(s,i),r.nextTick(k,e,t),e._writableState.errorEmitted=!0,P(e,i)):(s(i),e._writableState.errorEmitted=!0,P(e,i),k(e,t))}(e,n,i,t,s);else{var o=D(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||R(e,n),i?r.nextTick(C,e,n,o,s):C(e,n,o,s)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function E(t){var r=this instanceof(s=s||e("./_stream_duplex"));if(!r&&!h.call(E,this))return new E(t);this._writableState=new A(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function x(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function C(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),k(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)s[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;s.allBuffers=c,x(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,h=r.encoding,u=r.callback;if(x(e,t,!1,t.objectMode?1:l.length,l,h,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function D(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&P(e,r),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var n=D(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(j,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}e("inherits")(E,a),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===E&&(e&&e._writableState instanceof A)}})):h=function(e){return e instanceof this},E.prototype.pipe=function(){P(this,new y)},E.prototype.write=function(e,t,n){var i,s=this._writableState,o=!1,a=!s.objectMode&&(i=e,c.isBuffer(i)||i instanceof l);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=w),s.ending?function(e,t){var n=new T;P(e,n),r.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var s;return null===n?s=new v:"string"==typeof n||t.objectMode||(s=new f("chunk",["string","Buffer"],n)),!s||(P(e,s),r.nextTick(i,s),!1)}(this,s,e,n))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,n,i,s);return l}(this,s,a,e,t,n)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,k(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=u.destroy,E.prototype._undestroy=u.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":170,"./_stream_duplex":171,"./internal/streams/destroy":178,"./internal/streams/state":182,"./internal/streams/stream":183,_process:149,buffer:20,inherits:114,"util-deprecate":188}],176:[function(e,t,r){(function(r){(function(){var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),u=Symbol("handlePromise"),p=Symbol("stream");function d(e,t){return{value:e,done:t}}function f(e){var t=e[o];if(null!==t){var r=e[p].read();null!==r&&(e[h]=null,e[o]=null,e[a]=null,t(d(r,!1)))}}function g(e){r.nextTick(f,e)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[p]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[c]?n(e[c]):t(d(void 0,!0))}))}));var n,i=this[h];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[l]?r(d(void 0,!0)):t[u](r,n)}),n)}}(i,this));else{var s=this[p].read();if(null!==s)return Promise.resolve(d(s,!1));n=new Promise(this[u])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),m);t.exports=function(e){var t,r=Object.create(y,(i(t={},p,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,u,{value:function(e,t){var n=r[p].read();n?(r[h]=null,r[o]=null,r[a]=null,e(d(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[h]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[h]=null,r[o]=null,r[a]=null,t(e)),void(r[c]=e)}var n=r[o];null!==n&&(r[h]=null,r[o]=null,r[a]=null,n(d(void 0,!0))),r[l]=!0})),e.on("readable",g.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":179,_process:149}],177:[function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var c=e("buffer").Buffer,l=e("util").inspect,h=l&&l.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,r,n,i=c.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,r=i,n=o,c.prototype.copy.call(t,r,n),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:h,value:function(e,t){return l(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:20,util:18}],178:[function(e,t,r){(function(e){(function(){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,s){var o=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(s?s(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!s&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):s?(e.nextTick(n,o),s(t)):e.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:149}],179:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||i);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||h()},l=t._writableState&&t._writableState.finished,h=function(){a=!1,l=!0,o||s.call(t)},u=t._readableState&&t._readableState.endEmitted,p=function(){o=!1,u=!0,a||s.call(t)},d=function(e){s.call(t,e)},f=function(){var e;return o&&!u?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):a&&!l?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},g=function(){t.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",h),t.on("abort",f),t.req?g():t.on("request",g)),t.on("end",p),t.on("finish",h),!1!==r.error&&t.on("error",d),t.on("close",f),function(){t.removeListener("complete",h),t.removeListener("abort",f),t.removeListener("request",g),t.req&&t.req.removeListener("finish",h),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",h),t.removeListener("end",p),t.removeListener("error",d),t.removeListener("close",f)}}},{"../../../errors":170}],180:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],181:[function(e,t,r){var n;var i=e("../../../errors").codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function l(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var h,u=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new s("streams");var p=r.map((function(t,i){var s=i<r.length-1;return function(t,r,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var c=!1;return function(e){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new o("pipe"))}}(t,s,i>0,(function(e){h||(h=e),e&&p.forEach(c),s||(p.forEach(c),u(h))}))}));return r.reduce(l)}},{"../../../errors":170,"./end-of-stream":179}],182:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},{"../../../errors":170}],183:[function(e,t,r){t.exports=e("events").EventEmitter},{events:50}],184:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":171,"./lib/_stream_passthrough.js":172,"./lib/_stream_readable.js":173,"./lib/_stream_transform.js":174,"./lib/_stream_writable.js":175,"./lib/internal/streams/end-of-stream.js":179,"./lib/internal/streams/pipeline.js":181}],185:[function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=h,this.end=u,t=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":159}],186:[function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},c=0;function l(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new l(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new l(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=c++,n=!(arguments.length<2)&&o.call(arguments,1);return a[t]=!0,i((function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":149,timers:186}],187:[function(e,t,r){var n=e("punycode/");function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var s=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=e("qs");function b(e,t,r){if(e&&"object"==typeof e&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),o=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(o);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(o);if(b=b.trim(),!r&&1===e.split("#").length){var v=a.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var T=s.exec(b);if(T){var S=(T=T[0]).toLowerCase();this.protocol=S,b=b.substr(T.length)}if(r||T||b.match(/^\/\/[^@/]+@[^@/]+/)){var P="//"===b.substr(0,2);!P||T&&g[T]||(b=b.substr(2),this.slashes=!0)}if(!g[T]&&(P||T&&!m[T])){for(var w,A,E=-1,x=0;x<u.length;x++){-1!==(C=b.indexOf(u[x]))&&(-1===E||C<E)&&(E=C)}-1!==(A=-1===E?b.lastIndexOf("@"):b.lastIndexOf("@",E))&&(w=b.slice(0,A),b=b.slice(A+1),this.auth=decodeURIComponent(w)),E=-1;for(x=0;x<h.length;x++){var C;-1!==(C=b.indexOf(h[x]))&&(-1===E||C<E)&&(E=C)}-1===E&&(E=b.length),this.host=b.slice(0,E),b=b.slice(E),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var D=this.hostname.split(/\./),j=(x=0,D.length);x<j;x++){var k=D[x];if(k&&!k.match(p)){for(var N="",I=0,O=k.length;I<O;I++)k.charCodeAt(I)>127?N+="x":N+=k[I];if(!N.match(p)){var L=D.slice(0,x),M=D.slice(x+1),F=k.match(d);F&&(L.push(F[1]),M.unshift(F[2])),M.length&&(b="/"+M.join(".")+b),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=n.toASCII(this.hostname));var V=this.port?":"+this.port:"",_=this.hostname||"";this.host=_+V,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!f[S])for(x=0,j=l.length;x<j;x++){var B=l[x];if(-1!==b.indexOf(B)){var U=encodeURIComponent(B);U===B&&(U=escape(B)),b=b.split(B).join(U)}}var H=b.indexOf("#");-1!==H&&(this.hash=b.substr(H),b=b.slice(0,H));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),m[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){V=this.pathname||"";var J=this.search||"";this.path=V+J}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(s=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var o=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),o&&"?"!==o.charAt(0)&&(o="?"+o),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(o=o.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if("string"==typeof e){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),s=0;s<n.length;s++){var o=n[s];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),c=0;c<a.length;c++){var l=a[c];"protocol"!==l&&(r[l]=e[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var h=Object.keys(e),u=0;u<h.length;u++){var p=h[u];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var f=r.pathname||"",y=r.search||"";r.path=f+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),T=v||b||r.host&&e.pathname,S=T,P=r.pathname&&r.pathname.split("/")||[],w=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(w&&(r.hostname="",r.port=null,r.host&&(""===P[0]?P[0]=r.host:P.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),T=T&&(""===d[0]||""===P[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,P=d;else if(d.length)P||(P=[]),P.pop(),P=P.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search){if(w)r.host=P.shift(),r.hostname=r.host,(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!P.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=P.slice(-1)[0],E=(r.host||e.host||P.length>1)&&("."===A||".."===A)||""===A,x=0,C=P.length;C>=0;C--)"."===(A=P[C])?P.splice(C,1):".."===A?(P.splice(C,1),x++):x&&(P.splice(C,1),x--);if(!T&&!S)for(;x--;x)P.unshift("..");!T||""===P[0]||P[0]&&"/"===P[0].charAt(0)||P.unshift(""),E&&"/"!==P.join("/").substr(-1)&&P.push("");var R,D=""===P[0]||P[0]&&"/"===P[0].charAt(0);w&&(r.hostname=D?"":P.length?P.shift():"",r.host=r.hostname,(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname));return(T=T||r.host&&P.length)&&!D&&P.unshift(""),P.length>0?r.pathname=P.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},r.parse=b,r.resolve=function(e,t){return b(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},r.format=function(e){return"string"==typeof e&&(e=b(e)),e instanceof i?e.format():i.prototype.format.call(e)},r.Url=i},{"punycode/":150,qs:152}],188:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],189:[function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}},{}],190:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},{}],191:[function(e,t,r){t.exports={name:"pict",version:"1.0.310",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/**/*.js test/**/*.js",types:"tsc -p ."},types:"types/source/Pict.d.ts",mocha:{diff:!0,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.27.0","@types/jquery":"^3.5.32","@types/sinon":"^17.0.4",eslint:"^9.27.0",globals:"^16.2.0",quackage:"^1.0.42",sinon:"^20.0.0",typescript:"^5.8.3"},dependencies:{cachetrax:"^1.0.4",fable:"^3.1.23","pict-application":"^1.0.29","pict-provider":"^1.0.6","pict-template":"^1.0.13","pict-view":"^1.0.63"}}},{}],192:[function(e,t,r){t.exports=function(e,t){let r=void 0===t?0:t;e&&"object"==typeof e.default_configuration&&"pict_configuration"in e.default_configuration?window._Pict=new Pict(e.default_configuration.pict_configuration):window._Pict=new Pict,window._Pict.LogNoisiness=r;let n="DefaultApplication",i={};"default_configuration"in e&&(i=e.default_configuration,"Hash"in i&&"string"==typeof i.Hash&&(n=i.Hash)),_Pict.log.info("Loading the pict application [".concat(n,"] and associated views.")),_Pict.addApplication(n,i,e),_Pict.PictApplication.initializeAsync((function(e){e&&console.log("Error initializing the pict application: "+e),_Pict.log.info("Loading the Application and associated views.")}))}},{}],193:[function(e,t,r){t.exports=function(e){document?"loading"!=document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function(){e()})):document.attachEvent("onreadystatechange",(function(){"complete"==document.readyState&&e()})):console.log("No document object found; no initialization happening.")}},{}],194:[function(e,t,r){const n=e("fable").ServiceProviderBase,i="#PICT-CSS";t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.services,void 0===this.options.CSSElementAddress&&(this.options.CSSElementAddress=i),this.inlineCSSMap={}}addCSS(e,t,r,n){let i=void 0!==r?r:1e3,s="string"==typeof n?n:"Unknown";this.inlineCSSMap[e]={Hash:e,Content:t,Provider:s,Priority:i}}removeCSS(e){delete this.inlineCSSMap[e]}generateCSS(){let e="",t=Object.keys(this.inlineCSSMap);t.sort(((e,t)=>this.inlineCSSMap[e].Priority-this.inlineCSSMap[t].Priority));for(let r=0;r<t.length;r++){let n=this.inlineCSSMap[t[r]],i=n.Hash;n.Hash!=n.Provider&&(i="".concat(i," from ").concat(n.Provider)),e+="/* ".concat(i," */\n").concat(n.Content,"\n")}return e}injectCSS(){this.services.ContentAssignment.assignContent(this.options.CSSElementAddress,this.generateCSS())}}},{fable:68}],195:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.fable,this.serviceType="PictContentAssignment",this.manifest=e.newManyfest(),this.inBrowser=!1,this.hasDocument=!1,"object"==typeof window&&(this.inBrowser=!0,void 0!==window.document&&"function"==typeof window.document.querySelectorAll&&(this.hasDocument=!0)),this.hasJquery=!1,this.jQuery=!1,this.inBrowser&&void 0!==window.jQuery&&(this.hasJquery=!0),this.customAssignFunction=null,this.customPrependFunction=null,this.customAppendFunction=null,this.customInsertBeforeFunction=null,this.customInsertAfterFunction=null,this.customReadFunction=null,this.customGetElementFunction=null,this.customReadAttributeFunction=null,this.customSetAttributeFunction=null,this.customRemoveAttributeFunction=null,this.customReadClassFunction=null,this.customSetClassFunction=null,this.customRemoveClassFunction=null}getElement(e){if(this.customGetElementFunction)return this.customGetElementFunction(e);if(this.hasJquery){let t=window.jQuery(e);if(0==t.length)return[];let r=[];for(let e=0;e<t.length;e++)r.push(t[e]);return r}if(this.inBrowser&&this.hasDocument){const t=window.document.querySelectorAll(e);let r=[];for(let e=0;e<t.length;e++)r.push(t[e]);return r}return this.log.trace("PICT Content GET ELEMENT for [".concat(e,"] will return empty because none of the browser methods are available")),[]}assignContent(e,t){if(this.customAssignFunction)return this.customAssignFunction(e,t);if(this.hasJquery){const r=window.jQuery(e);for(let e=0;e<r.length;e++){const n=r[e];switch(n.tagName){case"INPUT":n instanceof HTMLInputElement&&"checkbox"==n.type&&(n.checked=Boolean(t));case"SELECT":case"TEXTAREA":(n instanceof HTMLInputElement||n instanceof HTMLSelectElement||n instanceof HTMLTextAreaElement)&&(n.value=String(t));break;case"SCRIPT":n instanceof HTMLScriptElement&&(n.text=String(t));break;default:n.innerHTML=String(t)}}}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++){const n=r[e];switch(r[e].tagName){case"INPUT":n instanceof HTMLInputElement&&"checkbox"==n.type&&(n.checked=Boolean(t));case"SELECT":case"TEXTAREA":(n instanceof HTMLInputElement||n instanceof HTMLSelectElement||n instanceof HTMLTextAreaElement)&&(n.value=String(t));break;case"SCRIPT":n instanceof HTMLScriptElement&&(n.text=String(t));break;default:n.innerHTML=String(t)}}}else this.log.trace("PICT Content ASSIGN to [".concat(e,"]:"),t)}appendContent(e,t){if(this.customAppendFunction)return this.customAppendFunction(e,t);if(this.hasJquery){window.jQuery(e).append(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("beforeend",t)}else this.log.trace("PICT Content APPEND to [".concat(e,"]:"),t)}insertContentBefore(e,t){if(this.customInsertBeforeFunction)return this.customInsertBeforeFunction(e,t);if(this.hasJquery)window.jQuery(t).insertBefore(e);else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("beforebegin",t)}else this.log.trace("PICT Content INSERT BEFORE [".concat(e,"]:"),t)}insertContentAfter(e,t){if(this.customInsertAfterFunction)return this.customInsertAfterFunction(e,t);if(this.hasJquery)window.jQuery(t).insertAfter(e);else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("afterend",t)}else this.log.trace("PICT Content INSERT AFTER [".concat(e,"]:"),t)}prependContent(e,t){if(this.customAppendFunction)return this.customPrependFunction(e,t);if(this.hasJquery){window.jQuery(e).prepend(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("afterbegin",t)}else this.log.trace("PICT Content PREPEND in [".concat(e,"]:"),t)}projectContent(e,t,r,n){switch(e){case"virtual-assignment":return this.manifest.setValueByHash(this.fable,t,r);case"append":return this.appendContent(t,r);case"prepend":return this.prependContent(t,r);case"append_once":{let e="string"==typeof n?n:t;if(this.getElement(e).length<1)return this.appendContent(t,r);break}default:return this.assignContent(t,r)}}readContent(e){if(this.customReadFunction)return this.customReadFunction(e);if(this.hasJquery){const t=window.jQuery(e);switch(t.prop("tagName")){case"INPUT":if("checkbox"==t.attr("type"))return t.prop("checked");case"SELECT":case"TEXTAREA":return t.val();case"SCRIPT":return t.text();default:return t.html()}}else{if(!this.inBrowser||!this.hasDocument)return this.log.trace("PICT Content READ from [".concat(e,"]...")),"";{let t="string"==typeof e?window.document.querySelectorAll(e):[e];if(t.length<1)return null;if(1==t.length){const e=t[0];switch(e.tagName){case"INPUT":if(e instanceof HTMLInputElement&&"checkbox"==e.type)return e.checked;case"SELECT":case"TEXTAREA":if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return e.value;case"SCRIPT":if(e instanceof HTMLScriptElement)return e.text;default:return e.innerHTML}}}}}addClass(e,t){if(this.customSetClassFunction)return this.customSetClassFunction(e,t);if(this.hasJquery){window.jQuery(e).addClass(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(Array.isArray(t))for(const n of t)r[e].classList.add(n);else r[e].classList.add(t)}else this.log.trace("PICT Content ADDCLASS to [".concat(e,"]:"),t)}removeClass(e,t){if(this.customRemoveClassFunction)return this.customRemoveClassFunction(e,t);if(this.hasJquery){window.jQuery(e).removeClass(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(Array.isArray(t))for(const n of t)r[e].classList.remove(n);else r[e].classList.remove(t)}else this.log.trace("PICT Content REMOVECLASS from [".concat(e,"]:"),t)}readAttribute(e,t){if(this.customReadAttributeFunction)return this.customReadAttributeFunction(e,t);if(this.hasJquery){return window.jQuery(e).attr(t)}if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].getAttribute(t);return r}this.log.trace("PICT Content READATTRIBUTE from [".concat(e,"]:"),t)}setAttribute(e,t,r){if(this.customSetAttributeFunction)return this.customSetAttributeFunction(e,t,r);if(this.hasJquery){window.jQuery(e).attr(t,r)}else if(this.inBrowser&&this.hasDocument){const n="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<n.length;e++)n[e].setAttribute(t,r)}else this.log.trace("PICT Content SETATTRIBUTE for [".concat(e,"] ATTRIBUTE [").concat(t,"]:"),r)}removeAttribute(e,t){if(this.customRemoveAttributeFunction)return this.customRemoveAttributeFunction(e,t);if(this.hasJquery){window.jQuery(e).removeAttr(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].removeAttribute(t)}else this.log.trace("PICT Content REMOVEATTRIBUTE for [".concat(e,"] ATTRIBUTE [").concat(t,"]"))}hasClass(e,t){if(this.customReadClassFunction)return this.customReadClassFunction(e,t);if(this.hasJquery){return window.jQuery(e).hasClass(t)}if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(r[e].classList.contains(t))return!0;return!1}return this.log.trace("PICT Content HASCLASS for [".concat(e,"] CLASS [").concat(t,"]:")),!1}}},{fable:68}],196:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.fable,this.serviceType="PictDataProvider"}getDataByAddress(e,t){let r=void 0===t?{}:t;const n={Fable:this.fable,Pict:this.fable,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Record:r};return this.fable.manifest.getValueByHash(n,e)}}},{fable:68}],197:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){var n;super(e,t,r),this.options,this.fable,this.log,this.serviceType="PictMeadowProvider",this.fable.settings.PictDefaultURLPrefix?this.options.urlPrefix=this.fable.settings.PictDefaultURLPrefix:this.options.urlPrefix||(this.options.urlPrefix="/1.0/"),this.options.downloadBatchSize||("number"==typeof this.fable.settings.PictDefaultDownloadBatchSize?this.options.downloadBatchSize=this.fable.settings.PictDefaultDownloadBatchSize:this.options.downloadBatchSize=100),this.restClient=null!==(n=this.fable.RestClient)&&void 0!==n?n:this.fable.instantiateServiceProviderWithoutRegistration("RestClient"),this.recordCache={},this.recordSetCache={},this.prepareRequestOptions=e=>e}initializeCache(e){e in this.recordCache||(this.recordCache[e]=this.fable.instantiateServiceProviderWithoutRegistration("ObjectCache"),this.recordCache[e].maxAge=3e4,this.recordCache[e].maxLength=1e4,this.fable.Bundle[e]=this.recordCache[e].RecordMap),e in this.recordSetCache||(this.recordSetCache[e]=this.fable.instantiateServiceProviderWithoutRegistration("ObjectCache"),this.recordSetCache[e].maxAge=1e4,this.recordSetCache[e].maxLength=100)}gatherEntitySetCount(e,t,r){return e.CountOnly=!0,this.gatherEntitySet(e,t,r)}gatherEntitySet(e,t,r){if(!("Entity"in e)||"string"!=typeof e.Entity)return this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain an Entity string."),r();if(!("Destination"in e)||"string"!=typeof e.Destination)return this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain a Destination string."),r();"Filter"in e&&"string"==typeof e.Filter||(e.Filter=""),"FilterData"in e&&"object"==typeof e.FilterData||(e.FilterData={}),t.StepData=e.FilterData,"RecordStartCursor"in e&&"number"==typeof e.RecordStartCursor||(e.RecordStartCursor=0),"PageSize"in e&&"number"==typeof e.PageSize||(e.PageSize=1e4),"AllRecords"in e&&"boolean"==typeof e.AllRecords||(e.AllRecords=!1);let n=null,i=null;e.PageSize&&(n=e.RecordStartCursor,i=e.PageSize);const s=this.fable.parseTemplate(e.Filter,t),o=(o,a)=>o?(this.log.error("EntityBundleRequest request Error getting entity set for [".concat(e.Entity,"] with filter [").concat(s,"]: ").concat(o),o),r(o,"")):(e.CountOnly?(this.log.trace("EntityBundleRequest counted ".concat(a," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(i,"]"))),this.fable.manifest.setValueByHash(t,e.Destination,a)):e.SingleRecord?(this.log.trace("EntityBundleRequest found ".concat(a.length," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(i,"]"))),a.length>1&&this.log.warn("EntityBundleRequest found more than one record for ".concat(e.Entity," filtered to [").concat(s,"] but SingleRecord is true; setting the first record.")),a.length<1&&this.fable.manifest.setValueByHash(t,e.Destination,!1),this.fable.manifest.setValueByHash(t,e.Destination,a[0])):(this.log.trace("EntityBundleRequest found ".concat(a.length," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(i,"]"))),this.fable.manifest.setValueByHash(t,e.Destination,a)),r());e.CountOnly?this.getEntitySetRecordCount(e.Entity,s,o):i&&!e.AllRecords?this.getEntitySetPage(e.Entity,s,n,i,o):this.getEntitySet(e.Entity,s,o)}mapJoinSingleDestination(e,t,r){const n=this.fable.manifest.getValueByHash(r,t.JoinRecordSetAddress);if(!Array.isArray(n))throw new Error("EntityBundleRequest failed to map join because the source [".concat(t.JoinRecordSetAddress,"] did not return an array."));const i={};for(const e of n){i[e[t.JoinValue]]=e}for(const r of n)if(r)if(t.BucketBy||t.BucketByTemplate){const n=[];if(t.BucketBy){const e=Array.isArray(t.BucketBy)?t.BucketBy:[t.BucketBy];for(const t of e){const e=this.fable.manifest.getValueByHash(r,t);n.push(e)}}else{const e=Array.isArray(t.BucketByTemplate)?t.BucketByTemplate:[t.BucketByTemplate];for(const t of e){const e=this.fable.parseTemplate(t,r);e&&n.push(e)}}if(n.length<1)this.fable.LogNoisiness>0&&this.log.warn("EntityBundleRequest failed to map join because no bucket values were found.",{pCustomRequestInformation:t,tmpSourceEntity:r});else{const i="".concat(t.RecordDestinationAddress,".").concat(n.join("."));if(t.SingleRecord)this.fable.manifest.setValueByHash(e,i,r);else{let t=this.fable.manifest.getValueByHash(e,i,r);t||(t=[],this.fable.manifest.setValueByHash(e,i,t)),t.push(r)}}}else t.SingleRecord?(e[t.RecordDestinationAddress]&&this.fable.LogNoisiness>1&&this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(t.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord.")),e[t.RecordDestinationAddress]=r):(e[t.RecordDestinationAddress]=e[t.RecordDestinationAddress]||[],e[t.RecordDestinationAddress].push(r));else this.log.error("EntityBundleRequest failed to map join because the source entity was not found in the source lookup.");return[e]}mapJoin(e,t){const r=e.DestinationRecordAddress?this.fable.manifest.getValueByHash(t,e.DestinationRecordAddress):null,n=e.DestinationRecordSetAddress?this.fable.manifest.getValueByHash(t,e.DestinationRecordSetAddress):null;if(!Array.isArray(n)&&!r)throw new Error("EntityBundleRequest failed to map join because the destination [".concat(e.DestinationRecordSetAddress,"] did not return an array."));if(r)return this.mapJoinSingleDestination(r,e,t);const i=this.fable.manifest.getValueByHash(t,e.Joins);if(!Array.isArray(i))throw new Error("EntityBundleRequest failed to map join because the join [".concat(e.Joins,"] did not return an array."));const s=this.fable.manifest.getValueByHash(t,e.JoinRecordSetAddress);if(!Array.isArray(s))throw new Error("EntityBundleRequest failed to map join because the source [".concat(e.JoinRecordSetAddress,"] did not return an array."));const o=e.JoinJoinValueLHS||e.DestinationJoinValue,a=e.JoinJoinValueRHS||e.JoinValue,c={},l={},h={};for(const t of n||[]){c[t[e.DestinationJoinValue]]=t}for(const t of s){l[t[e.JoinValue]]=t}for(const e of i){const t=e[o],r=e[a];h[t]=h[t]||new Set,h[t].add(r)}for(const t of Object.keys(h)){const r=Array.from(h[t]),n=c[t];if(n)for(const t of r){const r=l[t];if(r)if(e.BucketBy||e.BucketByTemplate){const t=[];if(e.BucketBy){const n=Array.isArray(e.BucketBy)?e.BucketBy:[e.BucketBy];for(const e of n){const n=this.fable.manifest.getValueByHash(r,e);t.push(n)}}else{const n=Array.isArray(e.BucketByTemplate)?e.BucketByTemplate:[e.BucketByTemplate];for(const e of n){const n=this.fable.parseTemplate(e,r);t.push(n)}}n[e.RecordDestinationAddress]||(n[e.RecordDestinationAddress]={});const i="".concat(e.RecordDestinationAddress,".").concat(t.join("."));if(e.SingleRecord)this.fable.manifest.setValueByHash(n,i,r);else{let e=this.fable.manifest.getValueByHash(n,i,r);e||(e=[],this.fable.manifest.setValueByHash(n,i,e)),e.push(r)}}else e.SingleRecord?(n[e.RecordDestinationAddress]&&this.fable.LogNoisiness>1&&this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(e.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord.")),n[e.RecordDestinationAddress]=r):(n[e.RecordDestinationAddress]=n[e.RecordDestinationAddress]||[],n[e.RecordDestinationAddress].push(r));else this.log.error("EntityBundleRequest failed to map join because the RHS join value [".concat(t,"] was not found in the source lookup."))}else this.log.error("EntityBundleRequest failed to map join because the LHS join value [".concat(t,"] was not found in the destination lookup."))}return n}projectDataset(e,t){let r=this.fable.manifest.getValueByHash(t,e.InputRecordsetAddress);if(null==typeof r||"object"!=typeof r)throw new Error("EntityBundleRequest failed to project dataset because the input recordset [".concat(e.InputRecordsetAddress,"] did not return an valid object."));Array.isArray(r)||(r=[r]);let n=this.fable.manifest.getValueByHash(t,e.OutputRecordsetAddress);n||(n=[],this.fable.manifest.setValueByHash(t,e.OutputRecordsetAddress,n));for(const i of r){let r,s=n;"object"==typeof e.OutputRecordsetAddressMapping&&(r=this._resolveOutputRecordsetAddressMapping(e,t,i),r&&(s=this.fable.manifest.getValueByHash(t,r),s||(s=[],this.fable.manifest.setValueByHash(t,r,s))),s&&Array.isArray(s)||(s=n));const o=this.fable.parseTemplate(e.RecordPrototypeAddress,Object.assign({InputRecord:i},t)),a=this.fable.manifest.getValueByHash(Object.assign({InputRecord:i,OutputRecordset:s},t),o);let c={};Array.isArray(a)&&a.length>0?c=a[0]:s.push(c);let l=e.RecordFieldMapping[r]||e.RecordFieldMapping.Default;if(l||(l=e.RecordFieldMapping[Object.keys(e.RecordFieldMapping)[0]]),!l)throw new Error("EntityBundleRequest failed to project dataset because the record field mapping for [".concat(r,"] did not return a mapping."));for(const e of Object.keys(l)){const r=l[e],n=this.fable.manifest.getValueByHash(Object.assign({InputRecord:i},t),e);this.fable.manifest.setValueByHash(Object.assign({OutputRecord:c},t),r,n)}}}_resolveOutputRecordsetAddressMapping(e,t,r){const n=Object.assign({InputRecord:r},t);for(const t of Object.keys(e.OutputRecordsetAddressMapping)){const[r,i,s]=t.split(","),o=this.fable.manifest.getValueByHash(n,r);if(o){if("AnyContains"===i){if(!Array.isArray(o)){this.log.error("EntityBundleRequest failed to project dataset because the LHS address [".concat(r,"] did not return an array."));continue}for(const r of o)if(String(r).includes(s))return e.OutputRecordsetAddressMapping[t]}}else this.fable.LogNoisiness>0&&this.log.warn("EntityBundleRequest failed to project dataset because the LHS address [".concat(r,"] did not return a value."))}return null}gatherCustomDataSet(e,t,r){if(!("URL"in e)||"string"!=typeof e.URL)return this.log.warn("EntityBundleRequest failed to parse custom data request because the stanza did not contain a URL string."),r();"URLData"in e&&"object"==typeof e.URLData||(e.URLData={}),t.StepData=e.URLData;const n=this.fable.parseTemplate(e.URL,t);""==n&&this.log.warn("EntityBundleRequest failed to parse custom data request because the entity Filter did not return a string for FilterBy");let i="";const s=!!e.Host&&e.Host,o=e.Protocol?e.Protocol:"https",a=!!e.Port&&e.Port;s?(i="".concat(o,"://").concat(s),a&&(i+=":".concat(a))):i=this.fable.EntityProvider.options.urlPrefix;let c={url:"".concat(i).concat(n)};return c=this.fable.EntityProvider.prepareRequestOptions(c),this.fable.EntityProvider.restClient.getJSON(c,((i,s,o)=>i?(this.log.error("EntityBundleRequest request Error getting data set for [".concat(e.Entity,"] with filter [").concat(n,"]: ").concat(i),i),r(i,"")):(this.log.trace("EntityBundleRequest completed request for ".concat(e.Entity," filtered to [").concat(n,"]")),e.Destination&&this.fable.manifest.setValueByHash(t,e.Destination,o),r())))}processBundle(e){if(!Array.isArray(e))throw this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."),new Error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");const t=[];let r={};for(const n of e)try{switch(n.Type){case"SetStateAddress":t.push(r),r=this.fable.manifest.getValueByHash(this.fable,n.StateAddress),void 0===r&&(r={},this.fable.manifest.setValueByHash(this.fable,n.StateAddress,r));break;case"PopState":t.length>0?r=t.pop():this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress.");break;case"MapJoin":this.mapJoin(n,this.prepareState(r,n));break;case"ProjectDataset":this.projectDataset(n,this.prepareState(r,n));break;default:this.log.error("EntityBundleRequest encountered an unsupported type [".concat(n.Type,"] in the entity bundle description."))}}catch(e){this.log.error("EntityBundleRequest error gathering entity set: ".concat(e),{Stack:e.stack})}}gatherDataFromServer(e,t){if(!Array.isArray(e))return this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."),t(new Error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."));let r=this.fable.newAnticipate();const n=[];let i={};for(let t=0;t<e.length;t++){let s=e[t];r.anticipate((e=>{try{switch(s.Type){case"SetStateAddress":return n.push(i),i=this.fable.manifest.getValueByHash(this.fable,s.StateAddress),void 0===i&&(i={},this.fable.manifest.setValueByHash(this.fable,s.StateAddress,i)),e();case"PopState":return n.length>0?i=n.pop():this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress."),e();case"Custom":return this.gatherCustomDataSet(s,this.prepareState(i,s),e);case"MapJoin":return this.mapJoin(s,this.prepareState(i,s)),e();case"ProjectDataset":return this.projectDataset(s,this.prepareState(i,s)),e();case"MeadowEntityCount":return this.gatherEntitySetCount(s,this.prepareState(i,s),e);default:return this.gatherEntitySet(s,this.prepareState(i,s),e)}}catch(t){return this.log.error("EntityBundleRequest error gathering entity set: ".concat(t),{Stack:t.stack}),e()}}))}r.wait((e=>e?(this.log.error("EntityBundleRequest error gathering entity set: ".concat(e),{Stack:e.stack}),t(e)):t()))}prepareState(e,t){return{State:e,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Pict:this.fable,Fable:this.fable,StepConfiguration:t}}getEntity(e,t,r){this.initializeCache(e),this.recordCache[e].prune(function(){let n=this.recordCache[e].read(t);if(n)return r(null,n);let i={url:"".concat(this.options.urlPrefix).concat(e,"/").concat(t)};return i=this.prepareRequestOptions(i),this.restClient.getJSON(i,((n,i,s)=>(s&&this.recordCache[e].put(s,t),r(n,s))))}.bind(this))}getEntitySetPage(e,t,r,n,i){const s=t?"/FilteredTo/".concat(t):"",o="".concat(this.options.urlPrefix).concat(e,"s").concat(s,"/").concat(r,"/").concat(n);return this.restClient.getJSON(o,function(s,a,c){return a&&a.statusCode&&a.statusCode>=400?(this.log.error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] [").concat(r,"/").concat(n,"] from url [").concat(o,"]: ").concat(a.statusCode," ").concat(a.statusMessage)),i(new Error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] [").concat(r,"/").concat(n,"] from url [").concat(o,"]: ").concat(a.statusCode," ").concat(JSON.stringify(c||{}))))):i(s,c)}.bind(this))}getEntitySetRecordCount(e,t,r){const n=t?"/FilteredTo/".concat(t):"",i="".concat(this.options.urlPrefix).concat(e,"s/Count").concat(n);return this.restClient.getJSON(i,function(n,s,o){if(s&&s.statusCode&&s.statusCode>=400)return this.log.error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(s.statusCode," ").concat(s.statusMessage)),r(new Error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(s.statusCode," ").concat(JSON.stringify(o||{}))));if(n)return this.log.error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(n)),r(n);let a=0;return o.Count&&(a=o.Count),r(n,a)}.bind(this))}getEntitySet(e,t,r){this.initializeCache(e),this.recordSetCache[e].prune(function(){let n=this.recordSetCache[e].read(t);return n?r(null,n):this.getEntitySetRecordCount(e,t,((n,i)=>{if(n)return r(n);let s=i;if(isNaN(i))return this.log.error("Entity count did not return a number for [".concat(e,"] filtered to [").concat(t,"]... something is fatally wrong from the server accessed in getEntitySet call.")),r(new Error("Entity count did not return a number in getEntitySet."));let o=[],a=this.options.downloadBatchSize;const c=t?"/FilteredTo/".concat(t):"";for(let t=0;t<s/a;t++)o.push("".concat(this.options.urlPrefix).concat(e,"s").concat(c,"/").concat(t*a,"/").concat(a));let l=[];this.fable.Utility.eachLimit(o,1,((r,n)=>{this.restClient.getJSON(r,((i,s,o)=>s&&s.statusCode&&s.statusCode>=400?(this.log.error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(r,"]: ").concat(s.statusCode," ").concat(s.statusMessage)),n(new Error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(r,"]: ").concat(s.statusCode," ").concat(JSON.stringify(o||{}))))):(l=l.concat(o),n(i))))}),(n=>(l&&this.recordSetCache[e].put(l,t),r(n,l))))}))}.bind(this))}}},{fable:68}],198:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.UUID,this.Hash,this.serviceType="PictTemplateProvider",this.templates={},this.templateSources={},this.defaultTemplates=[],this.loadTemplateFunction=()=>null}addTemplate(e,t,r){this.templates[e]=t,this.templateSources[e]="string"==typeof r?r:"Direct addTemplate('".concat(e,"') function load into PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"]")}addDefaultTemplate(e,t,r,n){let i={prefix:e,postfix:t,template:r,source:"string"==typeof n?n:"Direct addDefaultTemplate('".concat(e,"','").concat(t,"',..) function load into PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"]")};"string"!=typeof r&&this.log.error("PictTemplateProvider.addDefaultTemplate: pTemplate is not a string."),this.defaultTemplates.push(i)}checkDefaultTemplateHash(e){for(let t=0;t<this.defaultTemplates.length;t++)if(e.indexOf(this.defaultTemplates[t].postfix)==e.length-this.defaultTemplates[t].postfix.length&&0==e.indexOf(this.defaultTemplates[t].prefix))return this.templates[e]=this.defaultTemplates[t].template,this.templateSources[e]="Auto created in checkDefaultTemplateHash('".concat(e,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(this.defaultTemplates[t].prefix,"]...[").concat(this.defaultTemplates[t].postfix,"]"),this.templates[e];return null}getTemplate(e){return e in this.templates||this.loadTemplate(e),e in this.templates||this.checkDefaultTemplateHash(e),e in this.templates?this.templates[e]:null}loadTemplate(e){let t=this.loadTemplateFunction(e);return t&&(this.templates[e]=t.template,this.templateSources[e]="Loaded in loadTemplate('".concat(e,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(t.source,"]")),t}}},{fable:68}],199:[function(e,t,r){const n=e("./services/Fable-Service-TransactionTracking.js"),i=e("fable"),s=e("../package.json"),o=e("./providers/Provider-Filter-Manager.js"),a=e("./providers/Provider-DataBroker.js"),c=e("./Pict-Template-Provider.js"),l=e("./Pict-Content-Assignment.js"),h=e("./Pict-DataProvider.js"),u=e("./Pict-CSS.js"),p=e("./Pict-Meadow-EntityProvider.js");t.exports=class extends i{constructor(t){super(t),this.settings,this.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}"),this._PackageFable=this._Package,this._Package=s,this.browserAddress="window._Pict","BrowserAddress"in this.settings&&(this.browserAddress=this.settings.BrowserAddress),this.children=[],this.PictApplication=null,this.log,this.instantiateServiceProvider("RestClient"),this.TemplateProvider=null,this.addAndInstantiateServiceType("TemplateProvider",c),this.EntityProvider=null,this.addAndInstantiateServiceType("EntityProvider",p),this.DataProvider=null,this.addAndInstantiateServiceType("DataProvider",h),this.addServiceTypeIfNotExists("TransactionTracking",n),this.ContentAssignment=null,this.addAndInstantiateServiceType("ContentAssignment",l),this.CSSMap=null,this.addAndInstantiateServiceType("CSSMap",u),this.addServiceType("PictTemplate",e("pict-template")),this.instantiateServiceProvider("MetaTemplate"),this.instantiateServiceProvider("DataGeneration"),this.manifest=this.instantiateServiceProvider("Manifest"),this.AppData={},"DefaultAppData"in this.fable.settings&&(this.AppData=this.fable.settings.DefaultAppData),this.Bundle={},"DefaultBundle"in this.fable.settings&&(this.Bundle=this.fable.settings.DefaultBundle),this.LogNoisiness=0,this.LogControlFlow=!1,this.LogControlFlowWatchAddressList=[],this.settings.Manifests&&this.loadManifestSet(this.settings.Manifests),this._DefaultPictTemplatesInitialized=!1,this.initializePictTemplateEngine(),this.addServiceType("PictView",e("pict-view")),this.addServiceType("PictProvider",e("pict-provider")),this.addServiceType("PictApplication",e("pict-application")),this.providers=this.servicesMap.PictProvider,this.views=this.servicesMap.PictView,this.addProvider("FilterManager",{},o),this.addProvider("DataBroker",{},a)}loadManifestSet(e){if("object"!=typeof e)return void this.log.warn("PICT [".concat(this.UUID,"] could not load Manifest Set; pManifestSet was not an object."));let t=Object.keys(e);if(t.length>0)for(let r=0;r<t.length;r++){let n=t[r];this.instantiateServiceProvider("Manifest",e[n],n)}}addTemplate(e){if("function"!=typeof e)return this.log.warn("PICT [".concat(this.UUID,"] could not add Template; pTemplatePrototype was not a class it was ").concat(typeof e,".")),null;let t=e.template_hash;return this.LogNoisiness>1&&this.log.info("PICT-ControlFlow addTemplate [".concat(t,"]")),this.instantiateServiceProviderFromPrototype("PictTemplate",{},t,e)}addView(e,t,r){let n="object"==typeof t?t:{},i="string"==typeof e?e:this.fable.getUUID(),s=r;if(this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addView [".concat(i,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addView [".concat(i,"]"))),s){const e=s.default_configuration;return e&&(n=this.fable.Utility.extend({},JSON.parse(JSON.stringify(e)),n)),this.instantiateServiceProviderFromPrototype("PictView",n,i,s)}return this.instantiateServiceProvider("PictView",n,i)}addProviderSingleton(e,t,r){return e in this.providers?this.providers[e]:this.addProvider(e,t,r)}newTransactionTracker(){return this.instantiateServiceProviderWithoutRegistration("TransactionTracking")}addProvider(e,t,r){let n="object"==typeof t?t:{},i="string"==typeof e?e:this.fable.getUUID();return this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addProvider [".concat(i,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addProvider [".concat(i,"]"))),void 0!==r?("default_configuration"in r&&(n=this.fable.Utility.extend({},r.default_configuration,n)),this.instantiateServiceProviderFromPrototype("PictProvider",n,i,r)):this.instantiateServiceProvider("PictProvider",n,i)}addApplication(e,t,r){let n="object"==typeof t?t:{},i="string"==typeof e?e:this.fable.getUUID();return this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addApplication [".concat(i,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addApplication [".concat(i,"]"))),void 0!==r?("default_configuration"in r&&(n=this.fable.Utility.extend({},r.default_configuration,n)),this.instantiateServiceProviderFromPrototype("PictApplication",n,i,r)):this.instantiateServiceProvider("PictApplication",n,i)}initializePictTemplateEngine(){this._DefaultPictTemplatesInitialized||(this.addTemplate(e("./templates/Pict-Template-Data.js")),this.addTemplate(e("./templates/Pict-Template-DataWithTemplateFallback.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByReference.js")),this.addTemplate(e("./templates/Pict-Template-TemplateFromAddress.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByTypes.js")),this.addTemplate(e("./templates/Pict-Template-DataValueByKey.js")),this.addTemplate(e("./templates/Pict-Template-View.js")),this.addTemplate(e("./templates/data/Pict-Template-DataEncodeJavascriptString.js")),this.addTemplate(e("./templates/data/Pict-Template-HtmlCommentStart.js")),this.addTemplate(e("./templates/data/Pict-Template-HtmlCommentEnd.js")),this.addTemplate(e("./templates/Pict-Template-Self.js")),this.addTemplate(e("./templates/Pict-Template-Entity.js")),this.addTemplate(e("./templates/Pict-Template-Template.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByDataAddress.js")),this.addTemplate(e("./templates/Pict-Template-SolveByReference.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSet.js")),this.addTemplate(e("./templates/Pict-Template-TemplateValueSet.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSetWithPayload.js")),this.addTemplate(e("./templates/Pict-Template-TemplateFromMap.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSetFromMap.js")),this.addTemplate(e("./templates/logic/Pict-Template-TemplateIf.js")),this.addTemplate(e("./templates/logic/Pict-Template-TemplateIfAbsolute.js")),this.addTemplate(e("./templates/logic/Pict-Template-NotEmpty.js")),this.addTemplate(e("./templates/data/Pict-Template-DataJson.js")),this.addTemplate(e("./templates/data/Pict-Template-PascalCaseIdentifier.js")),this.addTemplate(e("./templates/data/Pict-Template-DateOnlyFormat.js")),this.addTemplate(e("./templates/data/Pict-Template-DateOnlyYMD.js")),this.addTemplate(e("./templates/data/Pict-Template-DateTimeFormat.js")),this.addTemplate(e("./templates/data/Pict-Template-DateTimeYMD.js")),this.addTemplate(e("./templates/data/Pict-Template-Digits.js")),this.addTemplate(e("./templates/data/Pict-Template-Dollars.js")),this.addTemplate(e("./templates/data/Pict-Template-Join.js")),this.addTemplate(e("./templates/data/Pict-Template-JoinUnique.js")),this.addTemplate(e("./templates/data/Pict-Template-PluckJoinUnique.js")),this.addTemplate(e("./templates/data-generation/Pict-Template-RandomNumber.js")),this.addTemplate(e("./templates/data-generation/Pict-Template-RandomNumberString.js")),this.addTemplate(e("./templates/debugging/Pict-Template-Breakpoint.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogStatement.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogValue.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogValueTree.js")),this.addTemplate(e("./templates/debugging/Pict-Template-DataValueTree.js")),this._DefaultPictTemplatesInitialized=!0)}resolveStateFromAddress(e,t,r,n,i,s){let o=Array.isArray(r)?r:[this],a=i||this,c="object"==typeof n&&null!=n?n:{};return c.Fable=this,c.Pict=this,c.AppData=this.AppData,c.Bundle=this.Bundle,c.Context=o,c.Record=t,c.Scope=a,c.__State=s,this.manifest.getValueByHash(c,e)}setStateValueAtAddress(e,t,r,n,i){let s=Array.isArray(n)?n:[this],o=i||this;const a={Fable:this.fable,Pict:this,AppData:this.AppData,Bundle:this.Bundle,Context:s,Record:t,Scope:o};return this.manifest.setValueByHash(a,e,r)}parseTemplate(e,t,r,n,i,s){let o,a="object"==typeof t?t:{},c=Array.isArray(n)?n:[this],l=i||this;if(this.LogControlFlow&&(o=this.fable.getUUID(),this.log.info("PICT-ControlFlow parseTemplate ".concat(o," [").concat(e.substring(0,50).replace("\n","\\n"),"...").concat(e.length,"] (fCallback: ").concat(typeof r,") with data size [").concat(JSON.stringify(a).length,"]")),this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," template:\n").concat(e)),this.LogControlFlowWatchAddressList.length>0))for(let e=0;e<this.LogControlFlowWatchAddressList.length;e++)this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Watch Value: [").concat(this.LogControlFlowWatchAddressList[e],"]=>[").concat(this.resolveStateFromAddress(this.LogControlFlowWatchAddressList[e],a),"]"));if("function"!=typeof r){let t=this.MetaTemplate.parseString(e,a,null,c,l,s);return this.LogControlFlow&&this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Template Return Value:\n").concat(t)),t}this.MetaTemplate.parseString(e,a,((e,t)=>(this.LogControlFlow&&this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Template Async Return Value:\n").concat(t)),r(e,t))),c,l,s)}parseTemplateByHash(e,t,r,n,i,s){let o=this.TemplateProvider.getTemplate(e);return o||(o=""),this.parseTemplate(o,t,r,n,i,s)}parseTemplateSet(e,t,r,n,i,s){let o="";if("function"!=typeof r){if(Array.isArray(t)||"object"==typeof t){if(Array.isArray(t))for(let r=0;r<t.length;r++)o+=this.parseTemplate(e,t[r],null,n,i,s);else{let r=Object.keys(t);for(let a=0;a<r.length;a++)o+=this.parseTemplate(e,t[r[a]],null,n,i,s)}return o}return""}if(!Array.isArray(t)&&"object"!=typeof t)return r(Error("Pict: Template Set: pDataSet is not an array or object."),"");this.Utility.eachLimit(t,1,((t,r)=>this.parseTemplate(e,t,((e,t)=>(o+=t,r())),n,i,s)),(e=>r(e,o)))}parseTemplateSetByHash(e,t,r,n,i,s){let o=this.TemplateProvider.getTemplate(e);return o||(o=""),this.parseTemplateSet(o,t,r,n,i,s)}parseTemplateSetWithPayload(e,t,r,n,i,s,o){let a="";if("function"!=typeof n){if(Array.isArray(t)||"object"==typeof t){if(Array.isArray(t))for(let n=0;n<t.length;n++)a+=this.parseTemplate(e,{Data:t[n],Payload:r},null,i,s,o);else{let n=Object.keys(t);for(let c=0;c<n.length;c++)a+=this.parseTemplate(e,{Data:t[n[c]],Payload:r},null,i,s,o)}return a}return""}if(!Array.isArray(t)&&"object"!=typeof t)return n(Error("Pict: Template Set: pDataSet is not an array or object."),"");this.Utility.eachLimit(t,1,((t,n)=>this.parseTemplate(e,{Data:t,Payload:r},((e,t)=>(a+=t,n())),i,s,o)),(e=>n(e,a)))}parseTemplateSetWithPayloadByHash(e,t,r,n,i,s,o){let a=this.TemplateProvider.getTemplate(e);return a||(a=""),this.parseTemplateSetWithPayload(a,t,r,n,i,s,o)}},t.exports.PictApplicationClass=e("pict-application"),t.exports.PictViewClass=e("pict-view"),t.exports.PictProviderClass=e("pict-provider"),t.exports.PictTemplateClass=e("pict-template"),t.exports.EnvironmentLog=e("./environments/Pict-Environment-Log.js"),t.exports.EnvironmentObject=e("./environments/Pict-Environment-Object.js"),t.exports.FilterClauseBase=e("./filters/FilterClauseBase.js"),t.exports.FilterClauseLocal=e("./filters/FilterClauseLocal.js"),t.exports.FilterClauseInternalJoin=e("./filters/FilterClauseInternalJoin.js"),t.exports.FilterClauseExternalJoin=e("./filters/FilterClauseExternalJoin.js"),t.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}"),t.exports.safeOnDocumentReady=e("./Pict-Browser-SafeOnDocumentReady.js"),t.exports.safeLoadPictApplication=e("./Pict-Browser-SafeLoad.js")},{"../package.json":191,"./Pict-Browser-SafeLoad.js":192,"./Pict-Browser-SafeOnDocumentReady.js":193,"./Pict-CSS.js":194,"./Pict-Content-Assignment.js":195,"./Pict-DataProvider.js":196,"./Pict-Meadow-EntityProvider.js":197,"./Pict-Template-Provider.js":198,"./environments/Pict-Environment-Log.js":200,"./environments/Pict-Environment-Object.js":201,"./filters/FilterClauseBase.js":203,"./filters/FilterClauseExternalJoin.js":204,"./filters/FilterClauseInternalJoin.js":205,"./filters/FilterClauseLocal.js":206,"./providers/Provider-DataBroker.js":207,"./providers/Provider-Filter-Manager.js":208,"./services/Fable-Service-TransactionTracking.js":209,"./templates/Pict-Template-Data.js":210,"./templates/Pict-Template-DataValueByKey.js":211,"./templates/Pict-Template-DataWithTemplateFallback.js":212,"./templates/Pict-Template-Entity.js":213,"./templates/Pict-Template-Self.js":214,"./templates/Pict-Template-SolveByReference.js":215,"./templates/Pict-Template-Template.js":216,"./templates/Pict-Template-TemplateByDataAddress.js":217,"./templates/Pict-Template-TemplateByReference.js":218,"./templates/Pict-Template-TemplateByTypes.js":219,"./templates/Pict-Template-TemplateFromAddress.js":220,"./templates/Pict-Template-TemplateFromMap.js":221,"./templates/Pict-Template-TemplateSet.js":222,"./templates/Pict-Template-TemplateSetFromMap.js":223,"./templates/Pict-Template-TemplateSetWithPayload.js":224,"./templates/Pict-Template-TemplateValueSet.js":225,"./templates/Pict-Template-View.js":226,"./templates/data-generation/Pict-Template-RandomNumber.js":227,"./templates/data-generation/Pict-Template-RandomNumberString.js":228,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":229,"./templates/data/Pict-Template-DataJson.js":230,"./templates/data/Pict-Template-DateOnlyFormat.js":231,"./templates/data/Pict-Template-DateOnlyYMD.js":232,"./templates/data/Pict-Template-DateTimeFormat.js":233,"./templates/data/Pict-Template-DateTimeYMD.js":234,"./templates/data/Pict-Template-Digits.js":235,"./templates/data/Pict-Template-Dollars.js":236,"./templates/data/Pict-Template-HtmlCommentEnd.js":237,"./templates/data/Pict-Template-HtmlCommentStart.js":238,"./templates/data/Pict-Template-Join.js":239,"./templates/data/Pict-Template-JoinUnique.js":240,"./templates/data/Pict-Template-PascalCaseIdentifier.js":241,"./templates/data/Pict-Template-PluckJoinUnique.js":242,"./templates/debugging/Pict-Template-Breakpoint.js":243,"./templates/debugging/Pict-Template-DataValueTree.js":244,"./templates/debugging/Pict-Template-LogStatement.js":245,"./templates/debugging/Pict-Template-LogValue.js":246,"./templates/debugging/Pict-Template-LogValueTree.js":247,"./templates/logic/Pict-Template-NotEmpty.js":248,"./templates/logic/Pict-Template-TemplateIf.js":250,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":251,fable:68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(e,t,r){t.exports=class{constructor(e,t){this.contentMap="object"==typeof t?t:{},this.pict=e,this.truncateContentLength=256,this.storeEventLog=!0,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)}createEventLogEntry(e,t){let r=void 0===t?"":t;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:e,Content:r}}customGetElementFunction(e){return this.storeEventLog&&this.eventLog.GetElement.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an GET of Address -> [".concat(e,"]")),""}customReadFunction(e){return this.storeEventLog&&this.eventLog.Read.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an READ from Address -> [".concat(e,"]")),e in this.contentMap?this.contentMap[e]:(this.pict.log.warn("Mock read from Address ".concat(e," did not find a value in the content map.")),"")}customAppendFunction(e,t){return this.storeEventLog&&this.eventLog.Append.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"]"),{Content:t}),""}customPrependFunction(e,t){return this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"]"),{Content:t}),""}customAssignFunction(e,t){return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"]"),{Content:t}),""}customReadAttributeFunction(e,t){return this.pict.log.info("Mocking an READ ATTRIBUTE from Address -> [".concat(e,"]"),{Attribute:t}),""}customSetAttributeFunction(e,t,r){return r.length>this.truncateContentLength?this.pict.log.info("Mocking an SET ATTRIBUTE to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Attribute:t,Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an SET ATTRIBUTE to Address -> [".concat(e,"]"),{Attribute:t,Content:r}),""}}},{}],201:[function(e,t,r){t.exports=class{constructor(e,t){this.contentMap="object"==typeof t?t:{},this.contentMap._ATTRIBUTE_MAP={},this.contentMap._CLASS_MAP={},this.pict=e,this.truncateContentLength=256,this.storeEventLog=!0,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)}createEventLogEntry(e,t){let r=void 0===t?"":t;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:e,Content:r}}customGetElementFunction(e){return this.storeEventLog&&this.eventLog.GetElement.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an GET of Address -> [".concat(e,"]")),""}customReadFunction(e){return this.storeEventLog&&this.eventLog.Read.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an READ from Address -> [".concat(e,"]")),e in this.contentMap?this.contentMap[e]:(this.pict.log.warn("Mock read from Address ".concat(e," did not find a value in the content map.")),"")}customAppendFunction(e,t){return this.contentMap[e]=void 0===this.contentMap[e]?t:this.contentMap[e]+t,this.storeEventLog&&this.eventLog.Append.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"]"),{Content:t}),""}customPrependFunction(e,t){return this.contentMap[e]=void 0===this.contentMap[e]?t:t+this.contentMap[e],this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"]"),{Content:t}),""}customAssignFunction(e,t){return this.contentMap[e]=t,this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"]"),{Content:t}),""}initializeAttributeMapLocation(e,t){e in this.contentMap._ATTRIBUTE_MAP||(this.contentMap._ATTRIBUTE_MAP[e]={}),t in this.contentMap._ATTRIBUTE_MAP[e]||(this.contentMap._ATTRIBUTE_MAP[e][t]=!1)}initializeClassMapLocation(e){e in this.contentMap._CLASS_MAP||(this.contentMap._CLASS_MAP[e]=[])}customReadAttributeFunction(e,t){this.initializeAttributeMapLocation(e,t);let r=this.contentMap._ATTRIBUTE_MAP[e][t];return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customSetAttributeFunction(e,t,r){return this.initializeAttributeMapLocation(e,t),this.contentMap._ATTRIBUTE_MAP[e][t]=r,this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customRemoveAttributeFunction(e,t){this.initializeAttributeMapLocation(e,t);let r=this.contentMap._ATTRIBUTE_MAP[e][t];return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),delete this.contentMap._ATTRIBUTE_MAP[e][t],!0}customReadClassFunction(e,t){this.initializeClassMapLocation(e);const r=this.contentMap._CLASS_MAP[e].indexOf(t)>-1;return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS READ for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customSetClassFunction(e,t){this.initializeClassMapLocation(e);let r=this.contentMap._CLASS_MAP[e];return-1==this.contentMap._CLASS_MAP[e].indexOf(t)&&this.contentMap._CLASS_MAP[e].push(t),this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS SET for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r.join(" ")}),r}customRemoveClassFunction(e,t){this.initializeClassMapLocation(e);let r=this.contentMap._CLASS_MAP[e];return this.contentMap._CLASS_MAP[e].splice(t),this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS REMOVE for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r.join(" ")}),r}}},{}],202:[function(e,t,r){t.exports=class{constructor(e){this.fable=e,this.pict=e,this.log=e.log}generateMeadowFilterStanzas(e){const t=[];e.UserFilters=[];for(const r of e.FilterConfiguration||[]){if(!1===r.Enabled){this.pict.LogNoisiness>1&&this.log.info("Skipping disabled filter configuration: ".concat(r.Type),{FilterConfig:r});continue}const n={GUID:this.pict.getUUID(),Filters:[]},i=Array.isArray(r.Values)?r.Values:null==r.Value||""==r.Value||"ExternalJoinDateMatch"==r.Type&&0==r.Value?[]:[r.Value];let s;switch(r.Type){case"ExternalJoinSelectedValue":case"ExternalJoinSelectedValueList":s=[r.ExternalFilterTableLookupColumn||"ID".concat(r.ExternalFilterByTable)];case"ExternalJoinMatch":case"ExternalJoinStringMatch":case"ExternalJoinDateMatch":case"ExternalJoinNumericMatch":s||(s=r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"]));for(const e of s)for(const t of i){const i={Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBVOR",Field:e};r.ExactMatch||void 0===r.ExactMatch&&("ExternalJoinNumericMatch"==r.Type||"ExternalJoinDateMatch"==r.Type||"ExternalJoinSelectedValue"==r.Type||"ExternalJoinSelectedValueList"==r.Type)?(i.Operator="EQ",i.Value=t):(i.Operator="LK",i.Value="%25".concat(t,"%25")),n.Filters.push(i)}if(!r.JoinTable){this.log.error("".concat(r.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:r});break}if(!r.JoinTableExternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(r.JoinTable,"]."));break}if(n.Filters.length>0){if(n.Filters.push({Index:0,Fulcrum:!0,Entity:r.JoinTable,Instruction:"FBL",Field:r.JoinTableExternalConnectionColumn,Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")}),!r.CoreConnectionColumn){this.log.error("".concat(r.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}n.JoinConfig={CoreEntity:e.Entity,Instruction:"FBLOR",Fields:[r.CoreConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")}}break;case"ExternalJoinStringRange":case"ExternalJoinNumericRange":case"ExternalJoinDateRange":case"ExternalJoinRange":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("ExternalJoinDateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const e of r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"])){const t=r.Values&&r.Values.Start&&("ExternalJoinDateRange"!=r.Type||"0"!=r.Values.Start),i=r.Values&&r.Values.End&&("ExternalJoinDateRange"!=r.Type||"0"!=r.Values.End);t&&n.Filters.push({Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBVOR",OpenParen:!0,OpenParenOr:!0,CloseParen:!i,Field:e,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),i&&n.Filters.push({Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBV",OpenParen:!t,OpenParenOr:!t,CloseParen:!0,Field:e,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}if(!r.JoinTable){this.log.error("".concat(r.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:r});break}if(!r.JoinTableExternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(r.JoinTable,"]."));break}if(n.Filters.length>0){if(n.Filters.push({Index:0,Fulcrum:!0,Entity:r.JoinTable,Instruction:"FBL",Field:r.JoinTableExternalConnectionColumn,Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")}),!r.CoreConnectionColumn){this.log.error("".concat(r.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}if(!r.JoinTableCoreConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableCoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}n.JoinConfig={CoreEntity:e.Entity,Instruction:"FBLOR",Fields:[r.CoreConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")}}break;case"StringRange":case"DateRange":case"NumericRange":case"Range":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("DateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const t of r.FilterByColumns||(r.FilterByColumn?[r.FilterByColumn]:["Name"])){const i=r.Values&&r.Values.Start&&("DateRange"!=r.Type||"0"!=r.Values.Start),s=r.Values&&r.Values.End&&("DateRange"!=r.Type||"0"!=r.Values.End);i&&n.Filters.push({Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBVOR",Field:t,OpenParen:!0,OpenParenOr:!0,CloseParen:!s,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),s&&n.Filters.push({Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBV",OpenParen:!i,OpenParenOr:!i,CloseParen:!0,Field:t,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}break;case"StringMatch":case"DateMatch":case"NumericMatch":case"Match":for(const t of r.FilterByColumns||(r.FilterByColumn?[r.FilterByColumn]:["Name"]))for(const s of i){const i={Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBVOR",Field:t};r.ExactMatch||void 0===r.ExactMatch&&("NumericMatch"==r.Type||"DateMatch"==r.Type)?(i.Operator="EQ",i.Value=s):(i.Operator="LK",i.Value="%25".concat(s,"%25")),n.Filters.push(i)}break;case"InternalJoinStringRange":case"InternalJoinNumericRange":case"InternalJoinDateRange":case"InternalJoinRange":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("InternalJoinDateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const e of r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"])){const t=r.Values&&r.Values.Start&&("InternalJoinDateRange"!=r.Type||"0"!=r.Values.Start),i=r.Values&&r.Values.End&&("InternalJoinDateRange"!=r.Type||"0"!=r.Values.End);t&&n.Filters.push({Index:0,Entity:r.RemoteTable,Instruction:"FBVOR",Field:e,OpenParen:!0,OpenParenOr:!0,CloseParen:!i,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),i&&n.Filters.push({Index:0,Entity:r.RemoteTable,Instruction:"FBV",OpenParen:!t,OpenParenOr:!t,CloseParen:!0,Field:e,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}if(n.Filters.length>0){if(!r.JoinInternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}n.JoinConfig={Instruction:"FBLOR",CoreEntity:e.Entity,Fields:[r.JoinInternalConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinExternalConnectionColumn,"^Record.State[Step0]~}")}}break;case"InternalJoinSelectedValue":case"InternalJoinSelectedValueList":s=[r.ExternalFilterTableLookupColumn||"ID".concat(r.RemoteTable)];case"InternalJoinMatch":case"InternalJoinStringMatch":case"InternalJoinDateMatch":case"InternalJoinNumericMatch":s||(s=r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"]));for(const e of s)for(const t of i){const i={Index:0,Entity:r.RemoteTable,Instruction:"FBVOR",Field:e};r.ExactMatch||void 0===r.ExactMatch&&("InternalJoinNumericMatch"==r.Type||"InternalJoinDateMatch"==r.Type||"InternalJoinSelectedValue"==r.Type||"InternalJoinSelectedValueList"==r.Type)?(i.Operator="EQ",i.Value=t):(i.Operator="LK",i.Value="%25".concat(t,"%25")),n.Filters.push(i)}if(n.Filters.length>0){if(!r.JoinInternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}n.JoinConfig={Instruction:"FBLOR",CoreEntity:e.Entity,Fields:[r.JoinInternalConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinExternalConnectionColumn,"^Record.State[Step0]~}")}}break;case"RawFilter":if(!r.Value){this.log.warn("RawFilter configuration missing Value, not adding filter.",{FilterConfig:r});break}e.UserFilters.push(r.Value);break;default:this.log.warn("Unknown filter type ".concat(r.Type," in filter configuration."),{FilterConfig:r})}n.Filters.length>0&&t.push(n)}e.PreparedFilters=t}linkPreparedFilters(e){const t=[];for(const r of e.PreparedFilters||[])if(r.JoinConfig){const e=r.Filters,n=r.JoinConfig;for(const t of n.Fields||[]){const i={Index:1,CoreEntity:!0,Entity:r.JoinConfig.CoreEntity,Instruction:r.JoinConfig.Instruction||"FBVOR",Field:t,Operator:n.Operator,Value:n.Value,ValueTemplate:n.ValueTemplate};e.push(i)}t.push(e)}else t.push(r.Filters);return t}normalizeMeadowFilterStanzas(e){let t=0;for(const r of e.PreparedFilters){const e=new Set;r.Filters.sort(((e,t)=>e.Index-t.Index));for(const t of r.Filters)t.CoreEntity||e.add(t.Index);t+=e.size}let r=-t-1;for(const t of e.PreparedFilters){let e=null;for(const n of t.Filters)n.Index!==e&&(++r,e=n.Index),n.ComputedIndex=r;for(const e of t.Filters)e.ValueTemplate&&(e.ValueTemplate=e.ValueTemplate.replace(/\[([^\]]+)\]/g,(e=>{var r;const n=e.substring(5,e.length-1),i=null===(r=t.Filters.find((e=>e.Index==n)))||void 0===r?void 0:r.ComputedIndex;if(null==i)throw new Error("Filter index ".concat(n," not found in group filters."));return e.replace(n,i)})))}}compileMeadowFilterStanzas(e){const t=[];e.Filter||(e.Filter="".concat(e.Entity||"Unknown","-").concat(this.pict.getUUID())),t.push({Type:"SetStateAddress",StateAddress:"Bundle[".concat(e.Filter,"]")});const r={},n=[],i=[],s=[];let o;const a=[];for(const a of e.PreparedFilters){for(const e of a.Filters)if(e.CoreEntity){o=e.Entity;const t="".concat(a.GUID,"-").concat(e.ComputedIndex);s.find((e=>e==t))||s.push(t),i[t]||(i[t]={Stanzas:[],ComputedIndex:e.ComputedIndex,Entity:e.Entity}),i[t].Stanzas.push(this._compileSimpleFilterToString(e))}else{const t="".concat(a.GUID,"-").concat(e.ComputedIndex);n.find((e=>e==t))||n.push(t),r[t]||(r[t]={Stanzas:[],ComputedIndex:e.ComputedIndex,Entity:e.Entity}),r[t].Stanzas.push(this._compileSimpleFilterToString(e))}for(const e of n)r[e].Stanzas=r[e].Stanzas.filter((e=>e.length>0)),r[e].Stanzas.length>0&&t.push({Type:"MeadowEntity",AllRecords:!0,Entity:r[e].Entity,Filter:r[e].Stanzas.join("~"),Destination:"State[Step".concat(r[e].ComputedIndex,"]")})}for(const e of s)i[e].Stanzas=i[e].Stanzas.filter((e=>e.length>0)),i[e].Stanzas.length>0&&a.push(["FOP~0~(~0",...i[e].Stanzas,"FCP~0~)~0"].join("~"));o||(o=e.Entity);const c={Type:"Count"===e.Mode?"MeadowEntityCount":"MeadowEntity",Entity:o,Filter:a.join("~"),AllRecords:void 0===e.PageSize,RecordStartCursor:e.RecordOffset,PageSize:e.PageSize,Destination:e.ResultDestinationAddress};if(e.UserFilters.length>0){let t="",r="";for(const n of e.UserFilters){let i,s=n;if("Count"===e.Mode)s=this._sanitizeFilterForCount(n);else if([s,i]=this._extractSortsFromFilter(n),i&&(t.length>0&&(t+="~"),t+=i),!s)continue;s&&(r.length>0&&(r+="~"),r+="FOP~0~(~0~",r+=s,r+="~FCP~0~)~0")}c.Filter&&(r.length>0&&(r+="~"),r+="FOP~0~(~0~",r+=c.Filter,r+="~FCP~0~)~0"),t&&(r.length>0&&(r+="~"),r+=t),c.Filter=r}t.push(c),e.BundleConfig=t}_sanitizeFilterForCount(e){if(!e||"string"!=typeof e)return e;let t=e.split("~");for(let e=0;e<t.length;e+=4)"FSF"===t[e]&&(t=t.slice(0,e).concat(t.slice(e+4)),e-=4);return t.join("~")}_extractSortsFromFilter(e){if(!e||"string"!=typeof e)return[e,""];let t=[],r=e.split("~");for(let e=0;e<r.length;e+=4)"FSF"===r[e]&&(t.push(r.slice(e,e+4).join("~")),r=r.slice(0,e).concat(r.slice(e+4)),e-=4);return[r.join("~"),t.join("~")]}_compileSimpleFilterToString(e){let t="".concat(e.Instruction);return t+="~".concat(e.Field),t+="~".concat(e.Operator),e.ValueTemplate?t+="~".concat(e.ValueTemplate):t+="~".concat(e.Value||""),e.OpenParen&&(t="".concat(e.OpenParenOr?"FOPOR":"FOP","~0~(~0~").concat(t)),e.CloseParen&&(t="".concat(t,"~FCP~0~)~0")),t}}},{}],203:[function(e,t,r){t.exports=class{constructor(e){this.fable=e,this.pict=e,this.log=e.log,this._type="None",this.values=[]}set type(e){this._type=e,e.includes("Range")?("object"!=typeof this.values||null===this.values||Array.isArray(this.values))&&(this.values={Start:void 0,End:void 0}):Array.isArray(this.values)||(this.values=[])}get type(){return this._type}generateFilterClauseConfig(){return{Type:"None"}}}},{}],204:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this.type="ExternalJoinMatch",this.values=[],this.exactMatch,this.startExclusive,this.endExclusive,this.externalFilterByColumn,this.externalFilterByColumns,this.coreConnectionColumn="",this.joinTable="",this.joinTableExternalConnectionColumn="",this.joinTableCoreConnectionColumn="",this.externalFilterByTable="",this.externalFilterTableLookupColumn="",this.externalFilterByTableConnectionColumn=""}generateFilterClauseConfig(){switch(this.type){case"ExternalJoinMatch":case"ExternalJoinStringMatch":case"ExternalJoinDateMatch":case"ExternalJoinNumericMatch":return{Type:this.type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn};case"ExternalJoinRange":case"ExternalJoinStringRange":case"ExternalJoinDateRange":case"ExternalJoinNumericRange":return{Type:this.type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn};case"ExternalJoinSelectedValue":case"ExternalJoinSelectedValueList":return{Type:this.type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterTableLookupColumn:this.externalFilterTableLookupColumn,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":203}],205:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this.type="None",this.values=[],this.exactMatch,this.startExclusive,this.endExclusive,this.remoteTable="",this.externalFilterByColumn,this.externalFilterByColumns,this.externalFilterTableLookupColumn,this.joinExternalConnectionColumn="",this.joinInternalConnectionColumn=""}generateFilterClauseConfig(){switch(this._type){case"InternalJoinMatch":case"InternalJoinStringMatch":case"InternalJoinDateMatch":case"InternalJoinNumericMatch":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case"InternalJoinSelectedValue":case"InternalJoinSelectedValueList":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,ExternalFilterTableLookupColumn:this.externalFilterTableLookupColumn,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case"InternalJoinRange":case"InternalJoinStringRange":case"InternalJoinDateRange":case"InternalJoinNumericRange":return{Type:this._type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":203}],206:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this._type="Match",this.filterByColumn,this.exactMatch,this.startExclusive,this.endExclusive}generateFilterClauseConfig(){switch(this._type){case"Match":case"StringMatch":case"DateMatch":case"NumericMatch":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,FilterByColumn:this.filterByColumn};case"Range":case"StringRange":case"DateRange":case"NumericRange":return{Type:this._type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,FilterByColumn:this.filterByColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":203}],207:[function(e,t,r){const n=e("pict-provider"),i={ProviderIdentifier:"Pict-Provider-DataBroker",AutoInitialize:!0,AutoInitializeOrdinal:0};t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},i,t),r),this.options,this.pict,this.marshalDestination="AppData"}getValue(e){return this.getValueByHash(e)}getValueByHash(e){return this.pict.manifest.getValueByHash(this.getMarshalDestinationObject(),e)}setValue(e,t){return this.setValueByHash(e,t)}setValueByHash(e,t){return this.pict.manifest.setValueByHash(this.getMarshalDestinationObject(),e,t)}get marshalDestination(){return this._marshalDestination}set marshalDestination(e){this._marshalDestination=e}get marshalDestinationObject(){const e=this.marshalDestination;if(!e)throw new Error("Attempt to access marshal destination object with no marshal destination set.");let t=this.pict.resolveStateFromAddress(e);if(!t&&(this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(e)),this.pict.setStateValueAtAddress(e,null,{}),t=this.pict.resolveStateFromAddress(e),!t))throw new Error("Attempt to access marshal destination object with no marshal destination set.");return t}getMarshalDestinationObject(){return this.marshalDestinationObject}resolveMarshalDestinationObject(e){const t=e||this.marshalDestination;if(!t)throw new Error("Attempt to resolve marshal destination object with no marshal destination set.");let r;return e?(r=this.pict.resolveStateFromAddress(e),r||(this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(t)),this.pict.setStateValueAtAddress(t,null,{}))):r=this.getMarshalDestinationObject(),r}},t.exports.default_configuration=i},{"pict-provider":141}],208:[function(e,t,r){const n=e("pict-provider"),i=e("../filters/Filter.js"),s={ProviderIdentifier:"Pict-RecordSet-FilterManager",AutoInitialize:!0,AutoInitializeOrdinal:0};t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},s,t),r),this.options,this.pict,this.filters={},this.filterCriteria={}}addFilter(e,t){if(!e||"string"!=typeof e)return void this.log.error("Invalid filter hash provided. It must be a non-empty string.");if(!t||"object"!=typeof t||!t.Type)return void this.log.error("Invalid filter configuration provided. It must be an object with a Type property.");const r=JSON.parse(JSON.stringify(t));r.Hash&&r.Hash!==e&&this.log.warn("Filter configuration hash mismatch: provided ".concat(r.Hash,", expected ").concat(e,". Overriding with provided hash.")),r.Hash=e,this.filters[r.Hash]=r}addFilterCriteria(e,t){if(!e||"string"!=typeof e)return void this.log.error("Invalid filter criteria hash provided. It must be a non-empty string.");if(!t||!Array.isArray(t))return void this.log.error("Invalid filter criteria configuration provided. It must be an array of filter clauses.");const r=JSON.parse(JSON.stringify(t));this.filterCriteria[e]=r}getFilter(e){return this.filters[e]}getFilterCriteria(e){return this.filterCriteria[e]}loadRecordsByFilter(e,t,r){return this.loadRecordsByFilterUsingProvider(this.pict.EntityProvider,e,t,r)}loadRecordsByFilterUsingProvider(e,t,r,n){if(!e||"function"!=typeof e.gatherDataFromServer)return n(new Error("loadRecordsByFilter: Missing or invalid EntityProvider."));const s=JSON.parse(JSON.stringify(r));s.Mode="Records",s.FilterConfiguration=t;const o=new i(this.pict);o.generateMeadowFilterStanzas(s),o.linkPreparedFilters(s),o.normalizeMeadowFilterStanzas(s),o.compileMeadowFilterStanzas(s),e.gatherDataFromServer(s.BundleConfig,n)}loadRecordPageByFilter(e,t,r,n,i){return this.loadRecordPageByFilterUsingProvider(this.pict.EntityProvider,e,t,r,n,i)}loadRecordPageByFilterUsingProvider(e,t,r,n,s,o){if(!e||"function"!=typeof e.gatherDataFromServer)return o(new Error("loadRecordPageByFilter: Missing or invalid EntityProvider."));const a="function"==typeof n?n:"function"==typeof s?s:o;let c="function"==typeof n?0:parseInt(String(n));(isNaN(c)||c<0)&&(c=0);let l="function"==typeof s?0:parseInt(String(s));(isNaN(l)||l<0)&&(l=1e4);const h=JSON.parse(JSON.stringify(r));h.Mode="Records",h.RecordOffset=c,h.PageSize=l,h.FilterConfiguration=t;const u=new i(this.pict);u.generateMeadowFilterStanzas(h),u.linkPreparedFilters(h),u.normalizeMeadowFilterStanzas(h),u.compileMeadowFilterStanzas(h),e.gatherDataFromServer(h.BundleConfig,a)}countRecordsByFilter(e,t,r){return this.countRecordsByFilterUsingProivider(this.pict.EntityProvider,e,t,r)}countRecordsByFilterUsingProivider(e,t,r,n){const s=JSON.parse(JSON.stringify(r));s.Mode="Count",s.FilterConfiguration=t;const o=new i(this.pict);o.generateMeadowFilterStanzas(s),o.linkPreparedFilters(s),o.normalizeMeadowFilterStanzas(s),o.compileMeadowFilterStanzas(s),e.gatherDataFromServer(s.BundleConfig,n)}executeFilter(e,t,r){return this.executeFilterUsingProvider(this.pict.EntityProvider,e,t,r)}executeFilterUsingProvider(e,t,r,n){if(!e||"function"!=typeof e.gatherDataFromServer)return n(new Error("executeFilter: Missing or invalid EntityProvider."));const i=this.pict.resolveStateFromAddress(t);if(!Array.isArray(i))return n(new Error("Filter configuration at address ".concat(t," is not an array.")));const s=this.pict.resolveStateFromAddress(r);return s&&"object"==typeof s?this.loadRecordsByFilterUsingProvider(e,i,s,n):n(new Error("Filter experience at address ".concat(r," is not an object.")))}executeFilterPage(e,t,r,n,i){return this.executeFilterPageUsingProvider(this.pict.EntityProvider,e,t,r,n,i)}executeFilterPageUsingProvider(e,t,r,n,i,s){const o="function"==typeof n?n:"function"==typeof i?i:s,a=this.pict.resolveStateFromAddress(t);if(!Array.isArray(a))return o(new Error("Filter configuration at address ".concat(t," is not an array.")));const c=this.pict.resolveStateFromAddress(r);return c&&"object"==typeof c?this.loadRecordPageByFilterUsingProvider(e,a,c,n,i,s):o(new Error("Filter experience at address ".concat(r," is not an object.")))}executeFilterCount(e,t,r){return this.executeFilterCountUsingProvider(this.pict.EntityProvider,e,t,r)}executeFilterCountUsingProvider(e,t,r,n){const i=this.pict.resolveStateFromAddress(t);if(!Array.isArray(i))return n(new Error("Filter configuration at address ".concat(t," is not an array.")));const s=this.pict.resolveStateFromAddress(r);return s&&"object"==typeof s?this.countRecordsByFilterUsingProivider(e,i,s,n):n(new Error("Filter experience at address ".concat(r," is not an object.")))}},t.exports.default_configuration=s},{"../filters/Filter.js":202,"pict-provider":141}],209:[function(e,t,r){const n=e("fable-serviceproviderbase");class i extends n{constructor(e,t,r){super(e,t,r),this.fable,this.log,this.UUID,this.transactionMap={}}get transactions(){return this.transactionMap}logToTransaction(e,t,r){let n=this.transactionMap[e];null==n&&(this.log.warn("TransactionTracking logToTransaction key [".concat(e,"] does not exist; auto creating...")),n=this.registerTransaction(e));let i="string"==typeof r?r:"General";return this.transactionMap[e].Log.push({TimeStamp:new Date,Category:i,Message:t}),!0}registerTransaction(e){return null!=this.transactionMap[e]||(this.transactionMap[e]={TransactionKey:e,Events:{},Log:[],TransactionQueue:[]}),this.transactionMap[e]}pushToTransactionQueue(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Entry",n=this.transactionMap[e];return null==n&&(this.log.warn("TransactionTracking pushToTransactionQueue key [".concat(e,"] does not exist; auto creating...")),n=this.registerTransaction(e)),n.TransactionQueue.push({Timestamp:Date.now(),Data:t,Type:r}),this.logToTransaction(e,"Pushed data to transaction queue","Queue"),n.TransactionQueue.length}checkTransactionQueue(e){let t=this.transactionMap[e];return null==t&&(this.log.warn("TransactionTracking checkTransactionQueue key [".concat(e,"] does not exist; auto creating...")),t=this.registerTransaction(e)),null==t.TransactionQueue&&(t.TransactionQueue=[]),this.logToTransaction(e,"Checked transaction queue","Queue"),t.TransactionQueue}getTransactionQueue(e){return this.checkTransactionQueue(e).map((e=>e.Data))}clearTransactionQueue(e){let t=this.transactionMap[e];if(null==t)return void this.log.warn("TransactionTracking clearTransactionQueue key [".concat(e,"] does not exist; skipping..."));const r=t.TransactionQueue;return t.TransactionQueue=[],this.logToTransaction(e,"Cleared transaction queue","Queue"),r}checkEvent(e,t,r){let n="string"==typeof r?r:"",i=this.transactionMap[e];return null==i&&(this.log.warn("TransactionTracking checkTransactionEvent event [".concat(t,"]->[").concat(n,"] key [").concat(e,"] does not exist; auto creating...")),i=this.registerTransaction(e)),null==i.Events[t]&&(i.Events[t]={}),n in i.Events[t]?(this.logToTransaction(e,"Event [".concat(t,"]->[").concat(n,"] already exists in transaction [").concat(e,"]"),"Event"),!1):(this.logToTransaction(e,"Event [".concat(t,"]->[").concat(n,"] registered in transaction [").concat(e,"]"),"Event"),i.Events[t][n]=!0,!0)}}t.exports=i,i.default_configuration={}},{"fable-serviceproviderbase":59}],210:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Data:","~}"),this.addPattern("{~D:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a="";s.indexOf(":")>-1&&(a=s.split(":")[1],s=s.split(":")[0]);let c="";return null!=s&&(c=this.resolveStateFromAddress(s,o,r,null,n,i)),null==c||"undefined"==c||void 0===c||""===c?a:c}}},{"pict-template":143}],211:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataValueByKey:","~}"),this.addPattern("{~DVBK:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=s.split(":");if(a.length<2)return this.log.trace("PICT Template [fDataRender]::[".concat(s,"] failed because there were not two stanzas in the expression [").concat(e,"]")),"";let c="";a.length>2&&(c=a[2]);let l=this.resolveStateFromAddress(a[0],o,r,null,n,i),h=this.resolveStateFromAddress(a[1],o,r,null,n,i),u=this.pict.manifest.getValueByHash(l,h);return null==u||"undefined"==u||void 0===u?c:u}}},{"pict-template":143}],212:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataWithTemplateFallback:","~}"),this.addPattern("{~DWTF:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] with tmpRecord:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"]"));let a="";s.indexOf(":")>-1&&(a=s.split(":")[1],s=s.split(":")[0]);let c="";if(null!=s&&(c=this.resolveStateFromAddress(s,o,r,null,n,i),c&&"undefined"!==c))return this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - Found value: ").concat(c)),c;const l=this.pict.parseTemplateByHash(a,o,null,r,n,i);return null==l||""===l?(this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - No fallback template found at address: ").concat(a)),""):(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - Using fallback template from address: ").concat(a)),l)}renderAsync(e,t,r,n,i,s){let o=e.trim(),a="object"==typeof t?t:{},c="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] with tmpRecord:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"]"));let l="";o.indexOf(":")>-1&&(l=o.split(":")[1],o=o.split(":")[0]);let h="";if(null!=o&&(h=this.resolveStateFromAddress(o,a,n,null,i,s),h&&"undefined"!==h))return this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - Found value: ").concat(h)),c(null,h);this.pict.parseTemplateByHash(l,a,((e,t)=>e?c(e,""):null==t||""===t?(this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - No fallback template found at address: ").concat(l)),c(null,"")):(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - Using fallback template from address: ").concat(l)),c(null,t))),n,i,s)}}},{"pict-template":143}],213:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~E:","~}"),this.addPattern("{~Entity:","~}")}render(e,t,r,n,i){return this.log.error("Pict: Entity Render [".concat(e,"]: Render called in a non-asynchronous fashion. This should not happen.")),""}renderAsync(e,t,r,n,i,s){let o,a=e.trim(),c="object"==typeof t?t:{},l="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fEntityRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fEntityRender]::[".concat(a,"]"));let h,u="",p=a.split("^");if(p.length<2)return this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(a,"]")),l(null,"");if(o=p[0].trim(),u=p[1].trim(),h=p[2].trim(),isNaN(Number(u)))u=this.resolveStateFromAddress(String(u),c,n,null,i,s);else try{u=parseInt(String(u))}catch(e){this.log.warn("Pict: Entity Render: Could not parse entity ID."),u=0}if(!o||!u)return this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(a,"] Entity: ").concat(o," ID: ").concat(u)),l(null,"");this.pict.LogNoisiness>3&&this.log.trace("Pict: Entity Render: Entity [".concat(o,"] with ID [").concat(u,"] as template [").concat(h,"] from [").concat(a,"]")),this.pict.EntityProvider.getEntity(o,u,function(e,t){if(e)return this.log.error("Pict: Entity Render: Error getting entity [".concat(o,"] with ID [").concat(u,"] for [").concat(a,"]: ").concat(e),e),l(e,"");h?this.pict.parseTemplateByHash(h,t,l,n,i,s):l(null,"")}.bind(this))}}},{"pict-template":143}],214:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.addPattern("{~Pict","~}"),this.addPattern("{~P","~}"),this.addPattern("{~p","~}")}render(e,t,r,n,i){return this.pict.browserAddress}}},{"pict-template":143}],215:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~SolveByReference:","~}"),this.addPattern("{~SBR:","~}")}render(e,t,r,n,i){const[s,o,a]=e.trim().split(":",3),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(e,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(e,"]"));const l=this.pict.resolveStateFromAddress(s,c,r,null,n,i);if(!l)return this.pict.LogNoisiness>2&&this.log.warn("Pict: SolveByReference: Equation not found for [".concat(s,"]")),"";const h=o&&this.pict.resolveStateFromAddress(o,c,r,null,n,i)||c,u=a&&this.pict.resolveStateFromAddress(a,c,r,null,n,i)||this.pict.manifest;return this.fable.instantiateServiceProviderIfNotExists("ExpressionParser").solve(l,h,{},u,h)}}},{"pict-template":143}],216:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Template:","~}"),this.addPattern("{~T:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");return s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,s?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplateByHash(s,t,null,r,n,i):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,l,n,null,i,s),((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplateByHash(o,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],217:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByDataAddress:","~}"),this.addPattern("{~TBDA:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"";let h=this.pict.resolveStateFromAddress(s,t,r,null,n,i);return h||(this.pict.LogNoisiness>2&&this.log.warn("Pict: Template Render: Template not found for [".concat(s,"]")),h=""),o?this.pict.parseTemplate(h,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplate(h,t,null,r,n,i)}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),h(null,"");let p=this.pict.resolveStateFromAddress(o,t,n,null,i,s)||"";p||(this.pict.LogNoisiness>2&&this.log.warn("Pict: Template Render: Template not found for [".concat(o,"]")),p=""),a?this.pict.parseTemplate(p,this.resolveStateFromAddress(a,l,n,null,i,s),((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplate(p,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],218:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByReference:","~}"),this.addPattern("{~TBR:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(a,"]")),"";let h=this.resolveStateFromAddress(s,t,r,null,n,i);return h?o?this.pict.parseTemplateByHash(h,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplateByHash(h,t,null,r,n,i):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(c,"]")),r(null,"");let p=this.resolveStateFromAddress(o,t,n,null,i,s);if(!p)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplateByHash(p,this.resolveStateFromAddress(a,l,n,null,i,s),((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplateByHash(p,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],219:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByType:","~}"),this.addPattern("{~TBT:","~}")}render(e,t,r,n,i){let s,o,a,c,l,h=e.trim(),u="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(h,"] with tmpData:"),u):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(h,"]"));let p=h.trim().split(":");if(p.length<3)return"";if(s=p[0],o=p[1].split(","),a=p[2],p.length>3&&(c=p[3]),p.length>4&&(l=p[4]),!a)return"";let d=t;c&&(d=this.resolveStateFromAddress(c,u,r,null,n,i));let f=typeof this.resolveStateFromAddress(s,u,r,null,n,i);if("object"==f&&Array.isArray(this.resolveStateFromAddress(s,u,r,null,n,i))&&(f="array"),-1===o.indexOf(f)){if(!l)return"";a=l}return this.pict.parseTemplateByHash(a,d,null,r,n,i)}renderAsync(e,t,r,n,i,s){let o,a,c,l,h,u=e.trim(),p="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(u,"] with tmpData:"),p):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(u,"]"));let f=u.trim().split(":");if(f.length<3)return r(null,"");if(o=f[0],a=f[1].split(","),c=f[2],f.length>3&&(l=f[3]),f.length>4&&(h=f[4]),!c)return r(null,"");let g=t;l&&(g=this.resolveStateFromAddress(l,p,n,null,i,s));let m=typeof this.resolveStateFromAddress(o,p,n,null,i,s);if("object"==m&&Array.isArray(this.resolveStateFromAddress(o,p,n,null,i,s))&&(m="array"),-1===a.indexOf(m)){if(!h)return r(null,"");c=h}this.pict.parseTemplateByHash(c,g,((e,t)=>e?d(e,""):d(null,t)),n,i,s)}}},{"pict-template":143}],220:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateFromAddress:","~}"),this.addPattern("{~TFA:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(a,"]")),"";let h=this.resolveStateFromAddress(s,t,r,null,n,i);return h?o?this.pict.parseTemplate(h,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplate(h,t,null,r,n,i):(this.log.warn("Pict: Template Render: Template not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(c,"]")),r(null,"");let p=this.resolveStateFromAddress(o,t,n,null,i,s);if(!p)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplate(p,this.resolveStateFromAddress(a,l,n,null,i,s),((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplate(p,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],221:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TFM:","~}"),this.addPattern("{~TemplateFromMap:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(c,"]")),"";let u=this.resolveStateFromAddress(o,l,r,null,n,i),p=this.resolveStateFromAddress(a,l,r,null,n,i);return u?(l=u[p],l?this.pict.parseTemplateByHash(s,l,null,r,n,i):this.pict.parseTemplateByHash(s,t,null,r,n,i)):(this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(c,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),r(null,"");let d=this.resolveStateFromAddress(a,h,n,null,i,s),f=this.resolveStateFromAddress(c,h,n,null,i,s);if(!d)return this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(l,"]")),r(null,"");h=d[f],h?this.pict.parseTemplateByHash(o,h,((e,t)=>e?u(e,""):u(null,t)),n,i,s):this.pict.parseTemplateByHash(o,t,((e,t)=>e?u(e,""):u(null,t)),n,i,s)}}},{"pict-template":143}],222:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateSet:","~}"),this.addPattern("{~TS:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetRender]::[".concat(a,"]"));let l=a.indexOf(":");return s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,s?o?this.pict.parseTemplateSetByHash(s,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplateSetByHash(s,t,null,r,n,i):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(c,"]"));let u=c.split(":");return u.length<2?(this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"")):(o=u[0],a=u[1],o?(l=this.resolveStateFromAddress(a,l,n,null,i,s),void(l?this.pict.parseTemplateSetByHash(o,l,((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplateSetByHash(o,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s))):(this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),r(null,"")))}}},{"pict-template":143}],223:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TSFM:","~}"),this.addPattern("{~TemplateSetFromMap:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),"";let u=this.resolveStateFromAddress(o,l,r,null,n,i),p=this.resolveStateFromAddress(a,l,r,null,n,i);return u?(l=u[p],l?this.pict.parseTemplateSetByHash(s,l,null,r,n,i):this.pict.parseTemplateSetByHash(s,t,null,r,n,i)):(this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(c,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),r(null,"");let d=this.resolveStateFromAddress(a,h,n,null,i,s),f=this.resolveStateFromAddress(c,h,n,null,i,s);if(!d)return this.log.warn("Pict: TemplateFromMapSet Render: Map not resolved for [".concat(l,"]")),r(null,"");h=d[f],h?this.pict.parseTemplateSetByHash(o,h,((e,t)=>e?u(e,""):u(null,t)),n,i,s):this.pict.parseTemplateSetByHash(o,t,((e,t)=>e?u(e,""):u(null,t)),n,i,s)}}},{"pict-template":143}],224:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateSetWithPayload:","~}"),this.addPattern("{~TSWP:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim();this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"] with record:"),t):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"]"));let l=c.trim().split(":");if(l.length<3)return this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";s=l[0],o=l[1],a=l[2];let h=this.resolveStateFromAddress(o,t,r,null,n,i);h||(h=t),h||(h={});let u=this.resolveStateFromAddress(a,t,r,null,n,i);return u||(u=t),u||(u={}),this.pict.parseTemplateSetWithPayloadByHash(s,h,u,null,r,n,i)}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="function"==typeof r?r:()=>"";(this.pict.LogNoisiness>4||this.pict.LogNoisiness>0)&&this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(l,"]"));let u=l.trim().split(":");if(u.length<3)return this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");o=u[0],a=u[1],c=u[2];let p=this.resolveStateFromAddress(a,t,n,null,i,s);p||(p=t),p||(p={});let d=this.resolveStateFromAddress(c,t,n,null,i,s);d||(d=t),d||(d={}),this.pict.parseTemplateSetWithPayloadByHash(o,p,d,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],225:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateValueSet:","~}"),this.addPattern("{~TVS:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"";c=this.resolveStateFromAddress(o,c,r,null,n,i);let h=[];if(Array.isArray(c))for(let e=0;e<c.length;e++)h.push({Value:c[e],Key:e});else if("object"==typeof c){let e=Object.keys(c);for(let t=0;t<e.length;t++)h.push({Value:c[e[t]],Key:e[t]})}else h.push({Value:c});return c=h,c?this.pict.parseTemplateSetByHash(s,c,null,r,n,i):this.pict.parseTemplateSetByHash(s,t,null,r,n,i)}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(c,"]"));let u=c.split(":");if(u.length<2)return this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=u[0],a=u[1],!o)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),r(null,"");l=this.resolveStateFromAddress(a,l,n,null,i,s);let p=[];if(Array.isArray(l))for(let e=0;e<l.length;e++)p.push({Value:l[e],Key:e});else if("object"==typeof l){let e=Object.keys(l);for(let t=0;t<e.length;t++)p.push({Value:l[e[t]],Key:l[e[t]]})}else p.push({Value:l});l=p,l?this.pict.parseTemplateSetByHash(o,l,((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplateSetByHash(o,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],226:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~V:","~}"),this.addPattern("{~View:","~}"),"__TemplateOutputCache"in this.pict||(this.pict.__TemplateOutputCache={})}render(e,t,r,n,i){const s=e.trim();if(!(s in this.pict.views))return this.log.warn("Pict: View Template Render: View not found for [".concat(s,"]")),"";let o=this.pict.getUUID();return this.pict.views[s].render("__Virtual","__TemplateOutputCache.".concat(o),t,i?i.RootRenderable:void 0),this.pict.__TemplateOutputCache[o]}renderAsync(e,t,r,n,i,s){const o=e.trim();if(!(o in this.pict.views))return this.log.warn("Pict: View Template Render: View not found for [".concat(o,"]")),r(null,"");let a=this.pict.getUUID();return this.pict.views[o].renderAsync("__Virtual","__TemplateOutputCache.".concat(a),t,s?s.RootRenderable:void 0,((e,t)=>{if(e)return this.log.warn("Pict: View Template Render: Error rendering view [".concat(o,"]"),e),r(e,"");let n=this.pict.__TemplateOutputCache[a];return r(null,n)}))}}},{"pict-template":143}],227:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~RandomNumber:","~}"),this.addPattern("{~RN:","~}")}render(e,t,r,n,i){let s=e.trim();this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fRandomNumber]::[".concat(s,"]"));let o=0,a=9999999;if(s.length>0){let e=s.split(",");if(e.length>0)try{o=parseInt(e[0])}catch(e){o=0}if(e.length>1)try{a=parseInt(e[1])}catch(e){a=9999999}}return this.fable.DataGeneration.randomIntegerBetween(o,a)}}},{"pict-template":143}],228:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~RandomNumberString:","~}"),this.addPattern("{~RNS:","~}")}render(e,t,r,n,i){let s=e.trim();this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fRandomNumberString]::[".concat(s,"]"));let o=4,a=9999;if(s.length>0){let e=s.split(",");if(e.length>0)try{o=parseInt(e[0])}catch(e){o=4}if(e.length>1)try{a=parseInt(e[1])}catch(e){a=9999}}return this.fable.DataGeneration.randomNumericString(o,a)}}},{"pict-template":143}],229:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataEncodeJavascriptString:","~}"),this.addPattern("{~DEJS:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataJson]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataJson]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return this.pict.DataFormat.stringEncodeForJavascript(a)}}},{"pict-template":143}],230:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataJson:","~}"),this.addPattern("{~DJ:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataJson]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataJson]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return a||(a=t),JSON.stringify(a)}}},{"pict-template":143}],231:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateOnlyFormat:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=s.split("^");if(a.length<2)return this.log.error("PICT Template [fDateOnlyFormat]::[".concat(s,"] did not have a valid format string and date.")),"";let c=this.resolveStateFromAddress(a[0],o,r,null,n,i);return this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(s,"]")),this.fable.Dates.dayJS.utc(c).format(a[1])}}},{"pict-template":143}],232:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateOnlyYMD:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,n,i);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"]"));return""+this.fable.Dates.dayJS.utc(a).format("YYYY-MM-DD")}}},{"pict-template":143}],233:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateTimeFormat:","~}"),this.addPattern("{~DateFormat:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=s.split("^");if(a.length<2)return this.log.error("PICT Template [fDateTimeFormat]::[".concat(s,"] did not have a valid format string and date.")),"";let c=this.resolveStateFromAddress(a[0],o,r,null,n,i);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeFormat]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeFormat]::[".concat(s,"]"));let l=this.fable.Dates.dayJS.utc(c);try{if(this.pict.options.Timezone)l=l.tz(this.pict.options.Timezone);else try{l=l.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}catch(e){try{l=l.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}return l.format(a[1])}}},{"pict-template":143}],234:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateTimeYMD:","~}"),this.addPattern("{~DateYMD:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,n,i);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"]"));let c=this.fable.Dates.dayJS.utc(a);try{if(this.pict.options.Timezone)c=c.tz(this.pict.options.Timezone);else try{c=c.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}catch(e){try{c=c.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}return c.format("YYYY-MM-DD")}}},{"pict-template":143}],235:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Digits:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDigits]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDigits]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(a,2))}}},{"pict-template":143}],236:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Dollars:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDollars]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDollars]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return this.fable.DataFormat.formatterDollars(a)}}},{"pict-template":143}],237:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~HtmlCommentEnd:","~}"),this.addPattern("{~HCE:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=!1;const[c,l]=s.split(":");null!=c&&(a=this.resolveStateFromAddress(c,o,r,null,n,i));const h=null!=l&&("1"===l||"true"===l.toLowerCase()||"t"===l.toLowerCase());return Boolean(a)==h?" --\x3e":""}}},{"pict-template":143}],238:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~HtmlCommentStart:","~}"),this.addPattern("{~HCS:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=!1;const[c,l]=s.split(":");null!=c&&(a=this.resolveStateFromAddress(c,o,r,null,n,i));const h=null!=l&&("1"===l||"true"===l.toLowerCase()||"t"===l.toLowerCase());return Boolean(a)==h?"\x3c!-- ":""}}},{"pict-template":143}],239:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Join:","~}"),this.addPattern("{~J:","~}")}render(e,t,r,n,i){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Join [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Join [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<2)return"";let c=a.shift(),l=[];for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,n,i);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++)l.push(t[e]);else t&&l.push(t)}return l.join(c)}}},{"pict-template":143}],240:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~JoinUnique:","~}"),this.addPattern("{~JU:","~}")}render(e,t,r,n,i){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Join Unique [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Join Unique [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<2)return"";let c=a.shift(),l=[],h={};for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,n,i);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++)t[e]in h||(h[t[e]]=!0,l.push(t[e]));else t&&(t in h||(h[t]=!0,l.push(t)))}return l.join(c)}}},{"pict-template":143}],241:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~PascalCaseIdentifier:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return null==a||"undefined"==a||void 0===a?"":this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(a))}}},{"pict-template":143}],242:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~PluckJoinUnique:","~}"),this.addPattern("{~PJU:","~}")}render(e,t,r,n,i){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<3)return"";let c=a.shift(),l=a.shift(),h=[],u={};for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,n,i);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++){if(null===t[e]||"object"!=typeof t)continue;let r=this.pict.manifest.getValueByHash(t[e],l);r in u||(u[r]=!0,h.push(r))}else t&&(t in u||(u[t]=!0,h.push(t)))}return h.join(c)}}},{"pict-template":143}],243:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Breakpoint","~}")}render(e,t,r,n,i){let s=e.trim(),o=new Error("PICT Template Breakpoint: ".concat(s));return this.log.trace("PICT Template Breakpoint: ".concat(s),o.stack),""}}},{"pict-template":143}],244:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataTree:","~}"),this.addPattern("{~DT:","~}")}render(e,t,r,n,i){let s="object"==typeof t?t:{};if(s.TemplateHash=e.trim(),s.ValueTreeParameters=s.TemplateHash.split("^"),s.ValueTreeParameters.length<1)return"";s.ResolvedValue=this.resolveStateFromAddress(s.ValueTreeParameters[0],s,r,null,n,i),s.ResolvedValueType=typeof s.ResolvedValue;try{s.TreeMaxDepth=s.ValueTreeParameters.length<2?1:parseInt(s.ValueTreeParameters[1])}catch(e){s.TreeMaxDepth=1}let o=this.pict.TemplateProvider.getTemplate("PICT-Object-Wrap");return o||(o='<div class="PICT PICTObjectSet">{~D:Record.ObjectValueTree~}</div>'),"object"==s.ResolvedValueType?s.ObjectValueTree=this.dataValueTreeObjectSet(s.ResolvedValue,s.ResolvedValue,0,s.TreeMaxDepth,r,n):(this.log.trace("PICT Template Log Value Tree: [".concat(s.TemplateHash,"] resolved data is not an object."),s.ResolvedValue),s.ObjectValueTree=s.ResolveValue),this.pict.parseTemplate(o,s,null,r,n,i)}dataValueTreeObjectSet(e,t,r,n,i,s,o){let a="";if("object"!=typeof e)return a;let c=Object.keys(e),l=this.pict.TemplateProvider.getTemplate("PICT-Object-Branch");l||(l='\n<div class="PICTObjectBranchDepth_{~D:Record.CurrentDepth~}"><div class="PICTObjectBranch">{~D:Record.BranchKey~}</div><div class="PICTObjectBranchValue">{~D:Record.BranchValue~}</div></div>\n');for(let h=0;h<c.length;h++){let u=typeof e[c[h]],p="";if("object"===u)p=r+1>n?"...":this.dataValueTreeObjectSet(e[c[h]],t,r+1,n,i,s);else p=e[c[h]];let d={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:t,Container:e,BranchEntryCount:c.length,BranchIndex:h,BranchKey:c[h],BranchValue:p,BranchDataType:u,CurrentDepth:r,MaxDepth:n};a+=this.pict.parseTemplate(l,d,null,i,s,o)}return a}}},{"pict-template":143}],245:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~LogStatement:","~}"),this.addPattern("{~LS:","~}")}render(e,t,r,n,i){let s=e.trim();return this.log.trace("PICT Template Log Message: ".concat(s)),""}}},{"pict-template":143}],246:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~LogValue:","~}"),this.addPattern("{~LV:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,n,i),c=typeof a;return null==a||"undefined"==c?this.log.trace("PICT Template Log Value: [".concat(s,"] is ").concat(c,".")):"object"==c?this.log.trace("PICT Template Log Value: [".concat(s,"] is an object."),a):this.log.trace("PICT Template Log Value: [".concat(s,"] is a ").concat(c," = [").concat(a,"]")),""}}},{"pict-template":143}],247:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),_defineProperty2(this,"logValueTreeObjectSet",((e,t,r,n,i)=>{if("object"!=typeof e)return"";let s=Object.keys(e);for(let o=0;o<s.length;o++){let a=typeof e[s[o]],c="";if("object"===a)c="...";else c=e[s[o]];if(this.log.trace("[".concat(t,".").concat(s[o],"] (").concat(a,"): ").concat(c)),n+1>i)return"";"object"==a&&(c=this.logValueTreeObjectSet(e[s[o]],"".concat(t,".").concat(s[o]),r,n+1,i))}return""})),this.log,this.addPattern("{~LogValueTree:","~}"),this.addPattern("{~LVT:","~}")}render(e,t,r,n,i){let s="object"==typeof t?t:{};if(s.TemplateHash=e.trim(),s.ValueTreeParameters=s.TemplateHash.split("^"),s.ValueTreeParameters.length<1)return"";s.ResolvedValue=this.resolveStateFromAddress(s.ValueTreeParameters[0],s,r,null,n,i),s.ResolvedValueType=typeof s.ResolvedValue;try{s.TreeMaxDepth=s.ValueTreeParameters.length<2?1:parseInt(s.ValueTreeParameters[1])}catch(e){s.TreeMaxDepth=1}return"object"==s.ResolvedValueType?this.logValueTreeObjectSet(s.ResolvedValue,s.ValueTreeParameters[0],s.ResolvedValue,0,s.TreeMaxDepth):this.log.trace("PICT Template Log Value Tree: [".concat(s.TemplateHash,"] resolved data is not an object."),s.ResolvedValue),""}}},{"pict-template":143}],248:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~NotEmpty:","~}"),this.addPattern("{~NE:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fNotEmptyRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>2&&this.log.trace("PICT Template [fNotEmptyRender]::[".concat(s,"]"));let a=s.split("^");return this.resolveStateFromAddress(a[0],o,r,null,n,i)?a[1]:""}}},{"pict-template":143}],249:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}compareValues(e,t,r){switch(t){case"TRUE":return!0===e;case"FALSE":return!1===e;case"LNGT":case"LENGTH_GREATER_THAN":switch(typeof e){case"string":case"object":return e.length>r;default:return!1}case"LNLT":case"LENGTH_LESS_THAN":switch(typeof e){case"string":case"object":return e.length<r;default:return!1}case"!=":return e!=r;case"<":return e<r;case">":return e>r;case"<=":return e<=r;case">=":return e>=r;case"===":return e===r;case"==":return e==r;default:return!1}}}},{"pict-template":143}],250:[function(e,t,r){const n=e("./Pict-Template-TemplateIf-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateIf:","~}"),this.addPattern("{~TIf:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(c,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(c,"]")),"";if(!a)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(c,"]")),"";let u=a.split("^");if(u.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(c,"]")),"";try{return this.compareValues(this.resolveStateFromAddress(u[0],l,r,null,n,i),u[1],this.resolveStateFromAddress(u[2],l,r,null,n,i))?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,l,r,null,n,i),null,r,n,i):this.pict.parseTemplateByHash(s,t,null,r,n,i):""}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(c,"]: ").concat(e),e),""}}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(l,"]")),u(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(l,"]")),u(null,"");if(!c)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(l,"]")),u(null,"");let d=c.split("^");if(d.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(l,"]")),u(null,"");try{if(!this.compareValues(this.resolveStateFromAddress(d[0],h,n,null,i,s),d[1],this.resolveStateFromAddress(d[2],h,n,null,i,s)))return u(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,h,n,null,i,s),((e,t)=>e?u(e,""):u(null,t)),n,i,s):this.pict.parseTemplateByHash(o,t,((e,t)=>e?u(e,""):u(null,t)),n,i,s)}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(l,"]: ").concat(e),e),u(e,"")}}}},{"./Pict-Template-TemplateIf-Base.js":249}],251:[function(e,t,r){const n=e("./Pict-Template-TemplateIf-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateIfAbsolute:","~}"),this.addPattern("{~TIfAbs:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(c,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(c,"]")),"";if(!a)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(c,"]")),"";let u=a.split("^");if(u.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(c,"]")),"";try{return this.compareValues(this.resolveStateFromAddress(u[0],l,r,null,n,i),u[1],u[2])?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,l,r,null,n,i),null,r,n,i):this.pict.parseTemplateByHash(s,t,null,r,n,i):""}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(c,"]: ").concat(e),e),""}}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(l,"]")),u(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(l,"]")),u(null,"");if(!c)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(l,"]")),u(null,"");let d=c.split("^");if(d.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(l,"]")),u(null,"");try{if(!this.compareValues(this.resolveStateFromAddress(d[0],h,n,null,i,s),d[1],d[2]))return u(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,h,n,null,i,s),((e,t)=>e?u(e,""):u(null,t)),n,i,s):this.pict.parseTemplateByHash(o,t,((e,t)=>e?u(e,""):u(null,t)),n,i,s)}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(l,"]: ").concat(e),e),u(e,"")}}}},{"./Pict-Template-TemplateIf-Base.js":249}]},{},[199])(199)}));
11
+ var n=e("./WordTree.js"),i=e("./StringParser.js");t.exports=class{constructor(){this.WordTree=new n,this.StringParser=new i,this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r){return this.WordTree.addPattern(e,t,r)}parseString(e,t){return this.StringParser.parseString(e,this.ParseTree,t)}}},{"./StringParser.js":147,"./WordTree.js":148}],147:[function(e,t,r){t.exports=class{constructor(){}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&t.Pattern.hasOwnProperty(e))t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(t.Pattern.PatternEnd.hasOwnProperty(e)){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),t.Pattern.hasOwnProperty("Parse"))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else t.PatternStartNode.PatternEnd.hasOwnProperty(e)?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if(t.Pattern.hasOwnProperty("PatternEnd")){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),t.Pattern.PatternEnd.hasOwnProperty(e)&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],t.Pattern.hasOwnProperty("Parse")))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(t.ParseTree.hasOwnProperty(e))return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}parseString(e,t,r){let n=this.newParserState(t);for(var i=0;i<e.length;i++)this.parseCharacter(e[i],n,r);return this.flushOutputBuffer(n),n.Output}}},{}],148:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return e.hasOwnProperty(t)||(e[t]={}),e[t]}addEndChild(e,t){return e.hasOwnProperty("PatternEnd")||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPattern(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let n=this.ParseTree;for(var i=0;i<e.length;i++)n=this.addChild(n,e[i],i);n.hasOwnProperty("PatternEnd")||(n.PatternEnd={});let s="string"==typeof t?t:e;for(let e=0;e<s.length;e++)n=this.addEndChild(n,s[e],e);return n.PatternStartString=e,n.PatternEndString=s,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:e=>e,!0}}},{}],149:[function(e,t,r){var n,i,s=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var l,h=[],u=!1,p=-1;function d(){u&&l&&(u=!1,l.length?h=l.concat(h):p=-1,h.length&&f())}function f(){if(!u){var e=c(d);u=!0;for(var t=h.length;t;){for(l=h,h=[];++p<t;)l&&l[p].run();p=-1,t=h.length}l=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function m(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new g(e,t)),1!==h.length||u||c(f)},g.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],150:[function(e,t,r){(function(e){(function(){!function(n){var i="object"==typeof r&&r&&!r.nodeType&&r,s="object"==typeof t&&t&&!t.nodeType&&t,o="object"==typeof e&&e;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var a,c,l=2147483647,h=36,u=/^xn--/,p=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function y(e){throw new RangeError(f[e])}function b(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+b((e=e.replace(d,".")).split("."),t).join(".")}function T(e){for(var t,r,n=[],i=0,s=e.length;i<s;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<s?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function S(e){return b(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;n+=h)e=g(e/35);return g(n+36*e/(e+38))}function A(e){var t,r,n,i,s,o,a,c,u,p,d,f=[],m=e.length,b=0,v=128,T=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&y("not-basic"),f.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<m;){for(s=b,o=1,a=h;i>=m&&y("invalid-input"),((c=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:h)>=h||c>g((l-b)/o))&&y("overflow"),b+=c*o,!(c<(u=a<=T?1:a>=T+26?26:a-T));a+=h)o>g(l/(p=h-u))&&y("overflow"),o*=p;T=w(b-s,t=f.length+1,0==s),g(b/t)>l-v&&y("overflow"),v+=g(b/t),b%=t,f.splice(b++,0,v)}return S(f)}function E(e){var t,r,n,i,s,o,a,c,u,p,d,f,b,v,S,A=[];for(f=(e=T(e)).length,t=128,r=0,s=72,o=0;o<f;++o)(d=e[o])<128&&A.push(m(d));for(n=i=A.length,i&&A.push("-");n<f;){for(a=l,o=0;o<f;++o)(d=e[o])>=t&&d<a&&(a=d);for(a-t>g((l-r)/(b=n+1))&&y("overflow"),r+=(a-t)*b,t=a,o=0;o<f;++o)if((d=e[o])<t&&++r>l&&y("overflow"),d==t){for(c=r,u=h;!(c<(p=u<=s?1:u>=s+26?26:u-s));u+=h)S=c-p,v=h-p,A.push(m(P(p+S%v,0))),c=g(S/v);A.push(m(P(c,0))),s=w(r,b,n==i),r=0,++n}++r,++t}return A.join("")}if(a={version:"1.4.1",ucs2:{decode:T,encode:S},decode:A,encode:E,toASCII:function(e){return v(e,(function(e){return p.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return v(e,(function(e){return u.test(e)?A(e.slice(4).toLowerCase()):e}))}},i&&s)if(t.exports==i)s.exports=a;else for(c in a)a.hasOwnProperty(c)&&(i[c]=a[c]);else n.punycode=a}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],151:[function(e,t,r){var n=String.prototype.replace,i=/%20/g,s="RFC1738",o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:s,RFC3986:o}},{}],152:[function(e,t,r){var n=e("./stringify"),i=e("./parse"),s=e("./formats");t.exports={formats:s,parse:i,stringify:n}},{"./formats":151,"./parse":153,"./stringify":154}],153:[function(e,t,r){var n=e("./utils"),i=Object.prototype.hasOwnProperty,s=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},l=function(e,t,r,s){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(o),h=l?o.slice(0,l.index):o,u=[];if(h){if(!r.plainObjects&&i.call(Object.prototype,h)&&!r.allowPrototypes)return;u.push(h)}for(var p=0;r.depth>0&&null!==(l=a.exec(o))&&p<r.depth;){if(p+=1,!r.plainObjects&&i.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}if(l){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+o.slice(l.index)+"]")}return function(e,t,r,i){var s=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");s=Array.isArray(t)&&t[o]?t[o].length:0}for(var a=i?t:c(t,r,s),l=e.length-1;l>=0;--l){var h,u=e[l];if("[]"===u&&r.parseArrays)h=r.allowEmptyArrays&&(""===a||r.strictNullHandling&&null===a)?[]:n.combine([],a);else{h=r.plainObjects?{__proto__:null}:{};var p="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,d=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,f=parseInt(d,10);r.parseArrays||""!==d?!isNaN(f)&&u!==d&&String(f)===d&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(h=[])[f]=a:"__proto__"!==d&&(h[d]=a):h={0:a}}a=h}return a}(u,t,r,s)}};t.exports=function(e,t){var r=function(e){if(!e)return o;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?o.charset:e.charset,r=void 0===e.duplicates?o.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||o.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:o.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var h="string"==typeof e?function(e,t){var r={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var h=t.parameterLimit===1/0?void 0:t.parameterLimit,u=l.split(t.delimiter,t.throwOnLimitExceeded?h+1:h);if(t.throwOnLimitExceeded&&u.length>h)throw new RangeError("Parameter limit exceeded. Only "+h+" parameter"+(1===h?"":"s")+" allowed.");var p,d=-1,f=t.charset;if(t.charsetSentinel)for(p=0;p<u.length;++p)0===u[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[p]?f="utf-8":"utf8=%26%2310003%3B"===u[p]&&(f="iso-8859-1"),d=p,p=u.length);for(p=0;p<u.length;++p)if(p!==d){var g,m,y=u[p],b=y.indexOf("]="),v=-1===b?y.indexOf("="):b+1;-1===v?(g=t.decoder(y,o.decoder,f,"key"),m=t.strictNullHandling?null:""):(g=t.decoder(y.slice(0,v),o.decoder,f,"key"),m=n.maybeMap(c(y.slice(v+1),t,s(r[g])?r[g].length:0),(function(e){return t.decoder(e,o.decoder,f,"value")}))),m&&t.interpretNumericEntities&&"iso-8859-1"===f&&(m=a(String(m))),y.indexOf("[]=")>-1&&(m=s(m)?[m]:m);var T=i.call(r,g);T&&"combine"===t.duplicates?r[g]=n.combine(r[g],m):T&&"last"!==t.duplicates||(r[g]=m)}return r}(e,r):e,u=r.plainObjects?{__proto__:null}:{},p=Object.keys(h),d=0;d<p.length;++d){var f=p[d],g=l(f,h[f],r,"string"==typeof e);u=n.merge(u,g,r)}return!0===r.allowSparse?u:n.compact(u)}},{"./utils":155}],154:[function(e,t,r){var n=e("side-channel"),i=e("./utils"),s=e("./formats"),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=Array.prototype.push,h=function(e,t){l.apply(e,c(t)?t:[t])},u=Date.prototype.toISOString,p=s.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:s.formatters[p],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f={},g=function e(t,r,s,o,a,l,u,p,g,m,y,b,v,T,S,P,w,A){for(var E,x=t,C=A,R=0,D=!1;void 0!==(C=C.get(f))&&!D;){var j=C.get(t);if(R+=1,void 0!==j){if(j===R)throw new RangeError("Cyclic object value");D=!0}void 0===C.get(f)&&(R=0)}if("function"==typeof m?x=m(r,x):x instanceof Date?x=v(x):"comma"===s&&c(x)&&(x=i.maybeMap(x,(function(e){return e instanceof Date?v(e):e}))),null===x){if(l)return g&&!P?g(r,d.encoder,w,"key",T):r;x=""}if("string"==typeof(E=x)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||i.isBuffer(x))return g?[S(P?r:g(r,d.encoder,w,"key",T))+"="+S(g(x,d.encoder,w,"value",T))]:[S(r)+"="+S(String(x))];var k,N=[];if(void 0===x)return N;if("comma"===s&&c(x))P&&g&&(x=i.maybeMap(x,g)),k=[{value:x.length>0?x.join(",")||null:void 0}];else if(c(m))k=m;else{var I=Object.keys(x);k=y?I.sort(y):I}var O=p?String(r).replace(/\./g,"%2E"):String(r),L=o&&c(x)&&1===x.length?O+"[]":O;if(a&&c(x)&&0===x.length)return L+"[]";for(var M=0;M<k.length;++M){var F=k[M],V="object"==typeof F&&F&&void 0!==F.value?F.value:x[F];if(!u||null!==V){var _=b&&p?String(F).replace(/\./g,"%2E"):String(F),B=c(x)?"function"==typeof s?s(L,_):L:L+(b?"."+_:"["+_+"]");A.set(t,R);var U=n();U.set(f,A),h(N,e(V,B,s,o,a,l,u,p,"comma"===s&&P&&c(x)?null:g,m,y,b,v,T,S,P,w,U))}}return N};t.exports=function(e,t){var r,i=e,l=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=s.default;if(void 0!==e.format){if(!o.call(s.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,i=s.formatters[r],l=d.filter;if(("function"==typeof e.filter||c(e.filter))&&(l=e.filter),n=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:h,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:l,format:r,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof l.filter?i=(0,l.filter)("",i):c(l.filter)&&(r=l.filter);var u=[];if("object"!=typeof i||null===i)return"";var p=a[l.arrayFormat],f="comma"===p&&l.commaRoundTrip;r||(r=Object.keys(i)),l.sort&&r.sort(l.sort);for(var m=n(),y=0;y<r.length;++y){var b=r[y],v=i[b];l.skipNulls&&null===v||h(u,g(v,b,p,f,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,m))}var T=u.join(l.delimiter),S=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),T.length>0?S+T:""}},{"./formats":151,"./utils":155,"side-channel":163}],155:[function(e,t,r){var n=e("./formats"),i=Object.prototype.hasOwnProperty,s=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},c=1024;t.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],o=i.obj[i.prop],a=Object.keys(o),c=0;c<a.length;++c){var l=a[c],h=o[l];"object"==typeof h&&null!==h&&-1===r.indexOf(h)&&(t.push({obj:o,prop:l}),r.push(h))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,s){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",h=0;h<a.length;h+=c){for(var u=a.length>=c?a.slice(h,h+c):a,p=[],d=0;d<u.length;++d){var f=u.charCodeAt(d);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===n.RFC1738&&(40===f||41===f)?p[p.length]=u.charAt(d):f<128?p[p.length]=o[f]:f<2048?p[p.length]=o[192|f>>6]+o[128|63&f]:f<55296||f>=57344?p[p.length]=o[224|f>>12]+o[128|f>>6&63]+o[128|63&f]:(d+=1,f=65536+((1023&f)<<10|1023&u.charCodeAt(d)),p[p.length]=o[240|f>>18]+o[128|f>>12&63]+o[128|f>>6&63]+o[128|63&f])}l+=p.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(s(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(s(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return s(t)&&!s(r)&&(o=a(t,n)),s(t)&&s(r)?(r.forEach((function(r,s){if(i.call(t,s)){var o=t[s];o&&"object"==typeof o&&r&&"object"==typeof r?t[s]=e(o,r,n):t.push(r)}else t[s]=r})),t):Object.keys(r).reduce((function(t,s){var o=r[s];return i.call(t,s)?t[s]=e(t[s],o,n):t[s]=o,t}),o)}}},{"./formats":151}],156:[function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,s){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var c=1e3;s&&"number"==typeof s.maxKeys&&(c=s.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var h=0;h<l;++h){var u,p,d,f,g=e[h].replace(a,"%20"),m=g.indexOf(r);m>=0?(u=g.substr(0,m),p=g.substr(m+1)):(u=g,p=""),d=decodeURIComponent(u),f=decodeURIComponent(p),n(o,d)?i(o[d])?o[d].push(f):o[d]=[o[d],f]:o[d]=f}return o};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],157:[function(e,t,r){var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?s(o(e),(function(o){var a=encodeURIComponent(n(o))+r;return i(e[o])?s(e[o],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[o]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],158:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":156,"./encode":157}],159:[function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:20}],160:[function(e,t,r){var n=e("object-inspect"),i=e("es-errors/type"),s=function(e,t,r){for(var n,i=e;null!=(n=i.next);i=n)if(n.key===t)return i.next=n.next,r||(n.next=e.next,e.next=n),n};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=function(e,t){if(e)return s(e,t,!0)}(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return function(e,t){if(e){var r=s(e,t);return r&&r.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!s(e,t)}(e,t)},set:function(t,r){e||(e={next:void 0}),function(e,t,r){var n=s(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(e,t,r)}};return t}},{"es-errors/type":47,"object-inspect":135}],161:[function(e,t,r){var n=e("get-intrinsic"),i=e("call-bound"),s=e("object-inspect"),o=e("es-errors/type"),a=n("%Map%",!0),c=i("Map.prototype.get",!0),l=i("Map.prototype.set",!0),h=i("Map.prototype.has",!0),u=i("Map.prototype.delete",!0),p=i("Map.prototype.size",!0);t.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+s(e))},delete:function(t){if(e){var r=u(e,t);return 0===p(e)&&(e=void 0),r}return!1},get:function(t){if(e)return c(e,t)},has:function(t){return!!e&&h(e,t)},set:function(t,r){e||(e=new a),l(e,t,r)}};return t}},{"call-bound":30,"es-errors/type":47,"get-intrinsic":103,"object-inspect":135}],162:[function(e,t,r){var n=e("get-intrinsic"),i=e("call-bound"),s=e("object-inspect"),o=e("side-channel-map"),a=e("es-errors/type"),c=n("%WeakMap%",!0),l=i("WeakMap.prototype.get",!0),h=i("WeakMap.prototype.set",!0),u=i("WeakMap.prototype.has",!0),p=i("WeakMap.prototype.delete",!0);t.exports=c?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+s(e))},delete:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(o&&t)return t.delete(r);return!1},get:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?l(e,r):t&&t.get(r)},has:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?u(e,r):!!t&&t.has(r)},set:function(r,n){c&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new c),h(e,r,n)):o&&(t||(t=o()),t.set(r,n))}};return r}:o},{"call-bound":30,"es-errors/type":47,"get-intrinsic":103,"object-inspect":135,"side-channel-map":161}],163:[function(e,t,r){var n=e("es-errors/type"),i=e("object-inspect"),s=e("side-channel-list"),o=e("side-channel-map"),a=e("side-channel-weakmap")||o||s;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=a()),e.set(t,r)}};return t}},{"es-errors/type":47,"object-inspect":135,"side-channel-list":160,"side-channel-map":161,"side-channel-weakmap":162}],164:[function(e,t,r){(function(e){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=function(t,r){var n=[];t.on("data",(function(e){n.push(e)})),t.once("end",(function(){r&&r(null,e.concat(n)),r=null})),t.once("error",(function(e){r&&r(e),r=null}))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20}],165:[function(e,t,r){(function(r){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=u;const n=e("simple-concat"),i=e("decompress-response"),s=e("http"),o=e("https"),a=e("once"),c=e("querystring"),l=e("url"),h=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function u(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=a(t),e.url){const{hostname:t,port:r,protocol:n,auth:i,path:s}=l.parse(e.url);delete e.url,t||r||n||i?Object.assign(e,{hostname:t,port:r,protocol:n,auth:i,path:s}):e.path=s}const n={"accept-encoding":"gzip, deflate"};let p;e.headers&&Object.keys(e.headers).forEach((t=>n[t.toLowerCase()]=e.headers[t])),e.headers=n,e.body?p=e.json&&!h(e.body)?JSON.stringify(e.body):e.body:e.form&&(p="string"==typeof e.form?e.form:c.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),p&&(e.method||(e.method="POST"),h(p)||(e.headers["content-length"]=r.byteLength(p)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const d=e.hostname,f=("https:"===e.protocol?o:s).request(e,(r=>{if(!1!==e.followRedirects&&r.statusCode>=300&&r.statusCode<400&&r.headers.location){e.url=r.headers.location,delete e.headers.host,r.resume();const n=l.parse(e.url).hostname;return null!==n&&n!==d&&(delete e.headers.cookie,delete e.headers.authorization),"POST"===e.method&&[301,302].includes(r.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):u(e,t)}const n="function"==typeof i&&"HEAD"!==e.method;t(null,n?i(r):r)}));return f.on("timeout",(()=>{f.abort(),t(new Error("Request timed out"))})),f.on("error",t),h(p)?p.on("error",t).pipe(f):f.end(p),f}u.concat=(e,t)=>u(e,((r,i)=>{if(r)return t(r);n(i,((r,n)=>{if(r)return t(r);if(e.json)try{n=JSON.parse(n.toString())}catch(r){return t(r,i,n)}t(null,i,n)}))})),["get","post","put","patch","head","delete"].forEach((e=>{u[e]=(t,r)=>("string"==typeof t&&(t={url:t}),u(Object.assign({method:e.toUpperCase()},t),r))}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,"decompress-response":18,http:166,https:112,once:136,querystring:158,"simple-concat":164,url:187}],166:[function(e,t,r){(function(t){(function(){var n=e("./lib/request"),i=e("./lib/response"),s=e("xtend"),o=e("builtin-status-codes"),a=e("url"),c=r;c.request=function(e,r){e="string"==typeof e?a.parse(e):s(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||i,c=e.hostname||e.host,l=e.port,h=e.path||"/";c&&-1!==c.indexOf(":")&&(c="["+c+"]"),e.url=(c?o+"//"+c:"")+(l?":"+l:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new n(e);return r&&u.on("response",r),u},c.get=function(e,t){var r=c.request(e,t);return r.end(),r},c.ClientRequest=n,c.IncomingMessage=i.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=o,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":168,"./lib/response":169,"builtin-status-codes":21,url:187,xtend:190}],167:[function(e,t,r){(function(e){(function(){var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function i(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function s(e){return"function"==typeof e}r.fetch=s(e.fetch)&&s(e.ReadableStream),r.writableStream=s(e.WritableStream),r.abortController=s(e.AbortController),r.arraybuffer=r.fetch||i("arraybuffer"),r.msstream=!r.fetch&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&s(n().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],168:[function(e,t,r){(function(r,n,i){(function(){var s=e("./capability"),o=e("inherits"),a=e("./response"),c=e("readable-stream"),l=a.IncomingMessage,h=a.readyStates;var u=t.exports=function(e){var t,r=this;c.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+i.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!s.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!s.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return s.fetch&&t?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&e?"arraybuffer":"text"}(t,n),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(u,c.Writable),u.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var i=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(i["content-type"]||{}).value||""}));var a=[];if(Object.keys(i).forEach((function(e){var t=i[e].name,r=i[e].value;Array.isArray(r)?r.forEach((function(e){a.push([t,e])})):a.push([t,r])})),"fetch"===e._mode){var c=null;if(s.abortController){var l=new AbortController;c=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:a,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new n.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(o)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},u.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},u.prototype._write=function(e,t,r){this._body.push(e),r()},u.prototype._resetTimers=function(e){var t=this;n.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},u.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(this,e,t,r)},u.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":167,"./response":169,_process:149,buffer:20,inherits:114,"readable-stream":184}],169:[function(e,t,r){(function(t,n,i){(function(){var s=e("./capability"),o=e("inherits"),a=e("readable-stream"),c=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=r.IncomingMessage=function(e,r,n,o){var c=this;if(a.Readable.call(c),c._mode=n,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===n){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),s.writableStream){var l=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){c._destroyed?r():c.push(i.from(e))?t():c._resumeFetch=t}))},close:function(){o(!0),c._destroyed||c.push(null)},abort:function(e){o(!0),c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(l).catch((function(e){o(!0),c._destroyed||c.emit("error",e)}))}catch(f){}}var h=r.body.getReader();function d(){h.read().then((function(e){c._destroyed||(o(e.done),e.done?c.push(null):(c.push(i.from(e.value)),d()))})).catch((function(e){o(!0),c._destroyed||c.emit("error",e)}))}d()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!s.overrideMimeType){var u=c.rawHeaders["mime-type"];if(u){var p=u.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};o(l,a.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,s=null;switch(t._mode){case"text":if((s=r.responseText).length>t._pos){var o=s.substr(t._pos);if("x-user-defined"===t._charset){for(var a=i.alloc(o.length),l=0;l<o.length;l++)a[l]=255&o.charCodeAt(l);t.push(a)}else t.push(o,t._charset);t._pos=s.length}break;case"arraybuffer":if(r.readyState!==c.DONE||!r.response)break;s=r.response,t.push(i.from(new Uint8Array(s)));break;case"moz-chunked-arraybuffer":if(s=r.response,r.readyState!==c.LOADING||!s)break;t.push(i.from(new Uint8Array(s)));break;case"ms-stream":if(s=r.response,r.readyState!==c.LOADING)break;var h=new n.MSStreamReader;h.onprogress=function(){h.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(h.result.slice(t._pos)))),t._pos=h.result.byteLength)},h.onload=function(){e(!0),t.push(null)},h.readAsArrayBuffer(s)}t._xhr.readyState===c.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":167,_process:149,buffer:20,inherits:114,"readable-stream":184}],170:[function(e,t,r){var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function s(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,o,a;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(s(t,"type"));else{var c=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(n," ").concat(s(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],171:[function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var i=e("./_stream_readable"),s=e("./_stream_writable");e("inherits")(l,i);for(var o=n(s.prototype),a=0;a<o.length;a++){var c=o[a];l.prototype[c]||(l.prototype[c]=s.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||r.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":173,"./_stream_writable":175,_process:149,inherits:114}],172:[function(e,t,r){t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":174,inherits:114}],173:[function(e,t,r){(function(r,n){(function(){var i;t.exports=E,E.ReadableState=A;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),a=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,h=e("util");l=h&&h.debuglog?h.debuglog("stream"):function(){};var u,p,d,f=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,y=e("../errors").codes,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,T=y.ERR_METHOD_NOT_IMPLEMENTED,S=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(E,o);var P=g.errorOrDestroy,w=["error","close","destroy","pause","resume"];function A(t,r,n){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",n),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=e("string_decoder/").StringDecoder),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function E(t){if(i=i||e("./_stream_duplex"),!(this instanceof E))return new E(t);var r=this instanceof i;this._readableState=new A(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function x(e,t,r,n,i){l("readableAddChunk",t);var s,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(l("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}(e,o);else if(i||(s=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(o,t)),s)P(e,s);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)o.endEmitted?P(e,new S):C(e,o,t,!0);else if(o.ended)P(e,new v);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?C(e,o,t,!1):N(e,o)):C(e,o,t,!1)}else n||(o.reading=!1,N(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&j(e)),N(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=g.destroy,E.prototype._undestroy=g.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),x(this,e,t,!1,r)},E.prototype.unshift=function(e){return x(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){u||(u=e("string_decoder/").StringDecoder);var r=new u(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function D(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(k,e))}function k(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function N(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(l("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function O(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){l("readable nexttick read 0"),e.read(0)}function M(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function V(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function _(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(B,t,e))}function B(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?_(this):j(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&_(this),null;var n,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=D(r,t))),null===(n=e>0?V(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&_(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){P(this,new T("_read()"))},E.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:m;function a(t,r){l("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),e.removeListener("close",f),e.removeListener("finish",g),e.removeListener("drain",h),e.removeListener("error",d),e.removeListener("unpipe",a),n.removeListener("end",c),n.removeListener("end",m),n.removeListener("data",p),u=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function c(){l("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",a);var h=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,F(e))}}(n);e.on("drain",h);var u=!1;function p(t){l("ondata");var r=e.write(t);l("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!u&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(t){l("onerror",t),m(),e.removeListener("error",d),0===s(e,"error")&&P(e,t)}function f(){e.removeListener("finish",g),m()}function g(){l("onfinish"),e.removeListener("close",f),m()}function m(){l("unpipe"),n.unpipe(e)}return n.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",g),e.emit("pipe",n),i.flowing||(l("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=U(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?j(this):i.reading||r.nextTick(L,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(O,this),n},E.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(O,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(M,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<w.length;s++)e.on(w[s],this.emit.bind(this,w[s]));return this._read=function(t){l("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=e("./internal/streams/async_iterator")),p(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=V,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,r){return void 0===d&&(d=e("./internal/streams/from")),d(E,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":170,"./_stream_duplex":171,"./internal/streams/async_iterator":176,"./internal/streams/buffer_list":177,"./internal/streams/destroy":178,"./internal/streams/from":180,"./internal/streams/state":182,"./internal/streams/stream":183,_process:149,buffer:20,events:50,inherits:114,"string_decoder/":185,util:18}],174:[function(e,t,r){t.exports=h;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);c.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(t,r){p(e,t,r)}))}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(h,c),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new i("_transform()"))},h.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":170,"./_stream_duplex":171,inherits:114}],175:[function(e,t,r){(function(r,n){(function(){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var s;t.exports=E,E.WritableState=A;var o={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),c=e("buffer").Buffer,l=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h,u=e("./internal/streams/destroy"),p=e("./internal/streams/state").getHighWaterMark,d=e("../errors").codes,f=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,T=d.ERR_STREAM_WRITE_AFTER_END,S=d.ERR_UNKNOWN_ENCODING,P=u.errorOrDestroy;function w(){}function A(t,n,o){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=n instanceof s),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=p(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,s=n.writecb;if("function"!=typeof s)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,s){--t.pendingcb,n?(r.nextTick(s,i),r.nextTick(k,e,t),e._writableState.errorEmitted=!0,P(e,i)):(s(i),e._writableState.errorEmitted=!0,P(e,i),k(e,t))}(e,n,i,t,s);else{var o=D(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||R(e,n),i?r.nextTick(C,e,n,o,s):C(e,n,o,s)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function E(t){var r=this instanceof(s=s||e("./_stream_duplex"));if(!r&&!h.call(E,this))return new E(t);this._writableState=new A(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function x(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function C(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),k(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)s[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;s.allBuffers=c,x(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,h=r.encoding,u=r.callback;if(x(e,t,!1,t.objectMode?1:l.length,l,h,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function D(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&P(e,r),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var n=D(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(j,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}e("inherits")(E,a),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===E&&(e&&e._writableState instanceof A)}})):h=function(e){return e instanceof this},E.prototype.pipe=function(){P(this,new y)},E.prototype.write=function(e,t,n){var i,s=this._writableState,o=!1,a=!s.objectMode&&(i=e,c.isBuffer(i)||i instanceof l);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=w),s.ending?function(e,t){var n=new T;P(e,n),r.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var s;return null===n?s=new v:"string"==typeof n||t.objectMode||(s=new f("chunk",["string","Buffer"],n)),!s||(P(e,s),r.nextTick(i,s),!1)}(this,s,e,n))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,n,i,s);return l}(this,s,a,e,t,n)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,k(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=u.destroy,E.prototype._undestroy=u.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":170,"./_stream_duplex":171,"./internal/streams/destroy":178,"./internal/streams/state":182,"./internal/streams/stream":183,_process:149,buffer:20,inherits:114,"util-deprecate":188}],176:[function(e,t,r){(function(r){(function(){var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),u=Symbol("handlePromise"),p=Symbol("stream");function d(e,t){return{value:e,done:t}}function f(e){var t=e[o];if(null!==t){var r=e[p].read();null!==r&&(e[h]=null,e[o]=null,e[a]=null,t(d(r,!1)))}}function g(e){r.nextTick(f,e)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[p]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[c]?n(e[c]):t(d(void 0,!0))}))}));var n,i=this[h];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[l]?r(d(void 0,!0)):t[u](r,n)}),n)}}(i,this));else{var s=this[p].read();if(null!==s)return Promise.resolve(d(s,!1));n=new Promise(this[u])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),m);t.exports=function(e){var t,r=Object.create(y,(i(t={},p,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,u,{value:function(e,t){var n=r[p].read();n?(r[h]=null,r[o]=null,r[a]=null,e(d(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[h]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[h]=null,r[o]=null,r[a]=null,t(e)),void(r[c]=e)}var n=r[o];null!==n&&(r[h]=null,r[o]=null,r[a]=null,n(d(void 0,!0))),r[l]=!0})),e.on("readable",g.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":179,_process:149}],177:[function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var c=e("buffer").Buffer,l=e("util").inspect,h=l&&l.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,r,n,i=c.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,r=i,n=o,c.prototype.copy.call(t,r,n),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:h,value:function(e,t){return l(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:20,util:18}],178:[function(e,t,r){(function(e){(function(){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,s){var o=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(s?s(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!s&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):s?(e.nextTick(n,o),s(t)):e.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:149}],179:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||i);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||h()},l=t._writableState&&t._writableState.finished,h=function(){a=!1,l=!0,o||s.call(t)},u=t._readableState&&t._readableState.endEmitted,p=function(){o=!1,u=!0,a||s.call(t)},d=function(e){s.call(t,e)},f=function(){var e;return o&&!u?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):a&&!l?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},g=function(){t.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",h),t.on("abort",f),t.req?g():t.on("request",g)),t.on("end",p),t.on("finish",h),!1!==r.error&&t.on("error",d),t.on("close",f),function(){t.removeListener("complete",h),t.removeListener("abort",f),t.removeListener("request",g),t.req&&t.req.removeListener("finish",h),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",h),t.removeListener("end",p),t.removeListener("error",d),t.removeListener("close",f)}}},{"../../../errors":170}],180:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],181:[function(e,t,r){var n;var i=e("../../../errors").codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function l(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var h,u=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new s("streams");var p=r.map((function(t,i){var s=i<r.length-1;return function(t,r,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var c=!1;return function(e){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new o("pipe"))}}(t,s,i>0,(function(e){h||(h=e),e&&p.forEach(c),s||(p.forEach(c),u(h))}))}));return r.reduce(l)}},{"../../../errors":170,"./end-of-stream":179}],182:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},{"../../../errors":170}],183:[function(e,t,r){t.exports=e("events").EventEmitter},{events:50}],184:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":171,"./lib/_stream_passthrough.js":172,"./lib/_stream_readable.js":173,"./lib/_stream_transform.js":174,"./lib/_stream_writable.js":175,"./lib/internal/streams/end-of-stream.js":179,"./lib/internal/streams/pipeline.js":181}],185:[function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=h,this.end=u,t=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":159}],186:[function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},c=0;function l(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new l(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new l(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=c++,n=!(arguments.length<2)&&o.call(arguments,1);return a[t]=!0,i((function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":149,timers:186}],187:[function(e,t,r){var n=e("punycode/");function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var s=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=e("qs");function b(e,t,r){if(e&&"object"==typeof e&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),o=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(o);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(o);if(b=b.trim(),!r&&1===e.split("#").length){var v=a.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var T=s.exec(b);if(T){var S=(T=T[0]).toLowerCase();this.protocol=S,b=b.substr(T.length)}if(r||T||b.match(/^\/\/[^@/]+@[^@/]+/)){var P="//"===b.substr(0,2);!P||T&&g[T]||(b=b.substr(2),this.slashes=!0)}if(!g[T]&&(P||T&&!m[T])){for(var w,A,E=-1,x=0;x<u.length;x++){-1!==(C=b.indexOf(u[x]))&&(-1===E||C<E)&&(E=C)}-1!==(A=-1===E?b.lastIndexOf("@"):b.lastIndexOf("@",E))&&(w=b.slice(0,A),b=b.slice(A+1),this.auth=decodeURIComponent(w)),E=-1;for(x=0;x<h.length;x++){var C;-1!==(C=b.indexOf(h[x]))&&(-1===E||C<E)&&(E=C)}-1===E&&(E=b.length),this.host=b.slice(0,E),b=b.slice(E),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var D=this.hostname.split(/\./),j=(x=0,D.length);x<j;x++){var k=D[x];if(k&&!k.match(p)){for(var N="",I=0,O=k.length;I<O;I++)k.charCodeAt(I)>127?N+="x":N+=k[I];if(!N.match(p)){var L=D.slice(0,x),M=D.slice(x+1),F=k.match(d);F&&(L.push(F[1]),M.unshift(F[2])),M.length&&(b="/"+M.join(".")+b),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=n.toASCII(this.hostname));var V=this.port?":"+this.port:"",_=this.hostname||"";this.host=_+V,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!f[S])for(x=0,j=l.length;x<j;x++){var B=l[x];if(-1!==b.indexOf(B)){var U=encodeURIComponent(B);U===B&&(U=escape(B)),b=b.split(B).join(U)}}var H=b.indexOf("#");-1!==H&&(this.hash=b.substr(H),b=b.slice(0,H));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),m[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){V=this.pathname||"";var J=this.search||"";this.path=V+J}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(s=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var o=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),o&&"?"!==o.charAt(0)&&(o="?"+o),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(o=o.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if("string"==typeof e){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),s=0;s<n.length;s++){var o=n[s];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),c=0;c<a.length;c++){var l=a[c];"protocol"!==l&&(r[l]=e[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var h=Object.keys(e),u=0;u<h.length;u++){var p=h[u];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var f=r.pathname||"",y=r.search||"";r.path=f+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),T=v||b||r.host&&e.pathname,S=T,P=r.pathname&&r.pathname.split("/")||[],w=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(w&&(r.hostname="",r.port=null,r.host&&(""===P[0]?P[0]=r.host:P.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),T=T&&(""===d[0]||""===P[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,P=d;else if(d.length)P||(P=[]),P.pop(),P=P.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search){if(w)r.host=P.shift(),r.hostname=r.host,(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!P.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=P.slice(-1)[0],E=(r.host||e.host||P.length>1)&&("."===A||".."===A)||""===A,x=0,C=P.length;C>=0;C--)"."===(A=P[C])?P.splice(C,1):".."===A?(P.splice(C,1),x++):x&&(P.splice(C,1),x--);if(!T&&!S)for(;x--;x)P.unshift("..");!T||""===P[0]||P[0]&&"/"===P[0].charAt(0)||P.unshift(""),E&&"/"!==P.join("/").substr(-1)&&P.push("");var R,D=""===P[0]||P[0]&&"/"===P[0].charAt(0);w&&(r.hostname=D?"":P.length?P.shift():"",r.host=r.hostname,(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname));return(T=T||r.host&&P.length)&&!D&&P.unshift(""),P.length>0?r.pathname=P.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},r.parse=b,r.resolve=function(e,t){return b(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},r.format=function(e){return"string"==typeof e&&(e=b(e)),e instanceof i?e.format():i.prototype.format.call(e)},r.Url=i},{"punycode/":150,qs:152}],188:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],189:[function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}},{}],190:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},{}],191:[function(e,t,r){t.exports={name:"pict",version:"1.0.311",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/**/*.js test/**/*.js",types:"tsc -p ."},types:"types/source/Pict.d.ts",mocha:{diff:!0,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.27.0","@types/jquery":"^3.5.32","@types/sinon":"^17.0.4",eslint:"^9.27.0",globals:"^16.2.0",quackage:"^1.0.42",sinon:"^20.0.0",typescript:"^5.8.3"},dependencies:{cachetrax:"^1.0.4",fable:"^3.1.23","pict-application":"^1.0.29","pict-provider":"^1.0.6","pict-template":"^1.0.13","pict-view":"^1.0.63"}}},{}],192:[function(e,t,r){t.exports=function(e,t){let r=void 0===t?0:t;e&&"object"==typeof e.default_configuration&&"pict_configuration"in e.default_configuration?window._Pict=new Pict(e.default_configuration.pict_configuration):window._Pict=new Pict,window._Pict.LogNoisiness=r;let n="DefaultApplication",i={};"default_configuration"in e&&(i=e.default_configuration,"Hash"in i&&"string"==typeof i.Hash&&(n=i.Hash)),_Pict.log.info("Loading the pict application [".concat(n,"] and associated views.")),_Pict.addApplication(n,i,e),_Pict.PictApplication.initializeAsync((function(e){e&&console.log("Error initializing the pict application: "+e),_Pict.log.info("Loading the Application and associated views.")}))}},{}],193:[function(e,t,r){t.exports=function(e){document?"loading"!=document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function(){e()})):document.attachEvent("onreadystatechange",(function(){"complete"==document.readyState&&e()})):console.log("No document object found; no initialization happening.")}},{}],194:[function(e,t,r){const n=e("fable").ServiceProviderBase,i="#PICT-CSS";t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.services,void 0===this.options.CSSElementAddress&&(this.options.CSSElementAddress=i),this.inlineCSSMap={}}addCSS(e,t,r,n){let i=void 0!==r?r:1e3,s="string"==typeof n?n:"Unknown";this.inlineCSSMap[e]={Hash:e,Content:t,Provider:s,Priority:i}}removeCSS(e){delete this.inlineCSSMap[e]}generateCSS(){let e="",t=Object.keys(this.inlineCSSMap);t.sort(((e,t)=>this.inlineCSSMap[e].Priority-this.inlineCSSMap[t].Priority));for(let r=0;r<t.length;r++){let n=this.inlineCSSMap[t[r]],i=n.Hash;n.Hash!=n.Provider&&(i="".concat(i," from ").concat(n.Provider)),e+="/* ".concat(i," */\n").concat(n.Content,"\n")}return e}injectCSS(){this.services.ContentAssignment.assignContent(this.options.CSSElementAddress,this.generateCSS())}}},{fable:68}],195:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.fable,this.serviceType="PictContentAssignment",this.manifest=e.newManyfest(),this.inBrowser=!1,this.hasDocument=!1,"object"==typeof window&&(this.inBrowser=!0,void 0!==window.document&&"function"==typeof window.document.querySelectorAll&&(this.hasDocument=!0)),this.hasJquery=!1,this.jQuery=!1,this.inBrowser&&void 0!==window.jQuery&&(this.hasJquery=!0),this.customAssignFunction=null,this.customPrependFunction=null,this.customAppendFunction=null,this.customInsertBeforeFunction=null,this.customInsertAfterFunction=null,this.customReadFunction=null,this.customGetElementFunction=null,this.customReadAttributeFunction=null,this.customSetAttributeFunction=null,this.customRemoveAttributeFunction=null,this.customReadClassFunction=null,this.customSetClassFunction=null,this.customRemoveClassFunction=null}getElement(e){if(this.customGetElementFunction)return this.customGetElementFunction(e);if(this.hasJquery){let t=window.jQuery(e);if(0==t.length)return[];let r=[];for(let e=0;e<t.length;e++)r.push(t[e]);return r}if(this.inBrowser&&this.hasDocument){const t=window.document.querySelectorAll(e);let r=[];for(let e=0;e<t.length;e++)r.push(t[e]);return r}return this.log.trace("PICT Content GET ELEMENT for [".concat(e,"] will return empty because none of the browser methods are available")),[]}assignContent(e,t){if(this.customAssignFunction)return this.customAssignFunction(e,t);if(this.hasJquery){const r=window.jQuery(e);for(let e=0;e<r.length;e++){const n=r[e];switch(n.tagName){case"INPUT":n instanceof HTMLInputElement&&"checkbox"==n.type&&(n.checked=Boolean(t));case"SELECT":case"TEXTAREA":(n instanceof HTMLInputElement||n instanceof HTMLSelectElement||n instanceof HTMLTextAreaElement)&&(n.value=String(t));break;case"SCRIPT":n instanceof HTMLScriptElement&&(n.text=String(t));break;default:n.innerHTML=String(t)}}}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++){const n=r[e];switch(r[e].tagName){case"INPUT":n instanceof HTMLInputElement&&"checkbox"==n.type&&(n.checked=Boolean(t));case"SELECT":case"TEXTAREA":(n instanceof HTMLInputElement||n instanceof HTMLSelectElement||n instanceof HTMLTextAreaElement)&&(n.value=String(t));break;case"SCRIPT":n instanceof HTMLScriptElement&&(n.text=String(t));break;default:n.innerHTML=String(t)}}}else this.log.trace("PICT Content ASSIGN to [".concat(e,"]:"),t)}appendContent(e,t){if(this.customAppendFunction)return this.customAppendFunction(e,t);if(this.hasJquery){window.jQuery(e).append(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("beforeend",t)}else this.log.trace("PICT Content APPEND to [".concat(e,"]:"),t)}insertContentBefore(e,t){if(this.customInsertBeforeFunction)return this.customInsertBeforeFunction(e,t);if(this.hasJquery)window.jQuery(t).insertBefore(e);else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("beforebegin",t)}else this.log.trace("PICT Content INSERT BEFORE [".concat(e,"]:"),t)}insertContentAfter(e,t){if(this.customInsertAfterFunction)return this.customInsertAfterFunction(e,t);if(this.hasJquery)window.jQuery(t).insertAfter(e);else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("afterend",t)}else this.log.trace("PICT Content INSERT AFTER [".concat(e,"]:"),t)}prependContent(e,t){if(this.customAppendFunction)return this.customPrependFunction(e,t);if(this.hasJquery){window.jQuery(e).prepend(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("afterbegin",t)}else this.log.trace("PICT Content PREPEND in [".concat(e,"]:"),t)}projectContent(e,t,r,n){switch(e){case"virtual-assignment":return this.manifest.setValueByHash(this.fable,t,r);case"append":return this.appendContent(t,r);case"prepend":return this.prependContent(t,r);case"append_once":{let e="string"==typeof n?n:t;if(this.getElement(e).length<1)return this.appendContent(t,r);break}default:return this.assignContent(t,r)}}readContent(e){if(this.customReadFunction)return this.customReadFunction(e);if(this.hasJquery){const t=window.jQuery(e);switch(t.prop("tagName")){case"INPUT":if("checkbox"==t.attr("type"))return t.prop("checked");case"SELECT":case"TEXTAREA":return t.val();case"SCRIPT":return t.text();default:return t.html()}}else{if(!this.inBrowser||!this.hasDocument)return this.log.trace("PICT Content READ from [".concat(e,"]...")),"";{let t="string"==typeof e?window.document.querySelectorAll(e):[e];if(t.length<1)return null;if(1==t.length){const e=t[0];switch(e.tagName){case"INPUT":if(e instanceof HTMLInputElement&&"checkbox"==e.type)return e.checked;case"SELECT":case"TEXTAREA":if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return e.value;case"SCRIPT":if(e instanceof HTMLScriptElement)return e.text;default:return e.innerHTML}}}}}addClass(e,t){if(this.customSetClassFunction)return this.customSetClassFunction(e,t);if(this.hasJquery){window.jQuery(e).addClass(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(Array.isArray(t))for(const n of t)r[e].classList.add(n);else r[e].classList.add(t)}else this.log.trace("PICT Content ADDCLASS to [".concat(e,"]:"),t)}removeClass(e,t){if(this.customRemoveClassFunction)return this.customRemoveClassFunction(e,t);if(this.hasJquery){window.jQuery(e).removeClass(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(Array.isArray(t))for(const n of t)r[e].classList.remove(n);else r[e].classList.remove(t)}else this.log.trace("PICT Content REMOVECLASS from [".concat(e,"]:"),t)}readAttribute(e,t){if(this.customReadAttributeFunction)return this.customReadAttributeFunction(e,t);if(this.hasJquery){return window.jQuery(e).attr(t)}if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].getAttribute(t);return r}this.log.trace("PICT Content READATTRIBUTE from [".concat(e,"]:"),t)}setAttribute(e,t,r){if(this.customSetAttributeFunction)return this.customSetAttributeFunction(e,t,r);if(this.hasJquery){window.jQuery(e).attr(t,r)}else if(this.inBrowser&&this.hasDocument){const n="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<n.length;e++)n[e].setAttribute(t,r)}else this.log.trace("PICT Content SETATTRIBUTE for [".concat(e,"] ATTRIBUTE [").concat(t,"]:"),r)}removeAttribute(e,t){if(this.customRemoveAttributeFunction)return this.customRemoveAttributeFunction(e,t);if(this.hasJquery){window.jQuery(e).removeAttr(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].removeAttribute(t)}else this.log.trace("PICT Content REMOVEATTRIBUTE for [".concat(e,"] ATTRIBUTE [").concat(t,"]"))}hasClass(e,t){if(this.customReadClassFunction)return this.customReadClassFunction(e,t);if(this.hasJquery){return window.jQuery(e).hasClass(t)}if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(r[e].classList.contains(t))return!0;return!1}return this.log.trace("PICT Content HASCLASS for [".concat(e,"] CLASS [").concat(t,"]:")),!1}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}}},{fable:68}],196:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.fable,this.serviceType="PictDataProvider"}getDataByAddress(e,t){let r=void 0===t?{}:t;const n={Fable:this.fable,Pict:this.fable,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Record:r};return this.fable.manifest.getValueByHash(n,e)}}},{fable:68}],197:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){var n;super(e,t,r),this.options,this.fable,this.log,this.serviceType="PictMeadowProvider",this.fable.settings.PictDefaultURLPrefix?this.options.urlPrefix=this.fable.settings.PictDefaultURLPrefix:this.options.urlPrefix||(this.options.urlPrefix="/1.0/"),this.options.downloadBatchSize||("number"==typeof this.fable.settings.PictDefaultDownloadBatchSize?this.options.downloadBatchSize=this.fable.settings.PictDefaultDownloadBatchSize:this.options.downloadBatchSize=100),this.restClient=null!==(n=this.fable.RestClient)&&void 0!==n?n:this.fable.instantiateServiceProviderWithoutRegistration("RestClient"),this.recordCache={},this.recordSetCache={},this.prepareRequestOptions=e=>e}initializeCache(e){e in this.recordCache||(this.recordCache[e]=this.fable.instantiateServiceProviderWithoutRegistration("ObjectCache"),this.recordCache[e].maxAge=3e4,this.recordCache[e].maxLength=1e4,this.fable.Bundle[e]=this.recordCache[e].RecordMap),e in this.recordSetCache||(this.recordSetCache[e]=this.fable.instantiateServiceProviderWithoutRegistration("ObjectCache"),this.recordSetCache[e].maxAge=1e4,this.recordSetCache[e].maxLength=100)}gatherEntitySetCount(e,t,r){return e.CountOnly=!0,this.gatherEntitySet(e,t,r)}gatherEntitySet(e,t,r){if(!("Entity"in e)||"string"!=typeof e.Entity)return this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain an Entity string."),r();if(!("Destination"in e)||"string"!=typeof e.Destination)return this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain a Destination string."),r();"Filter"in e&&"string"==typeof e.Filter||(e.Filter=""),"FilterData"in e&&"object"==typeof e.FilterData||(e.FilterData={}),t.StepData=e.FilterData,"RecordStartCursor"in e&&"number"==typeof e.RecordStartCursor||(e.RecordStartCursor=0),"PageSize"in e&&"number"==typeof e.PageSize||(e.PageSize=1e4),"AllRecords"in e&&"boolean"==typeof e.AllRecords||(e.AllRecords=!1);let n=null,i=null;e.PageSize&&(n=e.RecordStartCursor,i=e.PageSize);const s=this.fable.parseTemplate(e.Filter,t),o=(o,a)=>o?(this.log.error("EntityBundleRequest request Error getting entity set for [".concat(e.Entity,"] with filter [").concat(s,"]: ").concat(o),o),r(o,"")):(e.CountOnly?(this.log.trace("EntityBundleRequest counted ".concat(a," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(i,"]"))),this.fable.manifest.setValueByHash(t,e.Destination,a)):e.SingleRecord?(this.log.trace("EntityBundleRequest found ".concat(a.length," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(i,"]"))),a.length>1&&this.log.warn("EntityBundleRequest found more than one record for ".concat(e.Entity," filtered to [").concat(s,"] but SingleRecord is true; setting the first record.")),a.length<1&&this.fable.manifest.setValueByHash(t,e.Destination,!1),this.fable.manifest.setValueByHash(t,e.Destination,a[0])):(this.log.trace("EntityBundleRequest found ".concat(a.length," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(i,"]"))),this.fable.manifest.setValueByHash(t,e.Destination,a)),r());e.CountOnly?this.getEntitySetRecordCount(e.Entity,s,o):i&&!e.AllRecords?this.getEntitySetPage(e.Entity,s,n,i,o):this.getEntitySet(e.Entity,s,o)}mapJoinSingleDestination(e,t,r){const n=this.fable.manifest.getValueByHash(r,t.JoinRecordSetAddress);if(!Array.isArray(n))throw new Error("EntityBundleRequest failed to map join because the source [".concat(t.JoinRecordSetAddress,"] did not return an array."));const i={};for(const e of n){i[e[t.JoinValue]]=e}for(const r of n)if(r)if(t.BucketBy||t.BucketByTemplate){const n=[];if(t.BucketBy){const e=Array.isArray(t.BucketBy)?t.BucketBy:[t.BucketBy];for(const t of e){const e=this.fable.manifest.getValueByHash(r,t);n.push(e)}}else{const e=Array.isArray(t.BucketByTemplate)?t.BucketByTemplate:[t.BucketByTemplate];for(const t of e){const e=this.fable.parseTemplate(t,r);e&&n.push(e)}}if(n.length<1)this.fable.LogNoisiness>0&&this.log.warn("EntityBundleRequest failed to map join because no bucket values were found.",{pCustomRequestInformation:t,tmpSourceEntity:r});else{const i="".concat(t.RecordDestinationAddress,".").concat(n.join("."));if(t.SingleRecord)this.fable.manifest.setValueByHash(e,i,r);else{let t=this.fable.manifest.getValueByHash(e,i,r);t||(t=[],this.fable.manifest.setValueByHash(e,i,t)),t.push(r)}}}else t.SingleRecord?(e[t.RecordDestinationAddress]&&this.fable.LogNoisiness>1&&this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(t.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord.")),e[t.RecordDestinationAddress]=r):(e[t.RecordDestinationAddress]=e[t.RecordDestinationAddress]||[],e[t.RecordDestinationAddress].push(r));else this.log.error("EntityBundleRequest failed to map join because the source entity was not found in the source lookup.");return[e]}mapJoin(e,t){const r=e.DestinationRecordAddress?this.fable.manifest.getValueByHash(t,e.DestinationRecordAddress):null,n=e.DestinationRecordSetAddress?this.fable.manifest.getValueByHash(t,e.DestinationRecordSetAddress):null;if(!Array.isArray(n)&&!r)throw new Error("EntityBundleRequest failed to map join because the destination [".concat(e.DestinationRecordSetAddress,"] did not return an array."));if(r)return this.mapJoinSingleDestination(r,e,t);const i=this.fable.manifest.getValueByHash(t,e.Joins);if(!Array.isArray(i))throw new Error("EntityBundleRequest failed to map join because the join [".concat(e.Joins,"] did not return an array."));const s=this.fable.manifest.getValueByHash(t,e.JoinRecordSetAddress);if(!Array.isArray(s))throw new Error("EntityBundleRequest failed to map join because the source [".concat(e.JoinRecordSetAddress,"] did not return an array."));const o=e.JoinJoinValueLHS||e.DestinationJoinValue,a=e.JoinJoinValueRHS||e.JoinValue,c={},l={},h={};for(const t of n||[]){c[t[e.DestinationJoinValue]]=t}for(const t of s){l[t[e.JoinValue]]=t}for(const e of i){const t=e[o],r=e[a];h[t]=h[t]||new Set,h[t].add(r)}for(const t of Object.keys(h)){const r=Array.from(h[t]),n=c[t];if(n)for(const t of r){const r=l[t];if(r)if(e.BucketBy||e.BucketByTemplate){const t=[];if(e.BucketBy){const n=Array.isArray(e.BucketBy)?e.BucketBy:[e.BucketBy];for(const e of n){const n=this.fable.manifest.getValueByHash(r,e);t.push(n)}}else{const n=Array.isArray(e.BucketByTemplate)?e.BucketByTemplate:[e.BucketByTemplate];for(const e of n){const n=this.fable.parseTemplate(e,r);t.push(n)}}n[e.RecordDestinationAddress]||(n[e.RecordDestinationAddress]={});const i="".concat(e.RecordDestinationAddress,".").concat(t.join("."));if(e.SingleRecord)this.fable.manifest.setValueByHash(n,i,r);else{let e=this.fable.manifest.getValueByHash(n,i,r);e||(e=[],this.fable.manifest.setValueByHash(n,i,e)),e.push(r)}}else e.SingleRecord?(n[e.RecordDestinationAddress]&&this.fable.LogNoisiness>1&&this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(e.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord.")),n[e.RecordDestinationAddress]=r):(n[e.RecordDestinationAddress]=n[e.RecordDestinationAddress]||[],n[e.RecordDestinationAddress].push(r));else this.log.error("EntityBundleRequest failed to map join because the RHS join value [".concat(t,"] was not found in the source lookup."))}else this.log.error("EntityBundleRequest failed to map join because the LHS join value [".concat(t,"] was not found in the destination lookup."))}return n}projectDataset(e,t){let r=this.fable.manifest.getValueByHash(t,e.InputRecordsetAddress);if(null==typeof r||"object"!=typeof r)throw new Error("EntityBundleRequest failed to project dataset because the input recordset [".concat(e.InputRecordsetAddress,"] did not return an valid object."));Array.isArray(r)||(r=[r]);let n=this.fable.manifest.getValueByHash(t,e.OutputRecordsetAddress);n||(n=[],this.fable.manifest.setValueByHash(t,e.OutputRecordsetAddress,n));for(const i of r){let r,s=n;"object"==typeof e.OutputRecordsetAddressMapping&&(r=this._resolveOutputRecordsetAddressMapping(e,t,i),r&&(s=this.fable.manifest.getValueByHash(t,r),s||(s=[],this.fable.manifest.setValueByHash(t,r,s))),s&&Array.isArray(s)||(s=n));const o=this.fable.parseTemplate(e.RecordPrototypeAddress,Object.assign({InputRecord:i},t)),a=this.fable.manifest.getValueByHash(Object.assign({InputRecord:i,OutputRecordset:s},t),o);let c={};Array.isArray(a)&&a.length>0?c=a[0]:s.push(c);let l=e.RecordFieldMapping[r]||e.RecordFieldMapping.Default;if(l||(l=e.RecordFieldMapping[Object.keys(e.RecordFieldMapping)[0]]),!l)throw new Error("EntityBundleRequest failed to project dataset because the record field mapping for [".concat(r,"] did not return a mapping."));for(const e of Object.keys(l)){const r=l[e],n=this.fable.manifest.getValueByHash(Object.assign({InputRecord:i},t),e);this.fable.manifest.setValueByHash(Object.assign({OutputRecord:c},t),r,n)}}}_resolveOutputRecordsetAddressMapping(e,t,r){const n=Object.assign({InputRecord:r},t);for(const t of Object.keys(e.OutputRecordsetAddressMapping)){const[r,i,s]=t.split(","),o=this.fable.manifest.getValueByHash(n,r);if(o){if("AnyContains"===i){if(!Array.isArray(o)){this.log.error("EntityBundleRequest failed to project dataset because the LHS address [".concat(r,"] did not return an array."));continue}for(const r of o)if(String(r).includes(s))return e.OutputRecordsetAddressMapping[t]}}else this.fable.LogNoisiness>0&&this.log.warn("EntityBundleRequest failed to project dataset because the LHS address [".concat(r,"] did not return a value."))}return null}gatherCustomDataSet(e,t,r){if(!("URL"in e)||"string"!=typeof e.URL)return this.log.warn("EntityBundleRequest failed to parse custom data request because the stanza did not contain a URL string."),r();"URLData"in e&&"object"==typeof e.URLData||(e.URLData={}),t.StepData=e.URLData;const n=this.fable.parseTemplate(e.URL,t);""==n&&this.log.warn("EntityBundleRequest failed to parse custom data request because the entity Filter did not return a string for FilterBy");let i="";const s=!!e.Host&&e.Host,o=e.Protocol?e.Protocol:"https",a=!!e.Port&&e.Port;s?(i="".concat(o,"://").concat(s),a&&(i+=":".concat(a))):i=this.fable.EntityProvider.options.urlPrefix;let c={url:"".concat(i).concat(n)};return c=this.fable.EntityProvider.prepareRequestOptions(c),this.fable.EntityProvider.restClient.getJSON(c,((i,s,o)=>i?(this.log.error("EntityBundleRequest request Error getting data set for [".concat(e.Entity,"] with filter [").concat(n,"]: ").concat(i),i),r(i,"")):(this.log.trace("EntityBundleRequest completed request for ".concat(e.Entity," filtered to [").concat(n,"]")),e.Destination&&this.fable.manifest.setValueByHash(t,e.Destination,o),r())))}processBundle(e){if(!Array.isArray(e))throw this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."),new Error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");const t=[];let r={};for(const n of e)try{switch(n.Type){case"SetStateAddress":t.push(r),r=this.fable.manifest.getValueByHash(this.fable,n.StateAddress),void 0===r&&(r={},this.fable.manifest.setValueByHash(this.fable,n.StateAddress,r));break;case"PopState":t.length>0?r=t.pop():this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress.");break;case"MapJoin":this.mapJoin(n,this.prepareState(r,n));break;case"ProjectDataset":this.projectDataset(n,this.prepareState(r,n));break;default:this.log.error("EntityBundleRequest encountered an unsupported type [".concat(n.Type,"] in the entity bundle description."))}}catch(e){this.log.error("EntityBundleRequest error gathering entity set: ".concat(e),{Stack:e.stack})}}gatherDataFromServer(e,t){if(!Array.isArray(e))return this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."),t(new Error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."));let r=this.fable.newAnticipate();const n=[];let i={};for(let t=0;t<e.length;t++){let s=e[t];r.anticipate((e=>{try{switch(s.Type){case"SetStateAddress":return n.push(i),i=this.fable.manifest.getValueByHash(this.fable,s.StateAddress),void 0===i&&(i={},this.fable.manifest.setValueByHash(this.fable,s.StateAddress,i)),e();case"PopState":return n.length>0?i=n.pop():this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress."),e();case"Custom":return this.gatherCustomDataSet(s,this.prepareState(i,s),e);case"MapJoin":return this.mapJoin(s,this.prepareState(i,s)),e();case"ProjectDataset":return this.projectDataset(s,this.prepareState(i,s)),e();case"MeadowEntityCount":return this.gatherEntitySetCount(s,this.prepareState(i,s),e);default:return this.gatherEntitySet(s,this.prepareState(i,s),e)}}catch(t){return this.log.error("EntityBundleRequest error gathering entity set: ".concat(t),{Stack:t.stack}),e()}}))}r.wait((e=>e?(this.log.error("EntityBundleRequest error gathering entity set: ".concat(e),{Stack:e.stack}),t(e)):t()))}prepareState(e,t){return{State:e,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Pict:this.fable,Fable:this.fable,StepConfiguration:t}}getEntity(e,t,r){this.initializeCache(e),this.recordCache[e].prune(function(){let n=this.recordCache[e].read(t);if(n)return r(null,n);let i={url:"".concat(this.options.urlPrefix).concat(e,"/").concat(t)};return i=this.prepareRequestOptions(i),this.restClient.getJSON(i,((n,i,s)=>(s&&this.recordCache[e].put(s,t),r(n,s))))}.bind(this))}getEntitySetPage(e,t,r,n,i){const s=t?"/FilteredTo/".concat(t):"",o="".concat(this.options.urlPrefix).concat(e,"s").concat(s,"/").concat(r,"/").concat(n);return this.restClient.getJSON(o,function(s,a,c){return a&&a.statusCode&&a.statusCode>=400?(this.log.error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] [").concat(r,"/").concat(n,"] from url [").concat(o,"]: ").concat(a.statusCode," ").concat(a.statusMessage)),i(new Error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] [").concat(r,"/").concat(n,"] from url [").concat(o,"]: ").concat(a.statusCode," ").concat(JSON.stringify(c||{}))))):i(s,c)}.bind(this))}getEntitySetRecordCount(e,t,r){const n=t?"/FilteredTo/".concat(t):"",i="".concat(this.options.urlPrefix).concat(e,"s/Count").concat(n);return this.restClient.getJSON(i,function(n,s,o){if(s&&s.statusCode&&s.statusCode>=400)return this.log.error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(s.statusCode," ").concat(s.statusMessage)),r(new Error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(s.statusCode," ").concat(JSON.stringify(o||{}))));if(n)return this.log.error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(n)),r(n);let a=0;return o.Count&&(a=o.Count),r(n,a)}.bind(this))}getEntitySet(e,t,r){this.initializeCache(e),this.recordSetCache[e].prune(function(){let n=this.recordSetCache[e].read(t);return n?r(null,n):this.getEntitySetRecordCount(e,t,((n,i)=>{if(n)return r(n);let s=i;if(isNaN(i))return this.log.error("Entity count did not return a number for [".concat(e,"] filtered to [").concat(t,"]... something is fatally wrong from the server accessed in getEntitySet call.")),r(new Error("Entity count did not return a number in getEntitySet."));let o=[],a=this.options.downloadBatchSize;const c=t?"/FilteredTo/".concat(t):"";for(let t=0;t<s/a;t++)o.push("".concat(this.options.urlPrefix).concat(e,"s").concat(c,"/").concat(t*a,"/").concat(a));let l=[];this.fable.Utility.eachLimit(o,1,((r,n)=>{this.restClient.getJSON(r,((i,s,o)=>s&&s.statusCode&&s.statusCode>=400?(this.log.error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(r,"]: ").concat(s.statusCode," ").concat(s.statusMessage)),n(new Error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(r,"]: ").concat(s.statusCode," ").concat(JSON.stringify(o||{}))))):(l=l.concat(o),n(i))))}),(n=>(l&&this.recordSetCache[e].put(l,t),r(n,l))))}))}.bind(this))}}},{fable:68}],198:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.UUID,this.Hash,this.serviceType="PictTemplateProvider",this.templates={},this.templateSources={},this.defaultTemplates=[],this.loadTemplateFunction=()=>null}addTemplate(e,t,r){this.templates[e]=t,this.templateSources[e]="string"==typeof r?r:"Direct addTemplate('".concat(e,"') function load into PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"]")}addDefaultTemplate(e,t,r,n){let i={prefix:e,postfix:t,template:r,source:"string"==typeof n?n:"Direct addDefaultTemplate('".concat(e,"','").concat(t,"',..) function load into PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"]")};"string"!=typeof r&&this.log.error("PictTemplateProvider.addDefaultTemplate: pTemplate is not a string."),this.defaultTemplates.push(i)}checkDefaultTemplateHash(e){for(let t=0;t<this.defaultTemplates.length;t++)if(e.indexOf(this.defaultTemplates[t].postfix)==e.length-this.defaultTemplates[t].postfix.length&&0==e.indexOf(this.defaultTemplates[t].prefix))return this.templates[e]=this.defaultTemplates[t].template,this.templateSources[e]="Auto created in checkDefaultTemplateHash('".concat(e,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(this.defaultTemplates[t].prefix,"]...[").concat(this.defaultTemplates[t].postfix,"]"),this.templates[e];return null}getTemplate(e){return e in this.templates||this.loadTemplate(e),e in this.templates||this.checkDefaultTemplateHash(e),e in this.templates?this.templates[e]:null}loadTemplate(e){let t=this.loadTemplateFunction(e);return t&&(this.templates[e]=t.template,this.templateSources[e]="Loaded in loadTemplate('".concat(e,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(t.source,"]")),t}}},{fable:68}],199:[function(e,t,r){const n=e("./services/Fable-Service-TransactionTracking.js"),i=e("fable"),s=e("../package.json"),o=e("./providers/Provider-Filter-Manager.js"),a=e("./providers/Provider-DataBroker.js"),c=e("./Pict-Template-Provider.js"),l=e("./Pict-Content-Assignment.js"),h=e("./Pict-DataProvider.js"),u=e("./Pict-CSS.js"),p=e("./Pict-Meadow-EntityProvider.js");t.exports=class extends i{constructor(t){super(t),this.settings,this.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}"),this._PackageFable=this._Package,this._Package=s,this.browserAddress="window._Pict","BrowserAddress"in this.settings&&(this.browserAddress=this.settings.BrowserAddress),this.children=[],this.PictApplication=null,this.log,this.instantiateServiceProvider("RestClient"),this.TemplateProvider=null,this.addAndInstantiateServiceType("TemplateProvider",c),this.EntityProvider=null,this.addAndInstantiateServiceType("EntityProvider",p),this.DataProvider=null,this.addAndInstantiateServiceType("DataProvider",h),this.addServiceTypeIfNotExists("TransactionTracking",n),this.ContentAssignment=null,this.addAndInstantiateServiceType("ContentAssignment",l),this.CSSMap=null,this.addAndInstantiateServiceType("CSSMap",u),this.addServiceType("PictTemplate",e("pict-template")),this.instantiateServiceProvider("MetaTemplate"),this.instantiateServiceProvider("DataGeneration"),this.manifest=this.instantiateServiceProvider("Manifest"),this.AppData={},"DefaultAppData"in this.fable.settings&&(this.AppData=this.fable.settings.DefaultAppData),this.Bundle={},"DefaultBundle"in this.fable.settings&&(this.Bundle=this.fable.settings.DefaultBundle),this.LogNoisiness=0,this.LogControlFlow=!1,this.LogControlFlowWatchAddressList=[],this.settings.Manifests&&this.loadManifestSet(this.settings.Manifests),this._DefaultPictTemplatesInitialized=!1,this.initializePictTemplateEngine(),this.addServiceType("PictView",e("pict-view")),this.addServiceType("PictProvider",e("pict-provider")),this.addServiceType("PictApplication",e("pict-application")),this.providers=this.servicesMap.PictProvider,this.views=this.servicesMap.PictView,this.addProvider("FilterManager",{},o),this.addProvider("DataBroker",{},a)}loadManifestSet(e){if("object"!=typeof e)return void this.log.warn("PICT [".concat(this.UUID,"] could not load Manifest Set; pManifestSet was not an object."));let t=Object.keys(e);if(t.length>0)for(let r=0;r<t.length;r++){let n=t[r];this.instantiateServiceProvider("Manifest",e[n],n)}}addTemplate(e){if("function"!=typeof e)return this.log.warn("PICT [".concat(this.UUID,"] could not add Template; pTemplatePrototype was not a class it was ").concat(typeof e,".")),null;let t=e.template_hash;return this.LogNoisiness>1&&this.log.info("PICT-ControlFlow addTemplate [".concat(t,"]")),this.instantiateServiceProviderFromPrototype("PictTemplate",{},t,e)}addView(e,t,r){let n="object"==typeof t?t:{},i="string"==typeof e?e:this.fable.getUUID(),s=r;if(this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addView [".concat(i,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addView [".concat(i,"]"))),s){const e=s.default_configuration;return e&&(n=this.fable.Utility.extend({},JSON.parse(JSON.stringify(e)),n)),this.instantiateServiceProviderFromPrototype("PictView",n,i,s)}return this.instantiateServiceProvider("PictView",n,i)}addViewSingleton(e,t,r){return e in this.views?this.views[e]:this.addView(e,t,r)}addProviderSingleton(e,t,r){return e in this.providers?this.providers[e]:this.addProvider(e,t,r)}newTransactionTracker(){return this.instantiateServiceProviderWithoutRegistration("TransactionTracking")}addProvider(e,t,r){let n="object"==typeof t?t:{},i="string"==typeof e?e:this.fable.getUUID();return this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addProvider [".concat(i,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addProvider [".concat(i,"]"))),void 0!==r?("default_configuration"in r&&(n=this.fable.Utility.extend({},r.default_configuration,n)),this.instantiateServiceProviderFromPrototype("PictProvider",n,i,r)):this.instantiateServiceProvider("PictProvider",n,i)}addApplication(e,t,r){let n="object"==typeof t?t:{},i="string"==typeof e?e:this.fable.getUUID();return this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addApplication [".concat(i,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addApplication [".concat(i,"]"))),void 0!==r?("default_configuration"in r&&(n=this.fable.Utility.extend({},r.default_configuration,n)),this.instantiateServiceProviderFromPrototype("PictApplication",n,i,r)):this.instantiateServiceProvider("PictApplication",n,i)}initializePictTemplateEngine(){this._DefaultPictTemplatesInitialized||(this.addTemplate(e("./templates/Pict-Template-Data.js")),this.addTemplate(e("./templates/Pict-Template-DataWithTemplateFallback.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByReference.js")),this.addTemplate(e("./templates/Pict-Template-TemplateFromAddress.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByTypes.js")),this.addTemplate(e("./templates/Pict-Template-DataValueByKey.js")),this.addTemplate(e("./templates/Pict-Template-View.js")),this.addTemplate(e("./templates/data/Pict-Template-DataEncodeJavascriptString.js")),this.addTemplate(e("./templates/data/Pict-Template-HtmlCommentStart.js")),this.addTemplate(e("./templates/data/Pict-Template-HtmlCommentEnd.js")),this.addTemplate(e("./templates/Pict-Template-Self.js")),this.addTemplate(e("./templates/Pict-Template-Entity.js")),this.addTemplate(e("./templates/Pict-Template-Template.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByDataAddress.js")),this.addTemplate(e("./templates/Pict-Template-SolveByReference.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSet.js")),this.addTemplate(e("./templates/Pict-Template-TemplateValueSet.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSetWithPayload.js")),this.addTemplate(e("./templates/Pict-Template-TemplateFromMap.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSetFromMap.js")),this.addTemplate(e("./templates/logic/Pict-Template-TemplateIf.js")),this.addTemplate(e("./templates/logic/Pict-Template-TemplateIfAbsolute.js")),this.addTemplate(e("./templates/logic/Pict-Template-NotEmpty.js")),this.addTemplate(e("./templates/data/Pict-Template-DataJson.js")),this.addTemplate(e("./templates/data/Pict-Template-PascalCaseIdentifier.js")),this.addTemplate(e("./templates/data/Pict-Template-DateOnlyFormat.js")),this.addTemplate(e("./templates/data/Pict-Template-DateOnlyYMD.js")),this.addTemplate(e("./templates/data/Pict-Template-DateTimeFormat.js")),this.addTemplate(e("./templates/data/Pict-Template-DateTimeYMD.js")),this.addTemplate(e("./templates/data/Pict-Template-Digits.js")),this.addTemplate(e("./templates/data/Pict-Template-Dollars.js")),this.addTemplate(e("./templates/data/Pict-Template-Join.js")),this.addTemplate(e("./templates/data/Pict-Template-JoinUnique.js")),this.addTemplate(e("./templates/data/Pict-Template-PluckJoinUnique.js")),this.addTemplate(e("./templates/data-generation/Pict-Template-RandomNumber.js")),this.addTemplate(e("./templates/data-generation/Pict-Template-RandomNumberString.js")),this.addTemplate(e("./templates/debugging/Pict-Template-Breakpoint.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogStatement.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogValue.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogValueTree.js")),this.addTemplate(e("./templates/debugging/Pict-Template-DataValueTree.js")),this._DefaultPictTemplatesInitialized=!0)}resolveStateFromAddress(e,t,r,n,i,s){let o=Array.isArray(r)?r:[this],a=i||this,c="object"==typeof n&&null!=n?n:{};return c.Fable=this,c.Pict=this,c.AppData=this.AppData,c.Bundle=this.Bundle,c.Context=o,c.Record=t,c.Scope=a,c.__State=s,this.manifest.getValueByHash(c,e)}setStateValueAtAddress(e,t,r,n,i){let s=Array.isArray(n)?n:[this],o=i||this;const a={Fable:this.fable,Pict:this,AppData:this.AppData,Bundle:this.Bundle,Context:s,Record:t,Scope:o};return this.manifest.setValueByHash(a,e,r)}parseTemplate(e,t,r,n,i,s){let o,a="object"==typeof t?t:{},c=Array.isArray(n)?n:[this],l=i||this;if(this.LogControlFlow&&(o=this.fable.getUUID(),this.log.info("PICT-ControlFlow parseTemplate ".concat(o," [").concat(e.substring(0,50).replace("\n","\\n"),"...").concat(e.length,"] (fCallback: ").concat(typeof r,") with data size [").concat(JSON.stringify(a).length,"]")),this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," template:\n").concat(e)),this.LogControlFlowWatchAddressList.length>0))for(let e=0;e<this.LogControlFlowWatchAddressList.length;e++)this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Watch Value: [").concat(this.LogControlFlowWatchAddressList[e],"]=>[").concat(this.resolveStateFromAddress(this.LogControlFlowWatchAddressList[e],a),"]"));if("function"!=typeof r){let t=this.MetaTemplate.parseString(e,a,null,c,l,s);return this.LogControlFlow&&this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Template Return Value:\n").concat(t)),t}this.MetaTemplate.parseString(e,a,((e,t)=>(this.LogControlFlow&&this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Template Async Return Value:\n").concat(t)),r(e,t))),c,l,s)}parseTemplateByHash(e,t,r,n,i,s){let o=this.TemplateProvider.getTemplate(e);return o||(o=""),this.parseTemplate(o,t,r,n,i,s)}parseTemplateSet(e,t,r,n,i,s){let o="";if("function"!=typeof r){if(Array.isArray(t)||"object"==typeof t){if(Array.isArray(t))for(let r=0;r<t.length;r++)o+=this.parseTemplate(e,t[r],null,n,i,s);else{let r=Object.keys(t);for(let a=0;a<r.length;a++)o+=this.parseTemplate(e,t[r[a]],null,n,i,s)}return o}return""}if(!Array.isArray(t)&&"object"!=typeof t)return r(Error("Pict: Template Set: pDataSet is not an array or object."),"");this.Utility.eachLimit(t,1,((t,r)=>this.parseTemplate(e,t,((e,t)=>(o+=t,r())),n,i,s)),(e=>r(e,o)))}parseTemplateSetByHash(e,t,r,n,i,s){let o=this.TemplateProvider.getTemplate(e);return o||(o=""),this.parseTemplateSet(o,t,r,n,i,s)}parseTemplateSetWithPayload(e,t,r,n,i,s,o){let a="";if("function"!=typeof n){if(Array.isArray(t)||"object"==typeof t){if(Array.isArray(t))for(let n=0;n<t.length;n++)a+=this.parseTemplate(e,{Data:t[n],Payload:r},null,i,s,o);else{let n=Object.keys(t);for(let c=0;c<n.length;c++)a+=this.parseTemplate(e,{Data:t[n[c]],Payload:r},null,i,s,o)}return a}return""}if(!Array.isArray(t)&&"object"!=typeof t)return n(Error("Pict: Template Set: pDataSet is not an array or object."),"");this.Utility.eachLimit(t,1,((t,n)=>this.parseTemplate(e,{Data:t,Payload:r},((e,t)=>(a+=t,n())),i,s,o)),(e=>n(e,a)))}parseTemplateSetWithPayloadByHash(e,t,r,n,i,s,o){let a=this.TemplateProvider.getTemplate(e);return a||(a=""),this.parseTemplateSetWithPayload(a,t,r,n,i,s,o)}},t.exports.PictApplicationClass=e("pict-application"),t.exports.PictViewClass=e("pict-view"),t.exports.PictProviderClass=e("pict-provider"),t.exports.PictTemplateClass=e("pict-template"),t.exports.EnvironmentLog=e("./environments/Pict-Environment-Log.js"),t.exports.EnvironmentObject=e("./environments/Pict-Environment-Object.js"),t.exports.FilterClauseBase=e("./filters/FilterClauseBase.js"),t.exports.FilterClauseLocal=e("./filters/FilterClauseLocal.js"),t.exports.FilterClauseInternalJoin=e("./filters/FilterClauseInternalJoin.js"),t.exports.FilterClauseExternalJoin=e("./filters/FilterClauseExternalJoin.js"),t.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}"),t.exports.safeOnDocumentReady=e("./Pict-Browser-SafeOnDocumentReady.js"),t.exports.safeLoadPictApplication=e("./Pict-Browser-SafeLoad.js")},{"../package.json":191,"./Pict-Browser-SafeLoad.js":192,"./Pict-Browser-SafeOnDocumentReady.js":193,"./Pict-CSS.js":194,"./Pict-Content-Assignment.js":195,"./Pict-DataProvider.js":196,"./Pict-Meadow-EntityProvider.js":197,"./Pict-Template-Provider.js":198,"./environments/Pict-Environment-Log.js":200,"./environments/Pict-Environment-Object.js":201,"./filters/FilterClauseBase.js":203,"./filters/FilterClauseExternalJoin.js":204,"./filters/FilterClauseInternalJoin.js":205,"./filters/FilterClauseLocal.js":206,"./providers/Provider-DataBroker.js":207,"./providers/Provider-Filter-Manager.js":208,"./services/Fable-Service-TransactionTracking.js":209,"./templates/Pict-Template-Data.js":210,"./templates/Pict-Template-DataValueByKey.js":211,"./templates/Pict-Template-DataWithTemplateFallback.js":212,"./templates/Pict-Template-Entity.js":213,"./templates/Pict-Template-Self.js":214,"./templates/Pict-Template-SolveByReference.js":215,"./templates/Pict-Template-Template.js":216,"./templates/Pict-Template-TemplateByDataAddress.js":217,"./templates/Pict-Template-TemplateByReference.js":218,"./templates/Pict-Template-TemplateByTypes.js":219,"./templates/Pict-Template-TemplateFromAddress.js":220,"./templates/Pict-Template-TemplateFromMap.js":221,"./templates/Pict-Template-TemplateSet.js":222,"./templates/Pict-Template-TemplateSetFromMap.js":223,"./templates/Pict-Template-TemplateSetWithPayload.js":224,"./templates/Pict-Template-TemplateValueSet.js":225,"./templates/Pict-Template-View.js":226,"./templates/data-generation/Pict-Template-RandomNumber.js":227,"./templates/data-generation/Pict-Template-RandomNumberString.js":228,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":229,"./templates/data/Pict-Template-DataJson.js":230,"./templates/data/Pict-Template-DateOnlyFormat.js":231,"./templates/data/Pict-Template-DateOnlyYMD.js":232,"./templates/data/Pict-Template-DateTimeFormat.js":233,"./templates/data/Pict-Template-DateTimeYMD.js":234,"./templates/data/Pict-Template-Digits.js":235,"./templates/data/Pict-Template-Dollars.js":236,"./templates/data/Pict-Template-HtmlCommentEnd.js":237,"./templates/data/Pict-Template-HtmlCommentStart.js":238,"./templates/data/Pict-Template-Join.js":239,"./templates/data/Pict-Template-JoinUnique.js":240,"./templates/data/Pict-Template-PascalCaseIdentifier.js":241,"./templates/data/Pict-Template-PluckJoinUnique.js":242,"./templates/debugging/Pict-Template-Breakpoint.js":243,"./templates/debugging/Pict-Template-DataValueTree.js":244,"./templates/debugging/Pict-Template-LogStatement.js":245,"./templates/debugging/Pict-Template-LogValue.js":246,"./templates/debugging/Pict-Template-LogValueTree.js":247,"./templates/logic/Pict-Template-NotEmpty.js":248,"./templates/logic/Pict-Template-TemplateIf.js":250,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":251,fable:68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(e,t,r){t.exports=class{constructor(e,t){this.contentMap="object"==typeof t?t:{},this.pict=e,this.truncateContentLength=256,this.storeEventLog=!0,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)}createEventLogEntry(e,t){let r=void 0===t?"":t;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:e,Content:r}}customGetElementFunction(e){return this.storeEventLog&&this.eventLog.GetElement.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an GET of Address -> [".concat(e,"]")),""}customReadFunction(e){return this.storeEventLog&&this.eventLog.Read.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an READ from Address -> [".concat(e,"]")),e in this.contentMap?this.contentMap[e]:(this.pict.log.warn("Mock read from Address ".concat(e," did not find a value in the content map.")),"")}customAppendFunction(e,t){return this.storeEventLog&&this.eventLog.Append.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"]"),{Content:t}),""}customPrependFunction(e,t){return this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"]"),{Content:t}),""}customAssignFunction(e,t){return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"]"),{Content:t}),""}customReadAttributeFunction(e,t){return this.pict.log.info("Mocking an READ ATTRIBUTE from Address -> [".concat(e,"]"),{Attribute:t}),""}customSetAttributeFunction(e,t,r){return r.length>this.truncateContentLength?this.pict.log.info("Mocking an SET ATTRIBUTE to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Attribute:t,Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an SET ATTRIBUTE to Address -> [".concat(e,"]"),{Attribute:t,Content:r}),""}}},{}],201:[function(e,t,r){t.exports=class{constructor(e,t){this.contentMap="object"==typeof t?t:{},this.contentMap._ATTRIBUTE_MAP={},this.contentMap._CLASS_MAP={},this.pict=e,this.truncateContentLength=256,this.storeEventLog=!0,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)}createEventLogEntry(e,t){let r=void 0===t?"":t;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:e,Content:r}}customGetElementFunction(e){return this.storeEventLog&&this.eventLog.GetElement.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an GET of Address -> [".concat(e,"]")),""}customReadFunction(e){return this.storeEventLog&&this.eventLog.Read.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an READ from Address -> [".concat(e,"]")),e in this.contentMap?this.contentMap[e]:(this.pict.log.warn("Mock read from Address ".concat(e," did not find a value in the content map.")),"")}customAppendFunction(e,t){return this.contentMap[e]=void 0===this.contentMap[e]?t:this.contentMap[e]+t,this.storeEventLog&&this.eventLog.Append.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"]"),{Content:t}),""}customPrependFunction(e,t){return this.contentMap[e]=void 0===this.contentMap[e]?t:t+this.contentMap[e],this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"]"),{Content:t}),""}customAssignFunction(e,t){return this.contentMap[e]=t,this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"]"),{Content:t}),""}initializeAttributeMapLocation(e,t){e in this.contentMap._ATTRIBUTE_MAP||(this.contentMap._ATTRIBUTE_MAP[e]={}),t in this.contentMap._ATTRIBUTE_MAP[e]||(this.contentMap._ATTRIBUTE_MAP[e][t]=!1)}initializeClassMapLocation(e){e in this.contentMap._CLASS_MAP||(this.contentMap._CLASS_MAP[e]=[])}customReadAttributeFunction(e,t){this.initializeAttributeMapLocation(e,t);let r=this.contentMap._ATTRIBUTE_MAP[e][t];return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customSetAttributeFunction(e,t,r){return this.initializeAttributeMapLocation(e,t),this.contentMap._ATTRIBUTE_MAP[e][t]=r,this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customRemoveAttributeFunction(e,t){this.initializeAttributeMapLocation(e,t);let r=this.contentMap._ATTRIBUTE_MAP[e][t];return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),delete this.contentMap._ATTRIBUTE_MAP[e][t],!0}customReadClassFunction(e,t){this.initializeClassMapLocation(e);const r=this.contentMap._CLASS_MAP[e].indexOf(t)>-1;return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS READ for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customSetClassFunction(e,t){this.initializeClassMapLocation(e);let r=this.contentMap._CLASS_MAP[e];return-1==this.contentMap._CLASS_MAP[e].indexOf(t)&&this.contentMap._CLASS_MAP[e].push(t),this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS SET for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r.join(" ")}),r}customRemoveClassFunction(e,t){this.initializeClassMapLocation(e);let r=this.contentMap._CLASS_MAP[e];return this.contentMap._CLASS_MAP[e].splice(t),this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS REMOVE for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r.join(" ")}),r}}},{}],202:[function(e,t,r){t.exports=class{constructor(e){this.fable=e,this.pict=e,this.log=e.log}generateMeadowFilterStanzas(e){const t=[];e.UserFilters=[];for(const r of e.FilterConfiguration||[]){if(!1===r.Enabled){this.pict.LogNoisiness>1&&this.log.info("Skipping disabled filter configuration: ".concat(r.Type),{FilterConfig:r});continue}const n={GUID:this.pict.getUUID(),Filters:[]},i=Array.isArray(r.Values)?r.Values:null==r.Value||""==r.Value||"ExternalJoinDateMatch"==r.Type&&0==r.Value?[]:[r.Value];let s;switch(r.Type){case"ExternalJoinSelectedValue":case"ExternalJoinSelectedValueList":s=[r.ExternalFilterTableLookupColumn||"ID".concat(r.ExternalFilterByTable)];case"ExternalJoinMatch":case"ExternalJoinStringMatch":case"ExternalJoinDateMatch":case"ExternalJoinNumericMatch":s||(s=r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"]));for(const e of s)for(const t of i){const i={Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBVOR",Field:e};r.ExactMatch||void 0===r.ExactMatch&&("ExternalJoinNumericMatch"==r.Type||"ExternalJoinDateMatch"==r.Type||"ExternalJoinSelectedValue"==r.Type||"ExternalJoinSelectedValueList"==r.Type)?(i.Operator="EQ",i.Value=t):(i.Operator="LK",i.Value="%25".concat(t,"%25")),n.Filters.push(i)}if(!r.JoinTable){this.log.error("".concat(r.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:r});break}if(!r.JoinTableExternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(r.JoinTable,"]."));break}if(n.Filters.length>0){if(n.Filters.push({Index:0,Fulcrum:!0,Entity:r.JoinTable,Instruction:"FBL",Field:r.JoinTableExternalConnectionColumn,Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")}),!r.CoreConnectionColumn){this.log.error("".concat(r.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}n.JoinConfig={CoreEntity:e.Entity,Instruction:"FBLOR",Fields:[r.CoreConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")}}break;case"ExternalJoinStringRange":case"ExternalJoinNumericRange":case"ExternalJoinDateRange":case"ExternalJoinRange":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("ExternalJoinDateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const e of r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"])){const t=r.Values&&r.Values.Start&&("ExternalJoinDateRange"!=r.Type||"0"!=r.Values.Start),i=r.Values&&r.Values.End&&("ExternalJoinDateRange"!=r.Type||"0"!=r.Values.End);t&&n.Filters.push({Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBVOR",OpenParen:!0,OpenParenOr:!0,CloseParen:!i,Field:e,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),i&&n.Filters.push({Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBV",OpenParen:!t,OpenParenOr:!t,CloseParen:!0,Field:e,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}if(!r.JoinTable){this.log.error("".concat(r.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:r});break}if(!r.JoinTableExternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(r.JoinTable,"]."));break}if(n.Filters.length>0){if(n.Filters.push({Index:0,Fulcrum:!0,Entity:r.JoinTable,Instruction:"FBL",Field:r.JoinTableExternalConnectionColumn,Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")}),!r.CoreConnectionColumn){this.log.error("".concat(r.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}if(!r.JoinTableCoreConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableCoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}n.JoinConfig={CoreEntity:e.Entity,Instruction:"FBLOR",Fields:[r.CoreConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")}}break;case"StringRange":case"DateRange":case"NumericRange":case"Range":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("DateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const t of r.FilterByColumns||(r.FilterByColumn?[r.FilterByColumn]:["Name"])){const i=r.Values&&r.Values.Start&&("DateRange"!=r.Type||"0"!=r.Values.Start),s=r.Values&&r.Values.End&&("DateRange"!=r.Type||"0"!=r.Values.End);i&&n.Filters.push({Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBVOR",Field:t,OpenParen:!0,OpenParenOr:!0,CloseParen:!s,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),s&&n.Filters.push({Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBV",OpenParen:!i,OpenParenOr:!i,CloseParen:!0,Field:t,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}break;case"StringMatch":case"DateMatch":case"NumericMatch":case"Match":for(const t of r.FilterByColumns||(r.FilterByColumn?[r.FilterByColumn]:["Name"]))for(const s of i){const i={Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBVOR",Field:t};r.ExactMatch||void 0===r.ExactMatch&&("NumericMatch"==r.Type||"DateMatch"==r.Type)?(i.Operator="EQ",i.Value=s):(i.Operator="LK",i.Value="%25".concat(s,"%25")),n.Filters.push(i)}break;case"InternalJoinStringRange":case"InternalJoinNumericRange":case"InternalJoinDateRange":case"InternalJoinRange":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("InternalJoinDateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const e of r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"])){const t=r.Values&&r.Values.Start&&("InternalJoinDateRange"!=r.Type||"0"!=r.Values.Start),i=r.Values&&r.Values.End&&("InternalJoinDateRange"!=r.Type||"0"!=r.Values.End);t&&n.Filters.push({Index:0,Entity:r.RemoteTable,Instruction:"FBVOR",Field:e,OpenParen:!0,OpenParenOr:!0,CloseParen:!i,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),i&&n.Filters.push({Index:0,Entity:r.RemoteTable,Instruction:"FBV",OpenParen:!t,OpenParenOr:!t,CloseParen:!0,Field:e,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}if(n.Filters.length>0){if(!r.JoinInternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}n.JoinConfig={Instruction:"FBLOR",CoreEntity:e.Entity,Fields:[r.JoinInternalConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinExternalConnectionColumn,"^Record.State[Step0]~}")}}break;case"InternalJoinSelectedValue":case"InternalJoinSelectedValueList":s=[r.ExternalFilterTableLookupColumn||"ID".concat(r.RemoteTable)];case"InternalJoinMatch":case"InternalJoinStringMatch":case"InternalJoinDateMatch":case"InternalJoinNumericMatch":s||(s=r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"]));for(const e of s)for(const t of i){const i={Index:0,Entity:r.RemoteTable,Instruction:"FBVOR",Field:e};r.ExactMatch||void 0===r.ExactMatch&&("InternalJoinNumericMatch"==r.Type||"InternalJoinDateMatch"==r.Type||"InternalJoinSelectedValue"==r.Type||"InternalJoinSelectedValueList"==r.Type)?(i.Operator="EQ",i.Value=t):(i.Operator="LK",i.Value="%25".concat(t,"%25")),n.Filters.push(i)}if(n.Filters.length>0){if(!r.JoinInternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}n.JoinConfig={Instruction:"FBLOR",CoreEntity:e.Entity,Fields:[r.JoinInternalConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinExternalConnectionColumn,"^Record.State[Step0]~}")}}break;case"RawFilter":if(!r.Value){this.log.warn("RawFilter configuration missing Value, not adding filter.",{FilterConfig:r});break}e.UserFilters.push(r.Value);break;default:this.log.warn("Unknown filter type ".concat(r.Type," in filter configuration."),{FilterConfig:r})}n.Filters.length>0&&t.push(n)}e.PreparedFilters=t}linkPreparedFilters(e){const t=[];for(const r of e.PreparedFilters||[])if(r.JoinConfig){const e=r.Filters,n=r.JoinConfig;for(const t of n.Fields||[]){const i={Index:1,CoreEntity:!0,Entity:r.JoinConfig.CoreEntity,Instruction:r.JoinConfig.Instruction||"FBVOR",Field:t,Operator:n.Operator,Value:n.Value,ValueTemplate:n.ValueTemplate};e.push(i)}t.push(e)}else t.push(r.Filters);return t}normalizeMeadowFilterStanzas(e){let t=0;for(const r of e.PreparedFilters){const e=new Set;r.Filters.sort(((e,t)=>e.Index-t.Index));for(const t of r.Filters)t.CoreEntity||e.add(t.Index);t+=e.size}let r=-t-1;for(const t of e.PreparedFilters){let e=null;for(const n of t.Filters)n.Index!==e&&(++r,e=n.Index),n.ComputedIndex=r;for(const e of t.Filters)e.ValueTemplate&&(e.ValueTemplate=e.ValueTemplate.replace(/\[([^\]]+)\]/g,(e=>{var r;const n=e.substring(5,e.length-1),i=null===(r=t.Filters.find((e=>e.Index==n)))||void 0===r?void 0:r.ComputedIndex;if(null==i)throw new Error("Filter index ".concat(n," not found in group filters."));return e.replace(n,i)})))}}compileMeadowFilterStanzas(e){const t=[];e.Filter||(e.Filter="".concat(e.Entity||"Unknown","-").concat(this.pict.getUUID())),t.push({Type:"SetStateAddress",StateAddress:"Bundle[".concat(e.Filter,"]")});const r={},n=[],i=[],s=[];let o;const a=[];for(const a of e.PreparedFilters){for(const e of a.Filters)if(e.CoreEntity){o=e.Entity;const t="".concat(a.GUID,"-").concat(e.ComputedIndex);s.find((e=>e==t))||s.push(t),i[t]||(i[t]={Stanzas:[],ComputedIndex:e.ComputedIndex,Entity:e.Entity}),i[t].Stanzas.push(this._compileSimpleFilterToString(e))}else{const t="".concat(a.GUID,"-").concat(e.ComputedIndex);n.find((e=>e==t))||n.push(t),r[t]||(r[t]={Stanzas:[],ComputedIndex:e.ComputedIndex,Entity:e.Entity}),r[t].Stanzas.push(this._compileSimpleFilterToString(e))}for(const e of n)r[e].Stanzas=r[e].Stanzas.filter((e=>e.length>0)),r[e].Stanzas.length>0&&t.push({Type:"MeadowEntity",AllRecords:!0,Entity:r[e].Entity,Filter:r[e].Stanzas.join("~"),Destination:"State[Step".concat(r[e].ComputedIndex,"]")})}for(const e of s)i[e].Stanzas=i[e].Stanzas.filter((e=>e.length>0)),i[e].Stanzas.length>0&&a.push(["FOP~0~(~0",...i[e].Stanzas,"FCP~0~)~0"].join("~"));o||(o=e.Entity);const c={Type:"Count"===e.Mode?"MeadowEntityCount":"MeadowEntity",Entity:o,Filter:a.join("~"),AllRecords:void 0===e.PageSize,RecordStartCursor:e.RecordOffset,PageSize:e.PageSize,Destination:e.ResultDestinationAddress};if(e.UserFilters.length>0){let t="",r="";for(const n of e.UserFilters){let i,s=n;if("Count"===e.Mode)s=this._sanitizeFilterForCount(n);else if([s,i]=this._extractSortsFromFilter(n),i&&(t.length>0&&(t+="~"),t+=i),!s)continue;s&&(r.length>0&&(r+="~"),r+="FOP~0~(~0~",r+=s,r+="~FCP~0~)~0")}c.Filter&&(r.length>0&&(r+="~"),r+="FOP~0~(~0~",r+=c.Filter,r+="~FCP~0~)~0"),t&&(r.length>0&&(r+="~"),r+=t),c.Filter=r}t.push(c),e.BundleConfig=t}_sanitizeFilterForCount(e){if(!e||"string"!=typeof e)return e;let t=e.split("~");for(let e=0;e<t.length;e+=4)"FSF"===t[e]&&(t=t.slice(0,e).concat(t.slice(e+4)),e-=4);return t.join("~")}_extractSortsFromFilter(e){if(!e||"string"!=typeof e)return[e,""];let t=[],r=e.split("~");for(let e=0;e<r.length;e+=4)"FSF"===r[e]&&(t.push(r.slice(e,e+4).join("~")),r=r.slice(0,e).concat(r.slice(e+4)),e-=4);return[r.join("~"),t.join("~")]}_compileSimpleFilterToString(e){let t="".concat(e.Instruction);return t+="~".concat(e.Field),t+="~".concat(e.Operator),e.ValueTemplate?t+="~".concat(e.ValueTemplate):t+="~".concat(e.Value||""),e.OpenParen&&(t="".concat(e.OpenParenOr?"FOPOR":"FOP","~0~(~0~").concat(t)),e.CloseParen&&(t="".concat(t,"~FCP~0~)~0")),t}}},{}],203:[function(e,t,r){t.exports=class{constructor(e){this.fable=e,this.pict=e,this.log=e.log,this._type="None",this.values=[]}set type(e){this._type=e,e.includes("Range")?("object"!=typeof this.values||null===this.values||Array.isArray(this.values))&&(this.values={Start:void 0,End:void 0}):Array.isArray(this.values)||(this.values=[])}get type(){return this._type}generateFilterClauseConfig(){return{Type:"None"}}}},{}],204:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this.type="ExternalJoinMatch",this.values=[],this.exactMatch,this.startExclusive,this.endExclusive,this.externalFilterByColumn,this.externalFilterByColumns,this.coreConnectionColumn="",this.joinTable="",this.joinTableExternalConnectionColumn="",this.joinTableCoreConnectionColumn="",this.externalFilterByTable="",this.externalFilterTableLookupColumn="",this.externalFilterByTableConnectionColumn=""}generateFilterClauseConfig(){switch(this.type){case"ExternalJoinMatch":case"ExternalJoinStringMatch":case"ExternalJoinDateMatch":case"ExternalJoinNumericMatch":return{Type:this.type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn};case"ExternalJoinRange":case"ExternalJoinStringRange":case"ExternalJoinDateRange":case"ExternalJoinNumericRange":return{Type:this.type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn};case"ExternalJoinSelectedValue":case"ExternalJoinSelectedValueList":return{Type:this.type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterTableLookupColumn:this.externalFilterTableLookupColumn,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":203}],205:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this.type="None",this.values=[],this.exactMatch,this.startExclusive,this.endExclusive,this.remoteTable="",this.externalFilterByColumn,this.externalFilterByColumns,this.externalFilterTableLookupColumn,this.joinExternalConnectionColumn="",this.joinInternalConnectionColumn=""}generateFilterClauseConfig(){switch(this._type){case"InternalJoinMatch":case"InternalJoinStringMatch":case"InternalJoinDateMatch":case"InternalJoinNumericMatch":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case"InternalJoinSelectedValue":case"InternalJoinSelectedValueList":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,ExternalFilterTableLookupColumn:this.externalFilterTableLookupColumn,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case"InternalJoinRange":case"InternalJoinStringRange":case"InternalJoinDateRange":case"InternalJoinNumericRange":return{Type:this._type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":203}],206:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this._type="Match",this.filterByColumn,this.exactMatch,this.startExclusive,this.endExclusive}generateFilterClauseConfig(){switch(this._type){case"Match":case"StringMatch":case"DateMatch":case"NumericMatch":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,FilterByColumn:this.filterByColumn};case"Range":case"StringRange":case"DateRange":case"NumericRange":return{Type:this._type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,FilterByColumn:this.filterByColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":203}],207:[function(e,t,r){const n=e("pict-provider"),i={ProviderIdentifier:"Pict-Provider-DataBroker",AutoInitialize:!0,AutoInitializeOrdinal:0};t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},i,t),r),this.options,this.pict,this.marshalDestination="AppData"}getValue(e){return this.getValueByHash(e)}getValueByHash(e){return this.pict.manifest.getValueByHash(this.getMarshalDestinationObject(),e)}setValue(e,t){return this.setValueByHash(e,t)}setValueByHash(e,t){return this.pict.manifest.setValueByHash(this.getMarshalDestinationObject(),e,t)}get marshalDestination(){return this._marshalDestination}set marshalDestination(e){this._marshalDestination=e}get marshalDestinationObject(){const e=this.marshalDestination;if(!e)throw new Error("Attempt to access marshal destination object with no marshal destination set.");let t=this.pict.resolveStateFromAddress(e);if(!t&&(this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(e)),this.pict.setStateValueAtAddress(e,null,{}),t=this.pict.resolveStateFromAddress(e),!t))throw new Error("Attempt to access marshal destination object with no marshal destination set.");return t}getMarshalDestinationObject(){return this.marshalDestinationObject}resolveMarshalDestinationObject(e){const t=e||this.marshalDestination;if(!t)throw new Error("Attempt to resolve marshal destination object with no marshal destination set.");let r;return e?(r=this.pict.resolveStateFromAddress(e),r||(this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(t)),this.pict.setStateValueAtAddress(t,null,{}))):r=this.getMarshalDestinationObject(),r}},t.exports.default_configuration=i},{"pict-provider":141}],208:[function(e,t,r){const n=e("pict-provider"),i=e("../filters/Filter.js"),s={ProviderIdentifier:"Pict-RecordSet-FilterManager",AutoInitialize:!0,AutoInitializeOrdinal:0};t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},s,t),r),this.options,this.pict,this.filters={},this.filterCriteria={}}addFilter(e,t){if(!e||"string"!=typeof e)return void this.log.error("Invalid filter hash provided. It must be a non-empty string.");if(!t||"object"!=typeof t||!t.Type)return void this.log.error("Invalid filter configuration provided. It must be an object with a Type property.");const r=JSON.parse(JSON.stringify(t));r.Hash&&r.Hash!==e&&this.log.warn("Filter configuration hash mismatch: provided ".concat(r.Hash,", expected ").concat(e,". Overriding with provided hash.")),r.Hash=e,this.filters[r.Hash]=r}addFilterCriteria(e,t){if(!e||"string"!=typeof e)return void this.log.error("Invalid filter criteria hash provided. It must be a non-empty string.");if(!t||!Array.isArray(t))return void this.log.error("Invalid filter criteria configuration provided. It must be an array of filter clauses.");const r=JSON.parse(JSON.stringify(t));this.filterCriteria[e]=r}getFilter(e){return this.filters[e]}getFilterCriteria(e){return this.filterCriteria[e]}loadRecordsByFilter(e,t,r){return this.loadRecordsByFilterUsingProvider(this.pict.EntityProvider,e,t,r)}loadRecordsByFilterUsingProvider(e,t,r,n){if(!e||"function"!=typeof e.gatherDataFromServer)return n(new Error("loadRecordsByFilter: Missing or invalid EntityProvider."));const s=JSON.parse(JSON.stringify(r));s.Mode="Records",s.FilterConfiguration=t;const o=new i(this.pict);o.generateMeadowFilterStanzas(s),o.linkPreparedFilters(s),o.normalizeMeadowFilterStanzas(s),o.compileMeadowFilterStanzas(s),e.gatherDataFromServer(s.BundleConfig,n)}loadRecordPageByFilter(e,t,r,n,i){return this.loadRecordPageByFilterUsingProvider(this.pict.EntityProvider,e,t,r,n,i)}loadRecordPageByFilterUsingProvider(e,t,r,n,s,o){if(!e||"function"!=typeof e.gatherDataFromServer)return o(new Error("loadRecordPageByFilter: Missing or invalid EntityProvider."));const a="function"==typeof n?n:"function"==typeof s?s:o;let c="function"==typeof n?0:parseInt(String(n));(isNaN(c)||c<0)&&(c=0);let l="function"==typeof s?0:parseInt(String(s));(isNaN(l)||l<0)&&(l=1e4);const h=JSON.parse(JSON.stringify(r));h.Mode="Records",h.RecordOffset=c,h.PageSize=l,h.FilterConfiguration=t;const u=new i(this.pict);u.generateMeadowFilterStanzas(h),u.linkPreparedFilters(h),u.normalizeMeadowFilterStanzas(h),u.compileMeadowFilterStanzas(h),e.gatherDataFromServer(h.BundleConfig,a)}countRecordsByFilter(e,t,r){return this.countRecordsByFilterUsingProivider(this.pict.EntityProvider,e,t,r)}countRecordsByFilterUsingProivider(e,t,r,n){const s=JSON.parse(JSON.stringify(r));s.Mode="Count",s.FilterConfiguration=t;const o=new i(this.pict);o.generateMeadowFilterStanzas(s),o.linkPreparedFilters(s),o.normalizeMeadowFilterStanzas(s),o.compileMeadowFilterStanzas(s),e.gatherDataFromServer(s.BundleConfig,n)}executeFilter(e,t,r){return this.executeFilterUsingProvider(this.pict.EntityProvider,e,t,r)}executeFilterUsingProvider(e,t,r,n){if(!e||"function"!=typeof e.gatherDataFromServer)return n(new Error("executeFilter: Missing or invalid EntityProvider."));const i=this.pict.resolveStateFromAddress(t);if(!Array.isArray(i))return n(new Error("Filter configuration at address ".concat(t," is not an array.")));const s=this.pict.resolveStateFromAddress(r);return s&&"object"==typeof s?this.loadRecordsByFilterUsingProvider(e,i,s,n):n(new Error("Filter experience at address ".concat(r," is not an object.")))}executeFilterPage(e,t,r,n,i){return this.executeFilterPageUsingProvider(this.pict.EntityProvider,e,t,r,n,i)}executeFilterPageUsingProvider(e,t,r,n,i,s){const o="function"==typeof n?n:"function"==typeof i?i:s,a=this.pict.resolveStateFromAddress(t);if(!Array.isArray(a))return o(new Error("Filter configuration at address ".concat(t," is not an array.")));const c=this.pict.resolveStateFromAddress(r);return c&&"object"==typeof c?this.loadRecordPageByFilterUsingProvider(e,a,c,n,i,s):o(new Error("Filter experience at address ".concat(r," is not an object.")))}executeFilterCount(e,t,r){return this.executeFilterCountUsingProvider(this.pict.EntityProvider,e,t,r)}executeFilterCountUsingProvider(e,t,r,n){const i=this.pict.resolveStateFromAddress(t);if(!Array.isArray(i))return n(new Error("Filter configuration at address ".concat(t," is not an array.")));const s=this.pict.resolveStateFromAddress(r);return s&&"object"==typeof s?this.countRecordsByFilterUsingProivider(e,i,s,n):n(new Error("Filter experience at address ".concat(r," is not an object.")))}},t.exports.default_configuration=s},{"../filters/Filter.js":202,"pict-provider":141}],209:[function(e,t,r){const n=e("fable-serviceproviderbase");class i extends n{constructor(e,t,r){super(e,t,r),this.fable,this.log,this.UUID,this.transactionMap={}}get transactions(){return this.transactionMap}logToTransaction(e,t,r){let n=this.transactionMap[e];null==n&&(this.log.warn("TransactionTracking logToTransaction key [".concat(e,"] does not exist; auto creating...")),n=this.registerTransaction(e));let i="string"==typeof r?r:"General";return this.transactionMap[e].Log.push({TimeStamp:new Date,Category:i,Message:t}),!0}registerTransaction(e){return null!=this.transactionMap[e]||(this.transactionMap[e]={TransactionKey:e,Events:{},Log:[],TransactionQueue:[]}),this.transactionMap[e]}pushToTransactionQueue(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Entry",n=this.transactionMap[e];return null==n&&(this.log.warn("TransactionTracking pushToTransactionQueue key [".concat(e,"] does not exist; auto creating...")),n=this.registerTransaction(e)),n.TransactionQueue.push({Timestamp:Date.now(),Data:t,Type:r}),this.logToTransaction(e,"Pushed data to transaction queue","Queue"),n.TransactionQueue.length}checkTransactionQueue(e){let t=this.transactionMap[e];return null==t&&(this.log.warn("TransactionTracking checkTransactionQueue key [".concat(e,"] does not exist; auto creating...")),t=this.registerTransaction(e)),null==t.TransactionQueue&&(t.TransactionQueue=[]),this.logToTransaction(e,"Checked transaction queue","Queue"),t.TransactionQueue}getTransactionQueue(e){return this.checkTransactionQueue(e).map((e=>e.Data))}clearTransactionQueue(e){let t=this.transactionMap[e];if(null==t)return void this.log.warn("TransactionTracking clearTransactionQueue key [".concat(e,"] does not exist; skipping..."));const r=t.TransactionQueue;return t.TransactionQueue=[],this.logToTransaction(e,"Cleared transaction queue","Queue"),r}checkEvent(e,t,r){let n="string"==typeof r?r:"",i=this.transactionMap[e];return null==i&&(this.log.warn("TransactionTracking checkTransactionEvent event [".concat(t,"]->[").concat(n,"] key [").concat(e,"] does not exist; auto creating...")),i=this.registerTransaction(e)),null==i.Events[t]&&(i.Events[t]={}),n in i.Events[t]?(this.logToTransaction(e,"Event [".concat(t,"]->[").concat(n,"] already exists in transaction [").concat(e,"]"),"Event"),!1):(this.logToTransaction(e,"Event [".concat(t,"]->[").concat(n,"] registered in transaction [").concat(e,"]"),"Event"),i.Events[t][n]=!0,!0)}}t.exports=i,i.default_configuration={}},{"fable-serviceproviderbase":59}],210:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Data:","~}"),this.addPattern("{~D:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a="";s.indexOf(":")>-1&&(a=s.split(":")[1],s=s.split(":")[0]);let c="";return null!=s&&(c=this.resolveStateFromAddress(s,o,r,null,n,i)),null==c||"undefined"==c||void 0===c||""===c?a:c}}},{"pict-template":143}],211:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataValueByKey:","~}"),this.addPattern("{~DVBK:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=s.split(":");if(a.length<2)return this.log.trace("PICT Template [fDataRender]::[".concat(s,"] failed because there were not two stanzas in the expression [").concat(e,"]")),"";let c="";a.length>2&&(c=a[2]);let l=this.resolveStateFromAddress(a[0],o,r,null,n,i),h=this.resolveStateFromAddress(a[1],o,r,null,n,i),u=this.pict.manifest.getValueByHash(l,h);return null==u||"undefined"==u||void 0===u?c:u}}},{"pict-template":143}],212:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataWithTemplateFallback:","~}"),this.addPattern("{~DWTF:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] with tmpRecord:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"]"));let a="";s.indexOf(":")>-1&&(a=s.split(":")[1],s=s.split(":")[0]);let c="";if(null!=s&&(c=this.resolveStateFromAddress(s,o,r,null,n,i),c&&"undefined"!==c))return this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - Found value: ").concat(c)),c;const l=this.pict.parseTemplateByHash(a,o,null,r,n,i);return null==l||""===l?(this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - No fallback template found at address: ").concat(a)),""):(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - Using fallback template from address: ").concat(a)),l)}renderAsync(e,t,r,n,i,s){let o=e.trim(),a="object"==typeof t?t:{},c="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] with tmpRecord:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"]"));let l="";o.indexOf(":")>-1&&(l=o.split(":")[1],o=o.split(":")[0]);let h="";if(null!=o&&(h=this.resolveStateFromAddress(o,a,n,null,i,s),h&&"undefined"!==h))return this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - Found value: ").concat(h)),c(null,h);this.pict.parseTemplateByHash(l,a,((e,t)=>e?c(e,""):null==t||""===t?(this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - No fallback template found at address: ").concat(l)),c(null,"")):(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - Using fallback template from address: ").concat(l)),c(null,t))),n,i,s)}}},{"pict-template":143}],213:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~E:","~}"),this.addPattern("{~Entity:","~}")}render(e,t,r,n,i){return this.log.error("Pict: Entity Render [".concat(e,"]: Render called in a non-asynchronous fashion. This should not happen.")),""}renderAsync(e,t,r,n,i,s){let o,a=e.trim(),c="object"==typeof t?t:{},l="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fEntityRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fEntityRender]::[".concat(a,"]"));let h,u="",p=a.split("^");if(p.length<2)return this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(a,"]")),l(null,"");if(o=p[0].trim(),u=p[1].trim(),h=p[2].trim(),isNaN(Number(u)))u=this.resolveStateFromAddress(String(u),c,n,null,i,s);else try{u=parseInt(String(u))}catch(e){this.log.warn("Pict: Entity Render: Could not parse entity ID."),u=0}if(!o||!u)return this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(a,"] Entity: ").concat(o," ID: ").concat(u)),l(null,"");this.pict.LogNoisiness>3&&this.log.trace("Pict: Entity Render: Entity [".concat(o,"] with ID [").concat(u,"] as template [").concat(h,"] from [").concat(a,"]")),this.pict.EntityProvider.getEntity(o,u,function(e,t){if(e)return this.log.error("Pict: Entity Render: Error getting entity [".concat(o,"] with ID [").concat(u,"] for [").concat(a,"]: ").concat(e),e),l(e,"");h?this.pict.parseTemplateByHash(h,t,l,n,i,s):l(null,"")}.bind(this))}}},{"pict-template":143}],214:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.addPattern("{~Pict","~}"),this.addPattern("{~P","~}"),this.addPattern("{~p","~}")}render(e,t,r,n,i){return this.pict.browserAddress}}},{"pict-template":143}],215:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~SolveByReference:","~}"),this.addPattern("{~SBR:","~}")}render(e,t,r,n,i){const[s,o,a]=e.trim().split(":",3),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(e,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(e,"]"));const l=this.pict.resolveStateFromAddress(s,c,r,null,n,i);if(!l)return this.pict.LogNoisiness>2&&this.log.warn("Pict: SolveByReference: Equation not found for [".concat(s,"]")),"";const h=o&&this.pict.resolveStateFromAddress(o,c,r,null,n,i)||c,u=a&&this.pict.resolveStateFromAddress(a,c,r,null,n,i)||this.pict.manifest;return this.fable.instantiateServiceProviderIfNotExists("ExpressionParser").solve(l,h,{},u,h)}}},{"pict-template":143}],216:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Template:","~}"),this.addPattern("{~T:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");return s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,s?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplateByHash(s,t,null,r,n,i):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,l,n,null,i,s),((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplateByHash(o,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],217:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByDataAddress:","~}"),this.addPattern("{~TBDA:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"";let h=this.pict.resolveStateFromAddress(s,t,r,null,n,i);return h||(this.pict.LogNoisiness>2&&this.log.warn("Pict: Template Render: Template not found for [".concat(s,"]")),h=""),o?this.pict.parseTemplate(h,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplate(h,t,null,r,n,i)}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),h(null,"");let p=this.pict.resolveStateFromAddress(o,t,n,null,i,s)||"";p||(this.pict.LogNoisiness>2&&this.log.warn("Pict: Template Render: Template not found for [".concat(o,"]")),p=""),a?this.pict.parseTemplate(p,this.resolveStateFromAddress(a,l,n,null,i,s),((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplate(p,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],218:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByReference:","~}"),this.addPattern("{~TBR:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(a,"]")),"";let h=this.resolveStateFromAddress(s,t,r,null,n,i);return h?o?this.pict.parseTemplateByHash(h,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplateByHash(h,t,null,r,n,i):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(c,"]")),r(null,"");let p=this.resolveStateFromAddress(o,t,n,null,i,s);if(!p)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplateByHash(p,this.resolveStateFromAddress(a,l,n,null,i,s),((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplateByHash(p,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],219:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByType:","~}"),this.addPattern("{~TBT:","~}")}render(e,t,r,n,i){let s,o,a,c,l,h=e.trim(),u="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(h,"] with tmpData:"),u):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(h,"]"));let p=h.trim().split(":");if(p.length<3)return"";if(s=p[0],o=p[1].split(","),a=p[2],p.length>3&&(c=p[3]),p.length>4&&(l=p[4]),!a)return"";let d=t;c&&(d=this.resolveStateFromAddress(c,u,r,null,n,i));let f=typeof this.resolveStateFromAddress(s,u,r,null,n,i);if("object"==f&&Array.isArray(this.resolveStateFromAddress(s,u,r,null,n,i))&&(f="array"),-1===o.indexOf(f)){if(!l)return"";a=l}return this.pict.parseTemplateByHash(a,d,null,r,n,i)}renderAsync(e,t,r,n,i,s){let o,a,c,l,h,u=e.trim(),p="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(u,"] with tmpData:"),p):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(u,"]"));let f=u.trim().split(":");if(f.length<3)return r(null,"");if(o=f[0],a=f[1].split(","),c=f[2],f.length>3&&(l=f[3]),f.length>4&&(h=f[4]),!c)return r(null,"");let g=t;l&&(g=this.resolveStateFromAddress(l,p,n,null,i,s));let m=typeof this.resolveStateFromAddress(o,p,n,null,i,s);if("object"==m&&Array.isArray(this.resolveStateFromAddress(o,p,n,null,i,s))&&(m="array"),-1===a.indexOf(m)){if(!h)return r(null,"");c=h}this.pict.parseTemplateByHash(c,g,((e,t)=>e?d(e,""):d(null,t)),n,i,s)}}},{"pict-template":143}],220:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateFromAddress:","~}"),this.addPattern("{~TFA:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(a,"]")),"";let h=this.resolveStateFromAddress(s,t,r,null,n,i);return h?o?this.pict.parseTemplate(h,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplate(h,t,null,r,n,i):(this.log.warn("Pict: Template Render: Template not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(c,"]")),r(null,"");let p=this.resolveStateFromAddress(o,t,n,null,i,s);if(!p)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplate(p,this.resolveStateFromAddress(a,l,n,null,i,s),((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplate(p,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],221:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TFM:","~}"),this.addPattern("{~TemplateFromMap:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(c,"]")),"";let u=this.resolveStateFromAddress(o,l,r,null,n,i),p=this.resolveStateFromAddress(a,l,r,null,n,i);return u?(l=u[p],l?this.pict.parseTemplateByHash(s,l,null,r,n,i):this.pict.parseTemplateByHash(s,t,null,r,n,i)):(this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(c,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),r(null,"");let d=this.resolveStateFromAddress(a,h,n,null,i,s),f=this.resolveStateFromAddress(c,h,n,null,i,s);if(!d)return this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(l,"]")),r(null,"");h=d[f],h?this.pict.parseTemplateByHash(o,h,((e,t)=>e?u(e,""):u(null,t)),n,i,s):this.pict.parseTemplateByHash(o,t,((e,t)=>e?u(e,""):u(null,t)),n,i,s)}}},{"pict-template":143}],222:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateSet:","~}"),this.addPattern("{~TS:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetRender]::[".concat(a,"]"));let l=a.indexOf(":");return s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,s?o?this.pict.parseTemplateSetByHash(s,this.resolveStateFromAddress(o,c,r,null,n,i),null,r,n,i):this.pict.parseTemplateSetByHash(s,t,null,r,n,i):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(c,"]"));let u=c.split(":");return u.length<2?(this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"")):(o=u[0],a=u[1],o?(l=this.resolveStateFromAddress(a,l,n,null,i,s),void(l?this.pict.parseTemplateSetByHash(o,l,((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplateSetByHash(o,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s))):(this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),r(null,"")))}}},{"pict-template":143}],223:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TSFM:","~}"),this.addPattern("{~TemplateSetFromMap:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),"";let u=this.resolveStateFromAddress(o,l,r,null,n,i),p=this.resolveStateFromAddress(a,l,r,null,n,i);return u?(l=u[p],l?this.pict.parseTemplateSetByHash(s,l,null,r,n,i):this.pict.parseTemplateSetByHash(s,t,null,r,n,i)):(this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(c,"]")),"")}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),r(null,"");let d=this.resolveStateFromAddress(a,h,n,null,i,s),f=this.resolveStateFromAddress(c,h,n,null,i,s);if(!d)return this.log.warn("Pict: TemplateFromMapSet Render: Map not resolved for [".concat(l,"]")),r(null,"");h=d[f],h?this.pict.parseTemplateSetByHash(o,h,((e,t)=>e?u(e,""):u(null,t)),n,i,s):this.pict.parseTemplateSetByHash(o,t,((e,t)=>e?u(e,""):u(null,t)),n,i,s)}}},{"pict-template":143}],224:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateSetWithPayload:","~}"),this.addPattern("{~TSWP:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim();this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"] with record:"),t):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"]"));let l=c.trim().split(":");if(l.length<3)return this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";s=l[0],o=l[1],a=l[2];let h=this.resolveStateFromAddress(o,t,r,null,n,i);h||(h=t),h||(h={});let u=this.resolveStateFromAddress(a,t,r,null,n,i);return u||(u=t),u||(u={}),this.pict.parseTemplateSetWithPayloadByHash(s,h,u,null,r,n,i)}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="function"==typeof r?r:()=>"";(this.pict.LogNoisiness>4||this.pict.LogNoisiness>0)&&this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(l,"]"));let u=l.trim().split(":");if(u.length<3)return this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");o=u[0],a=u[1],c=u[2];let p=this.resolveStateFromAddress(a,t,n,null,i,s);p||(p=t),p||(p={});let d=this.resolveStateFromAddress(c,t,n,null,i,s);d||(d=t),d||(d={}),this.pict.parseTemplateSetWithPayloadByHash(o,p,d,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],225:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateValueSet:","~}"),this.addPattern("{~TVS:","~}")}render(e,t,r,n,i){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"";c=this.resolveStateFromAddress(o,c,r,null,n,i);let h=[];if(Array.isArray(c))for(let e=0;e<c.length;e++)h.push({Value:c[e],Key:e});else if("object"==typeof c){let e=Object.keys(c);for(let t=0;t<e.length;t++)h.push({Value:c[e[t]],Key:e[t]})}else h.push({Value:c});return c=h,c?this.pict.parseTemplateSetByHash(s,c,null,r,n,i):this.pict.parseTemplateSetByHash(s,t,null,r,n,i)}renderAsync(e,t,r,n,i,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(c,"]"));let u=c.split(":");if(u.length<2)return this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=u[0],a=u[1],!o)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),r(null,"");l=this.resolveStateFromAddress(a,l,n,null,i,s);let p=[];if(Array.isArray(l))for(let e=0;e<l.length;e++)p.push({Value:l[e],Key:e});else if("object"==typeof l){let e=Object.keys(l);for(let t=0;t<e.length;t++)p.push({Value:l[e[t]],Key:l[e[t]]})}else p.push({Value:l});l=p,l?this.pict.parseTemplateSetByHash(o,l,((e,t)=>e?h(e,""):h(null,t)),n,i,s):this.pict.parseTemplateSetByHash(o,t,((e,t)=>e?h(e,""):h(null,t)),n,i,s)}}},{"pict-template":143}],226:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~V:","~}"),this.addPattern("{~View:","~}"),"__TemplateOutputCache"in this.pict||(this.pict.__TemplateOutputCache={})}render(e,t,r,n,i){const s=e.trim();if(!(s in this.pict.views))return this.log.warn("Pict: View Template Render: View not found for [".concat(s,"]")),"";let o=this.pict.getUUID();return this.pict.views[s].render("__Virtual","__TemplateOutputCache.".concat(o),t,i?i.RootRenderable:void 0),this.pict.__TemplateOutputCache[o]}renderAsync(e,t,r,n,i,s){const o=e.trim();if(!(o in this.pict.views))return this.log.warn("Pict: View Template Render: View not found for [".concat(o,"]")),r(null,"");let a=this.pict.getUUID();return this.pict.views[o].renderAsync("__Virtual","__TemplateOutputCache.".concat(a),t,s?s.RootRenderable:void 0,((e,t)=>{if(e)return this.log.warn("Pict: View Template Render: Error rendering view [".concat(o,"]"),e),r(e,"");let n=this.pict.__TemplateOutputCache[a];return r(null,n)}))}}},{"pict-template":143}],227:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~RandomNumber:","~}"),this.addPattern("{~RN:","~}")}render(e,t,r,n,i){let s=e.trim();this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fRandomNumber]::[".concat(s,"]"));let o=0,a=9999999;if(s.length>0){let e=s.split(",");if(e.length>0)try{o=parseInt(e[0])}catch(e){o=0}if(e.length>1)try{a=parseInt(e[1])}catch(e){a=9999999}}return this.fable.DataGeneration.randomIntegerBetween(o,a)}}},{"pict-template":143}],228:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~RandomNumberString:","~}"),this.addPattern("{~RNS:","~}")}render(e,t,r,n,i){let s=e.trim();this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fRandomNumberString]::[".concat(s,"]"));let o=4,a=9999;if(s.length>0){let e=s.split(",");if(e.length>0)try{o=parseInt(e[0])}catch(e){o=4}if(e.length>1)try{a=parseInt(e[1])}catch(e){a=9999}}return this.fable.DataGeneration.randomNumericString(o,a)}}},{"pict-template":143}],229:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataEncodeJavascriptString:","~}"),this.addPattern("{~DEJS:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataJson]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataJson]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return this.pict.DataFormat.stringEncodeForJavascript(a)}}},{"pict-template":143}],230:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataJson:","~}"),this.addPattern("{~DJ:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataJson]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataJson]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return a||(a=t),JSON.stringify(a)}}},{"pict-template":143}],231:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateOnlyFormat:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=s.split("^");if(a.length<2)return this.log.error("PICT Template [fDateOnlyFormat]::[".concat(s,"] did not have a valid format string and date.")),"";let c=this.resolveStateFromAddress(a[0],o,r,null,n,i);return this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(s,"]")),this.fable.Dates.dayJS.utc(c).format(a[1])}}},{"pict-template":143}],232:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateOnlyYMD:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,n,i);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"]"));return""+this.fable.Dates.dayJS.utc(a).format("YYYY-MM-DD")}}},{"pict-template":143}],233:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateTimeFormat:","~}"),this.addPattern("{~DateFormat:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=s.split("^");if(a.length<2)return this.log.error("PICT Template [fDateTimeFormat]::[".concat(s,"] did not have a valid format string and date.")),"";let c=this.resolveStateFromAddress(a[0],o,r,null,n,i);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeFormat]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeFormat]::[".concat(s,"]"));let l=this.fable.Dates.dayJS.utc(c);try{if(this.pict.options.Timezone)l=l.tz(this.pict.options.Timezone);else try{l=l.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}catch(e){try{l=l.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}return l.format(a[1])}}},{"pict-template":143}],234:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateTimeYMD:","~}"),this.addPattern("{~DateYMD:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,n,i);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"]"));let c=this.fable.Dates.dayJS.utc(a);try{if(this.pict.options.Timezone)c=c.tz(this.pict.options.Timezone);else try{c=c.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}catch(e){try{c=c.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}return c.format("YYYY-MM-DD")}}},{"pict-template":143}],235:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Digits:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDigits]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDigits]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(a,2))}}},{"pict-template":143}],236:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Dollars:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDollars]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDollars]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return this.fable.DataFormat.formatterDollars(a)}}},{"pict-template":143}],237:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~HtmlCommentEnd:","~}"),this.addPattern("{~HCE:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=!1;const[c,l]=s.split(":");null!=c&&(a=this.resolveStateFromAddress(c,o,r,null,n,i));const h=null!=l&&("1"===l||"true"===l.toLowerCase()||"t"===l.toLowerCase());return Boolean(a)==h?" --\x3e":""}}},{"pict-template":143}],238:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~HtmlCommentStart:","~}"),this.addPattern("{~HCS:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=!1;const[c,l]=s.split(":");null!=c&&(a=this.resolveStateFromAddress(c,o,r,null,n,i));const h=null!=l&&("1"===l||"true"===l.toLowerCase()||"t"===l.toLowerCase());return Boolean(a)==h?"\x3c!-- ":""}}},{"pict-template":143}],239:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Join:","~}"),this.addPattern("{~J:","~}")}render(e,t,r,n,i){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Join [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Join [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<2)return"";let c=a.shift(),l=[];for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,n,i);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++)l.push(t[e]);else t&&l.push(t)}return l.join(c)}}},{"pict-template":143}],240:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~JoinUnique:","~}"),this.addPattern("{~JU:","~}")}render(e,t,r,n,i){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Join Unique [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Join Unique [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<2)return"";let c=a.shift(),l=[],h={};for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,n,i);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++)t[e]in h||(h[t[e]]=!0,l.push(t[e]));else t&&(t in h||(h[t]=!0,l.push(t)))}return l.join(c)}}},{"pict-template":143}],241:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~PascalCaseIdentifier:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,n,i);return null==a||"undefined"==a||void 0===a?"":this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(a))}}},{"pict-template":143}],242:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~PluckJoinUnique:","~}"),this.addPattern("{~PJU:","~}")}render(e,t,r,n,i){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<3)return"";let c=a.shift(),l=a.shift(),h=[],u={};for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,n,i);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++){if(null===t[e]||"object"!=typeof t)continue;let r=this.pict.manifest.getValueByHash(t[e],l);r in u||(u[r]=!0,h.push(r))}else t&&(t in u||(u[t]=!0,h.push(t)))}return h.join(c)}}},{"pict-template":143}],243:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Breakpoint","~}")}render(e,t,r,n,i){let s=e.trim(),o=new Error("PICT Template Breakpoint: ".concat(s));return this.log.trace("PICT Template Breakpoint: ".concat(s),o.stack),""}}},{"pict-template":143}],244:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataTree:","~}"),this.addPattern("{~DT:","~}")}render(e,t,r,n,i){let s="object"==typeof t?t:{};if(s.TemplateHash=e.trim(),s.ValueTreeParameters=s.TemplateHash.split("^"),s.ValueTreeParameters.length<1)return"";s.ResolvedValue=this.resolveStateFromAddress(s.ValueTreeParameters[0],s,r,null,n,i),s.ResolvedValueType=typeof s.ResolvedValue;try{s.TreeMaxDepth=s.ValueTreeParameters.length<2?1:parseInt(s.ValueTreeParameters[1])}catch(e){s.TreeMaxDepth=1}let o=this.pict.TemplateProvider.getTemplate("PICT-Object-Wrap");return o||(o='<div class="PICT PICTObjectSet">{~D:Record.ObjectValueTree~}</div>'),"object"==s.ResolvedValueType?s.ObjectValueTree=this.dataValueTreeObjectSet(s.ResolvedValue,s.ResolvedValue,0,s.TreeMaxDepth,r,n):(this.log.trace("PICT Template Log Value Tree: [".concat(s.TemplateHash,"] resolved data is not an object."),s.ResolvedValue),s.ObjectValueTree=s.ResolveValue),this.pict.parseTemplate(o,s,null,r,n,i)}dataValueTreeObjectSet(e,t,r,n,i,s,o){let a="";if("object"!=typeof e)return a;let c=Object.keys(e),l=this.pict.TemplateProvider.getTemplate("PICT-Object-Branch");l||(l='\n<div class="PICTObjectBranchDepth_{~D:Record.CurrentDepth~}"><div class="PICTObjectBranch">{~D:Record.BranchKey~}</div><div class="PICTObjectBranchValue">{~D:Record.BranchValue~}</div></div>\n');for(let h=0;h<c.length;h++){let u=typeof e[c[h]],p="";if("object"===u)p=r+1>n?"...":this.dataValueTreeObjectSet(e[c[h]],t,r+1,n,i,s);else p=e[c[h]];let d={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:t,Container:e,BranchEntryCount:c.length,BranchIndex:h,BranchKey:c[h],BranchValue:p,BranchDataType:u,CurrentDepth:r,MaxDepth:n};a+=this.pict.parseTemplate(l,d,null,i,s,o)}return a}}},{"pict-template":143}],245:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~LogStatement:","~}"),this.addPattern("{~LS:","~}")}render(e,t,r,n,i){let s=e.trim();return this.log.trace("PICT Template Log Message: ".concat(s)),""}}},{"pict-template":143}],246:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~LogValue:","~}"),this.addPattern("{~LV:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,n,i),c=typeof a;return null==a||"undefined"==c?this.log.trace("PICT Template Log Value: [".concat(s,"] is ").concat(c,".")):"object"==c?this.log.trace("PICT Template Log Value: [".concat(s,"] is an object."),a):this.log.trace("PICT Template Log Value: [".concat(s,"] is a ").concat(c," = [").concat(a,"]")),""}}},{"pict-template":143}],247:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),_defineProperty2(this,"logValueTreeObjectSet",((e,t,r,n,i)=>{if("object"!=typeof e)return"";let s=Object.keys(e);for(let o=0;o<s.length;o++){let a=typeof e[s[o]],c="";if("object"===a)c="...";else c=e[s[o]];if(this.log.trace("[".concat(t,".").concat(s[o],"] (").concat(a,"): ").concat(c)),n+1>i)return"";"object"==a&&(c=this.logValueTreeObjectSet(e[s[o]],"".concat(t,".").concat(s[o]),r,n+1,i))}return""})),this.log,this.addPattern("{~LogValueTree:","~}"),this.addPattern("{~LVT:","~}")}render(e,t,r,n,i){let s="object"==typeof t?t:{};if(s.TemplateHash=e.trim(),s.ValueTreeParameters=s.TemplateHash.split("^"),s.ValueTreeParameters.length<1)return"";s.ResolvedValue=this.resolveStateFromAddress(s.ValueTreeParameters[0],s,r,null,n,i),s.ResolvedValueType=typeof s.ResolvedValue;try{s.TreeMaxDepth=s.ValueTreeParameters.length<2?1:parseInt(s.ValueTreeParameters[1])}catch(e){s.TreeMaxDepth=1}return"object"==s.ResolvedValueType?this.logValueTreeObjectSet(s.ResolvedValue,s.ValueTreeParameters[0],s.ResolvedValue,0,s.TreeMaxDepth):this.log.trace("PICT Template Log Value Tree: [".concat(s.TemplateHash,"] resolved data is not an object."),s.ResolvedValue),""}}},{"pict-template":143}],248:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~NotEmpty:","~}"),this.addPattern("{~NE:","~}")}render(e,t,r,n,i){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fNotEmptyRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>2&&this.log.trace("PICT Template [fNotEmptyRender]::[".concat(s,"]"));let a=s.split("^");return this.resolveStateFromAddress(a[0],o,r,null,n,i)?a[1]:""}}},{"pict-template":143}],249:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}compareValues(e,t,r){switch(t){case"TRUE":return!0===e;case"FALSE":return!1===e;case"LNGT":case"LENGTH_GREATER_THAN":switch(typeof e){case"string":case"object":return e.length>r;default:return!1}case"LNLT":case"LENGTH_LESS_THAN":switch(typeof e){case"string":case"object":return e.length<r;default:return!1}case"!=":return e!=r;case"<":return e<r;case">":return e>r;case"<=":return e<=r;case">=":return e>=r;case"===":return e===r;case"==":return e==r;default:return!1}}}},{"pict-template":143}],250:[function(e,t,r){const n=e("./Pict-Template-TemplateIf-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateIf:","~}"),this.addPattern("{~TIf:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(c,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(c,"]")),"";if(!a)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(c,"]")),"";let u=a.split("^");if(u.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(c,"]")),"";try{return this.compareValues(this.resolveStateFromAddress(u[0],l,r,null,n,i),u[1],this.resolveStateFromAddress(u[2],l,r,null,n,i))?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,l,r,null,n,i),null,r,n,i):this.pict.parseTemplateByHash(s,t,null,r,n,i):""}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(c,"]: ").concat(e),e),""}}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(l,"]")),u(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(l,"]")),u(null,"");if(!c)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(l,"]")),u(null,"");let d=c.split("^");if(d.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(l,"]")),u(null,"");try{if(!this.compareValues(this.resolveStateFromAddress(d[0],h,n,null,i,s),d[1],this.resolveStateFromAddress(d[2],h,n,null,i,s)))return u(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,h,n,null,i,s),((e,t)=>e?u(e,""):u(null,t)),n,i,s):this.pict.parseTemplateByHash(o,t,((e,t)=>e?u(e,""):u(null,t)),n,i,s)}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(l,"]: ").concat(e),e),u(e,"")}}}},{"./Pict-Template-TemplateIf-Base.js":249}],251:[function(e,t,r){const n=e("./Pict-Template-TemplateIf-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateIfAbsolute:","~}"),this.addPattern("{~TIfAbs:","~}")}render(e,t,r,n,i){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(c,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(c,"]")),"";if(!a)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(c,"]")),"";let u=a.split("^");if(u.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(c,"]")),"";try{return this.compareValues(this.resolveStateFromAddress(u[0],l,r,null,n,i),u[1],u[2])?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,l,r,null,n,i),null,r,n,i):this.pict.parseTemplateByHash(s,t,null,r,n,i):""}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(c,"]: ").concat(e),e),""}}renderAsync(e,t,r,n,i,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(l,"]")),u(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(l,"]")),u(null,"");if(!c)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(l,"]")),u(null,"");let d=c.split("^");if(d.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(l,"]")),u(null,"");try{if(!this.compareValues(this.resolveStateFromAddress(d[0],h,n,null,i,s),d[1],d[2]))return u(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,h,n,null,i,s),((e,t)=>e?u(e,""):u(null,t)),n,i,s):this.pict.parseTemplateByHash(o,t,((e,t)=>e?u(e,""):u(null,t)),n,i,s)}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(l,"]: ").concat(e),e),u(e,"")}}}},{"./Pict-Template-TemplateIf-Base.js":249}]},{},[199])(199)}));
12
12
  //# sourceMappingURL=pict.min.js.map