fable 3.0.71 → 3.0.72

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.
@@ -1,4 +1,4 @@
1
- "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _defineProperty2(e,t,r){return(t=_toPropertyKey2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},_get.apply(this,arguments)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _classCallCheck2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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,_toPropertyKey2(n.key),n)}}function _createClass2(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey2(e){var t=_toPrimitive2(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive2(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)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Fable=e()}}((function(){return function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[o]={exports:{}};t[o][0].call(l.exports,(function(e){return i(t[o][1][e]||e)}),l,l.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){var n=e("async.util.eachoflimit"),i=e("async.util.withoutindex");t.exports=function(e,t,r,a){return n(t)(e,i(r),a)}},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(e,t,r){t.exports=function(e){return function t(r){function n(){return e.length&&e[r].apply(null,arguments),n.next()}return n.next=function(){return r<e.length-1?t(r+1):null},n}(0)}},{}],3:[function(e,t,r){var n=e("async.util.once"),i=e("async.util.noop"),a=e("async.util.onlyonce"),o=e("async.util.keyiterator");t.exports=function(e){return function(t,r,s){s=n(s||i);var u=o(t=t||[]);if(e<=0)return s(null);var c=!1,l=0,f=!1;!function n(){if(c&&l<=0)return s(null);for(;l<e&&!f;){var i=u();if(null===i)return c=!0,void(l<=0&&s(null));l+=1,r(t[i],i,a((function(e){l-=1,e?(s(e),f=!0):n()})))}}()}}},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(e,t,r){var n=e("async.util.setimmediate"),i=e("async.util.restparam");t.exports=function(e){return i((function(t){var r=t.pop();t.push((function(){var e=arguments;i?n((function(){r.apply(null,e)})):r.apply(null,e)}));var i=!0;e.apply(this,t),i=!1}))}},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(e,t,r){t.exports=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],6:[function(e,t,r){var n=e("async.util.isarray");t.exports=function(e){return n(e)||"number"==typeof e.length&&e.length>=0&&e.length%1==0}},{"async.util.isarray":5}],7:[function(e,t,r){var n=e("async.util.keys"),i=e("async.util.isarraylike");t.exports=function(e){var t,r,a=-1;return i(e)?(t=e.length,function(){return++a<t?a:null}):(r=n(e),t=r.length,function(){return++a<t?r[a]:null})}},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(e,t,r){t.exports=Object.keys||function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}},{}],9:[function(e,t,r){t.exports=function(){}},{}],10:[function(e,t,r){t.exports=function(e){return function(){null!==e&&(e.apply(this,arguments),e=null)}}},{}],11:[function(e,t,r){t.exports=function(e){return function(){if(null===e)throw new Error("Callback was already called.");e.apply(this,arguments),e=null}}},{}],12:[function(e,t,r){t.exports=function(e,t){return t=null==t?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),n=new Array(r),i=0;i<r;i++)n[i]=arguments[i+t];switch(t){case 0:return e.call(this,n);case 1:return e.call(this,arguments[0],n)}}}},{}],13:[function(e,t,r){(function(e){(function(){var r="function"==typeof e&&e,n=function(e){setTimeout(e,0)};t.exports=function(e){return(r||n)(e)}}).call(this)}).call(this,e("timers").setImmediate)},{timers:86}],14:[function(e,t,r){t.exports=function(e){return function(t,r,n){return e(t,n)}}},{}],15:[function(e,t,r){var n=e("async.util.once"),i=e("async.util.noop"),a=e("async.util.isarray"),o=e("async.util.restparam"),s=e("async.util.ensureasync"),u=e("async.iterator");t.exports=function(e,t){if(t=n(t||i),!a(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();!function e(r){return o((function(n,i){if(n)t.apply(null,[n].concat(i));else{var a=r.next();a?i.push(e(a)):i.push(t),s(r).apply(null,i)}}))}(u(e))()}},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(e,t,r){r.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=u(e),o=n[0],s=n[1],c=new a(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),l=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],17:[function(e,t,r){},{}],18:[function(e,t,r){arguments[4][17][0].apply(r,arguments)},{dup:17}],19:[function(e,t,r){(function(t){(function(){var t=e("base64-js"),n=e("ieee754");r.Buffer=o,r.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function a(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=a(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e));if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=o.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var i=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||H(e.length)?a(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e))}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|f(e))}function l(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function h(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(i)return n?-1:I(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return P(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(c(e,a+h)!==c(t,h)){f=!1;break}if(f)return a}return-1}function v(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(H(s))return o;e[r+o]=s}return o}function m(e,t,r,n){return F(I(t,e.length-r),e,r,n)}function b(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return b(e,t,r,n)}function w(e,t,r,n){return F(B(t),e,r,n)}function S(e,t,r,n){return F(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function P(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function T(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}r.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},o.allocUnsafe=function(e){return c(e)},o.allocUnsafeSlow=function(e){return c(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(U(a,Uint8Array)&&(a=o.from(a)),!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},o.byteLength=h,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)d(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)d(this,t,t+3),d(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):p.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(a,s),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return m(this,e,t,r);case"ascii":return b(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function O(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function E(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=N(e[a]);return i}function A(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function x(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,i,a){return t=+t,r>>>=0,a||M(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function L(e,t,r,i,a){return t=+t,r>>>=0,a||M(e,0,r,8),n.write(e,t,r,i,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var a=i-1;a>=0;--a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var s=o.isBuffer(e)?e:o.from(e,n),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<r-t;++a)this[a+t]=s[a%u]}return this};var D=/[^+/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function I(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function B(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":16,buffer:19,ieee754:40}],20:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],21:[function(e,t,r){var n=e("fable-serviceproviderbase"),i=e("./LinkedList.js"),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,a){var o;return _classCallCheck2(this,r),(o=void 0===e?t.call(this,{}):t.call(this,e,n,a)).serviceType="ObjectCache",o._HashMap={},o._RecordMap={},o._List=new i,o.maxLength=0,o.maxAge=0,_possibleConstructorReturn(o)}return _createClass2(r,[{key:"RecordMap",get:function(){return this._RecordMap}},{key:"put",value:function(e,t){if(this._HashMap.hasOwnProperty(t))return this._HashMap[t].Datum=e,this._RecordMap[t]=e,this._HashMap[t].Datum;var r=this._List.push(e,t);return this._HashMap[r.Hash]=r,this._RecordMap[t]=e,this.maxLength>0&&this._List.length>this.maxLength&&(r=this._List.pop(),delete this._RecordMap[r.Hash],delete this._HashMap[r.Hash]),r.Metadata.Created=+new Date,r.Datum}},{key:"read",value:function(e){return!!this._HashMap.hasOwnProperty(e)&&this._HashMap[e].Datum}},{key:"touch",value:function(e){if(!this._HashMap.hasOwnProperty(e))return!1;var t=this._List.remove(this._HashMap[e]);return delete this._RecordMap[e],delete this._HashMap[e],this.put(t.Datum,t.Hash)}},{key:"expire",value:function(e){if(!this._HashMap.hasOwnProperty(e))return!1;var t=this._HashMap[e];return t=this._List.remove(t),delete this._RecordMap[t.Hash],delete this._HashMap[t.Hash],t}},{key:"pruneBasedOnExpiration",value:function(e,t){var r=void 0===t?[]:t;if(this.maxAge<1)return e(r);for(var n=+new Date,i=Object.keys(this._HashMap),a=0;a<i.length;a++)n-this._HashMap[i[a]].Metadata.Created>=this.maxAge&&r.push(this.expire(i[a]));e(r)}},{key:"pruneBasedOnLength",value:function(e,t){var r=void 0===t?[]:t;if(this.maxLength>0)for(;this._List.length>this.maxLength;)r.push(this._List.pop());return e(r)}},{key:"pruneCustom",value:function(e,t,r){for(var n=void 0===r?[]:r,i=Object.keys(this._HashMap),a=0;a<i.length;a++){var o=this._HashMap[i[a]];t(o.Datum,o.Hash,o)&&n.push(this.expire(i[a]))}e(n)}},{key:"prune",value:function(e){var t=this,r=[];if(this._List.length<1)return e(r);this.pruneBasedOnExpiration((function(n){t.pruneBasedOnLength(e,r)}),r)}},{key:"getNode",value:function(e){return!!this._HashMap.hasOwnProperty(e)&&this._HashMap[e]}}]),r}(n);t.exports=a},{"./LinkedList.js":23,"fable-serviceproviderbase":33}],22:[function(e,t,r){var n=_createClass2((function e(){_classCallCheck2(this,e),this.Hash=!1,this.Datum=!1,this.Metadata={},this.LeftNode=!1,this.RightNode=!1,this.__ISNODE=!0}));t.exports=n},{}],23:[function(e,t,r){var n=e("./LinkedList-Node.js"),i=function(){function e(){_classCallCheck2(this,e),this.totalNodes=0,this.length=0,this.head=!1,this.tail=!1}return _createClass2(e,[{key:"initializeNode",value:function(e,t){if(void 0===e)return!1;this.totalNodes++;var r=void 0!==t?t:"NODE[".concat(this.totalNodes,"]"),i=new n;return i.Hash=r,i.Datum=e,i}},{key:"append",value:function(e,t){var r=this.initializeNode(e,t);return!!r&&(this.length++,1==this.length?(this.head=r,this.tail=r,r):(this.tail.RightNode=r,r.LeftNode=this.tail,this.tail=r,r))}},{key:"push",value:function(e,t){return this.append(e,t)}},{key:"prepend",value:function(e,t){var r=this.initializeNode(e,t);return!!r&&(this.length++,1==this.length?(this.head=r,this.tail=r,r):(this.head.LeftNode=r,r.RightNode=this.head,this.head=r,r))}},{key:"remove",value:function(e){return void 0!==e&&(!!e.__ISNODE&&(this.length--,this.length<1?(this.head=!1,this.tail=!1,e):e.LeftNode&&e.RightNode?(e.LeftNode.RightNode=e.RightNode,e.RightNode.LeftNode=e.LeftNode,e.RightNode=!1,e.LeftNode=!1,e):e.LeftNode?(e.LeftNode.RightNode=!1,this.tail=e.LeftNode,e.LeftNode=!1,e):(e.RightNode.LeftNode=!1,this.head=e.RightNode,e.RightNode=!1,e)))}},{key:"pop",value:function(){return this.remove(this.head)}},{key:"each",value:function(e,t){var r=this;if(this.length<1)return t();var n=!1;return function i(a){if(a)return t(a);if(n){if(!n.RightNode)return t();n=n.RightNode}else n=r.head;e(n.Datum,n.Hash,i)}()}},{key:"seek",value:function(e){if(!e)return!1;if(this.length<1)return!1;if(e>=this.length)return!1;for(var t=this.head,r=0;r<e;r++)t=t.RightNode;return t}}]),e}();t.exports=i},{"./LinkedList-Node.js":22}],24:[function(e,t,r){r.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},n=(t||{}).decode||a,i=0;for(;i<e.length;){var o=e.indexOf("=",i);if(-1===o)break;var u=e.indexOf(";",i);if(-1===u)u=e.length;else if(u<o){i=e.lastIndexOf(";",o-1)+1;continue}var c=e.slice(i,o).trim();if(void 0===r[c]){var l=e.slice(o+1,u).trim();34===l.charCodeAt(0)&&(l=l.slice(1,-1)),r[c]=s(l,n)}i=u+1}return r},r.serialize=function(e,t,r){var a=r||{},s=a.encode||o;if("function"!=typeof s)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var u=s(t);if(u&&!i.test(u))throw new TypeError("argument val is invalid");var c=e+"="+u;if(null!=a.maxAge){var l=a.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(l)}if(a.domain){if(!i.test(a.domain))throw new TypeError("option domain is invalid");c+="; Domain="+a.domain}if(a.path){if(!i.test(a.path))throw new TypeError("option path is invalid");c+="; Path="+a.path}if(a.expires){var f=a.expires;if(!function(e){return"[object Date]"===n.call(e)||e instanceof Date}(f)||isNaN(f.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+f.toUTCString()}a.httpOnly&&(c+="; HttpOnly");a.secure&&(c+="; Secure");if(a.priority){switch("string"==typeof a.priority?a.priority.toLowerCase():a.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(a.sameSite){switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return c};var n=Object.prototype.toString,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function a(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function o(e){return encodeURIComponent(e)}function s(e,t){try{return t(e)}catch(t){return e}}},{}],25:[function(e,t,r){var n,i="object"===("undefined"==typeof Reflect?"undefined":_typeof(Reflect))?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}v(e,t,a,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,r)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+_typeof(e))}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,a,o,s;if(c(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=l(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):y(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function v(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+_typeof(e));e.addEventListener(t,(function i(a){n.once&&e.removeEventListener(t,i),r(a)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var c=u.length,l=y(u,c);for(r=0;r<c;++r)a(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,a,o;if(c(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)"removeListener"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],26:[function(e,t,r){var n=function(){function e(t,r){_classCallCheck2(this,e),this._Settings="object"==_typeof(t)?t:{},this.loggerUUID=this.generateInsecureUUID(),this.levels=["trace","debug","info","warn","error","fatal"]}return _createClass2(e,[{key:"generateInsecureUUID",value:function(){var e=(new Date).getTime();return"LOGSTREAM-xxxxxx-yxxxxx".replace(/[xy]/g,(function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?r:3&r|8).toString(16)}))}},{key:"initialize",value:function(){}},{key:"trace",value:function(e,t){this.write("trace",e,t)}},{key:"debug",value:function(e,t){this.write("debug",e,t)}},{key:"info",value:function(e,t){this.write("info",e,t)}},{key:"warn",value:function(e,t){this.write("warn",e,t)}},{key:"error",value:function(e,t){this.write("error",e,t)}},{key:"fatal",value:function(e,t){this.write("fatal",e,t)}},{key:"write",value:function(e,t,r){return!0}}]),e}();t.exports=n},{}],27:[function(e,t,r){var n;t.exports=((n={}).console=e("./Fable-Log-Logger-Console.js"),n.default=n.console,n)},{"./Fable-Log-Logger-Console.js":29}],28:[function(e,t,r){t.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],29:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i;_classCallCheck2(this,r),(i=t.call(this,e))._ShowTimeStamps=!i._Settings.hasOwnProperty("showtimestamps")||1==i._Settings.showtimestamps,i._FormattedTimeStamps=!i._Settings.hasOwnProperty("formattedtimestamps")||1==i._Settings.formattedtimestamps,i._ContextMessage=i._Settings.hasOwnProperty("Context")?"(".concat(i._Settings.Context,")"):n._Settings.hasOwnProperty("Product")?"(".concat(n._Settings.Product,")"):"Unnamed_Log_Context",i._OutputLogLinesToConsole=!i._Settings.hasOwnProperty("outputloglinestoconsole")||i._Settings.outputloglinestoconsole,i._OutputObjectsToConsole=!i._Settings.hasOwnProperty("outputobjectstoconsole")||i._Settings.outputobjectstoconsole,i.prefixCache={};for(var a=0;a<=i.levels.length;a++)i.prefixCache[i.levels[a]]="[".concat(i.levels[a],"] ").concat(i._ContextMessage,": "),i._ShowTimeStamps&&(i.prefixCache[i.levels[a]]=" "+i.prefixCache[i.levels[a]]);return i}return _createClass2(r,[{key:"write",value:function(e,t,r){var n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);var i="".concat(n).concat(this.prefixCache[e]).concat(t);return this._OutputLogLinesToConsole&&console.log(i),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),i}}]),r}(e("./Fable-Log-BaseLogger.js"));t.exports=n},{"./Fable-Log-BaseLogger.js":26}],30:[function(e,t,r){var n=e("./Fable-Log-Logger-Console.js"),i=e("fs"),a=e("path"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var o;return _classCallCheck2(this,r),(o=t.call(this,e,n)).logFileRawPath=o._Settings.hasOwnProperty("path")?o._Settings.path:"./".concat(o._ContextMessage,".log"),o.logFilePath=a.normalize(o.logFileRawPath),o.logFileStreamOptions=o._Settings.hasOwnProperty("fileStreamoptions")?o._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},o.fileWriter=i.createWriteStream(o.logFilePath,o.logFileStreamOptions),o.activelyWriting=!1,o.logLineStrings=[],o.logObjectStrings=[],o.defaultWriteCompleteCallback=function(){},o.defaultBufferFlushCallback=function(){},o}return _createClass2(r,[{key:"closeWriter",value:function(e){var t="function"==typeof e?e:function(){};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",t.bind(this))}},{key:"completeBufferFlushToLogFile",value:function(e){this.activelyWriting=!1;var t="function"==typeof e?e:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return t();this.flushBufferToLogFile(t)}},{key:"flushBufferToLogFile",value:function(e){if(!this.activelyWriting){this.activelyWriting=!0;var t="function"==typeof e?e:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];for(var i="",a=0;a<r.length;a++)i+="".concat(r[a],"\n"),!1!==n[a]&&(i+="".concat(n[a],"\n"));if(this.fileWriter.write(i,"utf8"))return this.completeBufferFlushToLogFile(t);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,t))}}},{key:"write",value:function(e,t,n){var i=_get(_getPrototypeOf(r.prototype),"write",this).call(this,e,t,n);this.logLineStrings.push(i),void 0!==n?this.logObjectStrings.push(JSON.stringify(n,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}]),r}(n);t.exports=o},{"./Fable-Log-Logger-Console.js":29,fs:18,path:54}],31:[function(e,t,r){var n=function(t){_inherits(n,t);var r=_createSuper(n);function n(t,i){var a;_classCallCheck2(this,n),(a=r.call(this,t,i)).serviceType="Logging";var o="object"===_typeof(t)?t:{};return a._Settings=o,a._Providers=e("./Fable-Log-DefaultProviders-Node.js"),a._StreamDefinitions=o.hasOwnProperty("LogStreams")?o.LogStreams:e("./Fable-Log-DefaultStreams.json"),a.logStreams=[],a.logProviders={},a.activeLogStreams={},a.logStreamsTrace=[],a.logStreamsDebug=[],a.logStreamsInfo=[],a.logStreamsWarn=[],a.logStreamsError=[],a.logStreamsFatal=[],a.datumDecorator=function(e){return e},a.uuid="string"==typeof o.Product?o.Product:"Default",a}return _createClass2(n,[{key:"addLogger",value:function(e,t){if(this.activeLogStreams.hasOwnProperty(e.loggerUUID))return!1;switch(this.logStreams.push(e),this.activeLogStreams[e.loggerUUID]=!0,t){case"trace":this.logStreamsTrace.push(e);case"debug":this.logStreamsDebug.push(e);case"info":this.logStreamsInfo.push(e);case"warn":this.logStreamsWarn.push(e);case"error":this.logStreamsError.push(e);case"fatal":this.logStreamsFatal.push(e)}return!0}},{key:"setDatumDecorator",value:function(e){this.datumDecorator="function"==typeof e?e:function(e){return e}}},{key:"trace",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsTrace.length;n++)this.logStreamsTrace[n].trace(e,r)}},{key:"debug",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsDebug.length;n++)this.logStreamsDebug[n].debug(e,r)}},{key:"info",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsInfo.length;n++)this.logStreamsInfo[n].info(e,r)}},{key:"warn",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsWarn.length;n++)this.logStreamsWarn[n].warn(e,r)}},{key:"error",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsError.length;n++)this.logStreamsError[n].error(e,r)}},{key:"fatal",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsFatal.length;n++)this.logStreamsFatal[n].fatal(e,r)}},{key:"initialize",value:function(){for(var e=0;e<this._StreamDefinitions.length;e++){var t=Object.assign({loggertype:"default",streamtype:"console",level:"info"},this._StreamDefinitions[e]);this._Providers.hasOwnProperty(t.loggertype)?this.addLogger(new this._Providers[t.loggertype](t,this),t.level):console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(t)))}for(var r=0;r<this.logStreams.length;r++)this.logStreams[r].initialize()}},{key:"logTime",value:function(e,t){var r=void 0!==e?e:"Time",n=new Date;this.info("".concat(r," ").concat(n," (epoch ").concat(+n,")"),t)}},{key:"getTimeStamp",value:function(){return+new Date}},{key:"getTimeDelta",value:function(e){return+new Date-e}},{key:"logTimeDelta",value:function(e,t,r){var n=void 0!==t?t:"Time Measurement",i=(_typeof(r),+new Date);this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(e,"ms)"),r)}},{key:"logTimeDeltaHuman",value:function(e,t,r){var n=void 0!==t?t:"Time Measurement",i=+new Date,a=parseInt(e%1e3),o=parseInt(e/1e3%60),s=parseInt(e/6e4%60),u=parseInt(e/36e5);a=a<10?"00"+a:a<100?"0"+a:a,o=o<10?"0"+o:o,s=s<10?"0"+s:s,u=u<10?"0"+u:u,this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(e,"ms) or (").concat(u,":").concat(s,":").concat(o,".").concat(a,")"),r)}},{key:"logTimeDeltaRelative",value:function(e,t,r){this.logTimeDelta(this.getTimeDelta(e),t,r)}},{key:"logTimeDeltaRelativeHuman",value:function(e,t,r){this.logTimeDeltaHuman(this.getTimeDelta(e),t,r)}}]),n}(e("fable-serviceproviderbase").CoreServiceProviderBase);t.exports=n,t.exports.new=function(e){return new n(e)},t.exports.LogProviderBase=e("./Fable-Log-BaseLogger.js"),t.exports.LogProviderConsole=e("./Fable-Log-Logger-Console.js"),t.exports.LogProviderConsole=e("./Fable-Log-Logger-SimpleFlatFile.js")},{"./Fable-Log-BaseLogger.js":26,"./Fable-Log-DefaultProviders-Node.js":27,"./Fable-Log-DefaultStreams.json":28,"./Fable-Log-Logger-Console.js":29,"./Fable-Log-Logger-SimpleFlatFile.js":30,"fable-serviceproviderbase":33}],32:[function(e,t,r){var n=function(){function e(t,r){_classCallCheck2(this,e),this.fable=!1,this.options="object"===_typeof(t)?t:{},this.serviceType="Unknown",this.UUID="CORESVC-".concat(Math.floor(89999*Math.random()+1e4)),this.Hash="string"==typeof r?r:"".concat(this.UUID)}return _createClass2(e,[{key:"connectFable",value:function(e){return this.fable=e,!0}}]),e}();_defineProperty2(n,"isFableService",!0),t.exports=n},{}],33:[function(e,t,r){var n=_createClass2((function e(t,r,n){_classCallCheck2(this,e),this.fable=t,this.options="object"===_typeof(r)?r:"object"!==_typeof(t)||t.isFable?{}:t,this.serviceType="Unknown","function"==typeof t.getUUID?this.UUID=t.getUUID():this.UUID="NoFABLESVC-".concat(Math.floor(89999*Math.random()+1e4)),this.Hash="string"==typeof n?n:"".concat(this.UUID),this.log=this.fable.log,this.servicesMap=this.fable.servicesMap,this.services=this.fable.services}));_defineProperty2(n,"isFableService",!0),t.exports=n,t.exports.CoreServiceProviderBase=e("./Fable-ServiceProviderBase-Preinit.js")},{"./Fable-ServiceProviderBase-Preinit.js":32}],34:[function(e,t,r){t.exports={Product:"ApplicationNameHere",ProductVersion:"0.0.0",ConfigFile:!1,LogStreams:[{level:"trace"}]}},{}],35:[function(e,t,r){(function(r){(function(){var n=e("precedent"),i=function(){function e(t){_classCallCheck2(this,e),this.templateProcessor=new n,this.templateProcessor.addPattern("${","}",(function(e){var t=e.trim(),n=t.indexOf("|"),i=t.substring(n+1),a=n>-1?t.substring(0,n):t;return r.env.hasOwnProperty(a)?r.env[a]:i}))}return _createClass2(e,[{key:"parseSetting",value:function(e){return this.templateProcessor.parseString(e)}}]),e}();t.exports=i}).call(this)}).call(this,e("_process"))},{_process:58,precedent:55}],36:[function(e,t,r){var n=e("fable-serviceproviderbase").CoreServiceProviderBase,i=e("./Fable-Settings-TemplateProcessor.js"),a=function(t){_inherits(n,t);var r=_createSuper(n);function n(t,a){var o;_classCallCheck2(this,n),(o=r.call(this,t,a)).serviceType="SettingsManager",o.settingsTemplateProcessor=new i,o._configureEnvTemplating(t),o.default=o.buildDefaultSettings();var s=o.merge(t,o.buildDefaultSettings());if(o.base=JSON.parse(JSON.stringify(s)),s.DefaultConfigFile)try{s=o.merge(e(s.DefaultConfigFile),s)}catch(e){console.log("Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}if(s.ConfigFile)try{s=o.merge(e(s.ConfigFile),s)}catch(e){console.log("Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}return o.settings=s,o}return _createClass2(n,[{key:"buildDefaultSettings",value:function(){return JSON.parse(JSON.stringify(e("./Fable-Settings-Default")))}},{key:"_configureEnvTemplating",value:function(e){this._PerformEnvTemplating=!e||!0!==e.NoEnvReplacement}},{key:"_resolveEnv",value:function(e){for(var t in e)"object"===_typeof(e[t])?this._resolveEnv(e[t]):"string"==typeof e[t]&&(e[t]=this.settingsTemplateProcessor.parseSetting(e[t]))}},{key:"_isObject",value:function(e){return"object"===_typeof(e)&&!Array.isArray(e)}},{key:"_deepMergeObjects",value:function(e,t){var r=this;if(t&&this._isObject(t))return Object.keys(t).forEach((function(n){var i=t[n];if(r._isObject(i)){var a=e[n];if(a&&r._isObject(a))return void r._deepMergeObjects(a,i)}e[n]=i})),e}},{key:"merge",value:function(e,t){var r="object"===_typeof(e)?e:{},n="object"===_typeof(t)?t:this.settings,i=JSON.parse(JSON.stringify(r));return n=this._deepMergeObjects(n,i),this._PerformEnvTemplating&&this._resolveEnv(n),this._configureEnvTemplating(n),n}},{key:"fill",value:function(e){var t="object"===_typeof(e)?e:{},r=JSON.parse(JSON.stringify(t));return this.settings=this._deepMergeObjects(r,this.settings),this.settings}}]),n}(n);t.exports=a,t.exports.new=function(e){return new a(e)}},{"./Fable-Settings-Default":34,"./Fable-Settings-TemplateProcessor.js":35,"fable-serviceproviderbase":33}],37:[function(e,t,r){var n=function(){function e(){_classCallCheck2(this,e),this.getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)}return _createClass2(e,[{key:"generateWhatWGBytes",value:function(){var e=new Uint8Array(16);return this.getRandomValues(e),e}},{key:"generateRandomBytes",value:function(){for(var e,t=new Uint8Array(16),r=0;r<16;r++)0==(3&r)&&(e=4294967296*Math.random()),t[r]=e>>>((3&r)<<3)&255;return t}},{key:"generate",value:function(){return this.getRandomValues?this.generateWhatWGBytes():this.generateRandomBytes()}}]),e}();t.exports=n},{}],38:[function(e,t,r){var n=e("fable-serviceproviderbase").CoreServiceProviderBase,i=e("./Fable-UUID-Random.js"),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var a;_classCallCheck2(this,r),(a=t.call(this,e,n)).serviceType="UUID",a._UUIDModeRandom=!("object"!==_typeof(e)||!e.hasOwnProperty("UUIDModeRandom"))&&1==e.UUIDModeRandom,a._UUIDLength="object"===_typeof(e)&&e.hasOwnProperty("UUIDLength")?e.UUIDLength+0:8,a._UUIDRandomDictionary="object"===_typeof(e)&&e.hasOwnProperty("UUIDDictionary")?e.UUIDDictionary+0:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",a.randomByteGenerator=new i,a._HexLookup=[];for(var o=0;o<256;++o)a._HexLookup[o]=(o+256).toString(16).substr(1);return a}return _createClass2(r,[{key:"bytesToUUID",value:function(e){var t=0;return[this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]]].join("")}},{key:"generateUUIDv4",value:function(){new Array(16);var e=this.randomByteGenerator.generate();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,this.bytesToUUID(e)}},{key:"generateRandom",value:function(){for(var e="",t=0;t<this._UUIDLength;t++)e+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));return e}},{key:"getUUID",value:function(){return this._UUIDModeRandom?this.generateRandom():this.generateUUIDv4()}}]),r}(n);t.exports=a,t.exports.new=function(e){return new a(e)}},{"./Fable-UUID-Random.js":37,"fable-serviceproviderbase":33}],39:[function(e,t,r){var n=e("http"),i=e("url"),a=t.exports;for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}a.request=function(e,t){return e=s(e),n.request.call(this,e,t)},a.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},{http:66,url:87}],40:[function(e,t,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */r.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+f],f+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+f],f+=h,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(e,t,r,n,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*g}},{}],41:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],42:[function(e,t,r){t.exports=function(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}},{}],43:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n,this.translationTable={}}return _createClass2(e,[{key:"translationCount",value:function(){return Object.keys(this.translationTable).length}},{key:"addTranslation",value:function(e){var t=this;if("object"!=_typeof(e))return this.logError("Hash translation addTranslation expected a translation be type object but was passed in ".concat(_typeof(e))),!1;Object.keys(e).forEach((function(r){"string"!=typeof e[r]?t.logError("Hash translation addTranslation expected a translation destination hash for [".concat(r,"] to be a string but the referrant was a ").concat(_typeof(e[r]))):t.translationTable[r]=e[r]}))}},{key:"removeTranslationHash",value:function(e){this.translationTable.hasOwnProperty(e)&&delete this.translationTable[e]}},{key:"removeTranslation",value:function(e){var t=this;return"string"==typeof e?(this.removeTranslationHash(e),!0):"object"==_typeof(e)?(Object.keys(e).forEach((function(e){t.removeTranslation(e)})),!0):(this.logError("Hash translation removeTranslation expected either a string or an object but the passed-in translation was type ".concat(_typeof(e))),!1)}},{key:"clearTranslations",value:function(){this.translationTable={}}},{key:"translate",value:function(e){return this.translationTable.hasOwnProperty(e)?this.translationTable[e]:e}}]),e}();t.exports=i},{"./Manyfest-LogToConsole.js":44}],44:[function(e,t,r){t.exports=function(e,t){var r="string"==typeof e?e:"";console.log("[Manyfest] ".concat(r)),t&&console.log(JSON.stringify(t))}},{}],45:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n}return _createClass2(e,[{key:"checkAddressExists",value:function(e,t){if("object"!=_typeof(e))return!1;if("string"!=typeof t)return!1;var r=t.indexOf(".");if(-1==r){var n=t.indexOf("["),i=t.indexOf("]");if(n>0&&i>n&&i-n>1){var a=t.substring(0,n).trim();if("object"!==_typeof(e[a]))return!1;var o=t.substring(n+1,i).trim(),s=parseInt(o,10);return Array.isArray(e[a])!=isNaN(s)&&(isNaN(s)?(o=this.cleanWrapCharacters('"',o),o=this.cleanWrapCharacters("`",o),o=this.cleanWrapCharacters("'",o),e[a].hasOwnProperty(o)):s in e[a])}return e.hasOwnProperty(t)}var u=t.substring(0,r),c=t.substring(r+1),l=u.indexOf("["),f=u.indexOf("]");if(l>0&&f>l&&f-l>1){var h=u.substring(0,l).trim(),p=u.substring(l+1,f).trim(),d=parseInt(p,10);return Array.isArray(e[h])!=isNaN(d)&&(isNaN(d)?(p=this.cleanWrapCharacters('"',p),p=this.cleanWrapCharacters("`",p),p=this.cleanWrapCharacters("'",p),this.checkAddressExists(e[h][p],c)):this.checkAddressExists(e[h][d],c))}return(!e.hasOwnProperty(u)||"object"===_typeof(e[u]))&&(e.hasOwnProperty(u)||(e[u]={}),this.checkAddressExists(e[u],c))}}]),e}();t.exports=i},{"./Manyfest-LogToConsole.js":44}],46:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=e("./Manyfest-CleanWrapCharacters.js"),a=e("../source/Manyfest-ParseConditionals.js"),o=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n,this.cleanWrapCharacters=i}return _createClass2(e,[{key:"checkFilters",value:function(e,t){return a(this,e,t)}},{key:"deleteValueAtAddress",value:function(e,t,r){if("object"==_typeof(e)&&"string"==typeof t){var n="";"string"==typeof r&&(n=r);var i=t.indexOf(".");if(-1==i){var a=t.indexOf("["),o=t.indexOf("]"),s=t.indexOf("{}");if(a>0&&o>a&&o-a>1){var u=t.substring(0,a).trim();if("object"!==_typeof(e[u]))return!1;var c=t.substring(a+1,o).trim(),l=parseInt(c,10);return Array.isArray(e[u])!=isNaN(l)&&(isNaN(l)?(c=this.cleanWrapCharacters('"',c),c=this.cleanWrapCharacters("`",c),c=this.cleanWrapCharacters("'",c),delete e[u][c],!0):(delete e[u][l],!0))}if(a>0&&o>a&&o-a==1){var f=t.substring(0,a).trim();if(!Array.isArray(e[f]))return!1;for(var h=e[f],p=h.length-1;p>=0;p--){this.checkFilters(t,h[p])&&h.splice(p,1)}return!0}if(s>0){var d=t.substring(0,s).trim();return"object"==_typeof(e[d])&&(delete e[d],!0)}return delete e[t],!0}var g=t.substring(0,i),y=t.substring(i+1),v=g.indexOf("["),m=g.indexOf("]");if(v>0&&m>v&&m-v>1){var b=g.substring(0,v).trim(),_=g.substring(v+1,m).trim(),w=parseInt(_,10);return Array.isArray(e[b])!=isNaN(w)&&("object"==_typeof(e[b])&&(isNaN(w)?(_=this.cleanWrapCharacters('"',_),_=this.cleanWrapCharacters("`",_),_=this.cleanWrapCharacters("'",_),n="".concat(n).concat(n.length>0?".":"").concat(g),this.deleteValueAtAddress(e[b][_],y,n)):(n="".concat(n).concat(n.length>0?".":"").concat(g),this.deleteValueAtAddress(e[b][w],y,n))))}if(v>0&&m>v&&m-v==1){var S=t.substring(0,v).trim();if(!Array.isArray(e[S]))return!1;var P=e[S];n="".concat(n).concat(n.length>0?".":"").concat(S);for(var T={},C=0;C<P.length;C++){var O="".concat(n,"[").concat(C,"]"),k=this.deleteValueAtAddress(e[S][C],y,O);T["".concat(O,".").concat(y)]=k}return T}var E=t.indexOf("{}");if(E>0){var A=t.substring(0,E).trim();if("object"!=_typeof(e[A]))return!1;var x=e[A],j=Object.keys(x);n="".concat(n).concat(n.length>0?".":"").concat(A);for(var M={},R=0;R<j.length;R++){var L="".concat(n,".").concat(j[R]),D=this.deleteValueAtAddress(e[A][j[R]],y,L);this.checkFilters(t,D)&&(M["".concat(L,".").concat(y)]=D)}return M}return e.hasOwnProperty(g)&&"object"!==_typeof(e[g])?void 0:e.hasOwnProperty(g)?(n="".concat(n).concat(n.length>0?".":"").concat(g),this.deleteValueAtAddress(e[g],y,n)):(n="".concat(n).concat(n.length>0?".":"").concat(g),e[g]={},this.deleteValueAtAddress(e[g],y,n))}}}]),e}();t.exports=o},{"../source/Manyfest-ParseConditionals.js":50,"./Manyfest-CleanWrapCharacters.js":42,"./Manyfest-LogToConsole.js":44}],47:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=e("./Manyfest-CleanWrapCharacters.js"),a=e("../source/Manyfest-ParseConditionals.js"),o=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n,this.cleanWrapCharacters=i}return _createClass2(e,[{key:"checkFilters",value:function(e,t){return a(this,e,t)}},{key:"getValueAtAddress",value:function(e,t,r,n){if("object"==_typeof(e)&&"string"==typeof t){var i="";"string"==typeof r&&(i=r);var a=void 0===n?e:n,o=t.indexOf(".");if(0==o){for(var s=i.split("."),u=0,c=0;c<t.length&&"."==t.charAt(c);c++)u++;var l=s.length-u;if(l<0)return;var f=t.slice(u);return l>0&&(f="".concat(s.slice(0,l).join("."),".").concat(f)),this.logInfo("Back-navigation detected. Recursing back to address [".concat(f,"]")),this.getValueAtAddress(a,f)}if(-1==o){var h=t.indexOf("["),p=t.indexOf("]"),d=t.indexOf("{}");if(h>0&&p>h&&p-h>1){var g=t.substring(0,h).trim();if("object"!==_typeof(e[g]))return;var y=t.substring(h+1,p).trim(),v=parseInt(y,10);if(Array.isArray(e[g])==isNaN(v))return;return isNaN(v)?(y=this.cleanWrapCharacters('"',y),y=this.cleanWrapCharacters("`",y),y=this.cleanWrapCharacters("'",y),e[g][y]):e[g][v]}if(h>0&&p>h&&p-h==1){var m=t.substring(0,h).trim();if(!Array.isArray(e[m]))return!1;for(var b=e[m],_=[],w=0;w<b.length;w++){this.checkFilters(t,b[w])&&_.push(b[w])}return _}if(d>0){var S=t.substring(0,d).trim();return"object"==_typeof(e[S])&&e[S]}return e[t]}var P=t.substring(0,o),T=t.substring(o+1),C=P.indexOf("["),O=P.indexOf("]");if(C>0&&O>C&&O-C>1){var k=P.substring(0,C).trim(),E=P.substring(C+1,O).trim(),A=parseInt(E,10);if(Array.isArray(e[k])==isNaN(A))return;if("object"!=_typeof(e[k]))return;return isNaN(A)?(E=this.cleanWrapCharacters('"',E),E=this.cleanWrapCharacters("`",E),E=this.cleanWrapCharacters("'",E),i="".concat(i).concat(i.length>0?".":"").concat(P),this.getValueAtAddress(e[k][E],T,i,a)):(i="".concat(i).concat(i.length>0?".":"").concat(P),this.getValueAtAddress(e[k][A],T,i,a))}if(C>0&&O>C&&O-C==1){var x=t.substring(0,C).trim();if(!Array.isArray(e[x]))return!1;var j=e[x];i="".concat(i).concat(i.length>0?".":"").concat(x);for(var M={},R=0;R<j.length;R++){var L="".concat(i,"[").concat(R,"]"),D=this.getValueAtAddress(e[x][R],T,L,a);M["".concat(L,".").concat(T)]=D}return M}var N=t.indexOf("{}");if(N>0){var I=t.substring(0,N).trim();if("object"!=_typeof(e[I]))return!1;var B=e[I],F=Object.keys(B);i="".concat(i).concat(i.length>0?".":"").concat(I);for(var U={},H=0;H<F.length;H++){var W="".concat(i,".").concat(F[H]),q=this.getValueAtAddress(e[I][F[H]],T,W,a);this.checkFilters(t,q)&&(U["".concat(W,".").concat(T)]=q)}return U}return e.hasOwnProperty(P)&&"object"!==_typeof(e[P])?void 0:e.hasOwnProperty(P)?(i="".concat(i).concat(i.length>0?".":"").concat(P),this.getValueAtAddress(e[P],T,i,a)):(i="".concat(i).concat(i.length>0?".":"").concat(P),e[P]={},this.getValueAtAddress(e[P],T,i,a))}}}]),e}();t.exports=o},{"../source/Manyfest-ParseConditionals.js":50,"./Manyfest-CleanWrapCharacters.js":42,"./Manyfest-LogToConsole.js":44}],48:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=e("./Manyfest-CleanWrapCharacters.js"),a=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n,this.cleanWrapCharacters=i}return _createClass2(e,[{key:"setValueAtAddress",value:function(e,t,r){if("object"!=_typeof(e))return!1;if("string"!=typeof t)return!1;var n=t.indexOf(".");if(-1==n){var i=t.indexOf("["),a=t.indexOf("]");if(i>0&&a>i&&a-i>1){var o=t.substring(0,i).trim();if("object"!==_typeof(e[o]))return!1;var s=t.substring(i+1,a).trim(),u=parseInt(s,10);return Array.isArray(e[o])!=isNaN(u)&&(isNaN(u)?(s=this.cleanWrapCharacters('"',s),s=this.cleanWrapCharacters("`",s),s=this.cleanWrapCharacters("'",s),e[o][s]=r,!0):(e[o][u]=r,!0))}return e[t]=r,!0}var c=t.substring(0,n),l=t.substring(n+1),f=c.indexOf("["),h=c.indexOf("]");if(f>0&&h>f&&h-f>1){var p=c.substring(0,f).trim(),d=c.substring(f+1,h).trim(),g=parseInt(d,10);return Array.isArray(e[p])!=isNaN(g)&&(isNaN(g)?(d=this.cleanWrapCharacters('"',d),d=this.cleanWrapCharacters("`",d),d=this.cleanWrapCharacters("'",d),this.setValueAtAddress(e[p][d],l,r)):this.setValueAtAddress(e[p][g],l,r))}return e.hasOwnProperty(c)&&"object"!==_typeof(e[c])?(e.hasOwnProperty("__ERROR")||(e.__ERROR={}),e.__ERROR[t]=r,!1):(e.hasOwnProperty(c)||(e[c]={}),this.setValueAtAddress(e[c],l,r))}}]),e}();t.exports=a},{"./Manyfest-CleanWrapCharacters.js":42,"./Manyfest-LogToConsole.js":44}],49:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n}return _createClass2(e,[{key:"generateAddressses",value:function(e,t,r){var n="string"==typeof t?t:"",i="object"==_typeof(r)?r:{},a=_typeof(e),o={Address:n,Hash:n,Name:n,InSchema:!1};switch("object"==a&&null==e&&(a="null"),a){case"string":o.DataType="String",o.Default=e,i[n]=o;break;case"number":case"bigint":o.DataType="Number",o.Default=e,i[n]=o;break;case"undefined":case"null":o.DataType="Any",o.Default=e,i[n]=o;break;case"object":if(Array.isArray(e)){o.DataType="Array",""!=n&&(i[n]=o);for(var s=0;s<e.length;s++)this.generateAddressses(e[s],"".concat(n,"[").concat(s,"]"),i)}else{o.DataType="Object",""!=n&&(i[n]=o,n+=".");for(var u=Object.keys(e),c=0;c<u.length;c++)this.generateAddressses(e[u[c]],"".concat(n).concat(u[c]),i)}}return i}}]),e}();t.exports=i},{"./Manyfest-LogToConsole.js":44}],50:[function(e,t,r){var n="<<~?",i="?~>>",a=function(e,t,r,n,i){switch(n){case"!=":return e.getValueAtAddress(t,r)!=i;case"<":return e.getValueAtAddress(t,r)<i;case">":return e.getValueAtAddress(t,r)>i;case"<=":return e.getValueAtAddress(t,r)<=i;case">=":return e.getValueAtAddress(t,r)>=i;case"===":return e.getValueAtAddress(t,r)===i;default:return e.getValueAtAddress(t,r)==i}};t.exports=function(e,t,r){for(var o=!0,s=t.indexOf(n);-1!=s;){var u=t.indexOf(i,s+4);if(-1!=u){var c=t.substring(s+4,u).split(","),l=c[0],f=c[1],h=c[2];o=o&&a(e,r,l,f,h),s=t.indexOf(n,u+4)}else s=-1}return o}},{}],51:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n}return _createClass2(e,[{key:"resolveAddressMappings",value:function(e,t){if("object"!=_typeof(e))return this.logError("Attempted to resolve address mapping but the descriptor was not an object."),!1;if("object"!=_typeof(t))return!0;var r=Object.keys(e),n={};return r.forEach((function(t){e[t].hasOwnProperty("Hash")&&(n[e[t].Hash]=t)})),Object.keys(t).forEach((function(r){var i=t[r],a=!1,o=!1;e.hasOwnProperty(r)?a=r:n.hasOwnProperty(r)&&(a=n[r]),a?(o=e[a],delete e[a]):o={Hash:r},e[i]=o})),!0}},{key:"safeResolveAddressMappings",value:function(e,t){var r=JSON.parse(JSON.stringify(e));return this.resolveAddressMappings(r,t),r}},{key:"mergeAddressMappings",value:function(e,t){if("object"!=_typeof(t)||"object"!=_typeof(e))return this.logError("Attempted to merge two schema descriptors but both were not objects."),!1;var r=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(e));return Object.keys(r).forEach((function(e){n.hasOwnProperty(e)||(n[e]=r[e])})),n}}]),e}();t.exports=i},{"./Manyfest-LogToConsole.js":44}],52:[function(e,t,r){var n=e("fable-serviceproviderbase"),i=e("./Manyfest-LogToConsole.js"),a=e("./Manyfest-HashTranslation.js"),o=e("./Manyfest-ObjectAddress-CheckAddressExists.js"),s=e("./Manyfest-ObjectAddress-GetValue.js"),u=e("./Manyfest-ObjectAddress-SetValue.js"),c=e("./Manyfest-ObjectAddress-DeleteValue.js"),l=e("./Manyfest-ObjectAddressGeneration.js"),f=e("./Manyfest-SchemaManipulation.js"),h={Scope:"DEFAULT",Descriptors:{}},p=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,h){var p;return _classCallCheck2(this,r),(p=void 0===e?t.call(this,{}):t.call(this,e,n,h)).serviceType="Manifest",p.logInfo=i,p.logError=i,p.objectAddressCheckAddressExists=new o(p.logInfo,p.logError),p.objectAddressGetValue=new s(p.logInfo,p.logError),p.objectAddressSetValue=new u(p.logInfo,p.logError),p.objectAddressDeleteValue=new c(p.logInfo,p.logError),p.options.hasOwnProperty("defaultValues")||(p.options.defaultValues={String:"",Number:0,Float:0,Integer:0,Boolean:!1,Binary:0,DateTime:0,Array:[],Object:{},Null:null}),p.options.hasOwnProperty("strict")||(p.options.strict=!1),p.scope=void 0,p.elementAddresses=void 0,p.elementHashes=void 0,p.elementDescriptors=void 0,p.reset(),"object"===_typeof(p.options)&&p.loadManifest(p.options),p.schemaManipulations=new f(p.logInfo,p.logError),p.objectAddressGeneration=new l(p.logInfo,p.logError),p.hashTranslations=new a(p.logInfo,p.logError),_possibleConstructorReturn(p)}return _createClass2(r,[{key:"reset",value:function(){this.scope="DEFAULT",this.elementAddresses=[],this.elementHashes={},this.elementDescriptors={}}},{key:"clone",value:function(){var e=JSON.parse(JSON.stringify(this.options)),t=new r(this.getManifest(),this.logInfo,this.logError,e);return t.hashTranslations.addTranslation(this.hashTranslations.translationTable),t}},{key:"deserialize",value:function(e){return this.loadManifest(JSON.parse(e))}},{key:"loadManifest",value:function(e){"object"!==_typeof(e)&&this.logError("(".concat(this.scope,") Error loading manifest; expecting an object but parameter was type ").concat(_typeof(e),"."));for(var t="object"==_typeof(e)?e:{},r=Object.keys(h),n=0;n<r.length;n++)t.hasOwnProperty(r[n])||(t[r[n]]=JSON.parse(JSON.stringify(h[r[n]])));if(t.hasOwnProperty("Scope")?"string"==typeof t.Scope?this.scope=t.Scope:this.logError("(".concat(this.scope,") Error loading scope from manifest; expecting a string but property was type ").concat(_typeof(t.Scope),"."),t):this.logError("(".concat(this.scope,') Error loading scope from manifest object. Property "Scope" does not exist in the root of the object.'),t),t.hasOwnProperty("Descriptors"))if("object"===_typeof(t.Descriptors))for(var i=Object.keys(t.Descriptors),a=0;a<i.length;a++)this.addDescriptor(i[a],t.Descriptors[i[a]]);else this.logError("(".concat(this.scope,") Error loading description object from manifest object. Expecting an object in 'Manifest.Descriptors' but the property was type ").concat(_typeof(t.Descriptors),"."),t);else this.logError("(".concat(this.scope,') Error loading object description from manifest object. Property "Descriptors" does not exist in the root of the Manifest object.'),t);if(t.hasOwnProperty("HashTranslations")&&"object"===_typeof(t.HashTranslations))for(var o=0;o<t.HashTranslations.length;o++);}},{key:"serialize",value:function(){return JSON.stringify(this.getManifest())}},{key:"getManifest",value:function(){return{Scope:this.scope,Descriptors:JSON.parse(JSON.stringify(this.elementDescriptors)),HashTranslations:JSON.parse(JSON.stringify(this.hashTranslations.translationTable))}}},{key:"addDescriptor",value:function(e,t){return"object"===_typeof(t)?(t.hasOwnProperty("Address")||(t.Address=e),this.elementDescriptors.hasOwnProperty(e)||this.elementAddresses.push(e),this.elementDescriptors[e]=t,this.elementHashes[e]=e,t.hasOwnProperty("Hash")?this.elementHashes[t.Hash]=e:t.Hash=e,!0):(this.logError("(".concat(this.scope,") Error loading object descriptor for address '").concat(e,"' from manifest object. Expecting an object but property was type ").concat(_typeof(t),".")),!1)}},{key:"getDescriptorByHash",value:function(e){return this.getDescriptor(this.resolveHashAddress(e))}},{key:"getDescriptor",value:function(e){return this.elementDescriptors[e]}},{key:"eachDescriptor",value:function(e){for(var t=Object.keys(this.elementDescriptors),r=0;r<t.length;r++)e(this.elementDescriptors[t[r]])}},{key:"checkAddressExistsByHash",value:function(e,t){return this.checkAddressExists(e,this.resolveHashAddress(t))}},{key:"checkAddressExists",value:function(e,t){return this.objectAddressCheckAddressExists.checkAddressExists(e,t)}},{key:"resolveHashAddress",value:function(e){var t=this.elementHashes.hasOwnProperty(e),r=this.hashTranslations.translationTable.hasOwnProperty(e);return t&&!r?this.elementHashes[e]:r&&this.elementHashes.hasOwnProperty(this.hashTranslations.translate(e))?this.elementHashes[this.hashTranslations.translate(e)]:r?this.hashTranslations.translate(e):e}},{key:"getValueByHash",value:function(e,t){var r=this.getValueAtAddress(e,this.resolveHashAddress(t));return void 0===r&&(r=this.getDefaultValue(this.getDescriptorByHash(t))),r}},{key:"getValueAtAddress",value:function(e,t){var r=this.objectAddressGetValue.getValueAtAddress(e,t);return void 0===r&&(r=this.getDefaultValue(this.getDescriptor(t))),r}},{key:"setValueByHash",value:function(e,t,r){return this.setValueAtAddress(e,this.resolveHashAddress(t),r)}},{key:"setValueAtAddress",value:function(e,t,r){return this.objectAddressSetValue.setValueAtAddress(e,t,r)}},{key:"deleteValueByHash",value:function(e,t,r){return this.deleteValueAtAddress(e,this.resolveHashAddress(t),r)}},{key:"deleteValueAtAddress",value:function(e,t,r){return this.objectAddressDeleteValue.deleteValueAtAddress(e,t,r)}},{key:"validate",value:function(e){var t={Error:null,Errors:[],MissingElements:[]};"object"!==_typeof(e)&&(t.Error=!0,t.Errors.push("Expected passed in object to be type object but was passed in ".concat(_typeof(e))));for(var r=function(e,r){t.Error=!0,t.Errors.push('Element at address "'.concat(e,'" ').concat(r,"."))},n=0;n<this.elementAddresses.length;n++){var i=this.getDescriptor(this.elementAddresses[n]),a=this.checkAddressExists(e,i.Address),o=this.getValueAtAddress(e,i.Address);if(void 0!==o&&a||(t.MissingElements.push(i.Address),(i.Required||this.options.strict)&&r(i.Address,"is flagged REQUIRED but is not set in the object")),i.DataType){var s=_typeof(o);switch(i.DataType.toString().trim().toLowerCase()){case"string":"string"!=s&&r(i.Address,"has a DataType ".concat(i.DataType," but is of the type ").concat(s));break;case"number":"number"!=s&&r(i.Address,"has a DataType ".concat(i.DataType," but is of the type ").concat(s));break;case"integer":if("number"!=s)r(i.Address,"has a DataType ".concat(i.DataType," but is of the type ").concat(s));else o.toString().indexOf(".")>-1&&r(i.Address,"has a DataType ".concat(i.DataType," but has a decimal point in the number."));break;case"float":"number"!=s&&r(i.Address,"has a DataType ".concat(i.DataType," but is of the type ").concat(s));break;case"DateTime":"Invalid Date"==new Date(o).toString()&&r(i.Address,"has a DataType ".concat(i.DataType," but is not parsable as a Date by Javascript"));default:"string"!=s&&r(i.Address,"has a DataType ".concat(i.DataType," (which auto-converted to String because it was unrecognized) but is of the type ").concat(s))}}}return t}},{key:"getDefaultValue",value:function(e){if("object"==_typeof(e)){if(e.hasOwnProperty("Default"))return e.Default;var t=e.hasOwnProperty("DataType")?e.DataType:"String";return this.options.defaultValues.hasOwnProperty(t)?this.options.defaultValues[t]:null}}},{key:"populateDefaults",value:function(e,t){return this.populateObject(e,t,(function(e){return e.hasOwnProperty("Default")}))}},{key:"populateObject",value:function(e,t,r){var n=this,i="object"===_typeof(e)?e:{},a=void 0!==t&&t,o="function"==typeof r?r:function(e){return!0};return this.elementAddresses.forEach((function(e){var t=n.getDescriptor(e);o(t)&&(!a&&n.checkAddressExists(i,e)||n.setValueAtAddress(i,e,n.getDefaultValue(t)))})),i}}]),r}(n);t.exports=p},{"./Manyfest-HashTranslation.js":43,"./Manyfest-LogToConsole.js":44,"./Manyfest-ObjectAddress-CheckAddressExists.js":45,"./Manyfest-ObjectAddress-DeleteValue.js":46,"./Manyfest-ObjectAddress-GetValue.js":47,"./Manyfest-ObjectAddress-SetValue.js":48,"./Manyfest-ObjectAddressGeneration.js":49,"./Manyfest-SchemaManipulation.js":51,"fable-serviceproviderbase":33}],53:[function(e,t,r){var n=e("wrappy");function i(e){var t=function t(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function a(e){var t=function t(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(i),t.exports.strict=n(a),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return a(this)},configurable:!0})}))},{wrappy:90}],54:[function(e,t,r){(function(e){(function(){function r(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var r,n="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),a=s,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=s,o=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var i={resolve:function(){for(var t,i="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=e.cwd()),s=t),r(s),0!==s.length&&(i=s+"/"+i,a=47===s.charCodeAt(0))}return i=n(i,!a),a?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(r(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return r(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];r(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(r(e),r(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var a=e.length,o=a-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,c=o<u?o:u,l=-1,f=0;f<=c;++f){if(f===c){if(u>c){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else o>c&&(47===e.charCodeAt(n+f)?l=f:0===f&&(l=0));break}var h=e.charCodeAt(n+f);if(h!==t.charCodeAt(s+f))break;47===h&&(l=f)}var p="";for(f=n+l+1;f<=a;++f)f!==a&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(r(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');r(e);var n,i=0,a=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!o){i=n+1;break}}else-1===u&&(o=!1,u=n+1),s>=0&&(c===t.charCodeAt(s)?-1==--s&&(a=n):(s=-1,a=u))}return i===a?a=u:-1===a&&(a=e.length),e.slice(i,a)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){i=n+1;break}}else-1===a&&(o=!1,a=n+1);return-1===a?"":e.slice(i,a)},extname:function(e){r(e);for(var t=-1,n=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(a=!1,i=s+1),46===u?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!a){n=s+1;break}}return-1===t||-1===i||0===o||1===o&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==_typeof(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+_typeof(e));return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}("/",e)},parse:function(e){r(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0),a=47===i;a?(t.root="/",n=1):n=0;for(var o=-1,s=0,u=-1,c=!0,l=e.length-1,f=0;l>=n;--l)if(47!==(i=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===i?-1===o?o=l:1!==f&&(f=1):-1!==o&&(f=-1);else if(!c){s=l+1;break}return-1===o||-1===u||0===f||1===f&&o===u-1&&o===s+1?-1!==u&&(t.base=t.name=0===s&&a?e.slice(1,u):e.slice(s,u)):(0===s&&a?(t.name=e.slice(1,o),t.base=e.slice(1,u)):(t.name=e.slice(s,o),t.base=e.slice(s,u)),t.ext=e.slice(o,u)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}).call(this)}).call(this,e("_process"))},{_process:58}],55:[function(e,t,r){
1
+ "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _defineProperty2(e,t,r){return(t=_toPropertyKey2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},_get.apply(this,arguments)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _classCallCheck2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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,_toPropertyKey2(n.key),n)}}function _createClass2(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey2(e){var t=_toPrimitive2(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive2(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)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Fable=e()}}((function(){return function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[o]={exports:{}};t[o][0].call(l.exports,(function(e){return i(t[o][1][e]||e)}),l,l.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){var n=e("async.util.eachoflimit"),i=e("async.util.withoutindex");t.exports=function(e,t,r,a){return n(t)(e,i(r),a)}},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(e,t,r){t.exports=function(e){return function t(r){function n(){return e.length&&e[r].apply(null,arguments),n.next()}return n.next=function(){return r<e.length-1?t(r+1):null},n}(0)}},{}],3:[function(e,t,r){var n=e("async.util.once"),i=e("async.util.noop"),a=e("async.util.onlyonce"),o=e("async.util.keyiterator");t.exports=function(e){return function(t,r,s){s=n(s||i);var u=o(t=t||[]);if(e<=0)return s(null);var c=!1,l=0,f=!1;!function n(){if(c&&l<=0)return s(null);for(;l<e&&!f;){var i=u();if(null===i)return c=!0,void(l<=0&&s(null));l+=1,r(t[i],i,a((function(e){l-=1,e?(s(e),f=!0):n()})))}}()}}},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(e,t,r){var n=e("async.util.setimmediate"),i=e("async.util.restparam");t.exports=function(e){return i((function(t){var r=t.pop();t.push((function(){var e=arguments;i?n((function(){r.apply(null,e)})):r.apply(null,e)}));var i=!0;e.apply(this,t),i=!1}))}},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(e,t,r){t.exports=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],6:[function(e,t,r){var n=e("async.util.isarray");t.exports=function(e){return n(e)||"number"==typeof e.length&&e.length>=0&&e.length%1==0}},{"async.util.isarray":5}],7:[function(e,t,r){var n=e("async.util.keys"),i=e("async.util.isarraylike");t.exports=function(e){var t,r,a=-1;return i(e)?(t=e.length,function(){return++a<t?a:null}):(r=n(e),t=r.length,function(){return++a<t?r[a]:null})}},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(e,t,r){t.exports=Object.keys||function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}},{}],9:[function(e,t,r){t.exports=function(){}},{}],10:[function(e,t,r){t.exports=function(e){return function(){null!==e&&(e.apply(this,arguments),e=null)}}},{}],11:[function(e,t,r){t.exports=function(e){return function(){if(null===e)throw new Error("Callback was already called.");e.apply(this,arguments),e=null}}},{}],12:[function(e,t,r){t.exports=function(e,t){return t=null==t?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),n=new Array(r),i=0;i<r;i++)n[i]=arguments[i+t];switch(t){case 0:return e.call(this,n);case 1:return e.call(this,arguments[0],n)}}}},{}],13:[function(e,t,r){(function(e){(function(){var r="function"==typeof e&&e,n=function(e){setTimeout(e,0)};t.exports=function(e){return(r||n)(e)}}).call(this)}).call(this,e("timers").setImmediate)},{timers:86}],14:[function(e,t,r){t.exports=function(e){return function(t,r,n){return e(t,n)}}},{}],15:[function(e,t,r){var n=e("async.util.once"),i=e("async.util.noop"),a=e("async.util.isarray"),o=e("async.util.restparam"),s=e("async.util.ensureasync"),u=e("async.iterator");t.exports=function(e,t){if(t=n(t||i),!a(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();!function e(r){return o((function(n,i){if(n)t.apply(null,[n].concat(i));else{var a=r.next();a?i.push(e(a)):i.push(t),s(r).apply(null,i)}}))}(u(e))()}},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(e,t,r){r.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=u(e),o=n[0],s=n[1],c=new a(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),l=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],17:[function(e,t,r){},{}],18:[function(e,t,r){arguments[4][17][0].apply(r,arguments)},{dup:17}],19:[function(e,t,r){(function(t){(function(){var t=e("base64-js"),n=e("ieee754");r.Buffer=o,r.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function a(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=a(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e));if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=o.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var i=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||H(e.length)?a(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e))}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|f(e))}function l(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function h(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(i)return n?-1:I(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return P(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(c(e,a+h)!==c(t,h)){f=!1;break}if(f)return a}return-1}function v(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(H(s))return o;e[r+o]=s}return o}function m(e,t,r,n){return F(I(t,e.length-r),e,r,n)}function b(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return b(e,t,r,n)}function w(e,t,r,n){return F(B(t),e,r,n)}function S(e,t,r,n){return F(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function P(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function T(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}r.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},o.allocUnsafe=function(e){return c(e)},o.allocUnsafeSlow=function(e){return c(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(U(a,Uint8Array)&&(a=o.from(a)),!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},o.byteLength=h,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)d(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)d(this,t,t+3),d(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):p.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(a,s),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return m(this,e,t,r);case"ascii":return b(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function O(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function E(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=N(e[a]);return i}function A(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function x(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,i,a){return t=+t,r>>>=0,a||M(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function L(e,t,r,i,a){return t=+t,r>>>=0,a||M(e,0,r,8),n.write(e,t,r,i,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var a=i-1;a>=0;--a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var s=o.isBuffer(e)?e:o.from(e,n),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<r-t;++a)this[a+t]=s[a%u]}return this};var D=/[^+/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function I(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function B(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":16,buffer:19,ieee754:40}],20:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],21:[function(e,t,r){var n=e("fable-serviceproviderbase"),i=e("./LinkedList.js"),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,a){var o;return _classCallCheck2(this,r),(o=void 0===e?t.call(this,{}):t.call(this,e,n,a)).serviceType="ObjectCache",o._HashMap={},o._RecordMap={},o._List=new i,o.maxLength=0,o.maxAge=0,_possibleConstructorReturn(o)}return _createClass2(r,[{key:"RecordMap",get:function(){return this._RecordMap}},{key:"put",value:function(e,t){if(this._HashMap.hasOwnProperty(t))return this._HashMap[t].Datum=e,this._RecordMap[t]=e,this._HashMap[t].Datum;var r=this._List.push(e,t);return this._HashMap[r.Hash]=r,this._RecordMap[t]=e,this.maxLength>0&&this._List.length>this.maxLength&&(r=this._List.pop(),delete this._RecordMap[r.Hash],delete this._HashMap[r.Hash]),r.Metadata.Created=+new Date,r.Datum}},{key:"read",value:function(e){return!!this._HashMap.hasOwnProperty(e)&&this._HashMap[e].Datum}},{key:"touch",value:function(e){if(!this._HashMap.hasOwnProperty(e))return!1;var t=this._List.remove(this._HashMap[e]);return delete this._RecordMap[e],delete this._HashMap[e],this.put(t.Datum,t.Hash)}},{key:"expire",value:function(e){if(!this._HashMap.hasOwnProperty(e))return!1;var t=this._HashMap[e];return t=this._List.remove(t),delete this._RecordMap[t.Hash],delete this._HashMap[t.Hash],t}},{key:"pruneBasedOnExpiration",value:function(e,t){var r=void 0===t?[]:t;if(this.maxAge<1)return e(r);for(var n=+new Date,i=Object.keys(this._HashMap),a=0;a<i.length;a++)n-this._HashMap[i[a]].Metadata.Created>=this.maxAge&&r.push(this.expire(i[a]));e(r)}},{key:"pruneBasedOnLength",value:function(e,t){var r=void 0===t?[]:t;if(this.maxLength>0)for(;this._List.length>this.maxLength;)r.push(this._List.pop());return e(r)}},{key:"pruneCustom",value:function(e,t,r){for(var n=void 0===r?[]:r,i=Object.keys(this._HashMap),a=0;a<i.length;a++){var o=this._HashMap[i[a]];t(o.Datum,o.Hash,o)&&n.push(this.expire(i[a]))}e(n)}},{key:"prune",value:function(e){var t=this,r=[];if(this._List.length<1)return e(r);this.pruneBasedOnExpiration((function(n){t.pruneBasedOnLength(e,r)}),r)}},{key:"getNode",value:function(e){return!!this._HashMap.hasOwnProperty(e)&&this._HashMap[e]}}]),r}(n);t.exports=a},{"./LinkedList.js":23,"fable-serviceproviderbase":33}],22:[function(e,t,r){var n=_createClass2((function e(){_classCallCheck2(this,e),this.Hash=!1,this.Datum=!1,this.Metadata={},this.LeftNode=!1,this.RightNode=!1,this.__ISNODE=!0}));t.exports=n},{}],23:[function(e,t,r){var n=e("./LinkedList-Node.js"),i=function(){function e(){_classCallCheck2(this,e),this.totalNodes=0,this.length=0,this.head=!1,this.tail=!1}return _createClass2(e,[{key:"initializeNode",value:function(e,t){if(void 0===e)return!1;this.totalNodes++;var r=void 0!==t?t:"NODE[".concat(this.totalNodes,"]"),i=new n;return i.Hash=r,i.Datum=e,i}},{key:"append",value:function(e,t){var r=this.initializeNode(e,t);return!!r&&(this.length++,1==this.length?(this.head=r,this.tail=r,r):(this.tail.RightNode=r,r.LeftNode=this.tail,this.tail=r,r))}},{key:"push",value:function(e,t){return this.append(e,t)}},{key:"prepend",value:function(e,t){var r=this.initializeNode(e,t);return!!r&&(this.length++,1==this.length?(this.head=r,this.tail=r,r):(this.head.LeftNode=r,r.RightNode=this.head,this.head=r,r))}},{key:"remove",value:function(e){return void 0!==e&&(!!e.__ISNODE&&(this.length--,this.length<1?(this.head=!1,this.tail=!1,e):e.LeftNode&&e.RightNode?(e.LeftNode.RightNode=e.RightNode,e.RightNode.LeftNode=e.LeftNode,e.RightNode=!1,e.LeftNode=!1,e):e.LeftNode?(e.LeftNode.RightNode=!1,this.tail=e.LeftNode,e.LeftNode=!1,e):(e.RightNode.LeftNode=!1,this.head=e.RightNode,e.RightNode=!1,e)))}},{key:"pop",value:function(){return this.remove(this.head)}},{key:"each",value:function(e,t){var r=this;if(this.length<1)return t();var n=!1;return function i(a){if(a)return t(a);if(n){if(!n.RightNode)return t();n=n.RightNode}else n=r.head;e(n.Datum,n.Hash,i)}()}},{key:"seek",value:function(e){if(!e)return!1;if(this.length<1)return!1;if(e>=this.length)return!1;for(var t=this.head,r=0;r<e;r++)t=t.RightNode;return t}}]),e}();t.exports=i},{"./LinkedList-Node.js":22}],24:[function(e,t,r){r.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},n=(t||{}).decode||a,i=0;for(;i<e.length;){var o=e.indexOf("=",i);if(-1===o)break;var u=e.indexOf(";",i);if(-1===u)u=e.length;else if(u<o){i=e.lastIndexOf(";",o-1)+1;continue}var c=e.slice(i,o).trim();if(void 0===r[c]){var l=e.slice(o+1,u).trim();34===l.charCodeAt(0)&&(l=l.slice(1,-1)),r[c]=s(l,n)}i=u+1}return r},r.serialize=function(e,t,r){var a=r||{},s=a.encode||o;if("function"!=typeof s)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var u=s(t);if(u&&!i.test(u))throw new TypeError("argument val is invalid");var c=e+"="+u;if(null!=a.maxAge){var l=a.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(l)}if(a.domain){if(!i.test(a.domain))throw new TypeError("option domain is invalid");c+="; Domain="+a.domain}if(a.path){if(!i.test(a.path))throw new TypeError("option path is invalid");c+="; Path="+a.path}if(a.expires){var f=a.expires;if(!function(e){return"[object Date]"===n.call(e)||e instanceof Date}(f)||isNaN(f.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+f.toUTCString()}a.httpOnly&&(c+="; HttpOnly");a.secure&&(c+="; Secure");if(a.priority){switch("string"==typeof a.priority?a.priority.toLowerCase():a.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(a.sameSite){switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return c};var n=Object.prototype.toString,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function a(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function o(e){return encodeURIComponent(e)}function s(e,t){try{return t(e)}catch(t){return e}}},{}],25:[function(e,t,r){var n,i="object"===("undefined"==typeof Reflect?"undefined":_typeof(Reflect))?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}v(e,t,a,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,r)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+_typeof(e))}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,a,o,s;if(c(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=l(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):y(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function v(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+_typeof(e));e.addEventListener(t,(function i(a){n.once&&e.removeEventListener(t,i),r(a)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var c=u.length,l=y(u,c);for(r=0;r<c;++r)a(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,a,o;if(c(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)"removeListener"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],26:[function(e,t,r){var n=function(){function e(t,r){_classCallCheck2(this,e),this._Settings="object"==_typeof(t)?t:{},this.loggerUUID=this.generateInsecureUUID(),this.levels=["trace","debug","info","warn","error","fatal"]}return _createClass2(e,[{key:"generateInsecureUUID",value:function(){var e=(new Date).getTime();return"LOGSTREAM-xxxxxx-yxxxxx".replace(/[xy]/g,(function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?r:3&r|8).toString(16)}))}},{key:"initialize",value:function(){}},{key:"trace",value:function(e,t){this.write("trace",e,t)}},{key:"debug",value:function(e,t){this.write("debug",e,t)}},{key:"info",value:function(e,t){this.write("info",e,t)}},{key:"warn",value:function(e,t){this.write("warn",e,t)}},{key:"error",value:function(e,t){this.write("error",e,t)}},{key:"fatal",value:function(e,t){this.write("fatal",e,t)}},{key:"write",value:function(e,t,r){return!0}}]),e}();t.exports=n},{}],27:[function(e,t,r){var n;t.exports=((n={}).console=e("./Fable-Log-Logger-Console.js"),n.default=n.console,n)},{"./Fable-Log-Logger-Console.js":29}],28:[function(e,t,r){t.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],29:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i;_classCallCheck2(this,r),(i=t.call(this,e))._ShowTimeStamps=!i._Settings.hasOwnProperty("showtimestamps")||1==i._Settings.showtimestamps,i._FormattedTimeStamps=!i._Settings.hasOwnProperty("formattedtimestamps")||1==i._Settings.formattedtimestamps,i._ContextMessage=i._Settings.hasOwnProperty("Context")?"(".concat(i._Settings.Context,")"):n._Settings.hasOwnProperty("Product")?"(".concat(n._Settings.Product,")"):"Unnamed_Log_Context",i._OutputLogLinesToConsole=!i._Settings.hasOwnProperty("outputloglinestoconsole")||i._Settings.outputloglinestoconsole,i._OutputObjectsToConsole=!i._Settings.hasOwnProperty("outputobjectstoconsole")||i._Settings.outputobjectstoconsole,i.prefixCache={};for(var a=0;a<=i.levels.length;a++)i.prefixCache[i.levels[a]]="[".concat(i.levels[a],"] ").concat(i._ContextMessage,": "),i._ShowTimeStamps&&(i.prefixCache[i.levels[a]]=" "+i.prefixCache[i.levels[a]]);return i}return _createClass2(r,[{key:"write",value:function(e,t,r){var n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);var i="".concat(n).concat(this.prefixCache[e]).concat(t);return this._OutputLogLinesToConsole&&console.log(i),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),i}}]),r}(e("./Fable-Log-BaseLogger.js"));t.exports=n},{"./Fable-Log-BaseLogger.js":26}],30:[function(e,t,r){var n=e("./Fable-Log-Logger-Console.js"),i=e("fs"),a=e("path"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var o;return _classCallCheck2(this,r),(o=t.call(this,e,n)).logFileRawPath=o._Settings.hasOwnProperty("path")?o._Settings.path:"./".concat(o._ContextMessage,".log"),o.logFilePath=a.normalize(o.logFileRawPath),o.logFileStreamOptions=o._Settings.hasOwnProperty("fileStreamoptions")?o._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},o.fileWriter=i.createWriteStream(o.logFilePath,o.logFileStreamOptions),o.activelyWriting=!1,o.logLineStrings=[],o.logObjectStrings=[],o.defaultWriteCompleteCallback=function(){},o.defaultBufferFlushCallback=function(){},o}return _createClass2(r,[{key:"closeWriter",value:function(e){var t="function"==typeof e?e:function(){};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",t.bind(this))}},{key:"completeBufferFlushToLogFile",value:function(e){this.activelyWriting=!1;var t="function"==typeof e?e:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return t();this.flushBufferToLogFile(t)}},{key:"flushBufferToLogFile",value:function(e){if(!this.activelyWriting){this.activelyWriting=!0;var t="function"==typeof e?e:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];for(var i="",a=0;a<r.length;a++)i+="".concat(r[a],"\n"),!1!==n[a]&&(i+="".concat(n[a],"\n"));if(this.fileWriter.write(i,"utf8"))return this.completeBufferFlushToLogFile(t);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,t))}}},{key:"write",value:function(e,t,n){var i=_get(_getPrototypeOf(r.prototype),"write",this).call(this,e,t,n);this.logLineStrings.push(i),void 0!==n?this.logObjectStrings.push(JSON.stringify(n,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}]),r}(n);t.exports=o},{"./Fable-Log-Logger-Console.js":29,fs:18,path:54}],31:[function(e,t,r){var n=function(t){_inherits(n,t);var r=_createSuper(n);function n(t,i){var a;_classCallCheck2(this,n),(a=r.call(this,t,i)).serviceType="Logging";var o="object"===_typeof(t)?t:{};return a._Settings=o,a._Providers=e("./Fable-Log-DefaultProviders-Node.js"),a._StreamDefinitions=o.hasOwnProperty("LogStreams")?o.LogStreams:e("./Fable-Log-DefaultStreams.json"),a.logStreams=[],a.logProviders={},a.activeLogStreams={},a.logStreamsTrace=[],a.logStreamsDebug=[],a.logStreamsInfo=[],a.logStreamsWarn=[],a.logStreamsError=[],a.logStreamsFatal=[],a.datumDecorator=function(e){return e},a.uuid="string"==typeof o.Product?o.Product:"Default",a}return _createClass2(n,[{key:"addLogger",value:function(e,t){if(this.activeLogStreams.hasOwnProperty(e.loggerUUID))return!1;switch(this.logStreams.push(e),this.activeLogStreams[e.loggerUUID]=!0,t){case"trace":this.logStreamsTrace.push(e);case"debug":this.logStreamsDebug.push(e);case"info":this.logStreamsInfo.push(e);case"warn":this.logStreamsWarn.push(e);case"error":this.logStreamsError.push(e);case"fatal":this.logStreamsFatal.push(e)}return!0}},{key:"setDatumDecorator",value:function(e){this.datumDecorator="function"==typeof e?e:function(e){return e}}},{key:"trace",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsTrace.length;n++)this.logStreamsTrace[n].trace(e,r)}},{key:"debug",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsDebug.length;n++)this.logStreamsDebug[n].debug(e,r)}},{key:"info",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsInfo.length;n++)this.logStreamsInfo[n].info(e,r)}},{key:"warn",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsWarn.length;n++)this.logStreamsWarn[n].warn(e,r)}},{key:"error",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsError.length;n++)this.logStreamsError[n].error(e,r)}},{key:"fatal",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsFatal.length;n++)this.logStreamsFatal[n].fatal(e,r)}},{key:"initialize",value:function(){for(var e=0;e<this._StreamDefinitions.length;e++){var t=Object.assign({loggertype:"default",streamtype:"console",level:"info"},this._StreamDefinitions[e]);this._Providers.hasOwnProperty(t.loggertype)?this.addLogger(new this._Providers[t.loggertype](t,this),t.level):console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(t)))}for(var r=0;r<this.logStreams.length;r++)this.logStreams[r].initialize()}},{key:"logTime",value:function(e,t){var r=void 0!==e?e:"Time",n=new Date;this.info("".concat(r," ").concat(n," (epoch ").concat(+n,")"),t)}},{key:"getTimeStamp",value:function(){return+new Date}},{key:"getTimeDelta",value:function(e){return+new Date-e}},{key:"logTimeDelta",value:function(e,t,r){var n=void 0!==t?t:"Time Measurement",i=(_typeof(r),+new Date);this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(e,"ms)"),r)}},{key:"logTimeDeltaHuman",value:function(e,t,r){var n=void 0!==t?t:"Time Measurement",i=+new Date,a=parseInt(e%1e3),o=parseInt(e/1e3%60),s=parseInt(e/6e4%60),u=parseInt(e/36e5);a=a<10?"00"+a:a<100?"0"+a:a,o=o<10?"0"+o:o,s=s<10?"0"+s:s,u=u<10?"0"+u:u,this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(e,"ms) or (").concat(u,":").concat(s,":").concat(o,".").concat(a,")"),r)}},{key:"logTimeDeltaRelative",value:function(e,t,r){this.logTimeDelta(this.getTimeDelta(e),t,r)}},{key:"logTimeDeltaRelativeHuman",value:function(e,t,r){this.logTimeDeltaHuman(this.getTimeDelta(e),t,r)}}]),n}(e("fable-serviceproviderbase").CoreServiceProviderBase);t.exports=n,t.exports.new=function(e){return new n(e)},t.exports.LogProviderBase=e("./Fable-Log-BaseLogger.js"),t.exports.LogProviderConsole=e("./Fable-Log-Logger-Console.js"),t.exports.LogProviderConsole=e("./Fable-Log-Logger-SimpleFlatFile.js")},{"./Fable-Log-BaseLogger.js":26,"./Fable-Log-DefaultProviders-Node.js":27,"./Fable-Log-DefaultStreams.json":28,"./Fable-Log-Logger-Console.js":29,"./Fable-Log-Logger-SimpleFlatFile.js":30,"fable-serviceproviderbase":33}],32:[function(e,t,r){var n=function(){function e(t,r){_classCallCheck2(this,e),this.fable=!1,this.options="object"===_typeof(t)?t:{},this.serviceType="Unknown",this.UUID="CORESVC-".concat(Math.floor(89999*Math.random()+1e4)),this.Hash="string"==typeof r?r:"".concat(this.UUID)}return _createClass2(e,[{key:"connectFable",value:function(e){return this.fable=e,!0}}]),e}();_defineProperty2(n,"isFableService",!0),t.exports=n},{}],33:[function(e,t,r){var n=_createClass2((function e(t,r,n){_classCallCheck2(this,e),this.fable=t,this.options="object"===_typeof(r)?r:"object"!==_typeof(t)||t.isFable?{}:t,this.serviceType="Unknown","function"==typeof t.getUUID?this.UUID=t.getUUID():this.UUID="NoFABLESVC-".concat(Math.floor(89999*Math.random()+1e4)),this.Hash="string"==typeof n?n:"".concat(this.UUID),this.log=this.fable.log,this.services=this.fable.services,this.defaultServices=this.fable.defaultServices}));_defineProperty2(n,"isFableService",!0),t.exports=n,t.exports.CoreServiceProviderBase=e("./Fable-ServiceProviderBase-Preinit.js")},{"./Fable-ServiceProviderBase-Preinit.js":32}],34:[function(e,t,r){t.exports={Product:"ApplicationNameHere",ProductVersion:"0.0.0",ConfigFile:!1,LogStreams:[{level:"trace"}]}},{}],35:[function(e,t,r){(function(r){(function(){var n=e("precedent"),i=function(){function e(t){_classCallCheck2(this,e),this.templateProcessor=new n,this.templateProcessor.addPattern("${","}",(function(e){var t=e.trim(),n=t.indexOf("|"),i=t.substring(n+1),a=n>-1?t.substring(0,n):t;return r.env.hasOwnProperty(a)?r.env[a]:i}))}return _createClass2(e,[{key:"parseSetting",value:function(e){return this.templateProcessor.parseString(e)}}]),e}();t.exports=i}).call(this)}).call(this,e("_process"))},{_process:58,precedent:55}],36:[function(e,t,r){var n=e("fable-serviceproviderbase").CoreServiceProviderBase,i=e("./Fable-Settings-TemplateProcessor.js"),a=function(t){_inherits(n,t);var r=_createSuper(n);function n(t,a){var o;_classCallCheck2(this,n),(o=r.call(this,t,a)).serviceType="SettingsManager",o.settingsTemplateProcessor=new i,o._configureEnvTemplating(t),o.default=o.buildDefaultSettings();var s=o.merge(t,o.buildDefaultSettings());if(o.base=JSON.parse(JSON.stringify(s)),s.DefaultConfigFile)try{s=o.merge(e(s.DefaultConfigFile),s)}catch(e){console.log("Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}if(s.ConfigFile)try{s=o.merge(e(s.ConfigFile),s)}catch(e){console.log("Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}return o.settings=s,o}return _createClass2(n,[{key:"buildDefaultSettings",value:function(){return JSON.parse(JSON.stringify(e("./Fable-Settings-Default")))}},{key:"_configureEnvTemplating",value:function(e){this._PerformEnvTemplating=!e||!0!==e.NoEnvReplacement}},{key:"_resolveEnv",value:function(e){for(var t in e)"object"===_typeof(e[t])?this._resolveEnv(e[t]):"string"==typeof e[t]&&(e[t]=this.settingsTemplateProcessor.parseSetting(e[t]))}},{key:"_isObject",value:function(e){return"object"===_typeof(e)&&!Array.isArray(e)}},{key:"_deepMergeObjects",value:function(e,t){var r=this;if(t&&this._isObject(t))return Object.keys(t).forEach((function(n){var i=t[n];if(r._isObject(i)){var a=e[n];if(a&&r._isObject(a))return void r._deepMergeObjects(a,i)}e[n]=i})),e}},{key:"merge",value:function(e,t){var r="object"===_typeof(e)?e:{},n="object"===_typeof(t)?t:this.settings,i=JSON.parse(JSON.stringify(r));return n=this._deepMergeObjects(n,i),this._PerformEnvTemplating&&this._resolveEnv(n),this._configureEnvTemplating(n),n}},{key:"fill",value:function(e){var t="object"===_typeof(e)?e:{},r=JSON.parse(JSON.stringify(t));return this.settings=this._deepMergeObjects(r,this.settings),this.settings}}]),n}(n);t.exports=a,t.exports.new=function(e){return new a(e)}},{"./Fable-Settings-Default":34,"./Fable-Settings-TemplateProcessor.js":35,"fable-serviceproviderbase":33}],37:[function(e,t,r){var n=function(){function e(){_classCallCheck2(this,e),this.getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)}return _createClass2(e,[{key:"generateWhatWGBytes",value:function(){var e=new Uint8Array(16);return this.getRandomValues(e),e}},{key:"generateRandomBytes",value:function(){for(var e,t=new Uint8Array(16),r=0;r<16;r++)0==(3&r)&&(e=4294967296*Math.random()),t[r]=e>>>((3&r)<<3)&255;return t}},{key:"generate",value:function(){return this.getRandomValues?this.generateWhatWGBytes():this.generateRandomBytes()}}]),e}();t.exports=n},{}],38:[function(e,t,r){var n=e("fable-serviceproviderbase").CoreServiceProviderBase,i=e("./Fable-UUID-Random.js"),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var a;_classCallCheck2(this,r),(a=t.call(this,e,n)).serviceType="UUID",a._UUIDModeRandom=!("object"!==_typeof(e)||!e.hasOwnProperty("UUIDModeRandom"))&&1==e.UUIDModeRandom,a._UUIDLength="object"===_typeof(e)&&e.hasOwnProperty("UUIDLength")?e.UUIDLength+0:8,a._UUIDRandomDictionary="object"===_typeof(e)&&e.hasOwnProperty("UUIDDictionary")?e.UUIDDictionary+0:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",a.randomByteGenerator=new i,a._HexLookup=[];for(var o=0;o<256;++o)a._HexLookup[o]=(o+256).toString(16).substr(1);return a}return _createClass2(r,[{key:"bytesToUUID",value:function(e){var t=0;return[this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]]].join("")}},{key:"generateUUIDv4",value:function(){new Array(16);var e=this.randomByteGenerator.generate();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,this.bytesToUUID(e)}},{key:"generateRandom",value:function(){for(var e="",t=0;t<this._UUIDLength;t++)e+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));return e}},{key:"getUUID",value:function(){return this._UUIDModeRandom?this.generateRandom():this.generateUUIDv4()}}]),r}(n);t.exports=a,t.exports.new=function(e){return new a(e)}},{"./Fable-UUID-Random.js":37,"fable-serviceproviderbase":33}],39:[function(e,t,r){var n=e("http"),i=e("url"),a=t.exports;for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}a.request=function(e,t){return e=s(e),n.request.call(this,e,t)},a.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},{http:66,url:87}],40:[function(e,t,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */r.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+f],f+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+f],f+=h,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(e,t,r,n,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*g}},{}],41:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],42:[function(e,t,r){t.exports=function(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}},{}],43:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n,this.translationTable={}}return _createClass2(e,[{key:"translationCount",value:function(){return Object.keys(this.translationTable).length}},{key:"addTranslation",value:function(e){var t=this;if("object"!=_typeof(e))return this.logError("Hash translation addTranslation expected a translation be type object but was passed in ".concat(_typeof(e))),!1;Object.keys(e).forEach((function(r){"string"!=typeof e[r]?t.logError("Hash translation addTranslation expected a translation destination hash for [".concat(r,"] to be a string but the referrant was a ").concat(_typeof(e[r]))):t.translationTable[r]=e[r]}))}},{key:"removeTranslationHash",value:function(e){this.translationTable.hasOwnProperty(e)&&delete this.translationTable[e]}},{key:"removeTranslation",value:function(e){var t=this;return"string"==typeof e?(this.removeTranslationHash(e),!0):"object"==_typeof(e)?(Object.keys(e).forEach((function(e){t.removeTranslation(e)})),!0):(this.logError("Hash translation removeTranslation expected either a string or an object but the passed-in translation was type ".concat(_typeof(e))),!1)}},{key:"clearTranslations",value:function(){this.translationTable={}}},{key:"translate",value:function(e){return this.translationTable.hasOwnProperty(e)?this.translationTable[e]:e}}]),e}();t.exports=i},{"./Manyfest-LogToConsole.js":44}],44:[function(e,t,r){t.exports=function(e,t){var r="string"==typeof e?e:"";console.log("[Manyfest] ".concat(r)),t&&console.log(JSON.stringify(t))}},{}],45:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n}return _createClass2(e,[{key:"checkAddressExists",value:function(e,t){if("object"!=_typeof(e))return!1;if("string"!=typeof t)return!1;var r=t.indexOf(".");if(-1==r){var n=t.indexOf("["),i=t.indexOf("]");if(n>0&&i>n&&i-n>1){var a=t.substring(0,n).trim();if("object"!==_typeof(e[a]))return!1;var o=t.substring(n+1,i).trim(),s=parseInt(o,10);return Array.isArray(e[a])!=isNaN(s)&&(isNaN(s)?(o=this.cleanWrapCharacters('"',o),o=this.cleanWrapCharacters("`",o),o=this.cleanWrapCharacters("'",o),e[a].hasOwnProperty(o)):s in e[a])}return e.hasOwnProperty(t)}var u=t.substring(0,r),c=t.substring(r+1),l=u.indexOf("["),f=u.indexOf("]");if(l>0&&f>l&&f-l>1){var h=u.substring(0,l).trim(),p=u.substring(l+1,f).trim(),d=parseInt(p,10);return Array.isArray(e[h])!=isNaN(d)&&(isNaN(d)?(p=this.cleanWrapCharacters('"',p),p=this.cleanWrapCharacters("`",p),p=this.cleanWrapCharacters("'",p),this.checkAddressExists(e[h][p],c)):this.checkAddressExists(e[h][d],c))}return(!e.hasOwnProperty(u)||"object"===_typeof(e[u]))&&(e.hasOwnProperty(u)||(e[u]={}),this.checkAddressExists(e[u],c))}}]),e}();t.exports=i},{"./Manyfest-LogToConsole.js":44}],46:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=e("./Manyfest-CleanWrapCharacters.js"),a=e("../source/Manyfest-ParseConditionals.js"),o=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n,this.cleanWrapCharacters=i}return _createClass2(e,[{key:"checkFilters",value:function(e,t){return a(this,e,t)}},{key:"deleteValueAtAddress",value:function(e,t,r){if("object"==_typeof(e)&&"string"==typeof t){var n="";"string"==typeof r&&(n=r);var i=t.indexOf(".");if(-1==i){var a=t.indexOf("["),o=t.indexOf("]"),s=t.indexOf("{}");if(a>0&&o>a&&o-a>1){var u=t.substring(0,a).trim();if("object"!==_typeof(e[u]))return!1;var c=t.substring(a+1,o).trim(),l=parseInt(c,10);return Array.isArray(e[u])!=isNaN(l)&&(isNaN(l)?(c=this.cleanWrapCharacters('"',c),c=this.cleanWrapCharacters("`",c),c=this.cleanWrapCharacters("'",c),delete e[u][c],!0):(delete e[u][l],!0))}if(a>0&&o>a&&o-a==1){var f=t.substring(0,a).trim();if(!Array.isArray(e[f]))return!1;for(var h=e[f],p=h.length-1;p>=0;p--){this.checkFilters(t,h[p])&&h.splice(p,1)}return!0}if(s>0){var d=t.substring(0,s).trim();return"object"==_typeof(e[d])&&(delete e[d],!0)}return delete e[t],!0}var g=t.substring(0,i),y=t.substring(i+1),v=g.indexOf("["),m=g.indexOf("]");if(v>0&&m>v&&m-v>1){var b=g.substring(0,v).trim(),_=g.substring(v+1,m).trim(),w=parseInt(_,10);return Array.isArray(e[b])!=isNaN(w)&&("object"==_typeof(e[b])&&(isNaN(w)?(_=this.cleanWrapCharacters('"',_),_=this.cleanWrapCharacters("`",_),_=this.cleanWrapCharacters("'",_),n="".concat(n).concat(n.length>0?".":"").concat(g),this.deleteValueAtAddress(e[b][_],y,n)):(n="".concat(n).concat(n.length>0?".":"").concat(g),this.deleteValueAtAddress(e[b][w],y,n))))}if(v>0&&m>v&&m-v==1){var S=t.substring(0,v).trim();if(!Array.isArray(e[S]))return!1;var P=e[S];n="".concat(n).concat(n.length>0?".":"").concat(S);for(var T={},C=0;C<P.length;C++){var O="".concat(n,"[").concat(C,"]"),k=this.deleteValueAtAddress(e[S][C],y,O);T["".concat(O,".").concat(y)]=k}return T}var E=t.indexOf("{}");if(E>0){var A=t.substring(0,E).trim();if("object"!=_typeof(e[A]))return!1;var x=e[A],j=Object.keys(x);n="".concat(n).concat(n.length>0?".":"").concat(A);for(var M={},R=0;R<j.length;R++){var L="".concat(n,".").concat(j[R]),D=this.deleteValueAtAddress(e[A][j[R]],y,L);this.checkFilters(t,D)&&(M["".concat(L,".").concat(y)]=D)}return M}return e.hasOwnProperty(g)&&"object"!==_typeof(e[g])?void 0:e.hasOwnProperty(g)?(n="".concat(n).concat(n.length>0?".":"").concat(g),this.deleteValueAtAddress(e[g],y,n)):(n="".concat(n).concat(n.length>0?".":"").concat(g),e[g]={},this.deleteValueAtAddress(e[g],y,n))}}}]),e}();t.exports=o},{"../source/Manyfest-ParseConditionals.js":50,"./Manyfest-CleanWrapCharacters.js":42,"./Manyfest-LogToConsole.js":44}],47:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=e("./Manyfest-CleanWrapCharacters.js"),a=e("../source/Manyfest-ParseConditionals.js"),o=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n,this.cleanWrapCharacters=i}return _createClass2(e,[{key:"checkFilters",value:function(e,t){return a(this,e,t)}},{key:"getValueAtAddress",value:function(e,t,r,n){if("object"==_typeof(e)&&"string"==typeof t){var i="";"string"==typeof r&&(i=r);var a=void 0===n?e:n,o=t.indexOf(".");if(0==o){for(var s=i.split("."),u=0,c=0;c<t.length&&"."==t.charAt(c);c++)u++;var l=s.length-u;if(l<0)return;var f=t.slice(u);return l>0&&(f="".concat(s.slice(0,l).join("."),".").concat(f)),this.logInfo("Back-navigation detected. Recursing back to address [".concat(f,"]")),this.getValueAtAddress(a,f)}if(-1==o){var h=t.indexOf("["),p=t.indexOf("]"),d=t.indexOf("{}");if(h>0&&p>h&&p-h>1){var g=t.substring(0,h).trim();if("object"!==_typeof(e[g]))return;var y=t.substring(h+1,p).trim(),v=parseInt(y,10);if(Array.isArray(e[g])==isNaN(v))return;return isNaN(v)?(y=this.cleanWrapCharacters('"',y),y=this.cleanWrapCharacters("`",y),y=this.cleanWrapCharacters("'",y),e[g][y]):e[g][v]}if(h>0&&p>h&&p-h==1){var m=t.substring(0,h).trim();if(!Array.isArray(e[m]))return!1;for(var b=e[m],_=[],w=0;w<b.length;w++){this.checkFilters(t,b[w])&&_.push(b[w])}return _}if(d>0){var S=t.substring(0,d).trim();return"object"==_typeof(e[S])&&e[S]}return e[t]}var P=t.substring(0,o),T=t.substring(o+1),C=P.indexOf("["),O=P.indexOf("]");if(C>0&&O>C&&O-C>1){var k=P.substring(0,C).trim(),E=P.substring(C+1,O).trim(),A=parseInt(E,10);if(Array.isArray(e[k])==isNaN(A))return;if("object"!=_typeof(e[k]))return;return isNaN(A)?(E=this.cleanWrapCharacters('"',E),E=this.cleanWrapCharacters("`",E),E=this.cleanWrapCharacters("'",E),i="".concat(i).concat(i.length>0?".":"").concat(P),this.getValueAtAddress(e[k][E],T,i,a)):(i="".concat(i).concat(i.length>0?".":"").concat(P),this.getValueAtAddress(e[k][A],T,i,a))}if(C>0&&O>C&&O-C==1){var x=t.substring(0,C).trim();if(!Array.isArray(e[x]))return!1;var j=e[x];i="".concat(i).concat(i.length>0?".":"").concat(x);for(var M={},R=0;R<j.length;R++){var L="".concat(i,"[").concat(R,"]"),D=this.getValueAtAddress(e[x][R],T,L,a);M["".concat(L,".").concat(T)]=D}return M}var N=t.indexOf("{}");if(N>0){var I=t.substring(0,N).trim();if("object"!=_typeof(e[I]))return!1;var B=e[I],F=Object.keys(B);i="".concat(i).concat(i.length>0?".":"").concat(I);for(var U={},H=0;H<F.length;H++){var W="".concat(i,".").concat(F[H]),q=this.getValueAtAddress(e[I][F[H]],T,W,a);this.checkFilters(t,q)&&(U["".concat(W,".").concat(T)]=q)}return U}return e.hasOwnProperty(P)&&"object"!==_typeof(e[P])?void 0:e.hasOwnProperty(P)?(i="".concat(i).concat(i.length>0?".":"").concat(P),this.getValueAtAddress(e[P],T,i,a)):(i="".concat(i).concat(i.length>0?".":"").concat(P),e[P]={},this.getValueAtAddress(e[P],T,i,a))}}}]),e}();t.exports=o},{"../source/Manyfest-ParseConditionals.js":50,"./Manyfest-CleanWrapCharacters.js":42,"./Manyfest-LogToConsole.js":44}],48:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=e("./Manyfest-CleanWrapCharacters.js"),a=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n,this.cleanWrapCharacters=i}return _createClass2(e,[{key:"setValueAtAddress",value:function(e,t,r){if("object"!=_typeof(e))return!1;if("string"!=typeof t)return!1;var n=t.indexOf(".");if(-1==n){var i=t.indexOf("["),a=t.indexOf("]");if(i>0&&a>i&&a-i>1){var o=t.substring(0,i).trim();if("object"!==_typeof(e[o]))return!1;var s=t.substring(i+1,a).trim(),u=parseInt(s,10);return Array.isArray(e[o])!=isNaN(u)&&(isNaN(u)?(s=this.cleanWrapCharacters('"',s),s=this.cleanWrapCharacters("`",s),s=this.cleanWrapCharacters("'",s),e[o][s]=r,!0):(e[o][u]=r,!0))}return e[t]=r,!0}var c=t.substring(0,n),l=t.substring(n+1),f=c.indexOf("["),h=c.indexOf("]");if(f>0&&h>f&&h-f>1){var p=c.substring(0,f).trim(),d=c.substring(f+1,h).trim(),g=parseInt(d,10);return Array.isArray(e[p])!=isNaN(g)&&(isNaN(g)?(d=this.cleanWrapCharacters('"',d),d=this.cleanWrapCharacters("`",d),d=this.cleanWrapCharacters("'",d),this.setValueAtAddress(e[p][d],l,r)):this.setValueAtAddress(e[p][g],l,r))}return e.hasOwnProperty(c)&&"object"!==_typeof(e[c])?(e.hasOwnProperty("__ERROR")||(e.__ERROR={}),e.__ERROR[t]=r,!1):(e.hasOwnProperty(c)||(e[c]={}),this.setValueAtAddress(e[c],l,r))}}]),e}();t.exports=a},{"./Manyfest-CleanWrapCharacters.js":42,"./Manyfest-LogToConsole.js":44}],49:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n}return _createClass2(e,[{key:"generateAddressses",value:function(e,t,r){var n="string"==typeof t?t:"",i="object"==_typeof(r)?r:{},a=_typeof(e),o={Address:n,Hash:n,Name:n,InSchema:!1};switch("object"==a&&null==e&&(a="null"),a){case"string":o.DataType="String",o.Default=e,i[n]=o;break;case"number":case"bigint":o.DataType="Number",o.Default=e,i[n]=o;break;case"undefined":case"null":o.DataType="Any",o.Default=e,i[n]=o;break;case"object":if(Array.isArray(e)){o.DataType="Array",""!=n&&(i[n]=o);for(var s=0;s<e.length;s++)this.generateAddressses(e[s],"".concat(n,"[").concat(s,"]"),i)}else{o.DataType="Object",""!=n&&(i[n]=o,n+=".");for(var u=Object.keys(e),c=0;c<u.length;c++)this.generateAddressses(e[u[c]],"".concat(n).concat(u[c]),i)}}return i}}]),e}();t.exports=i},{"./Manyfest-LogToConsole.js":44}],50:[function(e,t,r){var n="<<~?",i="?~>>",a=function(e,t,r,n,i){switch(n){case"!=":return e.getValueAtAddress(t,r)!=i;case"<":return e.getValueAtAddress(t,r)<i;case">":return e.getValueAtAddress(t,r)>i;case"<=":return e.getValueAtAddress(t,r)<=i;case">=":return e.getValueAtAddress(t,r)>=i;case"===":return e.getValueAtAddress(t,r)===i;default:return e.getValueAtAddress(t,r)==i}};t.exports=function(e,t,r){for(var o=!0,s=t.indexOf(n);-1!=s;){var u=t.indexOf(i,s+4);if(-1!=u){var c=t.substring(s+4,u).split(","),l=c[0],f=c[1],h=c[2];o=o&&a(e,r,l,f,h),s=t.indexOf(n,u+4)}else s=-1}return o}},{}],51:[function(e,t,r){var n=e("./Manyfest-LogToConsole.js"),i=function(){function e(t,r){_classCallCheck2(this,e),this.logInfo="function"==typeof t?t:n,this.logError="function"==typeof r?r:n}return _createClass2(e,[{key:"resolveAddressMappings",value:function(e,t){if("object"!=_typeof(e))return this.logError("Attempted to resolve address mapping but the descriptor was not an object."),!1;if("object"!=_typeof(t))return!0;var r=Object.keys(e),n={};return r.forEach((function(t){e[t].hasOwnProperty("Hash")&&(n[e[t].Hash]=t)})),Object.keys(t).forEach((function(r){var i=t[r],a=!1,o=!1;e.hasOwnProperty(r)?a=r:n.hasOwnProperty(r)&&(a=n[r]),a?(o=e[a],delete e[a]):o={Hash:r},e[i]=o})),!0}},{key:"safeResolveAddressMappings",value:function(e,t){var r=JSON.parse(JSON.stringify(e));return this.resolveAddressMappings(r,t),r}},{key:"mergeAddressMappings",value:function(e,t){if("object"!=_typeof(t)||"object"!=_typeof(e))return this.logError("Attempted to merge two schema descriptors but both were not objects."),!1;var r=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(e));return Object.keys(r).forEach((function(e){n.hasOwnProperty(e)||(n[e]=r[e])})),n}}]),e}();t.exports=i},{"./Manyfest-LogToConsole.js":44}],52:[function(e,t,r){var n=e("fable-serviceproviderbase"),i=e("./Manyfest-LogToConsole.js"),a=e("./Manyfest-HashTranslation.js"),o=e("./Manyfest-ObjectAddress-CheckAddressExists.js"),s=e("./Manyfest-ObjectAddress-GetValue.js"),u=e("./Manyfest-ObjectAddress-SetValue.js"),c=e("./Manyfest-ObjectAddress-DeleteValue.js"),l=e("./Manyfest-ObjectAddressGeneration.js"),f=e("./Manyfest-SchemaManipulation.js"),h={Scope:"DEFAULT",Descriptors:{}},p=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,h){var p;return _classCallCheck2(this,r),(p=void 0===e?t.call(this,{}):t.call(this,e,n,h)).serviceType="Manifest",p.logInfo=i,p.logError=i,p.objectAddressCheckAddressExists=new o(p.logInfo,p.logError),p.objectAddressGetValue=new s(p.logInfo,p.logError),p.objectAddressSetValue=new u(p.logInfo,p.logError),p.objectAddressDeleteValue=new c(p.logInfo,p.logError),p.options.hasOwnProperty("defaultValues")||(p.options.defaultValues={String:"",Number:0,Float:0,Integer:0,Boolean:!1,Binary:0,DateTime:0,Array:[],Object:{},Null:null}),p.options.hasOwnProperty("strict")||(p.options.strict=!1),p.scope=void 0,p.elementAddresses=void 0,p.elementHashes=void 0,p.elementDescriptors=void 0,p.dataSolvers=void 0,p.dataSolverState=void 0,p.reset(),"object"===_typeof(p.options)&&p.loadManifest(p.options),p.schemaManipulations=new f(p.logInfo,p.logError),p.objectAddressGeneration=new l(p.logInfo,p.logError),p.hashTranslations=new a(p.logInfo,p.logError),_possibleConstructorReturn(p)}return _createClass2(r,[{key:"reset",value:function(){this.scope="DEFAULT",this.elementAddresses=[],this.elementHashes={},this.elementDescriptors={},this.dataSolvers=void 0,this.dataSolverState={}}},{key:"clone",value:function(){var e=JSON.parse(JSON.stringify(this.options)),t=new r(this.getManifest(),this.logInfo,this.logError,e);return t.hashTranslations.addTranslation(this.hashTranslations.translationTable),t}},{key:"deserialize",value:function(e){return this.loadManifest(JSON.parse(e))}},{key:"loadManifest",value:function(e){"object"!==_typeof(e)&&this.logError("(".concat(this.scope,") Error loading manifest; expecting an object but parameter was type ").concat(_typeof(e),"."));for(var t="object"==_typeof(e)?e:{},r=Object.keys(h),n=0;n<r.length;n++)t.hasOwnProperty(r[n])||(t[r[n]]=JSON.parse(JSON.stringify(h[r[n]])));if(t.hasOwnProperty("Scope")?"string"==typeof t.Scope?this.scope=t.Scope:this.logError("(".concat(this.scope,") Error loading scope from manifest; expecting a string but property was type ").concat(_typeof(t.Scope),"."),t):this.logError("(".concat(this.scope,') Error loading scope from manifest object. Property "Scope" does not exist in the root of the object.'),t),t.hasOwnProperty("Descriptors"))if("object"===_typeof(t.Descriptors))for(var i=Object.keys(t.Descriptors),a=0;a<i.length;a++)this.addDescriptor(i[a],t.Descriptors[i[a]]);else this.logError("(".concat(this.scope,") Error loading description object from manifest object. Expecting an object in 'Manifest.Descriptors' but the property was type ").concat(_typeof(t.Descriptors),"."),t);else this.logError("(".concat(this.scope,') Error loading object description from manifest object. Property "Descriptors" does not exist in the root of the Manifest object.'),t)}},{key:"serialize",value:function(){return JSON.stringify(this.getManifest())}},{key:"getManifest",value:function(){return{Scope:this.scope,Descriptors:JSON.parse(JSON.stringify(this.elementDescriptors))}}},{key:"addDescriptor",value:function(e,t){return"object"===_typeof(t)?(t.hasOwnProperty("Address")||(t.Address=e),this.elementDescriptors.hasOwnProperty(e)||this.elementAddresses.push(e),this.elementDescriptors[e]=t,this.elementHashes[e]=e,t.hasOwnProperty("Hash")?this.elementHashes[t.Hash]=e:t.Hash=e,!0):(this.logError("(".concat(this.scope,") Error loading object descriptor for address '").concat(e,"' from manifest object. Expecting an object but property was type ").concat(_typeof(t),".")),!1)}},{key:"getDescriptorByHash",value:function(e){return this.getDescriptor(this.resolveHashAddress(e))}},{key:"getDescriptor",value:function(e){return this.elementDescriptors[e]}},{key:"eachDescriptor",value:function(e){for(var t=Object.keys(this.elementDescriptors),r=0;r<t.length;r++)e(this.elementDescriptors[t[r]])}},{key:"checkAddressExistsByHash",value:function(e,t){return this.checkAddressExists(e,this.resolveHashAddress(t))}},{key:"checkAddressExists",value:function(e,t){return this.objectAddressCheckAddressExists.checkAddressExists(e,t)}},{key:"resolveHashAddress",value:function(e){var t=this.elementHashes.hasOwnProperty(e),r=this.hashTranslations.translationTable.hasOwnProperty(e);return t&&!r?this.elementHashes[e]:r&&this.elementHashes.hasOwnProperty(this.hashTranslations.translate(e))?this.elementHashes[this.hashTranslations.translate(e)]:r?this.hashTranslations.translate(e):e}},{key:"getValueByHash",value:function(e,t){var r=this.getValueAtAddress(e,this.resolveHashAddress(t));return void 0===r&&(r=this.getDefaultValue(this.getDescriptorByHash(t))),r}},{key:"getValueAtAddress",value:function(e,t){var r=this.objectAddressGetValue.getValueAtAddress(e,t);return void 0===r&&(r=this.getDefaultValue(this.getDescriptor(t))),r}},{key:"setValueByHash",value:function(e,t,r){return this.setValueAtAddress(e,this.resolveHashAddress(t),r)}},{key:"setValueAtAddress",value:function(e,t,r){return this.objectAddressSetValue.setValueAtAddress(e,t,r)}},{key:"deleteValueByHash",value:function(e,t,r){return this.deleteValueAtAddress(e,this.resolveHashAddress(t),r)}},{key:"deleteValueAtAddress",value:function(e,t,r){return this.objectAddressDeleteValue.deleteValueAtAddress(e,t,r)}},{key:"validate",value:function(e){var t={Error:null,Errors:[],MissingElements:[]};"object"!==_typeof(e)&&(t.Error=!0,t.Errors.push("Expected passed in object to be type object but was passed in ".concat(_typeof(e))));for(var r=function(e,r){t.Error=!0,t.Errors.push('Element at address "'.concat(e,'" ').concat(r,"."))},n=0;n<this.elementAddresses.length;n++){var i=this.getDescriptor(this.elementAddresses[n]),a=this.checkAddressExists(e,i.Address),o=this.getValueAtAddress(e,i.Address);if(void 0!==o&&a||(t.MissingElements.push(i.Address),(i.Required||this.options.strict)&&r(i.Address,"is flagged REQUIRED but is not set in the object")),i.DataType){var s=_typeof(o);switch(i.DataType.toString().trim().toLowerCase()){case"string":"string"!=s&&r(i.Address,"has a DataType ".concat(i.DataType," but is of the type ").concat(s));break;case"number":"number"!=s&&r(i.Address,"has a DataType ".concat(i.DataType," but is of the type ").concat(s));break;case"integer":if("number"!=s)r(i.Address,"has a DataType ".concat(i.DataType," but is of the type ").concat(s));else o.toString().indexOf(".")>-1&&r(i.Address,"has a DataType ".concat(i.DataType," but has a decimal point in the number."));break;case"float":"number"!=s&&r(i.Address,"has a DataType ".concat(i.DataType," but is of the type ").concat(s));break;case"DateTime":"Invalid Date"==new Date(o).toString()&&r(i.Address,"has a DataType ".concat(i.DataType," but is not parsable as a Date by Javascript"));default:"string"!=s&&r(i.Address,"has a DataType ".concat(i.DataType," (which auto-converted to String because it was unrecognized) but is of the type ").concat(s))}}}return t}},{key:"getDefaultValue",value:function(e){if("object"==_typeof(e)){if(e.hasOwnProperty("Default"))return e.Default;var t=e.hasOwnProperty("DataType")?e.DataType:"String";return this.options.defaultValues.hasOwnProperty(t)?this.options.defaultValues[t]:null}}},{key:"populateDefaults",value:function(e,t){return this.populateObject(e,t,(function(e){return e.hasOwnProperty("Default")}))}},{key:"populateObject",value:function(e,t,r){var n=this,i="object"===_typeof(e)?e:{},a=void 0!==t&&t,o="function"==typeof r?r:function(e){return!0};return this.elementAddresses.forEach((function(e){var t=n.getDescriptor(e);o(t)&&(!a&&n.checkAddressExists(i,e)||n.setValueAtAddress(i,e,n.getDefaultValue(t)))})),i}}]),r}(n);t.exports=p},{"./Manyfest-HashTranslation.js":43,"./Manyfest-LogToConsole.js":44,"./Manyfest-ObjectAddress-CheckAddressExists.js":45,"./Manyfest-ObjectAddress-DeleteValue.js":46,"./Manyfest-ObjectAddress-GetValue.js":47,"./Manyfest-ObjectAddress-SetValue.js":48,"./Manyfest-ObjectAddressGeneration.js":49,"./Manyfest-SchemaManipulation.js":51,"fable-serviceproviderbase":33}],53:[function(e,t,r){var n=e("wrappy");function i(e){var t=function t(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function a(e){var t=function t(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(i),t.exports.strict=n(a),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return a(this)},configurable:!0})}))},{wrappy:90}],54:[function(e,t,r){(function(e){(function(){function r(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var r,n="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),a=s,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=s,o=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var i={resolve:function(){for(var t,i="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=e.cwd()),s=t),r(s),0!==s.length&&(i=s+"/"+i,a=47===s.charCodeAt(0))}return i=n(i,!a),a?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(r(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return r(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];r(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(r(e),r(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var a=e.length,o=a-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,c=o<u?o:u,l=-1,f=0;f<=c;++f){if(f===c){if(u>c){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else o>c&&(47===e.charCodeAt(n+f)?l=f:0===f&&(l=0));break}var h=e.charCodeAt(n+f);if(h!==t.charCodeAt(s+f))break;47===h&&(l=f)}var p="";for(f=n+l+1;f<=a;++f)f!==a&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(r(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');r(e);var n,i=0,a=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!o){i=n+1;break}}else-1===u&&(o=!1,u=n+1),s>=0&&(c===t.charCodeAt(s)?-1==--s&&(a=n):(s=-1,a=u))}return i===a?a=u:-1===a&&(a=e.length),e.slice(i,a)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){i=n+1;break}}else-1===a&&(o=!1,a=n+1);return-1===a?"":e.slice(i,a)},extname:function(e){r(e);for(var t=-1,n=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(a=!1,i=s+1),46===u?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!a){n=s+1;break}}return-1===t||-1===i||0===o||1===o&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==_typeof(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+_typeof(e));return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}("/",e)},parse:function(e){r(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0),a=47===i;a?(t.root="/",n=1):n=0;for(var o=-1,s=0,u=-1,c=!0,l=e.length-1,f=0;l>=n;--l)if(47!==(i=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===i?-1===o?o=l:1!==f&&(f=1):-1!==o&&(f=-1);else if(!c){s=l+1;break}return-1===o||-1===u||0===f||1===f&&o===u-1&&o===s+1?-1!==u&&(t.base=t.name=0===s&&a?e.slice(1,u):e.slice(s,u)):(0===s&&a?(t.name=e.slice(1,o),t.base=e.slice(1,u)):(t.name=e.slice(s,o),t.base=e.slice(s,u)),t.ext=e.slice(o,u)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}).call(this)}).call(this,e("_process"))},{_process:58}],55:[function(e,t,r){
2
2
  /**
3
3
  * Precedent Meta-Templating
4
4
  *
@@ -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"),a=function(){function e(){_classCallCheck2(this,e),this.WordTree=new n,this.StringParser=new i,this.ParseTree=this.WordTree.ParseTree}return _createClass2(e,[{key:"addPattern",value:function(e,t,r){return this.WordTree.addPattern(e,t,r)}},{key:"parseString",value:function(e,t){return this.StringParser.parseString(e,this.ParseTree,t)}}]),e}();t.exports=a},{"./StringParser.js":56,"./WordTree.js":57}],56:[function(e,t,r){var n=function(){function e(){_classCallCheck2(this,e)}return _createClass2(e,[{key:"newParserState",value:function(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:!1,PatternMatch:!1,PatternMatchOutputBuffer:""}}},{key:"assignNode",value:function(e,t){t.PatternMatch=e,t.PatternMatch.hasOwnProperty("PatternEnd")&&(t.Pattern=t.PatternMatch)}},{key:"appendOutputBuffer",value:function(e,t){t.OutputBuffer+=e}},{key:"flushOutputBuffer",value:function(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}},{key:"checkPatternEnd",value:function(e,t){e.OutputBuffer.length>=e.Pattern.PatternEnd.length+e.Pattern.PatternStart.length&&e.OutputBuffer.substr(-e.Pattern.PatternEnd.length)===e.Pattern.PatternEnd&&(e.OutputBuffer=e.Pattern.Parse(e.OutputBuffer.substr(e.Pattern.PatternStart.length,e.OutputBuffer.length-(e.Pattern.PatternStart.length+e.Pattern.PatternEnd.length)),t),this.flushOutputBuffer(e),e.Pattern=!1,e.PatternMatch=!1)}},{key:"parseCharacter",value:function(e,t,r){!t.PatternMatch&&t.ParseTree.hasOwnProperty(e)?(this.assignNode(t.ParseTree[e],t),this.appendOutputBuffer(e,t)):t.PatternMatch?(t.PatternMatch.hasOwnProperty(e)&&this.assignNode(t.PatternMatch[e],t),this.appendOutputBuffer(e,t),t.Pattern&&this.checkPatternEnd(t,r)):t.Output+=e}},{key:"parseString",value:function(e,t,r){for(var n=this.newParserState(t),i=0;i<e.length;i++)this.parseCharacter(e[i],n,r);return this.flushOutputBuffer(n),n.Output}}]),e}();t.exports=n},{}],57:[function(e,t,r){var n=function(){function e(){_classCallCheck2(this,e),this.ParseTree={}}return _createClass2(e,[{key:"addChild",value:function(e,t,r){return e.hasOwnProperty(t[r])||(e[t[r]]={}),e[t[r]]}},{key:"addPattern",value:function(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;for(var n=this.ParseTree,i=0;i<e.length;i++)n=this.addChild(n,e,i);return n.PatternStart=e,n.PatternEnd="string"==typeof t&&t.length>0?t:e,n.Parse="function"==typeof r?r:"string"==typeof r?function(){return r}:function(e){return e},!0}}]),e}();t.exports=n},{}],58:[function(e,t,r){var n,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(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:s}catch(e){i=s}}();var c,l=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&d())}function d(){if(!f){var e=u(p);f=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!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 y(){}a.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];l.push(new g(e,t)),1!==l.length||f||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=y,a.addListener=y,a.once=y,a.off=y,a.removeListener=y,a.removeAllListeners=y,a.emit=y,a.prependListener=y,a.prependOnceListener=y,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],59:[function(e,t,r){(function(e){(function(){!function(n){var i="object"==_typeof(r)&&r&&!r.nodeType&&r,a="object"==_typeof(t)&&t&&!t.nodeType&&t,o="object"==_typeof(e)&&e;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var s,u,c=2147483647,l=36,f=1,h=26,p=38,d=700,g=72,y=128,v="-",m=/^xn--/,b=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=l-f,P=Math.floor,T=String.fromCharCode;function C(e){throw new RangeError(w[e])}function O(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function k(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+O((e=e.replace(_,".")).split("."),t).join(".")}function E(e){for(var t,r,n=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function A(e){return O(e,(function(e){var t="";return e>65535&&(t+=T((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=T(e)})).join("")}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function j(e,t,r){var n=0;for(e=r?P(e/d):e>>1,e+=P(e/t);e>S*h>>1;n+=l)e=P(e/S);return P(n+(S+1)*e/(e+p))}function M(e){var t,r,n,i,a,o,s,u,p,d,m,b=[],_=e.length,w=0,S=y,T=g;for((r=e.lastIndexOf(v))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&C("not-basic"),b.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<_;){for(a=w,o=1,s=l;i>=_&&C("invalid-input"),((u=(m=e.charCodeAt(i++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:l)>=l||u>P((c-w)/o))&&C("overflow"),w+=u*o,!(u<(p=s<=T?f:s>=T+h?h:s-T));s+=l)o>P(c/(d=l-p))&&C("overflow"),o*=d;T=j(w-a,t=b.length+1,0==a),P(w/t)>c-S&&C("overflow"),S+=P(w/t),w%=t,b.splice(w++,0,S)}return A(b)}function R(e){var t,r,n,i,a,o,s,u,p,d,m,b,_,w,S,O=[];for(b=(e=E(e)).length,t=y,r=0,a=g,o=0;o<b;++o)(m=e[o])<128&&O.push(T(m));for(n=i=O.length,i&&O.push(v);n<b;){for(s=c,o=0;o<b;++o)(m=e[o])>=t&&m<s&&(s=m);for(s-t>P((c-r)/(_=n+1))&&C("overflow"),r+=(s-t)*_,t=s,o=0;o<b;++o)if((m=e[o])<t&&++r>c&&C("overflow"),m==t){for(u=r,p=l;!(u<(d=p<=a?f:p>=a+h?h:p-a));p+=l)S=u-d,w=l-d,O.push(T(x(d+S%w,0))),u=P(S/w);O.push(T(x(u,0))),a=j(r,_,n==i),r=0,++n}++r,++t}return O.join("")}if(s={version:"1.4.1",ucs2:{decode:E,encode:A},decode:M,encode:R,toASCII:function(e){return k(e,(function(e){return b.test(e)?"xn--"+R(e):e}))},toUnicode:function(e){return k(e,(function(e){return m.test(e)?M(e.slice(4).toLowerCase()):e}))}},i&&a)if(t.exports==i)a.exports=s;else for(u in s)s.hasOwnProperty(u)&&(i[u]=s[u]);else n.punycode=s}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],60:[function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,a){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,h,p,d,g=e[l].replace(s,"%20"),y=g.indexOf(r);y>=0?(f=g.substr(0,y),h=g.substr(y+1)):(f=g,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(o,p)?i(o[p])?o[p].push(d):o[p]=[o[p],d]:o[p]=d}return o};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],61:[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,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===_typeof(e)?a(o(e),(function(o){var s=encodeURIComponent(n(o))+r;return i(e[o])?a(e[o],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[o]))})).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(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}},{}],62:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":60,"./encode":61}],63:[function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=e("buffer"),i=n.Buffer;function a(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:(a(n,r),r.Buffer=o),o.prototype=Object.create(i.prototype),a(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:19}],64:[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:19}],65:[function(e,t,r){(function(r){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=f;var n=e("simple-concat"),i=e("decompress-response"),a=e("http"),o=e("https"),s=e("once"),u=e("querystring"),c=e("url"),l=function(e){return null!==e&&"object"===_typeof(e)&&"function"==typeof e.pipe};function f(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=s(t),e.url){var n=c.parse(e.url),h=n.hostname,p=n.port,d=n.protocol,g=n.auth,y=n.path;delete e.url,h||p||d||g?Object.assign(e,{hostname:h,port:p,protocol:d,auth:g,path:y}):e.path=y}var v,m={"accept-encoding":"gzip, deflate"};e.headers&&Object.keys(e.headers).forEach((function(t){return m[t.toLowerCase()]=e.headers[t]})),e.headers=m,e.body?v=e.json&&!l(e.body)?JSON.stringify(e.body):e.body:e.form&&(v="string"==typeof e.form?e.form:u.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),v&&(e.method||(e.method="POST"),l(v)||(e.headers["content-length"]=r.byteLength(v)),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());var b=e.hostname,_=("https:"===e.protocol?o:a).request(e,(function(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();var n=c.parse(e.url).hostname;return null!==n&&n!==b&&(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")):f(e,t)}var a="function"==typeof i&&"HEAD"!==e.method;t(null,a?i(r):r)}));return _.on("timeout",(function(){_.abort(),t(new Error("Request timed out"))})),_.on("error",t),l(v)?v.on("error",t).pipe(_):_.end(v),_}f.concat=function(e,t){return f(e,(function(r,i){if(r)return t(r);n(i,(function(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((function(e){f[e]=function(t,r){return"string"==typeof t&&(t={url:t}),f(Object.assign({method:e.toUpperCase()},t),r)}}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:19,"decompress-response":17,http:66,https:39,once:53,querystring:62,"simple-concat":64,url:87}],66:[function(e,t,r){(function(t){(function(){var n=e("./lib/request"),i=e("./lib/response"),a=e("xtend"),o=e("builtin-status-codes"),s=e("url"),u=r;u.request=function(e,r){e="string"==typeof e?s.parse(e):a(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?o+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=o,u.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":68,"./lib/response":69,"builtin-status-codes":20,url:87,xtend:91}],67:[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 a(e){return"function"==typeof e}r.fetch=a(e.fetch)&&a(e.ReadableStream),r.writableStream=a(e.WritableStream),r.abortController=a(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()&&a(n().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],68:[function(e,t,r){(function(r,n,i){(function(){var a=e("./capability"),o=e("inherits"),s=e("./response"),u=e("readable-stream"),c=s.IncomingMessage,l=s.readyStates;var f=t.exports=function(e){var t,r=this;u.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&&!a.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!a.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 a.fetch&&t?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":"text"}(t,n),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(f,u.Writable),f.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===h.indexOf(r)&&(this._headers[r]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.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 s=[];if(Object.keys(i).forEach((function(e){var t=i[e].name,r=i[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var u=null;if(a.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"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:s,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var f=e._xhr=new n.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in f&&(f.responseType=e._mode),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(f.timeout=t.requestTimeout,f.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){f.setRequestHeader(e[0],e[1])})),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case l.LOADING:case l.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{f.send(o)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},f.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)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(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))},f.prototype._write=function(e,t,r){this._body.push(e),r()},f.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))},f.prototype.abort=f.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)},f.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},f.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var h=["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":67,"./response":69,_process:58,buffer:19,inherits:41,"readable-stream":84}],69:[function(e,t,r){(function(t,n,i){(function(){var a=e("./capability"),o=e("inherits"),s=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,n,o){var u=this;if(s.Readable.call(u),u._mode=n,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){t.nextTick((function(){u.emit("close")}))})),"fetch"===n){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),a.writableStream){var c=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){u._destroyed?r():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){o(!0),u._destroyed||u.push(null)},abort:function(e){o(!0),u._destroyed||u.emit("error",e)}});try{return void r.body.pipeTo(c).catch((function(e){o(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var l=r.body.getReader();!function e(){l.read().then((function(t){u._destroyed||(o(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){o(!0),u._destroyed||u.emit("error",e)}))}()}else{if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.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===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!a.overrideMimeType){var f=u.rawHeaders["mime-type"];if(f){var h=f.match(/;\s*charset=([^;])(;|$)/);h&&(u._charset=h[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};o(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,a=null;switch(t._mode){case"text":if((a=r.responseText).length>t._pos){var o=a.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(o.length),c=0;c<o.length;c++)s[c]=255&o.charCodeAt(c);t.push(s)}else t.push(o,t._charset);t._pos=a.length}break;case"arraybuffer":if(r.readyState!==u.DONE||!r.response)break;a=r.response,t.push(i.from(new Uint8Array(a)));break;case"moz-chunked-arraybuffer":if(a=r.response,r.readyState!==u.LOADING||!a)break;t.push(i.from(new Uint8Array(a)));break;case"ms-stream":if(a=r.response,r.readyState!==u.LOADING)break;var l=new n.MSStreamReader;l.onprogress=function(){l.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){e(!0),t.push(null)},l.readAsArrayBuffer(a)}t._xhr.readyState===u.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":67,_process:58,buffer:19,inherits:41,"readable-stream":84}],70:[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 a(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,s;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"))s="The ".concat(e," ").concat(n," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(a(t,"type"))}return s+=". 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},{}],71:[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=c;var i=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(c,i);for(var o=n(a.prototype),s=0;s<o.length;s++){var u=o[s];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),a.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",l)))}function l(){this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.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":73,"./_stream_writable":75,_process:58,inherits:41}],72:[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":74,inherits:41}],73:[function(e,t,r){(function(r,n){(function(){var i;t.exports=C,C.ReadableState=T;e("events").EventEmitter;var a=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),s=e("buffer").Buffer,u=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,l=e("util");c=l&&l.debuglog?l.debuglog("stream"):function(){};var f,h,p,d=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),y=e("./internal/streams/state").getHighWaterMark,v=e("../errors").codes,m=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,_=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(C,o);var S=g.errorOrDestroy,P=["error","close","destroy","pause","resume"];function T(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=y(this,t,"readableHighWaterMark",n),this.buffer=new d,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&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function C(t){if(i=i||e("./_stream_duplex"),!(this instanceof C))return new C(t);var r=this instanceof i;this._readableState=new T(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 O(e,t,r,n,i){c("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(c("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?x(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}(e,o);else if(i||(a=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(o,t)),a)S(e,a);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)o.endEmitted?S(e,new w):k(e,o,t,!0);else if(o.ended)S(e,new b);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?k(e,o,t,!1):M(e,o)):k(e,o,t,!1)}else n||(o.reading=!1,M(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function k(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&&x(e)),M(e,t)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),C.prototype.destroy=g.destroy,C.prototype._undestroy=g.undestroy,C.prototype._destroy=function(e,t){t(e)},C.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=s.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},C.prototype.unshift=function(e){return O(this,e,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(t){f||(f=e("string_decoder/").StringDecoder);var r=new f(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 E=1073741824;function A(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>=E?e=E:(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 x(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(j,e))}function j(e){var t=e._readableState;c("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,I(e)}function M(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function L(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 D(e){c("readable nexttick read 0"),e.read(0)}function N(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function B(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 F(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(U,t,e))}function U(e,t){if(c("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 H(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}C.prototype.read=function(e){c("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 c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):x(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(r,t))),null===(n=e>0?B(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&&F(this)),null!==n&&this.emit("data",n),n},C.prototype._read=function(e){S(this,new _("_read()"))},C.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,c("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:y;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",h),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){c("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var l=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,I(e))}}(n);e.on("drain",l);var f=!1;function h(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==H(i.pipes,e))&&!f&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function p(t){c("onerror",t),y(),e.removeListener("error",p),0===a(e,"error")&&S(e,t)}function d(){e.removeListener("finish",g),y()}function g(){c("onfinish"),e.removeListener("close",d),y()}function y(){c("unpipe"),n.unpipe(e)}return n.on("data",h),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",p),e.once("close",d),e.once("finish",g),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},C.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 a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=H(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},C.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,c("on readable",i.length,i.reading),i.length?x(this):i.reading||r.nextTick(D,this))),n},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(L,this),n},C.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(L,this),t},C.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(N,e,t))}(this,e)),e.paused=!1,this},C.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("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){(c("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 a=0;a<P.length;a++)e.on(P[a],this.emit.bind(this,P[a]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(C.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e("./internal/streams/async_iterator")),h(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),C._fromList=B,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(C.from=function(t,r){return void 0===p&&(p=e("./internal/streams/from")),p(C,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":70,"./_stream_duplex":71,"./internal/streams/async_iterator":76,"./internal/streams/buffer_list":77,"./internal/streams/destroy":78,"./internal/streams/from":80,"./internal/streams/state":82,"./internal/streams/stream":83,_process:58,buffer:19,events:25,inherits:41,"string_decoder/":85,util:17}],74:[function(e,t,r){t.exports=l;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=e("./_stream_duplex");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);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 l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.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",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.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)}},l.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))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":70,"./_stream_duplex":71,inherits:41}],75:[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 a;t.exports=C,C.WritableState=T;var o={deprecate:e("util-deprecate")},s=e("./internal/streams/stream"),u=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,f=e("./internal/streams/destroy"),h=e("./internal/streams/state").getHighWaterMark,p=e("../errors").codes,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,v=p.ERR_STREAM_CANNOT_PIPE,m=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,_=p.ERR_STREAM_WRITE_AFTER_END,w=p.ERR_UNKNOWN_ENCODING,S=f.errorOrDestroy;function P(){}function T(t,n,o){a=a||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=n instanceof a),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,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,a=n.writecb;if("function"!=typeof a)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,a){--t.pendingcb,n?(r.nextTick(a,i),r.nextTick(j,e,t),e._writableState.errorEmitted=!0,S(e,i)):(a(i),e._writableState.errorEmitted=!0,S(e,i),j(e,t))}(e,n,i,t,a);else{var o=A(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),i?r.nextTick(k,e,n,o,a):k(e,n,o,a)}}(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 C(t){var r=this instanceof(a=a||e("./_stream_duplex"));if(!r&&!l.call(C,this))return new C(t);this._writableState=new T(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)),s.call(this)}function O(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function k(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),j(e,t)}function E(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)a[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;a.allBuffers=u,O(e,t,!0,t.length,a,"",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 c=r.chunk,l=r.encoding,f=r.callback;if(O(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final((function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),j(e,t)}))}function j(e,t){var n=A(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(x,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")(C,s),T.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(T.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]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===C&&(e&&e._writableState instanceof T)}})):l=function(e){return e instanceof this},C.prototype.pipe=function(){S(this,new v)},C.prototype.write=function(e,t,n){var i,a=this._writableState,o=!1,s=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof n&&(n=P),a.ending?function(e,t){var n=new _;S(e,n),r.nextTick(t,n)}(this,n):(s||function(e,t,n,i){var a;return null===n?a=new b:"string"==typeof n||t.objectMode||(a=new d("chunk",["string","Buffer"],n)),!a||(S(e,a),r.nextTick(i,a),!1)}(this,a,e,n))&&(a.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else O(e,t,!1,s,n,i,a);return c}(this,a,s,e,t,n)),o},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},C.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 w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(e,t,r){r(new g("_write()"))},C.prototype._writev=null,C.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,j(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),C.prototype.destroy=f.destroy,C.prototype._undestroy=f.undestroy,C.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":70,"./_stream_duplex":71,"./internal/streams/destroy":78,"./internal/streams/state":82,"./internal/streams/stream":83,_process:58,buffer:19,inherits:41,"util-deprecate":89}],76:[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 a=e("./end-of-stream"),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function d(e){var t=e[o];if(null!==t){var r=e[h].read();null!==r&&(e[l]=null,e[o]=null,e[s]=null,t(p(r,!1)))}}function g(e){r.nextTick(d,e)}var y=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[u]?n(e[u]):t(p(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(p(void 0,!0)):t[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),y);t.exports=function(e){var t,r=Object.create(v,(i(t={},h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[h].read();n?(r[l]=null,r[o]=null,r[s]=null,e(p(n,!1))):(r[o]=e,r[s]=t)},writable:!0}),t));return r[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[l]=null,r[o]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[o];null!==n&&(r[l]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),e.on("readable",g.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":79,_process:58}],77:[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){a(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 a(e,t,r){return(t=s(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,s(n.key),n)}}function s(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 u=e("buffer").Buffer,c=e("util").inspect,l=c&&c.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 u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=i,n=o,u.prototype.copy.call(t,r,n),o+=a.data.length,a=a.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,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:19,util:17}],78:[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,a){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(a?a(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){!a&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):a?(e.nextTick(n,o),a(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:58}],79:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,a){if("function"==typeof r)return e(t,null,r);r||(r={}),a=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)}}}(a||i);var o=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){s=!1,c=!0,o||a.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,f=!0,s||a.call(t)},p=function(e){a.call(t,e)},d=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new n),a.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),a.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",l),t.on("abort",d),t.req?g():t.on("request",g)),t.on("end",h),t.on("finish",l),!1!==r.error&&t.on("error",p),t.on("close",d),function(){t.removeListener("complete",l),t.removeListener("abort",d),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",d)}}},{"../../../errors":70}],80:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],81:[function(e,t,r){var n;var i=e("../../../errors").codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(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 l,f=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new a("streams");var h=r.map((function(t,i){var a=i<r.length-1;return function(t,r,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;t.on("close",(function(){s=!0})),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},(function(e){if(e)return a(e);s=!0,a()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new o("pipe"))}}(t,a,i>0,(function(e){l||(l=e),e&&h.forEach(u),a||(h.forEach(u),f(l))}))}));return r.reduce(c)}},{"../../../errors":70,"./end-of-stream":79}],82:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},{"../../../errors":70}],83:[function(e,t,r){t.exports=e("events").EventEmitter},{events:25}],84:[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":71,"./lib/_stream_passthrough.js":72,"./lib/_stream_readable.js":73,"./lib/_stream_transform.js":74,"./lib/_stream_writable.js":75,"./lib/internal/streams/end-of-stream.js":79,"./lib/internal/streams/pipeline.js":81}],85:[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 a(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=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}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 s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){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 u(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 c(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 l(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 f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=a,a.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||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.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)},a.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":63}],86:[function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},u=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.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=u++,n=!(arguments.length<2)&&o.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":58,timers:86}],87:[function(e,t,r){var n=e("punycode"),i=e("./util");function a(){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}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){i.isString(e)&&(e=b(e));return e instanceof a?e.format():a.prototype.format.call(e)},r.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=e("querystring");function b(e,t,r){if(e&&i.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+_typeof(e));var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!r&&1===e.split("#").length){var _=u.exec(b);if(_)return this.path=b,this.href=b,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=o.exec(b);if(w){var S=(w=w[0]).toLowerCase();this.protocol=S,b=b.substr(w.length)}if(r||w||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var P="//"===b.substr(0,2);!P||w&&y[w]||(b=b.substr(2),this.slashes=!0)}if(!y[w]&&(P||w&&!v[w])){for(var T,C,O=-1,k=0;k<h.length;k++){-1!==(E=b.indexOf(h[k]))&&(-1===O||E<O)&&(O=E)}-1!==(C=-1===O?b.lastIndexOf("@"):b.lastIndexOf("@",O))&&(T=b.slice(0,C),b=b.slice(C+1),this.auth=decodeURIComponent(T)),O=-1;for(k=0;k<f.length;k++){var E;-1!==(E=b.indexOf(f[k]))&&(-1===O||E<O)&&(O=E)}-1===O&&(O=b.length),this.host=b.slice(0,O),b=b.slice(O),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var x=this.hostname.split(/\./),j=(k=0,x.length);k<j;k++){var M=x[k];if(M&&!M.match(p)){for(var R="",L=0,D=M.length;L<D;L++)M.charCodeAt(L)>127?R+="x":R+=M[L];if(!R.match(p)){var N=x.slice(0,k),I=x.slice(k+1),B=M.match(d);B&&(N.push(B[1]),I.unshift(B[2])),I.length&&(b="/"+I.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[S])for(k=0,j=l.length;k<j;k++){var H=l[k];if(-1!==b.indexOf(H)){var W=encodeURIComponent(H);W===H&&(W=escape(H)),b=b.split(H).join(W)}}var q=b.indexOf("#");-1!==q&&(this.hash=b.substr(q),b=b.slice(0,q));var V=b.indexOf("?");if(-1!==V?(this.search=b.substr(V),this.query=b.substr(V+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,V)):t&&(this.search="",this.query={}),b&&(this.pathname=b),v[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var J=this.search||"";this.path=F+J}return this.href=this.format(),this},a.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||"",a=!1,o="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(o=m.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==a?(a="//"+(a||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):a||(a=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+a+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},a.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var r=new a,n=Object.keys(this),o=0;o<n.length;o++){var s=n[o];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=e[l])}return v[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!v[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var p=f[h];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[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 g=r.pathname||"",m=r.search||"";r.path=g+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=_||b||r.host&&e.pathname,S=w,P=r.pathname&&r.pathname.split("/")||[],T=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!v[r.protocol]);if(T&&(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),w=w&&(""===d[0]||""===P[0])),_)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(!i.isNullOrUndefined(e.search)){if(T)r.hostname=r.host=P.shift(),(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(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 C=P.slice(-1)[0],O=(r.host||e.host||P.length>1)&&("."===C||".."===C)||""===C,k=0,E=P.length;E>=0;E--)"."===(C=P[E])?P.splice(E,1):".."===C?(P.splice(E,1),k++):k&&(P.splice(E,1),k--);if(!w&&!S)for(;k--;k)P.unshift("..");!w||""===P[0]||P[0]&&"/"===P[0].charAt(0)||P.unshift(""),O&&"/"!==P.join("/").substr(-1)&&P.push("");var A,x=""===P[0]||P[0]&&"/"===P[0].charAt(0);T&&(r.hostname=r.host=x?"":P.length?P.shift():"",(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift()));return(w=w||r.host&&P.length)&&!x&&P.unshift(""),P.length?r.pathname=P.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(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},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":88,punycode:59,querystring:62}],88:[function(e,t,r){t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===_typeof(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],89:[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:{})},{}],90:[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}}},{}],91:[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},{}],92:[function(e,t,r){var n=e("fable-serviceproviderbase"),i=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i;return _classCallCheck2(this,r),(i=t.call(this,e,n)).serviceType="ServiceManager",i.serviceTypes=[],i.servicesMap={},i.services={},i.serviceClasses={},i.extraServiceInitialization=!1,i}return _createClass2(r,[{key:"addServiceType",value:function(e,t){this.servicesMap.hasOwnProperty(e)?this.fable.log.warn("Adding a service type [".concat(e,"] that already exists.")):(this.servicesMap[e]={},this.serviceTypes.push(e)),"function"==typeof t&&t.isFableService?this.serviceClasses[e]=t:(this.fable.log.error("Attempted to add service type [".concat(e,"] with an invalid class. Using base service class, which will not crash but won't provide meaningful services.")),this.serviceClasses[e]=n)}},{key:"addAndInstantiateServiceType",value:function(e,t){return this.addServiceType(e,t),this.instantiateServiceProvider(e,{},"".concat(e,"-Default"))}},{key:"instantiateServiceProviderFromPrototype",value:function(e,t,r,n){var i=new n(this.fable,t,r);return this.extraServiceInitialization&&(i=this.extraServiceInitialization(i)),this.servicesMap[e][i.Hash]=i,this.services.hasOwnProperty(e)||this.setDefaultServiceInstantiation(e,i.Hash),i}},{key:"instantiateServiceProvider",value:function(e,t,r){var n=this.instantiateServiceProviderWithoutRegistration(e,t,r);return this.servicesMap[e][n.Hash]=n,this.services.hasOwnProperty(e)||this.setDefaultServiceInstantiation(e,n.Hash),n}},{key:"instantiateServiceProviderWithoutRegistration",value:function(e,t,r){var n=new this.serviceClasses[e](this.fable,t,r);return this.extraServiceInitialization&&(n=this.extraServiceInitialization(n)),n}},{key:"connectPreinitServiceProviderInstance",value:function(e){var t=e.serviceType,r=e.Hash;return e.connectFable(this.fable),this.servicesMap.hasOwnProperty(t)||(this.servicesMap[t]={}),this.servicesMap[t][r]=e,this.services.hasOwnProperty(t)||this.setDefaultServiceInstantiation(t,r),e}},{key:"setDefaultServiceInstantiation",value:function(e,t){return!!this.servicesMap[e].hasOwnProperty(t)&&(this.fable[e]=this.servicesMap[e][t],this.services[e]=this.servicesMap[e][t],!0)}}]),r}(n.CoreServiceProviderBase);t.exports=i,t.exports.ServiceProviderBase=n,t.exports.CoreServiceProviderBase=n.CoreServiceProviderBase},{"fable-serviceproviderbase":33}],93:[function(e,t,r){var n=e("fable-settings"),i=e("fable-uuid"),a=e("fable-log"),o=e("./Fable-ServiceManager.js"),s=function(){function t(r){_classCallCheck2(this,t),this._coreServices={},this._coreServices.SettingsManager=new n(r),this._coreServices.UUID=new i(this._coreServices.SettingsManager.settings),this._coreServices.Logging=new a(this._coreServices.SettingsManager.settings),this._coreServices.Logging.initialize(),this._coreServices.ServiceManager=new o(this),this.serviceManager=this._coreServices.ServiceManager,this.serviceManager.connectFable(this),this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.ServiceManager),this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.UUID),this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.Logging),this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.SettingsManager),this.serviceManager.addAndInstantiateServiceType("EnvironmentData",e("./services/Fable-Service-EnvironmentData.js")),this.serviceManager.addServiceType("Template",e("./services/Fable-Service-Template.js")),this.serviceManager.addServiceType("MetaTemplate",e("./services/Fable-Service-MetaTemplate.js")),this.serviceManager.addServiceType("Anticipate",e("./services/Fable-Service-Anticipate.js")),this.serviceManager.addAndInstantiateServiceType("DataFormat",e("./services/Fable-Service-DataFormat.js")),this.serviceManager.addAndInstantiateServiceType("DataGeneration",e("./services/Fable-Service-DataGeneration.js")),this.serviceManager.addAndInstantiateServiceType("Utility",e("./services/Fable-Service-Utility.js")),this.serviceManager.addServiceType("Operation",e("./services/Fable-Service-Operation.js")),this.serviceManager.addServiceType("RestClient",e("./services/Fable-Service-RestClient.js")),this.serviceManager.addServiceType("CSVParser",e("./services/Fable-Service-CSVParser.js")),this.serviceManager.addServiceType("Manifest",e("manyfest")),this.serviceManager.addServiceType("ObjectCache",e("cachetrax")),this.serviceManager.addServiceType("FilePersistence",e("./services/Fable-Service-FilePersistence.js"))}return _createClass2(t,[{key:"isFable",get:function(){return!0}},{key:"settings",get:function(){return this._coreServices.SettingsManager.settings}},{key:"settingsManager",get:function(){return this._coreServices.SettingsManager}},{key:"log",get:function(){return this._coreServices.Logging}},{key:"services",get:function(){return this._coreServices.ServiceManager.services}},{key:"servicesMap",get:function(){return this._coreServices.ServiceManager.servicesMap}},{key:"getUUID",value:function(){return this._coreServices.UUID.getUUID()}},{key:"fable",get:function(){return this}}]),t}();t.exports=s,t.exports.new=function(e){return new s(e)},t.exports.LogProviderBase=a.LogProviderBase,t.exports.ServiceProviderBase=o.ServiceProviderBase,t.exports.CoreServiceProviderBase=o.CoreServiceProviderBase,t.exports.precedent=n.precedent},{"./Fable-ServiceManager.js":92,"./services/Fable-Service-Anticipate.js":94,"./services/Fable-Service-CSVParser.js":95,"./services/Fable-Service-DataFormat.js":96,"./services/Fable-Service-DataGeneration.js":98,"./services/Fable-Service-EnvironmentData.js":99,"./services/Fable-Service-FilePersistence.js":100,"./services/Fable-Service-MetaTemplate.js":101,"./services/Fable-Service-Operation.js":105,"./services/Fable-Service-RestClient.js":106,"./services/Fable-Service-Template.js":107,"./services/Fable-Service-Utility.js":108,cachetrax:21,"fable-log":31,"fable-settings":36,"fable-uuid":38,manyfest:52}],94:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).serviceType="AsyncAnticipate",a.operationQueue=[],a.erroredOperations=[],a.executingOperationCount=0,a.completedOperationCount=0,a.maxOperations=1,a.lastError=void 0,a.waitingFunctions=[],a}return _createClass2(r,[{key:"checkQueue",value:function(){if(this.operationQueue.length>0&&this.executingOperationCount<this.maxOperations){var e=this.operationQueue.shift();this.executingOperationCount+=1,e(this.buildAnticipatorCallback())}else if(this.waitingFunctions.length>0&&this.executingOperationCount<1){for(var t=0;t<this.waitingFunctions.length;t++)this.waitingFunctions[t](this.lastError);this.lastError=void 0}}},{key:"anticipate",value:function(e){this.operationQueue.push(e),this.checkQueue()}},{key:"buildAnticipatorCallback",value:function(){var e={Called:!1,Error:void 0,OperationSet:this};return function(t){if(e.Called)throw new Error("Anticipation async callback called twice...");e.Called=!0,e.error=t,e.OperationSet.executingOperationCount-=1,e.OperationSet.completedOperationCount+=1,e.OperationSet.checkQueue()}}},{key:"wait",value:function(e){this.waitingFunctions.push(e),this.checkQueue()}}]),r}(e("../Fable-ServiceManager.js").ServiceProviderBase);t.exports=n},{"../Fable-ServiceManager.js":92}],95:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).serviceType="CSVParser",a.Header=[],a.HeaderFieldNames=[],a.Delimiter=",",a.QuoteCharacter='"',a.CleanCharacters=["\r"],a.HeaderLineIndex=0,a.HasHeader=!0,a.HasSetHeader=!1,a.EmitHeader=!1,a.EmitJSON=!0,a.EscapedQuoteString="&quot;",a.CurrentLine="",a.CurrentRecord=[],a.InQuote=!1,a.InEscapedQuote=!1,a.LinesParsed=0,a.RowsEmitted=0,a}return _createClass2(r,[{key:"marshalRowToJSON",value:function(e){if(!Array.isArray(e))return!1;for(var t=this.HeaderFieldNames.length;t<e.length;t++)this.HeaderFieldNames[t]="".concat(t);for(var r={},n=0;n<e.length;n++)r[this.HeaderFieldNames[n]]=e[n];return r}},{key:"setHeader",value:function(e){this.Header=e;for(var t=0;t<this.Header.length;t++)void 0===this.Header[t]?this.HeaderFieldNames[t]="".concat(t):this.HeaderFieldNames[t]=this.Header[t].toString()}},{key:"resetRowState",value:function(){this.CurrentRecord=[]}},{key:"pushLine",value:function(){for(var e=0;e<this.CleanCharacters.length;e++)this.CurrentLine=this.CurrentLine.replace(this.CleanCharacters[e],"");this.CurrentRecord.push(this.CurrentLine),this.CurrentLine=""}},{key:"emitRow",value:function(e){var t=void 0===e?this.EmitJSON:e;this.RowsEmitted++;var r=this.CurrentRecord;return this.CurrentRecord=[],t?this.marshalRowToJSON(r):r}},{key:"parseCSVLine",value:function(e){this.LinesParsed++;for(var t=0;t<e.length;t++)this.InQuote||e[t]!=this.Delimiter?e[t]==this.QuoteCharacter?this.InEscapedQuote?this.InEscapedQuote=!1:this.InQuote?t<e.length&&e[t+1]==this.QuoteCharacter?(this.CurrentLine+=this.EscapedQuoteString,this.InEscapedQuote=!0):this.InQuote=!1:this.InQuote=!0:this.CurrentLine+=e[t]:this.pushLine();return!this.InQuote&&(this.pushLine(),this.HasHeader&&!this.HasSetHeader&&this.RowsEmitted==this.HeaderLineIndex?(this.HasSetHeader=!0,this.setHeader(this.emitRow(!1)),!!this.EmitHeader&&this.Header):this.emitRow())}}]),r}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":33}],96:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),_defineProperty2(_assertThisInitialized(a=t.call(this,e,n,i)),"stringPadStart",(function(e,t,r){var n=e.toString();return this.stringGeneratePaddingString(n,t,r)+n})),_defineProperty2(_assertThisInitialized(a),"stringPadEnd",(function(e,t,r){var n=e.toString();return n+this.stringGeneratePaddingString(n,t,r)})),a.serviceType="DataArithmatic",a._Regex_formatterInsertCommas=/.{1,3}/g,a._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,a._Regex_formatterDollarsRemoveCommas=/,/gi,a._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi,a._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g,a._Value_MoneySign_Currency="$",a._Value_NaN_Currency="--",a._Value_GroupSeparator_Number=",",a._Value_Prefix_StringHash="HSH",a._Value_Clean_formatterCleanNonAlpha="",a._UseEngineStringStartsWith="function"==typeof String.prototype.startsWith,a._UseEngineStringEndsWith="function"==typeof String.prototype.endsWith,a}return _createClass2(r,[{key:"stringReverse",value:function(e){return e.split("").reverse().join("")}},{key:"stringStartsWith",value:function(e,t,r){return this._UseEngineStringStartsWith?e.startsWith(t,r):this.stringStartsWith_Polyfill.call(e,t,r)}},{key:"stringStartsWith_Polyfill",value:function(e,t){return this.slice(t||0,e.length)===e}},{key:"stringEndsWith",value:function(e,t,r){return this._UseEngineStringEndsWith?e.endsWith(t,r):this.stringEndsWith_Polyfill.call(e,t,r)}},{key:"stringEndsWith_Polyfill",value:function(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}},{key:"insecureStringHash",value:function(e){for(var t=0,r=e.length,n=0;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return"".concat(this._Value_Prefix_StringHash).concat(t)}},{key:"capitalizeEachWord",value:function(e){return e.replace(this._Regex_formatterCapitalizeEachWord,(function(e){return e.charAt(0).toUpperCase()+e.substr(1)}))}},{key:"cleanEnclosureWrapCharacters",value:function(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}},{key:"cleanNonAlphaCharacters",value:function(e){return"string"==typeof e&&""!=e?e.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha):""}},{key:"formatterInsertCommas",value:function(e){var t=this.stringReverse(e).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(t)}},{key:"processAddCommasToNumberRegex",value:function(e,t,r,n,i,a){return t+(i?this.formatterInsertCommas(n)+i+a:this.formatterInsertCommas(n+a))}},{key:"formatterAddCommasToNumber",value:function(e){return e.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}},{key:"formatterDollars",value:function(e){var t=parseFloat(e).toFixed(2);return isNaN(t)&&("string"==typeof e&&(t=parseFloat(e.replace(this._Value_MoneySign_Currency,"").replace(this._Regex_formatterDollarsRemoveCommas,"")).toFixed(2)),isNaN(t))?this._Value_NaN_Currency:"$".concat(this.formatterAddCommasToNumber(t))}},{key:"formatterRoundNumber",value:function(e,t){var r=void 0===t?2:t,n=parseFloat(e).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}},{key:"stringGeneratePaddingString",value:function(e,t,r){var n=t>>0;String(void 0!==r?r:" ");if(e.length>t)return"";var i=t-e.length;return i>r.length&&(r+=r.repeat(n/r.length)),r.slice(0,i)}},{key:"formatTimeSpan",value:function(e){if("number"!=typeof e)return"";var t=parseInt(e%1e3),r=parseInt(e/1e3%60),n=parseInt(e/6e4%60),i=parseInt(e/36e5);return"".concat(this.stringPadStart(i,2,"0"),":").concat(this.stringPadStart(n,2,"0"),":").concat(this.stringPadStart(r,2,"0"),".").concat(this.stringPadStart(t,3,"0"))}},{key:"formatTimeDelta",value:function(e,t){return"number"!=typeof e||"number"!=typeof t?"":this.formatTimeSpan(t-e)}},{key:"getMonthFromDate",value:function(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]}},{key:"getMonthAbbreviatedFromDate",value:function(e){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]}},{key:"formatSortableStringFromDate",value:function(e){return e.getFullYear()+this.stringPadStart(e.getMonth(),2,"0")+this.stringPadStart(e.getDate(),2,"0")}},{key:"stringBeforeMatch",value:function(e,t){return e.split(t)[0]}},{key:"stringAfterMatch",value:function(e,t){var r=e.indexOf(t);return r<0||r+t.length>=e.length?"":e.substring(r+t.length)}},{key:"stringCountEnclosures",value:function(e,t,r){for(var n="string"==typeof e?e:"",i="string"==typeof t?t:"(",a="string"==typeof r?r:")",o=0,s=0,u=0;u<n.length;u++)n[u]==i?(0==s&&o++,s++):n[u]==a&&s--;return o}},{key:"stringGetEnclosureValueByIndex",value:function(e,t,r,n){for(var i="string"==typeof e?e:"",a="number"==typeof t?t:0,o="string"==typeof r?r:"(",s="string"==typeof n?n:")",u=0,c=0,l=!1,f=0,h=0,p=0;p<i.length;p++)i[p]==o?1==++c&&a==++u-1&&(l=!0,f=p):i[p]==s&&0==--c&&l&&h<=f&&(h=p,l=!1);return u<=a?"":h>0&&h>f?i.substring(f+1,h):i.substring(f+1)}},{key:"stringRemoveEnclosureByIndex",value:function(e,t,r,n){for(var i="string"==typeof e?e:"",a="number"==typeof t?t:0,o="string"==typeof r?r:"(",s="string"==typeof n?n:")",u=0,c=0,l=!1,f=0,h=0,p=0;p<i.length;p++)i[p]==o?1==++c&&a==++u-1&&(l=!0,f=p):i[p]==s&&0==--c&&l&&h<=f&&(h=p,l=!1);if(u<=a)return i;var d="";return f>1&&(d=i.substring(0,f)),i.length>h+1&&h>f&&(d+=i.substring(h+1)),d}}]),r}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":33}],97:[function(e,t,r){t.exports={DefaultIntegerMinimum:0,DefaultIntegerMaximum:9999999,DefaultNumericStringLength:10,MonthSet:["January","February","March","April","May","June","July","August","September","October","November","December"],WeekDaySet:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ColorSet:["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],SurNameSet:["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],NameSet:["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]}},{}],98:[function(e,t,r){var n=function(t){_inherits(n,t);var r=_createSuper(n);function n(t,i,a){var o;return _classCallCheck2(this,n),(o=r.call(this,t,i,a)).serviceType="DataGeneration",o.defaultData=e("./Fable-Service-DataGeneration-DefaultValues.json"),o}return _createClass2(n,[{key:"randomIntegerBetween",value:function(e,t){return Math.floor(Math.random()*(t-e))+e}},{key:"randomIntegerUpTo",value:function(e){return this.randomIntegerBetween(0,e)}},{key:"randomInteger",value:function(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum)}},{key:"randomNumericString",value:function(e,t){var r=void 0===e?10:e,n=void 0===t?Math.pow(10,r)-1:t;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(n),e,"0")}},{key:"randomMonth",value:function(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)]}},{key:"randomDayOfWeek",value:function(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)]}},{key:"randomColor",value:function(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)]}},{key:"randomName",value:function(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)]}},{key:"randomSurname",value:function(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)]}}]),n}(e("../Fable-ServiceManager.js").ServiceProviderBase);t.exports=n},{"../Fable-ServiceManager.js":92,"./Fable-Service-DataGeneration-DefaultValues.json":97}],99:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).serviceType="EnvironmentData",a.Environment="node.js",a}return _createClass2(r)}(e("../Fable-ServiceManager.js").ServiceProviderBase);t.exports=n},{"../Fable-ServiceManager.js":92}],100:[function(e,t,r){(function(r){(function(){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=e("fs"),a=e("path"),o=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,a){var o;return _classCallCheck2(this,n),(o=t.call(this,e,i,a)).serviceType="FilePersistence",o.options.hasOwnProperty("Mode")||(o.options.Mode=parseInt("0777",8)&~r.umask()),o.currentInputFolder="/tmp",o.currentOutputFolder="/tmp",o}return _createClass2(n,[{key:"joinPath",value:function(){return a.resolve.apply(a,arguments)}},{key:"existsSync",value:function(e){return i.existsSync(e)}},{key:"exists",value:function(e,t){return t(null,this.existsSync(e))}},{key:"writeFileSync",value:function(e,t,r){var n=void 0===r?"utf8":r;return i.writeFileSync(e,t,n)}},{key:"appendFileSync",value:function(e,t,r){var n=void 0===r?"utf8":r;return i.appendFileSync(e,t,n)}},{key:"deleteFileSync",value:function(e){return i.unlinkSync(e)}},{key:"deleteFolderSync",value:function(e){return i.rmdirSync(e)}},{key:"writeFileSyncFromObject",value:function(e,t){return this.writeFileSync(e,JSON.stringify(t,null,4))}},{key:"writeFileSyncFromArray",value:function(e,t){if(!Array.isArray(t))return this.log.error("File Persistence Service attempted to write ".concat(e," from array but the expected array was not an array (it was a ").concat(_typeof(t),").")),Error("Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).");for(var r=0;r<t.length;r++)return this.appendFileSync(e,"".concat(t[r],"\n"))}},{key:"getDefaultOutputPath",value:function(e){return a.join(this.currentOutputFolder,e)}},{key:"dataFolderWriteSync",value:function(e,t){return this.writeFileSync(this.getDefaultOutputPath(e),t)}},{key:"dataFolderWriteSyncFromObject",value:function(e,t){return this.writeFileSyncFromObject(this.getDefaultOutputPath(e),t)}},{key:"dataFolderWriteSyncFromArray",value:function(e,t){return this.writeFileSyncFromArray(this.getDefaultOutputPath(e),t)}},{key:"makeFolderRecursive",value:function(e,t){var r=this,n=e;if("string"==typeof e)n={Path:e};else if("object"!==_typeof(e))return t(new Error("Parameters object or string not properly passed to recursive folder create.")),!1;return"string"!=typeof n.Path?(t(new Error("Parameters object needs a path to run the folder create operation.")),!1):(n.hasOwnProperty("Mode")||(n.Mode=this.options.Mode),void 0===n.CurrentPathIndex?(n.ActualPath=a.normalize(n.Path),n.ActualPathParts=n.ActualPath.split(a.sep),n.CurrentPathIndex=0,n.CurrentPath=""):(n.CurrentPath==a.sep?n.CurrentPath=n.CurrentPath+n.ActualPathParts[n.CurrentPathIndex]:n.CurrentPath=n.CurrentPath+a.sep+n.ActualPathParts[n.CurrentPathIndex],n.CurrentPathIndex++),n.CurrentPathIndex>=n.ActualPathParts.length?(t(null),!0):void i.open(n.CurrentPath+a.sep+n.ActualPathParts[n.CurrentPathIndex],"r",(function(e,o){if(o&&i.closeSync(o),!e||"ENOENT"!=e.code)return r.makeFolderRecursive(n,t);i.mkdir(n.CurrentPath+a.sep+n.ActualPathParts[n.CurrentPathIndex],n.Mode,(function(e){return e?(t(e),!1):r.makeFolderRecursive(n,t)}))})))}}]),n}(n);t.exports=o}).call(this)}).call(this,e("_process"))},{"../Fable-ServiceManager.js":92,_process:58,fs:18,path:54}],101:[function(e,t,r){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=e("./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js"),a=e("./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,o){var s;return _classCallCheck2(this,r),(s=t.call(this,e,n,o)).serviceType="MetaTemplate",s.WordTree=new i,s.StringParser=new a(s.fable.services.Utility.eachLimit),s.ParseTree=s.WordTree.ParseTree,s}return _createClass2(r,[{key:"addPattern",value:function(e,t,r){return this.WordTree.addPattern(e,t,r)}},{key:"addPatternAsync",value:function(e,t,r){return this.WordTree.addPatternAsync(e,t,r)}},{key:"parseString",value:function(e,t,r){return this.StringParser.parseString(e,this.ParseTree,t,r)}}]),r}(n);t.exports=o},{"../Fable-ServiceManager.js":92,"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":102,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":103}],102:[function(e,t,r){var n=function(){function e(t){_classCallCheck2(this,e),this.eachLimit=t}return _createClass2(e,[{key:"newParserState",value:function(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}},{key:"appendOutputBuffer",value:function(e,t){t.OutputBuffer+=e}},{key:"flushOutputBuffer",value:function(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}},{key:"resetOutputBuffer",value:function(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}},{key:"parseCharacter",value:function(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"))){if(!t.Pattern.isAsync)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);this.log.error("MetaTemplate: The pattern ".concat(t.Pattern.PatternStartString," is asynchronous and cannot be used in a synchronous parser.")),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}},{key:"parseCharacterAsync",value:function(e,t,r,n){var i=this;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.Pattern.isAsync?t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,(function(e,r){return e&&console.log("Precedent ERROR: Async template error happened parsing ".concat(t.Pattern.PatternStart," ... ").concat(t.Pattern.PatternEnd,": ").concat(e)),t.OutputBuffer=r,i.resetOutputBuffer(t),n()})):(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),n())}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"))return this.resetOutputBuffer(t),n();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.Pattern.isAsync?t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,(function(e,r){return e&&console.log("Precedent ERROR: Async template error happened parsing ".concat(t.Pattern.PatternStart," ... ").concat(t.Pattern.PatternEnd,": ").concat(e)),t.OutputBuffer=r,i.resetOutputBuffer(t),n()})):(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),n())}return t.PatternMatch||(t.ParseTree.hasOwnProperty(e)?(this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0):this.appendOutputBuffer(e,t)),n()}},{key:"parseString",value:function(e,t,r,n){var i=this;if("function"!=typeof n){for(var a=this.newParserState(t),o=0;o<e.length;o++)this.parseCharacter(e[o],a,r,n);return this.flushOutputBuffer(a),a.Output}var s=this.newParserState(t);s.Asynchronous=!0,this.eachLimit(e,1,(function(e,t){i.parseCharacterAsync(e,s,r,t)}),(function(e){i.flushOutputBuffer(s),n(e,s.Output)}))}}]),e}();t.exports=n},{}],103:[function(e,t,r){var n=function(){function e(){_classCallCheck2(this,e),this.ParseTree={}}return _createClass2(e,[{key:"addChild",value:function(e,t){return e.hasOwnProperty(t)||(e[t]={}),e[t]}},{key:"addEndChild",value:function(e,t){return e.hasOwnProperty("PatternEnd")||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}},{key:"addPattern",value:function(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;for(var n=this.ParseTree,i=0;i<e.length;i++)n=this.addChild(n,e[i],i);n.hasOwnProperty("PatternEnd")||(n.PatternEnd={});for(var a="string"==typeof t?t:e,o=0;o<a.length;o++)n=this.addEndChild(n,a[o],o);return n.PatternStartString=e,n.PatternEndString=a,n.Parse="function"==typeof r?r:"string"==typeof r?function(){return r}:function(e){return e},n}},{key:"addPatternAsync",value:function(e,t,r){var n=this.addPattern(e,t,r);n&&(n.isAsync=!0)}}]),e}();t.exports=n},{}],104:[function(e,t,r){t.exports={Metadata:{UUID:!1,Hash:!1,Title:"",Summary:"",Version:0},Status:{Completed:!1,CompletionProgress:0,CompletionTimeElapsed:0,Steps:1,StepsCompleted:0,StartTime:0,EndTime:0},Errors:[],Log:[]}},{}],105:[function(e,t,r){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=JSON.stringify(e("./Fable-Service-Operation-DefaultSettings.js")),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,a){var o;return _classCallCheck2(this,r),(o=t.call(this,e,n,a)).serviceType="PhasedOperation",o.state=JSON.parse(i),o.state.Metadata.Hash=o.Hash,o.state.Metadata.UUID=o.UUID,o.name="string"==typeof o.options.Name?o.options.Name:"Unnamed Operation ".concat(o.state.Metadata.UUID),o.log=_assertThisInitialized(o),o}return _createClass2(r,[{key:"writeOperationLog",value:function(e,t,r){this.state.Log.push("".concat((new Date).toUTCString()," [").concat(e,"]: ").concat(t)),"object"==_typeof(r)&&this.state.Log.push(JSON.stringify(r))}},{key:"writeOperationErrors",value:function(e,t){this.state.Errors.push("".concat(e)),"object"==_typeof(t)&&this.state.Errors.push(JSON.stringify(t))}},{key:"trace",value:function(e,t){this.writeOperationLog("TRACE",e,t),this.fable.log.trace(e,t)}},{key:"debug",value:function(e,t){this.writeOperationLog("DEBUG",e,t),this.fable.log.debug(e,t)}},{key:"info",value:function(e,t){this.writeOperationLog("INFO",e,t),this.fable.log.info(e,t)}},{key:"warn",value:function(e,t){this.writeOperationLog("WARN",e,t),this.fable.log.warn(e,t)}},{key:"error",value:function(e,t){this.writeOperationLog("ERROR",e,t),this.writeOperationErrors(e,t),this.fable.log.error(e,t)}},{key:"fatal",value:function(e,t){this.writeOperationLog("FATAL",e,t),this.writeOperationErrors(e,t),this.fable.log.fatal(e,t)}}]),r}(n);t.exports=a},{"../Fable-ServiceManager.js":92,"./Fable-Service-Operation-DefaultSettings.js":104}],106:[function(e,t,r){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=e("simple-get"),a=e("cookie"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).TraceLog=!1,(a.options.TraceLog||a.fable.TraceLog)&&(a.TraceLog=!0),a.dataFormat=a.fable.services.DataFormat,a.serviceType="RestClient",a.cookie=!1,a.prepareRequestOptions=function(e){return e},a}return _createClass2(r,[{key:"prepareCookies",value:function(e){if(this.cookie){e.hasOwnProperty("headers")||(e.headers={});var t=Object.keys(this.cookie);t.length>0&&(e.headers.cookie=a.serialize(t[0],this.cookie[t[0]]))}return e}},{key:"preRequest",value:function(e){var t=this.prepareCookies(e);return this.prepareRequestOptions(t)}},{key:"executeChunkedRequest",value:function(e,t){var r=this,n=this.preRequest(e);return n.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(n.method," request to ").concat(n.url," at ").concat(n.RequestStartTime)),i(n,(function(e,i){if(e)return t(e,i);if(r.TraceLog){var a=r.fable.log.getTimeStamp();r.fable.log.debug("--\x3e ".concat(n.method," connected in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,a),"ms code ").concat(i.statusCode))}var o="";i.on("data",(function(e){if(r.TraceLog){var t=r.fable.log.getTimeStamp();r.fable.log.debug("--\x3e ".concat(n.method," data chunk size ").concat(e.length,"b received in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,t),"ms"))}o+=e})),i.on("end",(function(){if(r.TraceLog){var a=r.fable.log.getTimeStamp();r.fable.log.debug("==> ".concat(n.method," completed data size ").concat(o.length,"b received in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,a),"ms"))}return t(e,i,o)}))}))}},{key:"executeJSONRequest",value:function(e,t){var r=this;e.json=!0;var n=this.preRequest(e);return n.hasOwnProperty("headers")||(n.headers={}),n.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(n.method," JSON request to ").concat(n.url," at ").concat(n.RequestStartTime)),i(n,(function(e,i){if(e)return t(e,i);if(r.TraceLog){var a=r.fable.log.getTimeStamp();r.fable.log.debug("--\x3e JSON ".concat(n.method," connected in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,a),"ms code ").concat(i.statusCode))}var o="";i.on("data",(function(e){if(r.TraceLog){var t=r.fable.log.getTimeStamp();r.fable.log.debug("--\x3e JSON ".concat(n.method," data chunk size ").concat(e.length,"b received in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,t),"ms"))}o+=e})),i.on("end",(function(){if(r.TraceLog){var a=r.fable.log.getTimeStamp();r.fable.log.debug("==> JSON ".concat(n.method," completed - received in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,a),"ms"))}return t(e,i,JSON.parse(o))}))}))}},{key:"getJSON",value:function(e,t){var r="object"==_typeof(e)?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeJSONRequest(r,t)}},{key:"putJSON",value:function(e,t){return"object"!=_typeof(e.body)?t(new Error("PUT JSON Error Invalid options object")):(e.method="PUT",this.executeJSONRequest(e,t))}},{key:"postJSON",value:function(e,t){return"object"!=_typeof(e.body)?t(new Error("POST JSON Error Invalid options object")):(e.method="POST",this.executeJSONRequest(e,t))}},{key:"patchJSON",value:function(e,t){return"object"!=_typeof(e.body)?t(new Error("PATCH JSON Error Invalid options object")):(e.method="PATCH",this.executeJSONRequest(e,t))}},{key:"headJSON",value:function(e,t){return"object"!=_typeof(e.body)?t(new Error("HEAD JSON Error Invalid options object")):(e.method="HEAD",this.executeJSONRequest(e,t))}},{key:"delJSON",value:function(e,t){return e.method="DELETE",this.executeJSONRequest(e,t)}},{key:"getRawText",value:function(e,t){var r="object"==_typeof(e)?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeChunkedRequest(r,t)}}]),r}(n);t.exports=o},{"../Fable-ServiceManager.js":92,cookie:24,"simple-get":65}],107:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).serviceType="Template",a.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},a.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},a.renderFunction=!1,a.templateString=!1,a}return _createClass2(r,[{key:"renderTemplate",value:function(e){return this.renderFunction(e)}},{key:"templateFunction",value:function(e){return this.renderTemplate.bind(this)}},{key:"buildTemplateFunction",value:function(e,t){var r=this;return this.TemplateSource="__p+='"+e.replace(this.Matchers.Escaper,(function(e){return"\\".concat(r.templateEscapes[e])})).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,(function(e,t){return"'+\n(".concat(decodeURIComponent(t),")+\n'")})).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,(function(e,t){return"';\n".concat(decodeURIComponent(t),"\n;__p+='")}))+"';\n",this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n"),this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n"),this.renderFunction=new Function("pTemplateDataObject",this.TemplateSource),void 0!==t?this.renderFunction(t):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}]),r}(e("../Fable-ServiceManager.js").ServiceProviderBase);t.exports=n},{"../Fable-ServiceManager.js":92}],108:[function(e,t,r){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=e("async.waterfall"),a=e("async.eachlimit"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,o){var s;return _classCallCheck2(this,r),(s=t.call(this,e,n,o)).templates={},s.waterfall=i,s.eachLimit=a,s}return _createClass2(r,[{key:"extend",value:function(e){for(var t=0;t<(arguments.length<=1?0:arguments.length-1);t++){var r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if("object"===_typeof(r))for(var n=Object.keys(r),i=0;i<n.length;i++)e[n[i]]=r[n[i]]}return e}},{key:"template",value:function(e,t){return this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(e,t)}},{key:"buildHashedTemplate",value:function(e,t,r){var n=this.fable.serviceManager.instantiateServiceProvider("Template",{},e);return this.templates[e]=n.buildTemplateFunction(t,r),this.templates[e]}},{key:"chunk",value:function(e,t,r){var n=_toConsumableArray(e),i="number"==typeof t?t:0,a=void 0!==r?r:[];if(i<=0)return a;for(;n.length;)a.push(n.splice(0,i));return a}},{key:"isoStringToDate",value:function(e){var t=e.split(/\D+/),r=new Date,n=0,i=0;return r.setUTCFullYear(parseInt(t[0])),r.setUTCMonth(parseInt(t[1]-1)),r.setUTCDate(parseInt(t[2])),r.setUTCHours(parseInt(t[3])),r.setUTCMinutes(parseInt(t[4])),r.setUTCSeconds(parseInt(t[5])),r.setUTCMilliseconds(parseInt(t[6])),(t[7]||t[8])&&(t[8]&&(i=parseInt(t[8])/60),n=parseInt(t[7])+i,"+"==e.substr(-6,1)&&(n*=-1)),r.setHours(r.getHours()+n),r}}]),r}(n);t.exports=o},{"../Fable-ServiceManager.js":92,"async.eachlimit":1,"async.waterfall":15}]},{},[93])(93)}));
11
+ var n=e("./WordTree.js"),i=e("./StringParser.js"),a=function(){function e(){_classCallCheck2(this,e),this.WordTree=new n,this.StringParser=new i,this.ParseTree=this.WordTree.ParseTree}return _createClass2(e,[{key:"addPattern",value:function(e,t,r){return this.WordTree.addPattern(e,t,r)}},{key:"parseString",value:function(e,t){return this.StringParser.parseString(e,this.ParseTree,t)}}]),e}();t.exports=a},{"./StringParser.js":56,"./WordTree.js":57}],56:[function(e,t,r){var n=function(){function e(){_classCallCheck2(this,e)}return _createClass2(e,[{key:"newParserState",value:function(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:!1,PatternMatch:!1,PatternMatchOutputBuffer:""}}},{key:"assignNode",value:function(e,t){t.PatternMatch=e,t.PatternMatch.hasOwnProperty("PatternEnd")&&(t.Pattern=t.PatternMatch)}},{key:"appendOutputBuffer",value:function(e,t){t.OutputBuffer+=e}},{key:"flushOutputBuffer",value:function(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}},{key:"checkPatternEnd",value:function(e,t){e.OutputBuffer.length>=e.Pattern.PatternEnd.length+e.Pattern.PatternStart.length&&e.OutputBuffer.substr(-e.Pattern.PatternEnd.length)===e.Pattern.PatternEnd&&(e.OutputBuffer=e.Pattern.Parse(e.OutputBuffer.substr(e.Pattern.PatternStart.length,e.OutputBuffer.length-(e.Pattern.PatternStart.length+e.Pattern.PatternEnd.length)),t),this.flushOutputBuffer(e),e.Pattern=!1,e.PatternMatch=!1)}},{key:"parseCharacter",value:function(e,t,r){!t.PatternMatch&&t.ParseTree.hasOwnProperty(e)?(this.assignNode(t.ParseTree[e],t),this.appendOutputBuffer(e,t)):t.PatternMatch?(t.PatternMatch.hasOwnProperty(e)&&this.assignNode(t.PatternMatch[e],t),this.appendOutputBuffer(e,t),t.Pattern&&this.checkPatternEnd(t,r)):t.Output+=e}},{key:"parseString",value:function(e,t,r){for(var n=this.newParserState(t),i=0;i<e.length;i++)this.parseCharacter(e[i],n,r);return this.flushOutputBuffer(n),n.Output}}]),e}();t.exports=n},{}],57:[function(e,t,r){var n=function(){function e(){_classCallCheck2(this,e),this.ParseTree={}}return _createClass2(e,[{key:"addChild",value:function(e,t,r){return e.hasOwnProperty(t[r])||(e[t[r]]={}),e[t[r]]}},{key:"addPattern",value:function(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;for(var n=this.ParseTree,i=0;i<e.length;i++)n=this.addChild(n,e,i);return n.PatternStart=e,n.PatternEnd="string"==typeof t&&t.length>0?t:e,n.Parse="function"==typeof r?r:"string"==typeof r?function(){return r}:function(e){return e},!0}}]),e}();t.exports=n},{}],58:[function(e,t,r){var n,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(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:s}catch(e){i=s}}();var c,l=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&d())}function d(){if(!f){var e=u(p);f=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!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 y(){}a.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];l.push(new g(e,t)),1!==l.length||f||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=y,a.addListener=y,a.once=y,a.off=y,a.removeListener=y,a.removeAllListeners=y,a.emit=y,a.prependListener=y,a.prependOnceListener=y,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],59:[function(e,t,r){(function(e){(function(){!function(n){var i="object"==_typeof(r)&&r&&!r.nodeType&&r,a="object"==_typeof(t)&&t&&!t.nodeType&&t,o="object"==_typeof(e)&&e;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var s,u,c=2147483647,l=36,f=1,h=26,p=38,d=700,g=72,y=128,v="-",m=/^xn--/,b=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=l-f,P=Math.floor,T=String.fromCharCode;function C(e){throw new RangeError(w[e])}function O(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function k(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+O((e=e.replace(_,".")).split("."),t).join(".")}function E(e){for(var t,r,n=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function A(e){return O(e,(function(e){var t="";return e>65535&&(t+=T((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=T(e)})).join("")}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function j(e,t,r){var n=0;for(e=r?P(e/d):e>>1,e+=P(e/t);e>S*h>>1;n+=l)e=P(e/S);return P(n+(S+1)*e/(e+p))}function M(e){var t,r,n,i,a,o,s,u,p,d,m,b=[],_=e.length,w=0,S=y,T=g;for((r=e.lastIndexOf(v))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&C("not-basic"),b.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<_;){for(a=w,o=1,s=l;i>=_&&C("invalid-input"),((u=(m=e.charCodeAt(i++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:l)>=l||u>P((c-w)/o))&&C("overflow"),w+=u*o,!(u<(p=s<=T?f:s>=T+h?h:s-T));s+=l)o>P(c/(d=l-p))&&C("overflow"),o*=d;T=j(w-a,t=b.length+1,0==a),P(w/t)>c-S&&C("overflow"),S+=P(w/t),w%=t,b.splice(w++,0,S)}return A(b)}function R(e){var t,r,n,i,a,o,s,u,p,d,m,b,_,w,S,O=[];for(b=(e=E(e)).length,t=y,r=0,a=g,o=0;o<b;++o)(m=e[o])<128&&O.push(T(m));for(n=i=O.length,i&&O.push(v);n<b;){for(s=c,o=0;o<b;++o)(m=e[o])>=t&&m<s&&(s=m);for(s-t>P((c-r)/(_=n+1))&&C("overflow"),r+=(s-t)*_,t=s,o=0;o<b;++o)if((m=e[o])<t&&++r>c&&C("overflow"),m==t){for(u=r,p=l;!(u<(d=p<=a?f:p>=a+h?h:p-a));p+=l)S=u-d,w=l-d,O.push(T(x(d+S%w,0))),u=P(S/w);O.push(T(x(u,0))),a=j(r,_,n==i),r=0,++n}++r,++t}return O.join("")}if(s={version:"1.4.1",ucs2:{decode:E,encode:A},decode:M,encode:R,toASCII:function(e){return k(e,(function(e){return b.test(e)?"xn--"+R(e):e}))},toUnicode:function(e){return k(e,(function(e){return m.test(e)?M(e.slice(4).toLowerCase()):e}))}},i&&a)if(t.exports==i)a.exports=s;else for(u in s)s.hasOwnProperty(u)&&(i[u]=s[u]);else n.punycode=s}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],60:[function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,a){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,h,p,d,g=e[l].replace(s,"%20"),y=g.indexOf(r);y>=0?(f=g.substr(0,y),h=g.substr(y+1)):(f=g,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(o,p)?i(o[p])?o[p].push(d):o[p]=[o[p],d]:o[p]=d}return o};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],61:[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,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===_typeof(e)?a(o(e),(function(o){var s=encodeURIComponent(n(o))+r;return i(e[o])?a(e[o],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[o]))})).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(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}},{}],62:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":60,"./encode":61}],63:[function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=e("buffer"),i=n.Buffer;function a(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:(a(n,r),r.Buffer=o),o.prototype=Object.create(i.prototype),a(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:19}],64:[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:19}],65:[function(e,t,r){(function(r){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=f;var n=e("simple-concat"),i=e("decompress-response"),a=e("http"),o=e("https"),s=e("once"),u=e("querystring"),c=e("url"),l=function(e){return null!==e&&"object"===_typeof(e)&&"function"==typeof e.pipe};function f(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=s(t),e.url){var n=c.parse(e.url),h=n.hostname,p=n.port,d=n.protocol,g=n.auth,y=n.path;delete e.url,h||p||d||g?Object.assign(e,{hostname:h,port:p,protocol:d,auth:g,path:y}):e.path=y}var v,m={"accept-encoding":"gzip, deflate"};e.headers&&Object.keys(e.headers).forEach((function(t){return m[t.toLowerCase()]=e.headers[t]})),e.headers=m,e.body?v=e.json&&!l(e.body)?JSON.stringify(e.body):e.body:e.form&&(v="string"==typeof e.form?e.form:u.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),v&&(e.method||(e.method="POST"),l(v)||(e.headers["content-length"]=r.byteLength(v)),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());var b=e.hostname,_=("https:"===e.protocol?o:a).request(e,(function(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();var n=c.parse(e.url).hostname;return null!==n&&n!==b&&(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")):f(e,t)}var a="function"==typeof i&&"HEAD"!==e.method;t(null,a?i(r):r)}));return _.on("timeout",(function(){_.abort(),t(new Error("Request timed out"))})),_.on("error",t),l(v)?v.on("error",t).pipe(_):_.end(v),_}f.concat=function(e,t){return f(e,(function(r,i){if(r)return t(r);n(i,(function(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((function(e){f[e]=function(t,r){return"string"==typeof t&&(t={url:t}),f(Object.assign({method:e.toUpperCase()},t),r)}}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:19,"decompress-response":17,http:66,https:39,once:53,querystring:62,"simple-concat":64,url:87}],66:[function(e,t,r){(function(t){(function(){var n=e("./lib/request"),i=e("./lib/response"),a=e("xtend"),o=e("builtin-status-codes"),s=e("url"),u=r;u.request=function(e,r){e="string"==typeof e?s.parse(e):a(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?o+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=o,u.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":68,"./lib/response":69,"builtin-status-codes":20,url:87,xtend:91}],67:[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 a(e){return"function"==typeof e}r.fetch=a(e.fetch)&&a(e.ReadableStream),r.writableStream=a(e.WritableStream),r.abortController=a(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()&&a(n().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],68:[function(e,t,r){(function(r,n,i){(function(){var a=e("./capability"),o=e("inherits"),s=e("./response"),u=e("readable-stream"),c=s.IncomingMessage,l=s.readyStates;var f=t.exports=function(e){var t,r=this;u.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&&!a.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!a.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 a.fetch&&t?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":"text"}(t,n),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(f,u.Writable),f.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===h.indexOf(r)&&(this._headers[r]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.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 s=[];if(Object.keys(i).forEach((function(e){var t=i[e].name,r=i[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var u=null;if(a.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"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:s,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var f=e._xhr=new n.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in f&&(f.responseType=e._mode),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(f.timeout=t.requestTimeout,f.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){f.setRequestHeader(e[0],e[1])})),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case l.LOADING:case l.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{f.send(o)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},f.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)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(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))},f.prototype._write=function(e,t,r){this._body.push(e),r()},f.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))},f.prototype.abort=f.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)},f.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},f.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var h=["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":67,"./response":69,_process:58,buffer:19,inherits:41,"readable-stream":84}],69:[function(e,t,r){(function(t,n,i){(function(){var a=e("./capability"),o=e("inherits"),s=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,n,o){var u=this;if(s.Readable.call(u),u._mode=n,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){t.nextTick((function(){u.emit("close")}))})),"fetch"===n){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),a.writableStream){var c=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){u._destroyed?r():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){o(!0),u._destroyed||u.push(null)},abort:function(e){o(!0),u._destroyed||u.emit("error",e)}});try{return void r.body.pipeTo(c).catch((function(e){o(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var l=r.body.getReader();!function e(){l.read().then((function(t){u._destroyed||(o(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){o(!0),u._destroyed||u.emit("error",e)}))}()}else{if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.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===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!a.overrideMimeType){var f=u.rawHeaders["mime-type"];if(f){var h=f.match(/;\s*charset=([^;])(;|$)/);h&&(u._charset=h[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};o(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,a=null;switch(t._mode){case"text":if((a=r.responseText).length>t._pos){var o=a.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(o.length),c=0;c<o.length;c++)s[c]=255&o.charCodeAt(c);t.push(s)}else t.push(o,t._charset);t._pos=a.length}break;case"arraybuffer":if(r.readyState!==u.DONE||!r.response)break;a=r.response,t.push(i.from(new Uint8Array(a)));break;case"moz-chunked-arraybuffer":if(a=r.response,r.readyState!==u.LOADING||!a)break;t.push(i.from(new Uint8Array(a)));break;case"ms-stream":if(a=r.response,r.readyState!==u.LOADING)break;var l=new n.MSStreamReader;l.onprogress=function(){l.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){e(!0),t.push(null)},l.readAsArrayBuffer(a)}t._xhr.readyState===u.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":67,_process:58,buffer:19,inherits:41,"readable-stream":84}],70:[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 a(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,s;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"))s="The ".concat(e," ").concat(n," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(a(t,"type"))}return s+=". 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},{}],71:[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=c;var i=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(c,i);for(var o=n(a.prototype),s=0;s<o.length;s++){var u=o[s];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),a.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",l)))}function l(){this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.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":73,"./_stream_writable":75,_process:58,inherits:41}],72:[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":74,inherits:41}],73:[function(e,t,r){(function(r,n){(function(){var i;t.exports=C,C.ReadableState=T;e("events").EventEmitter;var a=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),s=e("buffer").Buffer,u=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,l=e("util");c=l&&l.debuglog?l.debuglog("stream"):function(){};var f,h,p,d=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),y=e("./internal/streams/state").getHighWaterMark,v=e("../errors").codes,m=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,_=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(C,o);var S=g.errorOrDestroy,P=["error","close","destroy","pause","resume"];function T(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=y(this,t,"readableHighWaterMark",n),this.buffer=new d,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&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function C(t){if(i=i||e("./_stream_duplex"),!(this instanceof C))return new C(t);var r=this instanceof i;this._readableState=new T(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 O(e,t,r,n,i){c("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(c("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?x(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}(e,o);else if(i||(a=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(o,t)),a)S(e,a);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)o.endEmitted?S(e,new w):k(e,o,t,!0);else if(o.ended)S(e,new b);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?k(e,o,t,!1):M(e,o)):k(e,o,t,!1)}else n||(o.reading=!1,M(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function k(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&&x(e)),M(e,t)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),C.prototype.destroy=g.destroy,C.prototype._undestroy=g.undestroy,C.prototype._destroy=function(e,t){t(e)},C.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=s.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},C.prototype.unshift=function(e){return O(this,e,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(t){f||(f=e("string_decoder/").StringDecoder);var r=new f(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 E=1073741824;function A(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>=E?e=E:(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 x(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(j,e))}function j(e){var t=e._readableState;c("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,I(e)}function M(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function L(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 D(e){c("readable nexttick read 0"),e.read(0)}function N(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function B(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 F(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(U,t,e))}function U(e,t){if(c("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 H(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}C.prototype.read=function(e){c("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 c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):x(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(r,t))),null===(n=e>0?B(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&&F(this)),null!==n&&this.emit("data",n),n},C.prototype._read=function(e){S(this,new _("_read()"))},C.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,c("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:y;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",h),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){c("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var l=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,I(e))}}(n);e.on("drain",l);var f=!1;function h(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==H(i.pipes,e))&&!f&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function p(t){c("onerror",t),y(),e.removeListener("error",p),0===a(e,"error")&&S(e,t)}function d(){e.removeListener("finish",g),y()}function g(){c("onfinish"),e.removeListener("close",d),y()}function y(){c("unpipe"),n.unpipe(e)}return n.on("data",h),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",p),e.once("close",d),e.once("finish",g),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},C.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 a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=H(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},C.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,c("on readable",i.length,i.reading),i.length?x(this):i.reading||r.nextTick(D,this))),n},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(L,this),n},C.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(L,this),t},C.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(N,e,t))}(this,e)),e.paused=!1,this},C.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("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){(c("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 a=0;a<P.length;a++)e.on(P[a],this.emit.bind(this,P[a]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(C.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e("./internal/streams/async_iterator")),h(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),C._fromList=B,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(C.from=function(t,r){return void 0===p&&(p=e("./internal/streams/from")),p(C,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":70,"./_stream_duplex":71,"./internal/streams/async_iterator":76,"./internal/streams/buffer_list":77,"./internal/streams/destroy":78,"./internal/streams/from":80,"./internal/streams/state":82,"./internal/streams/stream":83,_process:58,buffer:19,events:25,inherits:41,"string_decoder/":85,util:17}],74:[function(e,t,r){t.exports=l;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=e("./_stream_duplex");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);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 l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.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",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.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)}},l.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))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":70,"./_stream_duplex":71,inherits:41}],75:[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 a;t.exports=C,C.WritableState=T;var o={deprecate:e("util-deprecate")},s=e("./internal/streams/stream"),u=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,f=e("./internal/streams/destroy"),h=e("./internal/streams/state").getHighWaterMark,p=e("../errors").codes,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,v=p.ERR_STREAM_CANNOT_PIPE,m=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,_=p.ERR_STREAM_WRITE_AFTER_END,w=p.ERR_UNKNOWN_ENCODING,S=f.errorOrDestroy;function P(){}function T(t,n,o){a=a||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=n instanceof a),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,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,a=n.writecb;if("function"!=typeof a)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,a){--t.pendingcb,n?(r.nextTick(a,i),r.nextTick(j,e,t),e._writableState.errorEmitted=!0,S(e,i)):(a(i),e._writableState.errorEmitted=!0,S(e,i),j(e,t))}(e,n,i,t,a);else{var o=A(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),i?r.nextTick(k,e,n,o,a):k(e,n,o,a)}}(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 C(t){var r=this instanceof(a=a||e("./_stream_duplex"));if(!r&&!l.call(C,this))return new C(t);this._writableState=new T(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)),s.call(this)}function O(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function k(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),j(e,t)}function E(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)a[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;a.allBuffers=u,O(e,t,!0,t.length,a,"",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 c=r.chunk,l=r.encoding,f=r.callback;if(O(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final((function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),j(e,t)}))}function j(e,t){var n=A(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(x,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")(C,s),T.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(T.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]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===C&&(e&&e._writableState instanceof T)}})):l=function(e){return e instanceof this},C.prototype.pipe=function(){S(this,new v)},C.prototype.write=function(e,t,n){var i,a=this._writableState,o=!1,s=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof n&&(n=P),a.ending?function(e,t){var n=new _;S(e,n),r.nextTick(t,n)}(this,n):(s||function(e,t,n,i){var a;return null===n?a=new b:"string"==typeof n||t.objectMode||(a=new d("chunk",["string","Buffer"],n)),!a||(S(e,a),r.nextTick(i,a),!1)}(this,a,e,n))&&(a.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else O(e,t,!1,s,n,i,a);return c}(this,a,s,e,t,n)),o},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},C.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 w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(e,t,r){r(new g("_write()"))},C.prototype._writev=null,C.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,j(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),C.prototype.destroy=f.destroy,C.prototype._undestroy=f.undestroy,C.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":70,"./_stream_duplex":71,"./internal/streams/destroy":78,"./internal/streams/state":82,"./internal/streams/stream":83,_process:58,buffer:19,inherits:41,"util-deprecate":89}],76:[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 a=e("./end-of-stream"),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function d(e){var t=e[o];if(null!==t){var r=e[h].read();null!==r&&(e[l]=null,e[o]=null,e[s]=null,t(p(r,!1)))}}function g(e){r.nextTick(d,e)}var y=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[u]?n(e[u]):t(p(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(p(void 0,!0)):t[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),y);t.exports=function(e){var t,r=Object.create(v,(i(t={},h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[h].read();n?(r[l]=null,r[o]=null,r[s]=null,e(p(n,!1))):(r[o]=e,r[s]=t)},writable:!0}),t));return r[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[l]=null,r[o]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[o];null!==n&&(r[l]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),e.on("readable",g.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":79,_process:58}],77:[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){a(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 a(e,t,r){return(t=s(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,s(n.key),n)}}function s(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 u=e("buffer").Buffer,c=e("util").inspect,l=c&&c.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 u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=i,n=o,u.prototype.copy.call(t,r,n),o+=a.data.length,a=a.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,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:19,util:17}],78:[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,a){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(a?a(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){!a&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):a?(e.nextTick(n,o),a(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:58}],79:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,a){if("function"==typeof r)return e(t,null,r);r||(r={}),a=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)}}}(a||i);var o=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){s=!1,c=!0,o||a.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,f=!0,s||a.call(t)},p=function(e){a.call(t,e)},d=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new n),a.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),a.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",l),t.on("abort",d),t.req?g():t.on("request",g)),t.on("end",h),t.on("finish",l),!1!==r.error&&t.on("error",p),t.on("close",d),function(){t.removeListener("complete",l),t.removeListener("abort",d),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",d)}}},{"../../../errors":70}],80:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],81:[function(e,t,r){var n;var i=e("../../../errors").codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(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 l,f=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new a("streams");var h=r.map((function(t,i){var a=i<r.length-1;return function(t,r,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;t.on("close",(function(){s=!0})),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},(function(e){if(e)return a(e);s=!0,a()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new o("pipe"))}}(t,a,i>0,(function(e){l||(l=e),e&&h.forEach(u),a||(h.forEach(u),f(l))}))}));return r.reduce(c)}},{"../../../errors":70,"./end-of-stream":79}],82:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},{"../../../errors":70}],83:[function(e,t,r){t.exports=e("events").EventEmitter},{events:25}],84:[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":71,"./lib/_stream_passthrough.js":72,"./lib/_stream_readable.js":73,"./lib/_stream_transform.js":74,"./lib/_stream_writable.js":75,"./lib/internal/streams/end-of-stream.js":79,"./lib/internal/streams/pipeline.js":81}],85:[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 a(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=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}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 s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){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 u(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 c(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 l(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 f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=a,a.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||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.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)},a.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":63}],86:[function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},u=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.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=u++,n=!(arguments.length<2)&&o.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":58,timers:86}],87:[function(e,t,r){var n=e("punycode"),i=e("./util");function a(){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}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){i.isString(e)&&(e=b(e));return e instanceof a?e.format():a.prototype.format.call(e)},r.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=e("querystring");function b(e,t,r){if(e&&i.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+_typeof(e));var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!r&&1===e.split("#").length){var _=u.exec(b);if(_)return this.path=b,this.href=b,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=o.exec(b);if(w){var S=(w=w[0]).toLowerCase();this.protocol=S,b=b.substr(w.length)}if(r||w||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var P="//"===b.substr(0,2);!P||w&&y[w]||(b=b.substr(2),this.slashes=!0)}if(!y[w]&&(P||w&&!v[w])){for(var T,C,O=-1,k=0;k<h.length;k++){-1!==(E=b.indexOf(h[k]))&&(-1===O||E<O)&&(O=E)}-1!==(C=-1===O?b.lastIndexOf("@"):b.lastIndexOf("@",O))&&(T=b.slice(0,C),b=b.slice(C+1),this.auth=decodeURIComponent(T)),O=-1;for(k=0;k<f.length;k++){var E;-1!==(E=b.indexOf(f[k]))&&(-1===O||E<O)&&(O=E)}-1===O&&(O=b.length),this.host=b.slice(0,O),b=b.slice(O),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var x=this.hostname.split(/\./),j=(k=0,x.length);k<j;k++){var M=x[k];if(M&&!M.match(p)){for(var R="",L=0,D=M.length;L<D;L++)M.charCodeAt(L)>127?R+="x":R+=M[L];if(!R.match(p)){var N=x.slice(0,k),I=x.slice(k+1),B=M.match(d);B&&(N.push(B[1]),I.unshift(B[2])),I.length&&(b="/"+I.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[S])for(k=0,j=l.length;k<j;k++){var H=l[k];if(-1!==b.indexOf(H)){var W=encodeURIComponent(H);W===H&&(W=escape(H)),b=b.split(H).join(W)}}var q=b.indexOf("#");-1!==q&&(this.hash=b.substr(q),b=b.slice(0,q));var V=b.indexOf("?");if(-1!==V?(this.search=b.substr(V),this.query=b.substr(V+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,V)):t&&(this.search="",this.query={}),b&&(this.pathname=b),v[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var J=this.search||"";this.path=F+J}return this.href=this.format(),this},a.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||"",a=!1,o="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(o=m.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==a?(a="//"+(a||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):a||(a=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+a+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},a.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var r=new a,n=Object.keys(this),o=0;o<n.length;o++){var s=n[o];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=e[l])}return v[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!v[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var p=f[h];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[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 g=r.pathname||"",m=r.search||"";r.path=g+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=_||b||r.host&&e.pathname,S=w,P=r.pathname&&r.pathname.split("/")||[],T=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!v[r.protocol]);if(T&&(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),w=w&&(""===d[0]||""===P[0])),_)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(!i.isNullOrUndefined(e.search)){if(T)r.hostname=r.host=P.shift(),(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(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 C=P.slice(-1)[0],O=(r.host||e.host||P.length>1)&&("."===C||".."===C)||""===C,k=0,E=P.length;E>=0;E--)"."===(C=P[E])?P.splice(E,1):".."===C?(P.splice(E,1),k++):k&&(P.splice(E,1),k--);if(!w&&!S)for(;k--;k)P.unshift("..");!w||""===P[0]||P[0]&&"/"===P[0].charAt(0)||P.unshift(""),O&&"/"!==P.join("/").substr(-1)&&P.push("");var A,x=""===P[0]||P[0]&&"/"===P[0].charAt(0);T&&(r.hostname=r.host=x?"":P.length?P.shift():"",(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift()));return(w=w||r.host&&P.length)&&!x&&P.unshift(""),P.length?r.pathname=P.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(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},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":88,punycode:59,querystring:62}],88:[function(e,t,r){t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===_typeof(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],89:[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:{})},{}],90:[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}}},{}],91:[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},{}],92:[function(e,t,r){var n=e("fable-serviceproviderbase"),i=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i;return _classCallCheck2(this,r),(i=t.call(this,e,n)).serviceType="ServiceManager",i.serviceTypes=[],i.servicesMap={},i.services={},i.serviceClasses={},i.extraServiceInitialization=!1,i}return _createClass2(r,[{key:"addServiceType",value:function(e,t){this.servicesMap.hasOwnProperty(e)?this.fable.log.warn("Adding a service type [".concat(e,"] that already exists.")):(this.servicesMap[e]={},this.serviceTypes.push(e)),"function"==typeof t&&t.isFableService?this.serviceClasses[e]=t:(this.fable.log.error("Attempted to add service type [".concat(e,"] with an invalid class. Using base service class, which will not crash but won't provide meaningful services.")),this.serviceClasses[e]=n)}},{key:"addAndInstantiateServiceType",value:function(e,t){return this.addServiceType(e,t),this.instantiateServiceProvider(e,{},"".concat(e,"-Default"))}},{key:"instantiateServiceProviderFromPrototype",value:function(e,t,r,n){var i=new n(this.fable,t,r);return this.extraServiceInitialization&&(i=this.extraServiceInitialization(i)),this.servicesMap[e][i.Hash]=i,this.services.hasOwnProperty(e)||this.setDefaultServiceInstantiation(e,i.Hash),i}},{key:"instantiateServiceProvider",value:function(e,t,r){var n=this.instantiateServiceProviderWithoutRegistration(e,t,r);return this.servicesMap[e][n.Hash]=n,this.services.hasOwnProperty(e)||this.setDefaultServiceInstantiation(e,n.Hash),n}},{key:"instantiateServiceProviderWithoutRegistration",value:function(e,t,r){var n=new this.serviceClasses[e](this.fable,t,r);return this.extraServiceInitialization&&(n=this.extraServiceInitialization(n)),n}},{key:"connectPreinitServiceProviderInstance",value:function(e){var t=e.serviceType,r=e.Hash;return e.connectFable(this.fable),this.servicesMap.hasOwnProperty(t)||(this.servicesMap[t]={}),this.servicesMap[t][r]=e,this.services.hasOwnProperty(t)||this.setDefaultServiceInstantiation(t,r),e}},{key:"setDefaultServiceInstantiation",value:function(e,t){return!!this.servicesMap[e].hasOwnProperty(t)&&(this.fable[e]=this.servicesMap[e][t],this.services[e]=this.servicesMap[e][t],!0)}}]),r}(n.CoreServiceProviderBase);t.exports=i,t.exports.ServiceProviderBase=n,t.exports.CoreServiceProviderBase=n.CoreServiceProviderBase},{"fable-serviceproviderbase":33}],93:[function(e,t,r){var n=e("fable-settings"),i=e("fable-uuid"),a=e("fable-log"),o=e("./Fable-ServiceManager.js"),s=function(){function t(r){_classCallCheck2(this,t),this._coreServices={},this._coreServices.SettingsManager=new n(r),this._coreServices.UUID=new i(this._coreServices.SettingsManager.settings),this._coreServices.Logging=new a(this._coreServices.SettingsManager.settings),this._coreServices.Logging.initialize(),this._coreServices.ServiceManager=new o(this),this.serviceManager=this._coreServices.ServiceManager,this.serviceManager.connectFable(this),this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.ServiceManager),this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.UUID),this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.Logging),this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.SettingsManager),this.serviceManager.addAndInstantiateServiceType("EnvironmentData",e("./services/Fable-Service-EnvironmentData.js")),this.serviceManager.addServiceType("Template",e("./services/Fable-Service-Template.js")),this.serviceManager.addServiceType("MetaTemplate",e("./services/Fable-Service-MetaTemplate.js")),this.serviceManager.addServiceType("Anticipate",e("./services/Fable-Service-Anticipate.js")),this.serviceManager.addAndInstantiateServiceType("DataFormat",e("./services/Fable-Service-DataFormat.js")),this.serviceManager.addAndInstantiateServiceType("DataGeneration",e("./services/Fable-Service-DataGeneration.js")),this.serviceManager.addAndInstantiateServiceType("Utility",e("./services/Fable-Service-Utility.js")),this.serviceManager.addServiceType("Operation",e("./services/Fable-Service-Operation.js")),this.serviceManager.addServiceType("RestClient",e("./services/Fable-Service-RestClient.js")),this.serviceManager.addServiceType("CSVParser",e("./services/Fable-Service-CSVParser.js")),this.serviceManager.addServiceType("Manifest",e("manyfest")),this.serviceManager.addServiceType("ObjectCache",e("cachetrax")),this.serviceManager.addServiceType("FilePersistence",e("./services/Fable-Service-FilePersistence.js"))}return _createClass2(t,[{key:"isFable",get:function(){return!0}},{key:"settings",get:function(){return this._coreServices.SettingsManager.settings}},{key:"settingsManager",get:function(){return this._coreServices.SettingsManager}},{key:"log",get:function(){return this._coreServices.Logging}},{key:"services",get:function(){return this._coreServices.ServiceManager.services}},{key:"servicesMap",get:function(){return this._coreServices.ServiceManager.servicesMap}},{key:"getUUID",value:function(){return this._coreServices.UUID.getUUID()}},{key:"fable",get:function(){return this}}]),t}();t.exports=s,t.exports.new=function(e){return new s(e)},t.exports.LogProviderBase=a.LogProviderBase,t.exports.ServiceProviderBase=o.ServiceProviderBase,t.exports.CoreServiceProviderBase=o.CoreServiceProviderBase,t.exports.precedent=n.precedent},{"./Fable-ServiceManager.js":92,"./services/Fable-Service-Anticipate.js":94,"./services/Fable-Service-CSVParser.js":95,"./services/Fable-Service-DataFormat.js":96,"./services/Fable-Service-DataGeneration.js":98,"./services/Fable-Service-EnvironmentData.js":99,"./services/Fable-Service-FilePersistence.js":100,"./services/Fable-Service-MetaTemplate.js":101,"./services/Fable-Service-Operation.js":105,"./services/Fable-Service-RestClient.js":106,"./services/Fable-Service-Template.js":107,"./services/Fable-Service-Utility.js":108,cachetrax:21,"fable-log":31,"fable-settings":36,"fable-uuid":38,manyfest:52}],94:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).serviceType="AsyncAnticipate",a.operationQueue=[],a.erroredOperations=[],a.executingOperationCount=0,a.completedOperationCount=0,a.maxOperations=1,a.lastError=void 0,a.waitingFunctions=[],a}return _createClass2(r,[{key:"checkQueue",value:function(){if(this.operationQueue.length>0&&this.executingOperationCount<this.maxOperations){var e=this.operationQueue.shift();this.executingOperationCount+=1,e(this.buildAnticipatorCallback())}else if(this.waitingFunctions.length>0&&this.executingOperationCount<1){for(var t=0;t<this.waitingFunctions.length;t++)this.waitingFunctions[t](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}}},{key:"anticipate",value:function(e){this.operationQueue.push(e),this.checkQueue()}},{key:"buildAnticipatorCallback",value:function(){var e={Called:!1,Error:void 0,OperationSet:this};return function(t){if(e.Called)throw new Error("Anticipation async callback called twice...");e.Called=!0,e.error=t,e.OperationSet.executingOperationCount-=1,e.OperationSet.completedOperationCount+=1,e.OperationSet.checkQueue()}}},{key:"wait",value:function(e){this.waitingFunctions.push(e),this.checkQueue()}}]),r}(e("../Fable-ServiceManager.js").ServiceProviderBase);t.exports=n},{"../Fable-ServiceManager.js":92}],95:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).serviceType="CSVParser",a.Header=[],a.HeaderFieldNames=[],a.Delimiter=",",a.QuoteCharacter='"',a.CleanCharacters=["\r"],a.HeaderLineIndex=0,a.HasHeader=!0,a.HasSetHeader=!1,a.EmitHeader=!1,a.EmitJSON=!0,a.EscapedQuoteString="&quot;",a.CurrentLine="",a.CurrentRecord=[],a.InQuote=!1,a.InEscapedQuote=!1,a.LinesParsed=0,a.RowsEmitted=0,a}return _createClass2(r,[{key:"marshalRowToJSON",value:function(e){if(!Array.isArray(e))return!1;for(var t=this.HeaderFieldNames.length;t<e.length;t++)this.HeaderFieldNames[t]="".concat(t);for(var r={},n=0;n<e.length;n++)r[this.HeaderFieldNames[n]]=e[n];return r}},{key:"setHeader",value:function(e){this.Header=e;for(var t=0;t<this.Header.length;t++)void 0===this.Header[t]?this.HeaderFieldNames[t]="".concat(t):this.HeaderFieldNames[t]=this.Header[t].toString()}},{key:"resetRowState",value:function(){this.CurrentRecord=[]}},{key:"pushLine",value:function(){for(var e=0;e<this.CleanCharacters.length;e++)this.CurrentLine=this.CurrentLine.replace(this.CleanCharacters[e],"");this.CurrentRecord.push(this.CurrentLine),this.CurrentLine=""}},{key:"emitRow",value:function(e){var t=void 0===e?this.EmitJSON:e;this.RowsEmitted++;var r=this.CurrentRecord;return this.CurrentRecord=[],t?this.marshalRowToJSON(r):r}},{key:"parseCSVLine",value:function(e){this.LinesParsed++;for(var t=0;t<e.length;t++)this.InQuote||e[t]!=this.Delimiter?e[t]==this.QuoteCharacter?this.InEscapedQuote?this.InEscapedQuote=!1:this.InQuote?t<e.length&&e[t+1]==this.QuoteCharacter?(this.CurrentLine+=this.EscapedQuoteString,this.InEscapedQuote=!0):this.InQuote=!1:this.InQuote=!0:this.CurrentLine+=e[t]:this.pushLine();return!this.InQuote&&(this.pushLine(),this.HasHeader&&!this.HasSetHeader&&this.RowsEmitted==this.HeaderLineIndex?(this.HasSetHeader=!0,this.setHeader(this.emitRow(!1)),!!this.EmitHeader&&this.Header):this.emitRow())}}]),r}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":33}],96:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),_defineProperty2(_assertThisInitialized(a=t.call(this,e,n,i)),"stringPadStart",(function(e,t,r){var n=e.toString();return this.stringGeneratePaddingString(n,t,r)+n})),_defineProperty2(_assertThisInitialized(a),"stringPadEnd",(function(e,t,r){var n=e.toString();return n+this.stringGeneratePaddingString(n,t,r)})),a.serviceType="DataArithmatic",a._Regex_formatterInsertCommas=/.{1,3}/g,a._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,a._Regex_formatterDollarsRemoveCommas=/,/gi,a._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi,a._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g,a._Value_MoneySign_Currency="$",a._Value_NaN_Currency="--",a._Value_GroupSeparator_Number=",",a._Value_Prefix_StringHash="HSH",a._Value_Clean_formatterCleanNonAlpha="",a._UseEngineStringStartsWith="function"==typeof String.prototype.startsWith,a._UseEngineStringEndsWith="function"==typeof String.prototype.endsWith,a}return _createClass2(r,[{key:"stringReverse",value:function(e){return e.split("").reverse().join("")}},{key:"stringStartsWith",value:function(e,t,r){return this._UseEngineStringStartsWith?e.startsWith(t,r):this.stringStartsWith_Polyfill.call(e,t,r)}},{key:"stringStartsWith_Polyfill",value:function(e,t){return this.slice(t||0,e.length)===e}},{key:"stringEndsWith",value:function(e,t,r){return this._UseEngineStringEndsWith?e.endsWith(t,r):this.stringEndsWith_Polyfill.call(e,t,r)}},{key:"stringEndsWith_Polyfill",value:function(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}},{key:"insecureStringHash",value:function(e){for(var t=0,r=e.length,n=0;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return"".concat(this._Value_Prefix_StringHash).concat(t)}},{key:"capitalizeEachWord",value:function(e){return e.replace(this._Regex_formatterCapitalizeEachWord,(function(e){return e.charAt(0).toUpperCase()+e.substr(1)}))}},{key:"cleanEnclosureWrapCharacters",value:function(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}},{key:"cleanNonAlphaCharacters",value:function(e){return"string"==typeof e&&""!=e?e.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha):""}},{key:"formatterInsertCommas",value:function(e){var t=this.stringReverse(e).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(t)}},{key:"processAddCommasToNumberRegex",value:function(e,t,r,n,i,a){return t+(i?this.formatterInsertCommas(n)+i+a:this.formatterInsertCommas(n+a))}},{key:"formatterAddCommasToNumber",value:function(e){return e.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}},{key:"formatterDollars",value:function(e){var t=parseFloat(e).toFixed(2);return isNaN(t)&&("string"==typeof e&&(t=parseFloat(e.replace(this._Value_MoneySign_Currency,"").replace(this._Regex_formatterDollarsRemoveCommas,"")).toFixed(2)),isNaN(t))?this._Value_NaN_Currency:"$".concat(this.formatterAddCommasToNumber(t))}},{key:"formatterRoundNumber",value:function(e,t){var r=void 0===t?2:t,n=parseFloat(e).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}},{key:"stringGeneratePaddingString",value:function(e,t,r){var n=t>>0;String(void 0!==r?r:" ");if(e.length>t)return"";var i=t-e.length;return i>r.length&&(r+=r.repeat(n/r.length)),r.slice(0,i)}},{key:"formatTimeSpan",value:function(e){if("number"!=typeof e)return"";var t=parseInt(e%1e3),r=parseInt(e/1e3%60),n=parseInt(e/6e4%60),i=parseInt(e/36e5);return"".concat(this.stringPadStart(i,2,"0"),":").concat(this.stringPadStart(n,2,"0"),":").concat(this.stringPadStart(r,2,"0"),".").concat(this.stringPadStart(t,3,"0"))}},{key:"formatTimeDelta",value:function(e,t){return"number"!=typeof e||"number"!=typeof t?"":this.formatTimeSpan(t-e)}},{key:"getMonthFromDate",value:function(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]}},{key:"getMonthAbbreviatedFromDate",value:function(e){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]}},{key:"formatSortableStringFromDate",value:function(e){return e.getFullYear()+this.stringPadStart(e.getMonth(),2,"0")+this.stringPadStart(e.getDate(),2,"0")}},{key:"stringBeforeMatch",value:function(e,t){return e.split(t)[0]}},{key:"stringAfterMatch",value:function(e,t){var r=e.indexOf(t);return r<0||r+t.length>=e.length?"":e.substring(r+t.length)}},{key:"stringCountEnclosures",value:function(e,t,r){for(var n="string"==typeof e?e:"",i="string"==typeof t?t:"(",a="string"==typeof r?r:")",o=0,s=0,u=0;u<n.length;u++)n[u]==i?(0==s&&o++,s++):n[u]==a&&s--;return o}},{key:"stringGetEnclosureValueByIndex",value:function(e,t,r,n){for(var i="string"==typeof e?e:"",a="number"==typeof t?t:0,o="string"==typeof r?r:"(",s="string"==typeof n?n:")",u=0,c=0,l=!1,f=0,h=0,p=0;p<i.length;p++)i[p]==o?1==++c&&a==++u-1&&(l=!0,f=p):i[p]==s&&0==--c&&l&&h<=f&&(h=p,l=!1);return u<=a?"":h>0&&h>f?i.substring(f+1,h):i.substring(f+1)}},{key:"stringRemoveEnclosureByIndex",value:function(e,t,r,n){for(var i="string"==typeof e?e:"",a="number"==typeof t?t:0,o="string"==typeof r?r:"(",s="string"==typeof n?n:")",u=0,c=0,l=!1,f=0,h=0,p=0;p<i.length;p++)i[p]==o?1==++c&&a==++u-1&&(l=!0,f=p):i[p]==s&&0==--c&&l&&h<=f&&(h=p,l=!1);if(u<=a)return i;var d="";return f>1&&(d=i.substring(0,f)),i.length>h+1&&h>f&&(d+=i.substring(h+1)),d}}]),r}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":33}],97:[function(e,t,r){t.exports={DefaultIntegerMinimum:0,DefaultIntegerMaximum:9999999,DefaultNumericStringLength:10,MonthSet:["January","February","March","April","May","June","July","August","September","October","November","December"],WeekDaySet:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ColorSet:["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],SurNameSet:["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],NameSet:["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]}},{}],98:[function(e,t,r){var n=function(t){_inherits(n,t);var r=_createSuper(n);function n(t,i,a){var o;return _classCallCheck2(this,n),(o=r.call(this,t,i,a)).serviceType="DataGeneration",o.defaultData=e("./Fable-Service-DataGeneration-DefaultValues.json"),o}return _createClass2(n,[{key:"randomIntegerBetween",value:function(e,t){return Math.floor(Math.random()*(t-e))+e}},{key:"randomIntegerUpTo",value:function(e){return this.randomIntegerBetween(0,e)}},{key:"randomInteger",value:function(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum)}},{key:"randomNumericString",value:function(e,t){var r=void 0===e?10:e,n=void 0===t?Math.pow(10,r)-1:t;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(n),e,"0")}},{key:"randomMonth",value:function(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)]}},{key:"randomDayOfWeek",value:function(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)]}},{key:"randomColor",value:function(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)]}},{key:"randomName",value:function(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)]}},{key:"randomSurname",value:function(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)]}}]),n}(e("../Fable-ServiceManager.js").ServiceProviderBase);t.exports=n},{"../Fable-ServiceManager.js":92,"./Fable-Service-DataGeneration-DefaultValues.json":97}],99:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).serviceType="EnvironmentData",a.Environment="node.js",a}return _createClass2(r)}(e("../Fable-ServiceManager.js").ServiceProviderBase);t.exports=n},{"../Fable-ServiceManager.js":92}],100:[function(e,t,r){(function(r){(function(){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=e("fs"),a=e("path"),o=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,a){var o;return _classCallCheck2(this,n),(o=t.call(this,e,i,a)).serviceType="FilePersistence",o.options.hasOwnProperty("Mode")||(o.options.Mode=parseInt("0777",8)&~r.umask()),o.currentInputFolder="/tmp",o.currentOutputFolder="/tmp",o}return _createClass2(n,[{key:"joinPath",value:function(){return a.resolve.apply(a,arguments)}},{key:"existsSync",value:function(e){return i.existsSync(e)}},{key:"exists",value:function(e,t){return t(null,this.existsSync(e))}},{key:"writeFileSync",value:function(e,t,r){var n=void 0===r?"utf8":r;return i.writeFileSync(e,t,n)}},{key:"appendFileSync",value:function(e,t,r){var n=void 0===r?"utf8":r;return i.appendFileSync(e,t,n)}},{key:"deleteFileSync",value:function(e){return i.unlinkSync(e)}},{key:"deleteFolderSync",value:function(e){return i.rmdirSync(e)}},{key:"writeFileSyncFromObject",value:function(e,t){return this.writeFileSync(e,JSON.stringify(t,null,4))}},{key:"writeFileSyncFromArray",value:function(e,t){if(!Array.isArray(t))return this.log.error("File Persistence Service attempted to write ".concat(e," from array but the expected array was not an array (it was a ").concat(_typeof(t),").")),Error("Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).");for(var r=0;r<t.length;r++)return this.appendFileSync(e,"".concat(t[r],"\n"))}},{key:"getDefaultOutputPath",value:function(e){return a.join(this.currentOutputFolder,e)}},{key:"dataFolderWriteSync",value:function(e,t){return this.writeFileSync(this.getDefaultOutputPath(e),t)}},{key:"dataFolderWriteSyncFromObject",value:function(e,t){return this.writeFileSyncFromObject(this.getDefaultOutputPath(e),t)}},{key:"dataFolderWriteSyncFromArray",value:function(e,t){return this.writeFileSyncFromArray(this.getDefaultOutputPath(e),t)}},{key:"makeFolderRecursive",value:function(e,t){var r=this,n=e;if("string"==typeof e)n={Path:e};else if("object"!==_typeof(e))return t(new Error("Parameters object or string not properly passed to recursive folder create.")),!1;return"string"!=typeof n.Path?(t(new Error("Parameters object needs a path to run the folder create operation.")),!1):(n.hasOwnProperty("Mode")||(n.Mode=this.options.Mode),void 0===n.CurrentPathIndex?(n.ActualPath=a.normalize(n.Path),n.ActualPathParts=n.ActualPath.split(a.sep),n.CurrentPathIndex=0,n.CurrentPath=""):(n.CurrentPath==a.sep?n.CurrentPath=n.CurrentPath+n.ActualPathParts[n.CurrentPathIndex]:n.CurrentPath=n.CurrentPath+a.sep+n.ActualPathParts[n.CurrentPathIndex],n.CurrentPathIndex++),n.CurrentPathIndex>=n.ActualPathParts.length?(t(null),!0):void i.open(n.CurrentPath+a.sep+n.ActualPathParts[n.CurrentPathIndex],"r",(function(e,o){if(o&&i.closeSync(o),!e||"ENOENT"!=e.code)return r.makeFolderRecursive(n,t);i.mkdir(n.CurrentPath+a.sep+n.ActualPathParts[n.CurrentPathIndex],n.Mode,(function(e){return e?(t(e),!1):r.makeFolderRecursive(n,t)}))})))}}]),n}(n);t.exports=o}).call(this)}).call(this,e("_process"))},{"../Fable-ServiceManager.js":92,_process:58,fs:18,path:54}],101:[function(e,t,r){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=e("./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js"),a=e("./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,o){var s;return _classCallCheck2(this,r),(s=t.call(this,e,n,o)).serviceType="MetaTemplate",s.WordTree=new i,s.StringParser=new a(s.fable.services.Utility.eachLimit),s.ParseTree=s.WordTree.ParseTree,s}return _createClass2(r,[{key:"addPattern",value:function(e,t,r){return this.WordTree.addPattern(e,t,r)}},{key:"addPatternAsync",value:function(e,t,r){return this.WordTree.addPatternAsync(e,t,r)}},{key:"parseString",value:function(e,t,r){return this.StringParser.parseString(e,this.ParseTree,t,r)}}]),r}(n);t.exports=o},{"../Fable-ServiceManager.js":92,"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":102,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":103}],102:[function(e,t,r){var n=function(){function e(t){_classCallCheck2(this,e),this.eachLimit=t}return _createClass2(e,[{key:"newParserState",value:function(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}},{key:"appendOutputBuffer",value:function(e,t){t.OutputBuffer+=e}},{key:"flushOutputBuffer",value:function(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}},{key:"resetOutputBuffer",value:function(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}},{key:"parseCharacter",value:function(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"))){if(!t.Pattern.isAsync)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);this.log.error("MetaTemplate: The pattern ".concat(t.Pattern.PatternStartString," is asynchronous and cannot be used in a synchronous parser.")),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}},{key:"parseCharacterAsync",value:function(e,t,r,n){var i=this;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.Pattern.isAsync?t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,(function(e,r){return e&&console.log("Precedent ERROR: Async template error happened parsing ".concat(t.Pattern.PatternStart," ... ").concat(t.Pattern.PatternEnd,": ").concat(e)),t.OutputBuffer=r,i.resetOutputBuffer(t),n()})):(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),n())}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"))return this.resetOutputBuffer(t),n();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.Pattern.isAsync?t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,(function(e,r){return e&&console.log("Precedent ERROR: Async template error happened parsing ".concat(t.Pattern.PatternStart," ... ").concat(t.Pattern.PatternEnd,": ").concat(e)),t.OutputBuffer=r,i.resetOutputBuffer(t),n()})):(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),n())}return t.PatternMatch||(t.ParseTree.hasOwnProperty(e)?(this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0):this.appendOutputBuffer(e,t)),n()}},{key:"parseString",value:function(e,t,r,n){var i=this;if("function"!=typeof n){for(var a=this.newParserState(t),o=0;o<e.length;o++)this.parseCharacter(e[o],a,r,n);return this.flushOutputBuffer(a),a.Output}var s=this.newParserState(t);s.Asynchronous=!0,this.eachLimit(e,1,(function(e,t){i.parseCharacterAsync(e,s,r,t)}),(function(e){i.flushOutputBuffer(s),n(e,s.Output)}))}}]),e}();t.exports=n},{}],103:[function(e,t,r){var n=function(){function e(){_classCallCheck2(this,e),this.ParseTree={}}return _createClass2(e,[{key:"addChild",value:function(e,t){return e.hasOwnProperty(t)||(e[t]={}),e[t]}},{key:"addEndChild",value:function(e,t){return e.hasOwnProperty("PatternEnd")||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}},{key:"addPattern",value:function(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;for(var n=this.ParseTree,i=0;i<e.length;i++)n=this.addChild(n,e[i],i);n.hasOwnProperty("PatternEnd")||(n.PatternEnd={});for(var a="string"==typeof t?t:e,o=0;o<a.length;o++)n=this.addEndChild(n,a[o],o);return n.PatternStartString=e,n.PatternEndString=a,n.Parse="function"==typeof r?r:"string"==typeof r?function(){return r}:function(e){return e},n}},{key:"addPatternAsync",value:function(e,t,r){var n=this.addPattern(e,t,r);n&&(n.isAsync=!0)}}]),e}();t.exports=n},{}],104:[function(e,t,r){t.exports={Metadata:{UUID:!1,Hash:!1,Title:"",Summary:"",Version:0},Status:{Completed:!1,CompletionProgress:0,CompletionTimeElapsed:0,Steps:1,StepsCompleted:0,StartTime:0,EndTime:0},Errors:[],Log:[]}},{}],105:[function(e,t,r){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=JSON.stringify(e("./Fable-Service-Operation-DefaultSettings.js")),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,a){var o;return _classCallCheck2(this,r),(o=t.call(this,e,n,a)).serviceType="PhasedOperation",o.state=JSON.parse(i),o.state.Metadata.Hash=o.Hash,o.state.Metadata.UUID=o.UUID,o.name="string"==typeof o.options.Name?o.options.Name:"Unnamed Operation ".concat(o.state.Metadata.UUID),o.log=_assertThisInitialized(o),o}return _createClass2(r,[{key:"writeOperationLog",value:function(e,t,r){this.state.Log.push("".concat((new Date).toUTCString()," [").concat(e,"]: ").concat(t)),"object"==_typeof(r)&&this.state.Log.push(JSON.stringify(r))}},{key:"writeOperationErrors",value:function(e,t){this.state.Errors.push("".concat(e)),"object"==_typeof(t)&&this.state.Errors.push(JSON.stringify(t))}},{key:"trace",value:function(e,t){this.writeOperationLog("TRACE",e,t),this.fable.log.trace(e,t)}},{key:"debug",value:function(e,t){this.writeOperationLog("DEBUG",e,t),this.fable.log.debug(e,t)}},{key:"info",value:function(e,t){this.writeOperationLog("INFO",e,t),this.fable.log.info(e,t)}},{key:"warn",value:function(e,t){this.writeOperationLog("WARN",e,t),this.fable.log.warn(e,t)}},{key:"error",value:function(e,t){this.writeOperationLog("ERROR",e,t),this.writeOperationErrors(e,t),this.fable.log.error(e,t)}},{key:"fatal",value:function(e,t){this.writeOperationLog("FATAL",e,t),this.writeOperationErrors(e,t),this.fable.log.fatal(e,t)}}]),r}(n);t.exports=a},{"../Fable-ServiceManager.js":92,"./Fable-Service-Operation-DefaultSettings.js":104}],106:[function(e,t,r){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=e("simple-get"),a=e("cookie"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).TraceLog=!1,(a.options.TraceLog||a.fable.TraceLog)&&(a.TraceLog=!0),a.dataFormat=a.fable.services.DataFormat,a.serviceType="RestClient",a.cookie=!1,a.prepareRequestOptions=function(e){return e},a}return _createClass2(r,[{key:"prepareCookies",value:function(e){if(this.cookie){var t=this.cookie;e.hasOwnProperty("headers")||(e.headers={});var r=Object.keys(t);r.length>0&&(e.headers.cookie=a.serialize(r[0],t[r[0]]))}return e}},{key:"preRequest",value:function(e){var t=this.prepareCookies(e);return this.prepareRequestOptions(t)}},{key:"executeChunkedRequest",value:function(e,t){var r=this,n=this.preRequest(e);return n.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(n.method," request to ").concat(n.url," at ").concat(n.RequestStartTime)),i(n,(function(e,i){if(e)return t(e,i);if(r.TraceLog){var a=r.fable.log.getTimeStamp();r.fable.log.debug("--\x3e ".concat(n.method," connected in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,a),"ms code ").concat(i.statusCode))}var o="";i.on("data",(function(e){if(r.TraceLog){var t=r.fable.log.getTimeStamp();r.fable.log.debug("--\x3e ".concat(n.method," data chunk size ").concat(e.length,"b received in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,t),"ms"))}o+=e})),i.on("end",(function(){if(r.TraceLog){var a=r.fable.log.getTimeStamp();r.fable.log.debug("==> ".concat(n.method," completed data size ").concat(o.length,"b received in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,a),"ms"))}return t(e,i,o)}))}))}},{key:"executeJSONRequest",value:function(e,t){var r=this;e.json=!0;var n=this.preRequest(e);return n.hasOwnProperty("headers")||(n.headers={}),n.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(n.method," JSON request to ").concat(n.url," at ").concat(n.RequestStartTime)),i(n,(function(e,i){if(e)return t(e,i);if(r.TraceLog){var a=r.fable.log.getTimeStamp();r.fable.log.debug("--\x3e JSON ".concat(n.method," connected in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,a),"ms code ").concat(i.statusCode))}var o="";i.on("data",(function(e){if(r.TraceLog){var t=r.fable.log.getTimeStamp();r.fable.log.debug("--\x3e JSON ".concat(n.method," data chunk size ").concat(e.length,"b received in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,t),"ms"))}o+=e})),i.on("end",(function(){if(r.TraceLog){var a=r.fable.log.getTimeStamp();r.fable.log.debug("==> JSON ".concat(n.method," completed - received in ").concat(r.dataFormat.formatTimeDelta(n.RequestStartTime,a),"ms"))}return t(e,i,JSON.parse(o))}))}))}},{key:"getJSON",value:function(e,t){var r="object"==_typeof(e)?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeJSONRequest(r,t)}},{key:"putJSON",value:function(e,t){return"object"!=_typeof(e.body)?t(new Error("PUT JSON Error Invalid options object")):(e.method="PUT",this.executeJSONRequest(e,t))}},{key:"postJSON",value:function(e,t){return"object"!=_typeof(e.body)?t(new Error("POST JSON Error Invalid options object")):(e.method="POST",this.executeJSONRequest(e,t))}},{key:"patchJSON",value:function(e,t){return"object"!=_typeof(e.body)?t(new Error("PATCH JSON Error Invalid options object")):(e.method="PATCH",this.executeJSONRequest(e,t))}},{key:"headJSON",value:function(e,t){return"object"!=_typeof(e.body)?t(new Error("HEAD JSON Error Invalid options object")):(e.method="HEAD",this.executeJSONRequest(e,t))}},{key:"delJSON",value:function(e,t){return e.method="DELETE",this.executeJSONRequest(e,t)}},{key:"getRawText",value:function(e,t){var r="object"==_typeof(e)?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeChunkedRequest(r,t)}}]),r}(n);t.exports=o},{"../Fable-ServiceManager.js":92,cookie:24,"simple-get":65}],107:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck2(this,r),(a=t.call(this,e,n,i)).serviceType="Template",a.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},a.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},a.renderFunction=!1,a.templateString=!1,a}return _createClass2(r,[{key:"renderTemplate",value:function(e){return this.renderFunction(e)}},{key:"templateFunction",value:function(e){return this.renderTemplate.bind(this)}},{key:"buildTemplateFunction",value:function(e,t){var r=this;return this.TemplateSource="__p+='"+e.replace(this.Matchers.Escaper,(function(e){return"\\".concat(r.templateEscapes[e])})).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,(function(e,t){return"'+\n(".concat(decodeURIComponent(t),")+\n'")})).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,(function(e,t){return"';\n".concat(decodeURIComponent(t),"\n;__p+='")}))+"';\n",this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n"),this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n"),this.renderFunction=new Function("pTemplateDataObject",this.TemplateSource),void 0!==t?this.renderFunction(t):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}]),r}(e("../Fable-ServiceManager.js").ServiceProviderBase);t.exports=n},{"../Fable-ServiceManager.js":92}],108:[function(e,t,r){var n=e("../Fable-ServiceManager.js").ServiceProviderBase,i=e("async.waterfall"),a=e("async.eachlimit"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,o){var s;return _classCallCheck2(this,r),(s=t.call(this,e,n,o)).templates={},s.waterfall=i,s.eachLimit=a,s}return _createClass2(r,[{key:"extend",value:function(e){for(var t=0;t<(arguments.length<=1?0:arguments.length-1);t++){var r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if("object"===_typeof(r))for(var n=Object.keys(r),i=0;i<n.length;i++)e[n[i]]=r[n[i]]}return e}},{key:"template",value:function(e,t){return this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(e,t)}},{key:"buildHashedTemplate",value:function(e,t,r){var n=this.fable.serviceManager.instantiateServiceProvider("Template",{},e);return this.templates[e]=n.buildTemplateFunction(t,r),this.templates[e]}},{key:"chunk",value:function(e,t,r){var n=_toConsumableArray(e),i="number"==typeof t?t:0,a=void 0!==r?r:[];if(i<=0)return a;for(;n.length;)a.push(n.splice(0,i));return a}},{key:"isoStringToDate",value:function(e){var t=e.split(/\D+/),r=new Date,n=0,i=0;return r.setUTCFullYear(parseInt(t[0])),r.setUTCMonth(parseInt(t[1]-1)),r.setUTCDate(parseInt(t[2])),r.setUTCHours(parseInt(t[3])),r.setUTCMinutes(parseInt(t[4])),r.setUTCSeconds(parseInt(t[5])),r.setUTCMilliseconds(parseInt(t[6])),(t[7]||t[8])&&(t[8]&&(i=parseInt(t[8])/60),n=parseInt(t[7])+i,"+"==e.substr(-6,1)&&(n*=-1)),r.setHours(r.getHours()+n),r}}]),r}(n);t.exports=o},{"../Fable-ServiceManager.js":92,"async.eachlimit":1,"async.waterfall":15}]},{},[93])(93)}));
12
12
  //# sourceMappingURL=fable.compatible.min.js.map