@player-ui/metrics-plugin 0.4.0-next.10 → 0.4.0-next.12

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.
@@ -196,6 +196,7 @@ class Registry {
196
196
  __webpack_require__.r(__webpack_exports__);
197
197
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicabilityPlugin", function() { return ApplicabilityPlugin; });
198
198
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AssetTransformCorePlugin", function() { return AssetTransformCorePlugin; });
199
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BINDING_BRACKETS_REGEX", function() { return BINDING_BRACKETS_REGEX; });
199
200
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BindingInstance", function() { return BindingInstance; });
200
201
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BindingParser", function() { return BindingParser; });
201
202
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Builder", function() { return Builder; });
@@ -262,10 +263,10 @@ __webpack_require__.r(__webpack_exports__);
262
263
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withoutContext", function() { return withoutContext; });
263
264
  /* harmony import */ var _player_ui_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @player-ui/types */ "./bazel-out/k8-fastbuild/bin/core/types/dist/index.esm.js");
264
265
  /* harmony import */ var _player_ui_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_player_ui_types__WEBPACK_IMPORTED_MODULE_0__);
265
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _player_ui_types__WEBPACK_IMPORTED_MODULE_0__) if(["default","ApplicabilityPlugin","AssetTransformCorePlugin","BindingInstance","BindingParser","Builder","ConsoleLogger","ConstantsController","DataController","DependencyMiddleware","DependencyModel","DependencyTracker","EMPTY_NODE","ExpNodeOpaqueIdentifier","ExpressionEvaluator","FlowController","FlowExpPlugin","FlowInstance","LocalModel","LocalStateStore","NOOPDataModel","NOOP_MODEL","NOT_STARTED_STATE","NodeType","NoopLogger","Parser","PipelinedDataModel","Player","ProxyLogger","ROOT_BINDING","Resolver","SCHEMA_VALIDATION_PROVIDER_NAME","SIMPLE_BINDING_REGEX","SchemaController","StringResolverPlugin","SwitchPlugin","TapableLogger","TemplatePlugin","VALIDATION_PROVIDER_NAME_SYMBOL","VIEW_VALIDATION_PROVIDER_NAME","ValidationBindingTrackerViewPlugin","ValidationController","ValidationMiddleware","ValidatorRegistry","ViewController","ViewInstance","caresAboutDataChanges","constructModelForPipeline","findClosestNodeAtPosition","findInArray","findNextExp","getBindingSegments","isBinding","isExpressionNode","isObjectExpression","maybeConvertToNum","parse","parseExpression","removeBindingAndChildrenFromMap","resolveDataRefs","resolveDataRefsInString","resolveExpressionsInString","severities","toModel","toNodeResolveOptions","withParser","withoutContext"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _player_ui_types__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
266
+ /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _player_ui_types__WEBPACK_IMPORTED_MODULE_0__) if(["default","ApplicabilityPlugin","AssetTransformCorePlugin","BINDING_BRACKETS_REGEX","BindingInstance","BindingParser","Builder","ConsoleLogger","ConstantsController","DataController","DependencyMiddleware","DependencyModel","DependencyTracker","EMPTY_NODE","ExpNodeOpaqueIdentifier","ExpressionEvaluator","FlowController","FlowExpPlugin","FlowInstance","LocalModel","LocalStateStore","NOOPDataModel","NOOP_MODEL","NOT_STARTED_STATE","NodeType","NoopLogger","Parser","PipelinedDataModel","Player","ProxyLogger","ROOT_BINDING","Resolver","SCHEMA_VALIDATION_PROVIDER_NAME","SIMPLE_BINDING_REGEX","SchemaController","StringResolverPlugin","SwitchPlugin","TapableLogger","TemplatePlugin","VALIDATION_PROVIDER_NAME_SYMBOL","VIEW_VALIDATION_PROVIDER_NAME","ValidationBindingTrackerViewPlugin","ValidationController","ValidationMiddleware","ValidatorRegistry","ViewController","ViewInstance","caresAboutDataChanges","constructModelForPipeline","findClosestNodeAtPosition","findInArray","findNextExp","getBindingSegments","isBinding","isExpressionNode","isObjectExpression","maybeConvertToNum","parse","parseExpression","removeBindingAndChildrenFromMap","resolveDataRefs","resolveDataRefsInString","resolveExpressionsInString","severities","toModel","toNodeResolveOptions","withParser","withoutContext"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _player_ui_types__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
266
267
  /* harmony import */ var tapable_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tapable-ts */ "./node_modules/tapable-ts/dist/hooks.mjs");
267
- /* harmony import */ var nested_error_stacks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! nested-error-stacks */ "./node_modules/nested-error-stacks/index.js");
268
- /* harmony import */ var nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(nested_error_stacks__WEBPACK_IMPORTED_MODULE_2__);
268
+ /* harmony import */ var ts_nested_error__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ts-nested-error */ "./node_modules/ts-nested-error/build/nested-error.js");
269
+ /* harmony import */ var ts_nested_error__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ts_nested_error__WEBPACK_IMPORTED_MODULE_2__);
269
270
  /* harmony import */ var arr_flatten__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! arr-flatten */ "./node_modules/arr-flatten/index.js");
270
271
  /* harmony import */ var arr_flatten__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(arr_flatten__WEBPACK_IMPORTED_MODULE_3__);
271
272
  /* harmony import */ var parsimmon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! parsimmon */ "./node_modules/parsimmon/build/parsimmon.umd.min.js");
@@ -377,7 +378,8 @@ const isIdentifierChar = (char) => {
377
378
  return false;
378
379
  }
379
380
  const charCode = char.charCodeAt(0);
380
- return charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 90 || charCode >= 97 && charCode <= 122 || charCode === 95 || charCode === 45 || charCode === 64;
381
+ const matches = charCode === 32 || charCode === 34 || charCode === 39 || charCode === 40 || charCode === 41 || charCode === 42 || charCode === 46 || charCode === 61 || charCode === 91 || charCode === 93 || charCode === 96 || charCode === 123 || charCode === 125;
382
+ return !matches;
381
383
  };
382
384
  const parse$1 = (path) => {
383
385
  let index = 1;
@@ -663,7 +665,7 @@ function resolveBindingAST(bindingPathNode, options, hooks) {
663
665
  try {
664
666
  return options.convertToPath(options.getValue(nestedResolvedValue.path));
665
667
  } catch (e) {
666
- throw new nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default.a(`Unable to resolve path segment: ${nestedResolvedValue.path}`, e);
668
+ throw new ts_nested_error__WEBPACK_IMPORTED_MODULE_2__["NestedError"](`Unable to resolve path segment: ${nestedResolvedValue.path}`, e);
667
669
  }
668
670
  }
669
671
  if (node.name === "Expression") {
@@ -671,7 +673,7 @@ function resolveBindingAST(bindingPathNode, options, hooks) {
671
673
  const actualValue = options.evaluate(node.value);
672
674
  return options.convertToPath(actualValue);
673
675
  } catch (e) {
674
- throw new nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default.a(`Unable to resolve path: ${node.value}`, e);
676
+ throw new ts_nested_error__WEBPACK_IMPORTED_MODULE_2__["NestedError"](`Unable to resolve path: ${node.value}`, e);
675
677
  }
676
678
  }
677
679
  throw new Error(`Unable to resolve value for node: ${node.name}`);
@@ -741,6 +743,8 @@ var __spreadValues$d = (a, b) => {
741
743
  return a;
742
744
  };
743
745
  const SIMPLE_BINDING_REGEX = /^[\w\-@]+(\.[\w\-@]+)*$/;
746
+ const BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
747
+ const LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
744
748
  const DEFAULT_OPTIONS = {
745
749
  get: () => {
746
750
  throw new Error("Not Implemented");
@@ -765,7 +769,7 @@ class BindingParser {
765
769
  }
766
770
  normalizePath(path, resolveOptions) {
767
771
  var _a, _b;
768
- if (path.match(SIMPLE_BINDING_REGEX) && this.hooks.skipOptimization.call(path) !== true) {
772
+ if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
769
773
  return { path: path.split("."), updates: void 0 };
770
774
  }
771
775
  const ast = (_a = this.parseCache[path]) != null ? _a : parse$1(path);
@@ -776,7 +780,7 @@ class BindingParser {
776
780
  try {
777
781
  return resolveBindingAST(ast.path, resolveOptions, this.hooks);
778
782
  } catch (e) {
779
- throw new nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default.a(`Cannot resolve binding: ${path}`, e);
783
+ throw new ts_nested_error__WEBPACK_IMPORTED_MODULE_2__["NestedError"](`Cannot resolve binding: ${path}`, e);
780
784
  }
781
785
  }
782
786
  getBindingForNormalizedResult(normalized) {
@@ -4028,6 +4032,14 @@ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
4028
4032
  const SCHEMA_VALIDATION_PROVIDER_NAME = "schema";
4029
4033
  const VIEW_VALIDATION_PROVIDER_NAME = "view";
4030
4034
  const VALIDATION_PROVIDER_NAME_SYMBOL = Symbol.for("validation-provider-name");
4035
+ function isSubset(subset, containingSet) {
4036
+ if (subset.size > containingSet.size)
4037
+ return false;
4038
+ for (const entry of subset)
4039
+ if (!containingSet.has(entry))
4040
+ return false;
4041
+ return true;
4042
+ }
4031
4043
  function createStatefulValidationObject(obj) {
4032
4044
  return {
4033
4045
  value: obj,
@@ -4090,23 +4102,26 @@ class ValidatedBinding {
4090
4102
  }
4091
4103
  }
4092
4104
  runApplicableValidations(runner, canDismiss) {
4093
- this.applicableValidations = this.applicableValidations.map((obj) => {
4105
+ this.applicableValidations = this.applicableValidations.map((originalValue) => {
4094
4106
  var _a, _b, _c;
4095
- if (obj.state === "dismissed") {
4096
- return obj;
4107
+ if (originalValue.state === "dismissed") {
4108
+ return originalValue;
4097
4109
  }
4098
- const blocking = (_a = obj.value.blocking) != null ? _a : obj.value.severity === "warning" && "once" || true;
4110
+ const blocking = (_a = originalValue.value.blocking) != null ? _a : originalValue.value.severity === "warning" && "once" || true;
4111
+ const obj = Object(timm__WEBPACK_IMPORTED_MODULE_7__["setIn"])(originalValue, ["value", "blocking"], blocking);
4099
4112
  const isBlockingNavigation = blocking === true || blocking === "once" && !canDismiss;
4100
- const dismissable = canDismiss && blocking === "once";
4101
- if (this.currentPhase === "navigation" && obj.state === "active" && dismissable) {
4113
+ if (this.currentPhase === "navigation" && obj.state === "active" && obj.value.blocking !== true) {
4102
4114
  if (obj.value.severity === "warning") {
4103
4115
  const warn = obj;
4104
- if (warn.dismissable && warn.response.dismiss) {
4116
+ if (warn.dismissable && warn.response.dismiss && (warn.response.blocking !== "once" || !warn.response.blocking)) {
4105
4117
  warn.response.dismiss();
4106
4118
  } else {
4119
+ if ((warn == null ? void 0 : warn.response.blocking) === "once") {
4120
+ warn.response.blocking = false;
4121
+ }
4107
4122
  warn.dismissable = true;
4108
4123
  }
4109
- return obj;
4124
+ return warn;
4110
4125
  }
4111
4126
  }
4112
4127
  const response = runner(obj.value);
@@ -4133,6 +4148,7 @@ class ValidatedBinding {
4133
4148
  });
4134
4149
  }
4135
4150
  update(phase, canDismiss, runner) {
4151
+ const newApplicableValidations = [];
4136
4152
  if (phase === "load" && this.currentPhase !== void 0) {
4137
4153
  return;
4138
4154
  }
@@ -4150,8 +4166,13 @@ class ValidatedBinding {
4150
4166
  ...this.validationsByState.change
4151
4167
  ];
4152
4168
  } else if (phase === "navigation" && (this.currentPhase === "load" || this.currentPhase === "change")) {
4169
+ this.applicableValidations.forEach((element) => {
4170
+ if (!(element.type === "error" && element.state === "active" && element.isBlockingNavigation === false)) {
4171
+ newApplicableValidations.push(element);
4172
+ }
4173
+ });
4153
4174
  this.applicableValidations = [
4154
- ...this.applicableValidations,
4175
+ ...newApplicableValidations,
4155
4176
  ...this.currentPhase === "load" ? this.validationsByState.change : [],
4156
4177
  ...this.validationsByState.navigation
4157
4178
  ];
@@ -4391,19 +4412,11 @@ class ValidationController {
4391
4412
  updateValidations(!isNavigationTrigger);
4392
4413
  if (isNavigationTrigger) {
4393
4414
  const { activeBindings } = this;
4394
- if (this.setCompare(lastActiveBindings, activeBindings)) {
4415
+ if (isSubset(activeBindings, lastActiveBindings)) {
4395
4416
  updateValidations(true);
4396
4417
  }
4397
4418
  }
4398
4419
  }
4399
- setCompare(set1, set2) {
4400
- if (set1.size !== set2.size)
4401
- return false;
4402
- for (const entry of set1)
4403
- if (!set2.has(entry))
4404
- return false;
4405
- return true;
4406
- }
4407
4420
  get activeBindings() {
4408
4421
  return new Set(Array.from(this.getBindings()).filter((b) => {
4409
4422
  var _a;
@@ -5054,8 +5067,8 @@ var __async = (__this, __arguments, generator) => {
5054
5067
  step((generator = generator.apply(__this, __arguments)).next());
5055
5068
  });
5056
5069
  };
5057
- const PLAYER_VERSION = "0.4.0-next.10";
5058
- const COMMIT = "82270dcbee70fc05ba5b5d68e566b431ff5258ec";
5070
+ const PLAYER_VERSION = "0.4.0-next.12";
5071
+ const COMMIT = "cbc2cfa9cc04202b7919813d1493f9ea3b911621";
5059
5072
  const _Player = class {
5060
5073
  constructor(config) {
5061
5074
  this.logger = new TapableLogger();
@@ -7895,67 +7908,6 @@ module.exports = Array.isArray || function (arr) {
7895
7908
  };
7896
7909
 
7897
7910
 
7898
- /***/ }),
7899
-
7900
- /***/ "./node_modules/nested-error-stacks/index.js":
7901
- /*!***************************************************!*\
7902
- !*** ./node_modules/nested-error-stacks/index.js ***!
7903
- \***************************************************/
7904
- /*! no static exports found */
7905
- /***/ (function(module, exports, __webpack_require__) {
7906
-
7907
- var inherits = __webpack_require__(/*! util */ "./node_modules/node-libs-browser/node_modules/util/util.js").inherits;
7908
-
7909
- var NestedError = function (message, nested) {
7910
- this.nested = nested;
7911
-
7912
- if (message instanceof Error) {
7913
- nested = message;
7914
- } else if (typeof message !== 'undefined') {
7915
- Object.defineProperty(this, 'message', {
7916
- value: message,
7917
- writable: true,
7918
- enumerable: false,
7919
- configurable: true
7920
- });
7921
- }
7922
-
7923
- Error.captureStackTrace(this, this.constructor);
7924
- var oldStackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
7925
- var stackDescriptor = buildStackDescriptor(oldStackDescriptor, nested);
7926
- Object.defineProperty(this, 'stack', stackDescriptor);
7927
- };
7928
-
7929
- function buildStackDescriptor(oldStackDescriptor, nested) {
7930
- if (oldStackDescriptor.get) {
7931
- return {
7932
- get: function () {
7933
- var stack = oldStackDescriptor.get.call(this);
7934
- return buildCombinedStacks(stack, this.nested);
7935
- }
7936
- };
7937
- } else {
7938
- var stack = oldStackDescriptor.value;
7939
- return {
7940
- value: buildCombinedStacks(stack, nested)
7941
- };
7942
- }
7943
- }
7944
-
7945
- function buildCombinedStacks(stack, nested) {
7946
- if (nested) {
7947
- stack += '\nCaused By: ' + nested.stack;
7948
- }
7949
- return stack;
7950
- }
7951
-
7952
- inherits(NestedError, Error);
7953
- NestedError.prototype.name = 'NestedError';
7954
-
7955
-
7956
- module.exports = NestedError;
7957
-
7958
-
7959
7911
  /***/ }),
7960
7912
 
7961
7913
  /***/ "./node_modules/node-libs-browser/node_modules/buffer/index.js":
@@ -9760,771 +9712,6 @@ function isnan (val) {
9760
9712
 
9761
9713
  /***/ }),
9762
9714
 
9763
- /***/ "./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js":
9764
- /*!**********************************************************************************!*\
9765
- !*** ./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js ***!
9766
- \**********************************************************************************/
9767
- /*! no static exports found */
9768
- /***/ (function(module, exports) {
9769
-
9770
- if (typeof Object.create === 'function') {
9771
- // implementation from standard node.js 'util' module
9772
- module.exports = function inherits(ctor, superCtor) {
9773
- ctor.super_ = superCtor
9774
- ctor.prototype = Object.create(superCtor.prototype, {
9775
- constructor: {
9776
- value: ctor,
9777
- enumerable: false,
9778
- writable: true,
9779
- configurable: true
9780
- }
9781
- });
9782
- };
9783
- } else {
9784
- // old school shim for old browsers
9785
- module.exports = function inherits(ctor, superCtor) {
9786
- ctor.super_ = superCtor
9787
- var TempCtor = function () {}
9788
- TempCtor.prototype = superCtor.prototype
9789
- ctor.prototype = new TempCtor()
9790
- ctor.prototype.constructor = ctor
9791
- }
9792
- }
9793
-
9794
-
9795
- /***/ }),
9796
-
9797
- /***/ "./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js":
9798
- /*!*************************************************************************************!*\
9799
- !*** ./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js ***!
9800
- \*************************************************************************************/
9801
- /*! no static exports found */
9802
- /***/ (function(module, exports) {
9803
-
9804
- module.exports = function isBuffer(arg) {
9805
- return arg && typeof arg === 'object'
9806
- && typeof arg.copy === 'function'
9807
- && typeof arg.fill === 'function'
9808
- && typeof arg.readUInt8 === 'function';
9809
- }
9810
-
9811
- /***/ }),
9812
-
9813
- /***/ "./node_modules/node-libs-browser/node_modules/util/util.js":
9814
- /*!******************************************************************!*\
9815
- !*** ./node_modules/node-libs-browser/node_modules/util/util.js ***!
9816
- \******************************************************************/
9817
- /*! no static exports found */
9818
- /***/ (function(module, exports, __webpack_require__) {
9819
-
9820
- /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
9821
- //
9822
- // Permission is hereby granted, free of charge, to any person obtaining a
9823
- // copy of this software and associated documentation files (the
9824
- // "Software"), to deal in the Software without restriction, including
9825
- // without limitation the rights to use, copy, modify, merge, publish,
9826
- // distribute, sublicense, and/or sell copies of the Software, and to permit
9827
- // persons to whom the Software is furnished to do so, subject to the
9828
- // following conditions:
9829
- //
9830
- // The above copyright notice and this permission notice shall be included
9831
- // in all copies or substantial portions of the Software.
9832
- //
9833
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9834
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9835
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
9836
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
9837
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
9838
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
9839
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
9840
-
9841
- var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
9842
- function getOwnPropertyDescriptors(obj) {
9843
- var keys = Object.keys(obj);
9844
- var descriptors = {};
9845
- for (var i = 0; i < keys.length; i++) {
9846
- descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
9847
- }
9848
- return descriptors;
9849
- };
9850
-
9851
- var formatRegExp = /%[sdj%]/g;
9852
- exports.format = function(f) {
9853
- if (!isString(f)) {
9854
- var objects = [];
9855
- for (var i = 0; i < arguments.length; i++) {
9856
- objects.push(inspect(arguments[i]));
9857
- }
9858
- return objects.join(' ');
9859
- }
9860
-
9861
- var i = 1;
9862
- var args = arguments;
9863
- var len = args.length;
9864
- var str = String(f).replace(formatRegExp, function(x) {
9865
- if (x === '%%') return '%';
9866
- if (i >= len) return x;
9867
- switch (x) {
9868
- case '%s': return String(args[i++]);
9869
- case '%d': return Number(args[i++]);
9870
- case '%j':
9871
- try {
9872
- return JSON.stringify(args[i++]);
9873
- } catch (_) {
9874
- return '[Circular]';
9875
- }
9876
- default:
9877
- return x;
9878
- }
9879
- });
9880
- for (var x = args[i]; i < len; x = args[++i]) {
9881
- if (isNull(x) || !isObject(x)) {
9882
- str += ' ' + x;
9883
- } else {
9884
- str += ' ' + inspect(x);
9885
- }
9886
- }
9887
- return str;
9888
- };
9889
-
9890
-
9891
- // Mark that a method should not be used.
9892
- // Returns a modified function which warns once by default.
9893
- // If --no-deprecation is set, then it is a no-op.
9894
- exports.deprecate = function(fn, msg) {
9895
- if (typeof process !== 'undefined' && process.noDeprecation === true) {
9896
- return fn;
9897
- }
9898
-
9899
- // Allow for deprecating things in the process of starting up.
9900
- if (typeof process === 'undefined') {
9901
- return function() {
9902
- return exports.deprecate(fn, msg).apply(this, arguments);
9903
- };
9904
- }
9905
-
9906
- var warned = false;
9907
- function deprecated() {
9908
- if (!warned) {
9909
- if (process.throwDeprecation) {
9910
- throw new Error(msg);
9911
- } else if (process.traceDeprecation) {
9912
- console.trace(msg);
9913
- } else {
9914
- console.error(msg);
9915
- }
9916
- warned = true;
9917
- }
9918
- return fn.apply(this, arguments);
9919
- }
9920
-
9921
- return deprecated;
9922
- };
9923
-
9924
-
9925
- var debugs = {};
9926
- var debugEnviron;
9927
- exports.debuglog = function(set) {
9928
- if (isUndefined(debugEnviron))
9929
- debugEnviron = process.env.NODE_DEBUG || '';
9930
- set = set.toUpperCase();
9931
- if (!debugs[set]) {
9932
- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
9933
- var pid = process.pid;
9934
- debugs[set] = function() {
9935
- var msg = exports.format.apply(exports, arguments);
9936
- console.error('%s %d: %s', set, pid, msg);
9937
- };
9938
- } else {
9939
- debugs[set] = function() {};
9940
- }
9941
- }
9942
- return debugs[set];
9943
- };
9944
-
9945
-
9946
- /**
9947
- * Echos the value of a value. Trys to print the value out
9948
- * in the best way possible given the different types.
9949
- *
9950
- * @param {Object} obj The object to print out.
9951
- * @param {Object} opts Optional options object that alters the output.
9952
- */
9953
- /* legacy: obj, showHidden, depth, colors*/
9954
- function inspect(obj, opts) {
9955
- // default options
9956
- var ctx = {
9957
- seen: [],
9958
- stylize: stylizeNoColor
9959
- };
9960
- // legacy...
9961
- if (arguments.length >= 3) ctx.depth = arguments[2];
9962
- if (arguments.length >= 4) ctx.colors = arguments[3];
9963
- if (isBoolean(opts)) {
9964
- // legacy...
9965
- ctx.showHidden = opts;
9966
- } else if (opts) {
9967
- // got an "options" object
9968
- exports._extend(ctx, opts);
9969
- }
9970
- // set default options
9971
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
9972
- if (isUndefined(ctx.depth)) ctx.depth = 2;
9973
- if (isUndefined(ctx.colors)) ctx.colors = false;
9974
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
9975
- if (ctx.colors) ctx.stylize = stylizeWithColor;
9976
- return formatValue(ctx, obj, ctx.depth);
9977
- }
9978
- exports.inspect = inspect;
9979
-
9980
-
9981
- // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
9982
- inspect.colors = {
9983
- 'bold' : [1, 22],
9984
- 'italic' : [3, 23],
9985
- 'underline' : [4, 24],
9986
- 'inverse' : [7, 27],
9987
- 'white' : [37, 39],
9988
- 'grey' : [90, 39],
9989
- 'black' : [30, 39],
9990
- 'blue' : [34, 39],
9991
- 'cyan' : [36, 39],
9992
- 'green' : [32, 39],
9993
- 'magenta' : [35, 39],
9994
- 'red' : [31, 39],
9995
- 'yellow' : [33, 39]
9996
- };
9997
-
9998
- // Don't use 'blue' not visible on cmd.exe
9999
- inspect.styles = {
10000
- 'special': 'cyan',
10001
- 'number': 'yellow',
10002
- 'boolean': 'yellow',
10003
- 'undefined': 'grey',
10004
- 'null': 'bold',
10005
- 'string': 'green',
10006
- 'date': 'magenta',
10007
- // "name": intentionally not styling
10008
- 'regexp': 'red'
10009
- };
10010
-
10011
-
10012
- function stylizeWithColor(str, styleType) {
10013
- var style = inspect.styles[styleType];
10014
-
10015
- if (style) {
10016
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
10017
- '\u001b[' + inspect.colors[style][1] + 'm';
10018
- } else {
10019
- return str;
10020
- }
10021
- }
10022
-
10023
-
10024
- function stylizeNoColor(str, styleType) {
10025
- return str;
10026
- }
10027
-
10028
-
10029
- function arrayToHash(array) {
10030
- var hash = {};
10031
-
10032
- array.forEach(function(val, idx) {
10033
- hash[val] = true;
10034
- });
10035
-
10036
- return hash;
10037
- }
10038
-
10039
-
10040
- function formatValue(ctx, value, recurseTimes) {
10041
- // Provide a hook for user-specified inspect functions.
10042
- // Check that value is an object with an inspect function on it
10043
- if (ctx.customInspect &&
10044
- value &&
10045
- isFunction(value.inspect) &&
10046
- // Filter out the util module, it's inspect function is special
10047
- value.inspect !== exports.inspect &&
10048
- // Also filter out any prototype objects using the circular check.
10049
- !(value.constructor && value.constructor.prototype === value)) {
10050
- var ret = value.inspect(recurseTimes, ctx);
10051
- if (!isString(ret)) {
10052
- ret = formatValue(ctx, ret, recurseTimes);
10053
- }
10054
- return ret;
10055
- }
10056
-
10057
- // Primitive types cannot have properties
10058
- var primitive = formatPrimitive(ctx, value);
10059
- if (primitive) {
10060
- return primitive;
10061
- }
10062
-
10063
- // Look up the keys of the object.
10064
- var keys = Object.keys(value);
10065
- var visibleKeys = arrayToHash(keys);
10066
-
10067
- if (ctx.showHidden) {
10068
- keys = Object.getOwnPropertyNames(value);
10069
- }
10070
-
10071
- // IE doesn't make error fields non-enumerable
10072
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
10073
- if (isError(value)
10074
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
10075
- return formatError(value);
10076
- }
10077
-
10078
- // Some type of object without properties can be shortcutted.
10079
- if (keys.length === 0) {
10080
- if (isFunction(value)) {
10081
- var name = value.name ? ': ' + value.name : '';
10082
- return ctx.stylize('[Function' + name + ']', 'special');
10083
- }
10084
- if (isRegExp(value)) {
10085
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
10086
- }
10087
- if (isDate(value)) {
10088
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
10089
- }
10090
- if (isError(value)) {
10091
- return formatError(value);
10092
- }
10093
- }
10094
-
10095
- var base = '', array = false, braces = ['{', '}'];
10096
-
10097
- // Make Array say that they are Array
10098
- if (isArray(value)) {
10099
- array = true;
10100
- braces = ['[', ']'];
10101
- }
10102
-
10103
- // Make functions say that they are functions
10104
- if (isFunction(value)) {
10105
- var n = value.name ? ': ' + value.name : '';
10106
- base = ' [Function' + n + ']';
10107
- }
10108
-
10109
- // Make RegExps say that they are RegExps
10110
- if (isRegExp(value)) {
10111
- base = ' ' + RegExp.prototype.toString.call(value);
10112
- }
10113
-
10114
- // Make dates with properties first say the date
10115
- if (isDate(value)) {
10116
- base = ' ' + Date.prototype.toUTCString.call(value);
10117
- }
10118
-
10119
- // Make error with message first say the error
10120
- if (isError(value)) {
10121
- base = ' ' + formatError(value);
10122
- }
10123
-
10124
- if (keys.length === 0 && (!array || value.length == 0)) {
10125
- return braces[0] + base + braces[1];
10126
- }
10127
-
10128
- if (recurseTimes < 0) {
10129
- if (isRegExp(value)) {
10130
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
10131
- } else {
10132
- return ctx.stylize('[Object]', 'special');
10133
- }
10134
- }
10135
-
10136
- ctx.seen.push(value);
10137
-
10138
- var output;
10139
- if (array) {
10140
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
10141
- } else {
10142
- output = keys.map(function(key) {
10143
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
10144
- });
10145
- }
10146
-
10147
- ctx.seen.pop();
10148
-
10149
- return reduceToSingleString(output, base, braces);
10150
- }
10151
-
10152
-
10153
- function formatPrimitive(ctx, value) {
10154
- if (isUndefined(value))
10155
- return ctx.stylize('undefined', 'undefined');
10156
- if (isString(value)) {
10157
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
10158
- .replace(/'/g, "\\'")
10159
- .replace(/\\"/g, '"') + '\'';
10160
- return ctx.stylize(simple, 'string');
10161
- }
10162
- if (isNumber(value))
10163
- return ctx.stylize('' + value, 'number');
10164
- if (isBoolean(value))
10165
- return ctx.stylize('' + value, 'boolean');
10166
- // For some reason typeof null is "object", so special case here.
10167
- if (isNull(value))
10168
- return ctx.stylize('null', 'null');
10169
- }
10170
-
10171
-
10172
- function formatError(value) {
10173
- return '[' + Error.prototype.toString.call(value) + ']';
10174
- }
10175
-
10176
-
10177
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
10178
- var output = [];
10179
- for (var i = 0, l = value.length; i < l; ++i) {
10180
- if (hasOwnProperty(value, String(i))) {
10181
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
10182
- String(i), true));
10183
- } else {
10184
- output.push('');
10185
- }
10186
- }
10187
- keys.forEach(function(key) {
10188
- if (!key.match(/^\d+$/)) {
10189
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
10190
- key, true));
10191
- }
10192
- });
10193
- return output;
10194
- }
10195
-
10196
-
10197
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
10198
- var name, str, desc;
10199
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
10200
- if (desc.get) {
10201
- if (desc.set) {
10202
- str = ctx.stylize('[Getter/Setter]', 'special');
10203
- } else {
10204
- str = ctx.stylize('[Getter]', 'special');
10205
- }
10206
- } else {
10207
- if (desc.set) {
10208
- str = ctx.stylize('[Setter]', 'special');
10209
- }
10210
- }
10211
- if (!hasOwnProperty(visibleKeys, key)) {
10212
- name = '[' + key + ']';
10213
- }
10214
- if (!str) {
10215
- if (ctx.seen.indexOf(desc.value) < 0) {
10216
- if (isNull(recurseTimes)) {
10217
- str = formatValue(ctx, desc.value, null);
10218
- } else {
10219
- str = formatValue(ctx, desc.value, recurseTimes - 1);
10220
- }
10221
- if (str.indexOf('\n') > -1) {
10222
- if (array) {
10223
- str = str.split('\n').map(function(line) {
10224
- return ' ' + line;
10225
- }).join('\n').substr(2);
10226
- } else {
10227
- str = '\n' + str.split('\n').map(function(line) {
10228
- return ' ' + line;
10229
- }).join('\n');
10230
- }
10231
- }
10232
- } else {
10233
- str = ctx.stylize('[Circular]', 'special');
10234
- }
10235
- }
10236
- if (isUndefined(name)) {
10237
- if (array && key.match(/^\d+$/)) {
10238
- return str;
10239
- }
10240
- name = JSON.stringify('' + key);
10241
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
10242
- name = name.substr(1, name.length - 2);
10243
- name = ctx.stylize(name, 'name');
10244
- } else {
10245
- name = name.replace(/'/g, "\\'")
10246
- .replace(/\\"/g, '"')
10247
- .replace(/(^"|"$)/g, "'");
10248
- name = ctx.stylize(name, 'string');
10249
- }
10250
- }
10251
-
10252
- return name + ': ' + str;
10253
- }
10254
-
10255
-
10256
- function reduceToSingleString(output, base, braces) {
10257
- var numLinesEst = 0;
10258
- var length = output.reduce(function(prev, cur) {
10259
- numLinesEst++;
10260
- if (cur.indexOf('\n') >= 0) numLinesEst++;
10261
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
10262
- }, 0);
10263
-
10264
- if (length > 60) {
10265
- return braces[0] +
10266
- (base === '' ? '' : base + '\n ') +
10267
- ' ' +
10268
- output.join(',\n ') +
10269
- ' ' +
10270
- braces[1];
10271
- }
10272
-
10273
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
10274
- }
10275
-
10276
-
10277
- // NOTE: These type checking functions intentionally don't use `instanceof`
10278
- // because it is fragile and can be easily faked with `Object.create()`.
10279
- function isArray(ar) {
10280
- return Array.isArray(ar);
10281
- }
10282
- exports.isArray = isArray;
10283
-
10284
- function isBoolean(arg) {
10285
- return typeof arg === 'boolean';
10286
- }
10287
- exports.isBoolean = isBoolean;
10288
-
10289
- function isNull(arg) {
10290
- return arg === null;
10291
- }
10292
- exports.isNull = isNull;
10293
-
10294
- function isNullOrUndefined(arg) {
10295
- return arg == null;
10296
- }
10297
- exports.isNullOrUndefined = isNullOrUndefined;
10298
-
10299
- function isNumber(arg) {
10300
- return typeof arg === 'number';
10301
- }
10302
- exports.isNumber = isNumber;
10303
-
10304
- function isString(arg) {
10305
- return typeof arg === 'string';
10306
- }
10307
- exports.isString = isString;
10308
-
10309
- function isSymbol(arg) {
10310
- return typeof arg === 'symbol';
10311
- }
10312
- exports.isSymbol = isSymbol;
10313
-
10314
- function isUndefined(arg) {
10315
- return arg === void 0;
10316
- }
10317
- exports.isUndefined = isUndefined;
10318
-
10319
- function isRegExp(re) {
10320
- return isObject(re) && objectToString(re) === '[object RegExp]';
10321
- }
10322
- exports.isRegExp = isRegExp;
10323
-
10324
- function isObject(arg) {
10325
- return typeof arg === 'object' && arg !== null;
10326
- }
10327
- exports.isObject = isObject;
10328
-
10329
- function isDate(d) {
10330
- return isObject(d) && objectToString(d) === '[object Date]';
10331
- }
10332
- exports.isDate = isDate;
10333
-
10334
- function isError(e) {
10335
- return isObject(e) &&
10336
- (objectToString(e) === '[object Error]' || e instanceof Error);
10337
- }
10338
- exports.isError = isError;
10339
-
10340
- function isFunction(arg) {
10341
- return typeof arg === 'function';
10342
- }
10343
- exports.isFunction = isFunction;
10344
-
10345
- function isPrimitive(arg) {
10346
- return arg === null ||
10347
- typeof arg === 'boolean' ||
10348
- typeof arg === 'number' ||
10349
- typeof arg === 'string' ||
10350
- typeof arg === 'symbol' || // ES6 symbol
10351
- typeof arg === 'undefined';
10352
- }
10353
- exports.isPrimitive = isPrimitive;
10354
-
10355
- exports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ "./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js");
10356
-
10357
- function objectToString(o) {
10358
- return Object.prototype.toString.call(o);
10359
- }
10360
-
10361
-
10362
- function pad(n) {
10363
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
10364
- }
10365
-
10366
-
10367
- var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
10368
- 'Oct', 'Nov', 'Dec'];
10369
-
10370
- // 26 Feb 16:19:34
10371
- function timestamp() {
10372
- var d = new Date();
10373
- var time = [pad(d.getHours()),
10374
- pad(d.getMinutes()),
10375
- pad(d.getSeconds())].join(':');
10376
- return [d.getDate(), months[d.getMonth()], time].join(' ');
10377
- }
10378
-
10379
-
10380
- // log is just a thin wrapper to console.log that prepends a timestamp
10381
- exports.log = function() {
10382
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
10383
- };
10384
-
10385
-
10386
- /**
10387
- * Inherit the prototype methods from one constructor into another.
10388
- *
10389
- * The Function.prototype.inherits from lang.js rewritten as a standalone
10390
- * function (not on Function.prototype). NOTE: If this file is to be loaded
10391
- * during bootstrapping this function needs to be rewritten using some native
10392
- * functions as prototype setup using normal JavaScript does not work as
10393
- * expected during bootstrapping (see mirror.js in r114903).
10394
- *
10395
- * @param {function} ctor Constructor function which needs to inherit the
10396
- * prototype.
10397
- * @param {function} superCtor Constructor function to inherit prototype from.
10398
- */
10399
- exports.inherits = __webpack_require__(/*! inherits */ "./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js");
10400
-
10401
- exports._extend = function(origin, add) {
10402
- // Don't do anything if add isn't an object
10403
- if (!add || !isObject(add)) return origin;
10404
-
10405
- var keys = Object.keys(add);
10406
- var i = keys.length;
10407
- while (i--) {
10408
- origin[keys[i]] = add[keys[i]];
10409
- }
10410
- return origin;
10411
- };
10412
-
10413
- function hasOwnProperty(obj, prop) {
10414
- return Object.prototype.hasOwnProperty.call(obj, prop);
10415
- }
10416
-
10417
- var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
10418
-
10419
- exports.promisify = function promisify(original) {
10420
- if (typeof original !== 'function')
10421
- throw new TypeError('The "original" argument must be of type Function');
10422
-
10423
- if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
10424
- var fn = original[kCustomPromisifiedSymbol];
10425
- if (typeof fn !== 'function') {
10426
- throw new TypeError('The "util.promisify.custom" argument must be of type Function');
10427
- }
10428
- Object.defineProperty(fn, kCustomPromisifiedSymbol, {
10429
- value: fn, enumerable: false, writable: false, configurable: true
10430
- });
10431
- return fn;
10432
- }
10433
-
10434
- function fn() {
10435
- var promiseResolve, promiseReject;
10436
- var promise = new Promise(function (resolve, reject) {
10437
- promiseResolve = resolve;
10438
- promiseReject = reject;
10439
- });
10440
-
10441
- var args = [];
10442
- for (var i = 0; i < arguments.length; i++) {
10443
- args.push(arguments[i]);
10444
- }
10445
- args.push(function (err, value) {
10446
- if (err) {
10447
- promiseReject(err);
10448
- } else {
10449
- promiseResolve(value);
10450
- }
10451
- });
10452
-
10453
- try {
10454
- original.apply(this, args);
10455
- } catch (err) {
10456
- promiseReject(err);
10457
- }
10458
-
10459
- return promise;
10460
- }
10461
-
10462
- Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
10463
-
10464
- if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
10465
- value: fn, enumerable: false, writable: false, configurable: true
10466
- });
10467
- return Object.defineProperties(
10468
- fn,
10469
- getOwnPropertyDescriptors(original)
10470
- );
10471
- }
10472
-
10473
- exports.promisify.custom = kCustomPromisifiedSymbol
10474
-
10475
- function callbackifyOnRejected(reason, cb) {
10476
- // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
10477
- // Because `null` is a special error value in callbacks which means "no error
10478
- // occurred", we error-wrap so the callback consumer can distinguish between
10479
- // "the promise rejected with null" or "the promise fulfilled with undefined".
10480
- if (!reason) {
10481
- var newReason = new Error('Promise was rejected with a falsy value');
10482
- newReason.reason = reason;
10483
- reason = newReason;
10484
- }
10485
- return cb(reason);
10486
- }
10487
-
10488
- function callbackify(original) {
10489
- if (typeof original !== 'function') {
10490
- throw new TypeError('The "original" argument must be of type Function');
10491
- }
10492
-
10493
- // We DO NOT return the promise as it gives the user a false sense that
10494
- // the promise is actually somehow related to the callback's execution
10495
- // and that the callback throwing will reject the promise.
10496
- function callbackified() {
10497
- var args = [];
10498
- for (var i = 0; i < arguments.length; i++) {
10499
- args.push(arguments[i]);
10500
- }
10501
-
10502
- var maybeCb = args.pop();
10503
- if (typeof maybeCb !== 'function') {
10504
- throw new TypeError('The last argument must be of type Function');
10505
- }
10506
- var self = this;
10507
- var cb = function() {
10508
- return maybeCb.apply(self, arguments);
10509
- };
10510
- // In true node style we process the callback on `nextTick` with all the
10511
- // implications (stack, `uncaughtException`, `async_hooks`)
10512
- original.apply(this, args)
10513
- .then(function(ret) { process.nextTick(cb, null, ret) },
10514
- function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });
10515
- }
10516
-
10517
- Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
10518
- Object.defineProperties(callbackified,
10519
- getOwnPropertyDescriptors(original));
10520
- return callbackified;
10521
- }
10522
- exports.callbackify = callbackify;
10523
-
10524
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ "./node_modules/process/browser.js")))
10525
-
10526
- /***/ }),
10527
-
10528
9715
  /***/ "./node_modules/p-defer/index.js":
10529
9716
  /*!***************************************!*\
10530
9717
  !*** ./node_modules/p-defer/index.js ***!
@@ -10561,201 +9748,6 @@ module.exports = pDefer;
10561
9748
  /* WEBPACK VAR INJECTION */(function(Buffer) {!function(n,t){ true?module.exports=t():undefined}("undefined"!=typeof self?self:this,function(){return function(n){var t={};function r(e){if(t[e])return t[e].exports;var u=t[e]={i:e,l:!1,exports:{}};return n[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=n,r.c=t,r.d=function(n,t,e){r.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:e})},r.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,"a",t),t},r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.p="",r(r.s=0)}([function(n,t,r){"use strict";function e(n){if(!(this instanceof e))return new e(n);this._=n}var u=e.prototype;function o(n,t){for(var r=0;r<n;r++)t(r)}function i(n,t,r){return function(n,t){o(t.length,function(r){n(t[r],r,t)})}(function(r,e,u){t=n(t,r,e,u)},r),t}function a(n,t){return i(function(t,r,e,u){return t.concat([n(r,e,u)])},[],t)}function f(n,t){var r={v:0,buf:t};return o(n,function(){var n;r={v:r.v<<1|(n=r.buf,n[0]>>7),buf:function(n){var t=i(function(n,t,r,e){return n.concat(r===e.length-1?Buffer.from([t,0]).readUInt16BE(0):e.readUInt16BE(r))},[],n);return Buffer.from(a(function(n){return(n<<1&65535)>>8},t))}(r.buf)}}),r}function c(){return"undefined"!=typeof Buffer}function s(){if(!c())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function l(n){s();var t=i(function(n,t){return n+t},0,n);if(t%8!=0)throw new Error("The bits ["+n.join(", ")+"] add up to "+t+" which is not an even number of bytes; the total should be divisible by 8");var r,u=t/8,o=(r=function(n){return n>48},i(function(n,t){return n||(r(t)?t:n)},null,n));if(o)throw new Error(o+" bit range requested exceeds 48 bit (6 byte) Number max.");return new e(function(t,r){var e=u+r;return e>t.length?x(r,u.toString()+" bytes"):b(e,i(function(n,t){var r=f(t,n.buf);return{coll:n.coll.concat(r.v),buf:r.buf}},{coll:[],buf:t.slice(r,e)},n).coll)})}function h(n,t){return new e(function(r,e){return s(),e+t>r.length?x(e,t+" bytes for "+n):b(e+t,r.slice(e,e+t))})}function p(n,t){if("number"!=typeof(r=t)||Math.floor(r)!==r||t<0||t>6)throw new Error(n+" requires integer length in range [0, 6].");var r}function d(n){return p("uintBE",n),h("uintBE("+n+")",n).map(function(t){return t.readUIntBE(0,n)})}function v(n){return p("uintLE",n),h("uintLE("+n+")",n).map(function(t){return t.readUIntLE(0,n)})}function g(n){return p("intBE",n),h("intBE("+n+")",n).map(function(t){return t.readIntBE(0,n)})}function m(n){return p("intLE",n),h("intLE("+n+")",n).map(function(t){return t.readIntLE(0,n)})}function y(n){return n instanceof e}function E(n){return"[object Array]"==={}.toString.call(n)}function w(n){return c()&&Buffer.isBuffer(n)}function b(n,t){return{status:!0,index:n,value:t,furthest:-1,expected:[]}}function x(n,t){return E(t)||(t=[t]),{status:!1,index:-1,value:null,furthest:n,expected:t}}function B(n,t){if(!t)return n;if(n.furthest>t.furthest)return n;var r=n.furthest===t.furthest?function(n,t){if(function(){if(void 0!==e._supportsSet)return e._supportsSet;var n="undefined"!=typeof Set;return e._supportsSet=n,n}()&&Array.from){for(var r=new Set(n),u=0;u<t.length;u++)r.add(t[u]);var o=Array.from(r);return o.sort(),o}for(var i={},a=0;a<n.length;a++)i[n[a]]=!0;for(var f=0;f<t.length;f++)i[t[f]]=!0;var c=[];for(var s in i)({}).hasOwnProperty.call(i,s)&&c.push(s);return c.sort(),c}(n.expected,t.expected):t.expected;return{status:n.status,index:n.index,value:n.value,furthest:t.furthest,expected:r}}var j={};function S(n,t){if(w(n))return{offset:t,line:-1,column:-1};n in j||(j[n]={});for(var r=j[n],e=0,u=0,o=0,i=t;i>=0;){if(i in r){e=r[i].line,0===o&&(o=r[i].lineStart);break}("\n"===n.charAt(i)||"\r"===n.charAt(i)&&"\n"!==n.charAt(i+1))&&(u++,0===o&&(o=i+1)),i--}var a=e+u,f=t-o;return r[t]={line:a,lineStart:o},{offset:t,line:a+1,column:f+1}}function _(n){if(!y(n))throw new Error("not a parser: "+n)}function L(n,t){return"string"==typeof n?n.charAt(t):n[t]}function O(n){if("number"!=typeof n)throw new Error("not a number: "+n)}function k(n){if("function"!=typeof n)throw new Error("not a function: "+n)}function P(n){if("string"!=typeof n)throw new Error("not a string: "+n)}var q=2,A=3,I=8,F=5*I,M=4*I,z=" ";function R(n,t){return new Array(t+1).join(n)}function U(n,t,r){var e=t-n.length;return e<=0?n:R(r,e)+n}function W(n,t,r,e){return{from:n-t>0?n-t:0,to:n+r>e?e:n+r}}function D(n,t){var r,e,u,o,f,c=t.index,s=c.offset,l=1;if(s===n.length)return"Got the end of the input";if(w(n)){var h=s-s%I,p=s-h,d=W(h,F,M+I,n.length),v=a(function(n){return a(function(n){return U(n.toString(16),2,"0")},n)},function(n,t){var r=n.length,e=[],u=0;if(r<=t)return[n.slice()];for(var o=0;o<r;o++)e[u]||e.push([]),e[u].push(n[o]),(o+1)%t==0&&u++;return e}(n.slice(d.from,d.to).toJSON().data,I));o=function(n){return 0===n.from&&1===n.to?{from:n.from,to:n.to}:{from:n.from/I,to:Math.floor(n.to/I)}}(d),e=h/I,r=3*p,p>=4&&(r+=1),l=2,u=a(function(n){return n.length<=4?n.join(" "):n.slice(0,4).join(" ")+" "+n.slice(4).join(" ")},v),(f=(8*(o.to>0?o.to-1:o.to)).toString(16).length)<2&&(f=2)}else{var g=n.split(/\r\n|[\n\r\u2028\u2029]/);r=c.column-1,e=c.line-1,o=W(e,q,A,g.length),u=g.slice(o.from,o.to),f=o.to.toString().length}var m=e-o.from;return w(n)&&(f=(8*(o.to>0?o.to-1:o.to)).toString(16).length)<2&&(f=2),i(function(t,e,u){var i,a=u===m,c=a?"> ":z;return i=w(n)?U((8*(o.from+u)).toString(16),f,"0"):U((o.from+u+1).toString(),f," "),[].concat(t,[c+i+" | "+e],a?[z+R(" ",f)+" | "+U("",r," ")+R("^",l)]:[])},[],u).join("\n")}function N(n,t){return["\n","-- PARSING FAILED "+R("-",50),"\n\n",D(n,t),"\n\n",(r=t.expected,1===r.length?"Expected:\n\n"+r[0]:"Expected one of the following: \n\n"+r.join(", ")),"\n"].join("");var r}function G(n){return void 0!==n.flags?n.flags:[n.global?"g":"",n.ignoreCase?"i":"",n.multiline?"m":"",n.unicode?"u":"",n.sticky?"y":""].join("")}function C(){for(var n=[].slice.call(arguments),t=n.length,r=0;r<t;r+=1)_(n[r]);return e(function(r,e){for(var u,o=new Array(t),i=0;i<t;i+=1){if(!(u=B(n[i]._(r,e),u)).status)return u;o[i]=u.value,e=u.index}return B(b(e,o),u)})}function J(){var n=[].slice.call(arguments);if(0===n.length)throw new Error("seqMap needs at least one argument");var t=n.pop();return k(t),C.apply(null,n).map(function(n){return t.apply(null,n)})}function T(){var n=[].slice.call(arguments),t=n.length;if(0===t)return Y("zero alternates");for(var r=0;r<t;r+=1)_(n[r]);return e(function(t,r){for(var e,u=0;u<n.length;u+=1)if((e=B(n[u]._(t,r),e)).status)return e;return e})}function V(n,t){return H(n,t).or(X([]))}function H(n,t){return _(n),_(t),J(n,t.then(n).many(),function(n,t){return[n].concat(t)})}function K(n){P(n);var t="'"+n+"'";return e(function(r,e){var u=e+n.length,o=r.slice(e,u);return o===n?b(u,o):x(e,t)})}function Q(n,t){!function(n){if(!(n instanceof RegExp))throw new Error("not a regexp: "+n);for(var t=G(n),r=0;r<t.length;r++){var e=t.charAt(r);if("i"!==e&&"m"!==e&&"u"!==e&&"s"!==e)throw new Error('unsupported regexp flag "'+e+'": '+n)}}(n),arguments.length>=2?O(t):t=0;var r=function(n){return RegExp("^(?:"+n.source+")",G(n))}(n),u=""+n;return e(function(n,e){var o=r.exec(n.slice(e));if(o){if(0<=t&&t<=o.length){var i=o[0],a=o[t];return b(e+i.length,a)}return x(e,"valid match group (0 to "+o.length+") in "+u)}return x(e,u)})}function X(n){return e(function(t,r){return b(r,n)})}function Y(n){return e(function(t,r){return x(r,n)})}function Z(n){if(y(n))return e(function(t,r){var e=n._(t,r);return e.index=r,e.value="",e});if("string"==typeof n)return Z(K(n));if(n instanceof RegExp)return Z(Q(n));throw new Error("not a string, regexp, or parser: "+n)}function $(n){return _(n),e(function(t,r){var e=n._(t,r),u=t.slice(r,e.index);return e.status?x(r,'not "'+u+'"'):b(r,null)})}function nn(n){return k(n),e(function(t,r){var e=L(t,r);return r<t.length&&n(e)?b(r+1,e):x(r,"a character/byte matching "+n)})}function tn(n,t){arguments.length<2&&(t=n,n=void 0);var r=e(function(n,e){return r._=t()._,r._(n,e)});return n?r.desc(n):r}function rn(){return Y("fantasy-land/empty")}u.parse=function(n){if("string"!=typeof n&&!w(n))throw new Error(".parse must be called with a string or Buffer as its argument");var t,r=this.skip(an)._(n,0);return t=r.status?{status:!0,value:r.value}:{status:!1,index:S(n,r.furthest),expected:r.expected},delete j[n],t},u.tryParse=function(n){var t=this.parse(n);if(t.status)return t.value;var r=N(n,t),e=new Error(r);throw e.type="ParsimmonError",e.result=t,e},u.assert=function(n,t){return this.chain(function(r){return n(r)?X(r):Y(t)})},u.or=function(n){return T(this,n)},u.trim=function(n){return this.wrap(n,n)},u.wrap=function(n,t){return J(n,this,t,function(n,t){return t})},u.thru=function(n){return n(this)},u.then=function(n){return _(n),C(this,n).map(function(n){return n[1]})},u.many=function(){var n=this;return e(function(t,r){for(var e=[],u=void 0;;){if(!(u=B(n._(t,r),u)).status)return B(b(r,e),u);if(r===u.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");r=u.index,e.push(u.value)}})},u.tieWith=function(n){return P(n),this.map(function(t){if(function(n){if(!E(n))throw new Error("not an array: "+n)}(t),t.length){P(t[0]);for(var r=t[0],e=1;e<t.length;e++)P(t[e]),r+=n+t[e];return r}return""})},u.tie=function(){return this.tieWith("")},u.times=function(n,t){var r=this;return arguments.length<2&&(t=n),O(n),O(t),e(function(e,u){for(var o=[],i=void 0,a=void 0,f=0;f<n;f+=1){if(a=B(i=r._(e,u),a),!i.status)return a;u=i.index,o.push(i.value)}for(;f<t&&(a=B(i=r._(e,u),a),i.status);f+=1)u=i.index,o.push(i.value);return B(b(u,o),a)})},u.result=function(n){return this.map(function(){return n})},u.atMost=function(n){return this.times(0,n)},u.atLeast=function(n){return J(this.times(n),this.many(),function(n,t){return n.concat(t)})},u.map=function(n){k(n);var t=this;return e(function(r,e){var u=t._(r,e);return u.status?B(b(u.index,n(u.value)),u):u})},u.contramap=function(n){k(n);var t=this;return e(function(r,e){var u=t.parse(n(r.slice(e)));return u.status?b(e+r.length,u.value):u})},u.promap=function(n,t){return k(n),k(t),this.contramap(n).map(t)},u.skip=function(n){return C(this,n).map(function(n){return n[0]})},u.mark=function(){return J(en,this,en,function(n,t,r){return{start:n,value:t,end:r}})},u.node=function(n){return J(en,this,en,function(t,r,e){return{name:n,value:r,start:t,end:e}})},u.sepBy=function(n){return V(this,n)},u.sepBy1=function(n){return H(this,n)},u.lookahead=function(n){return this.skip(Z(n))},u.notFollowedBy=function(n){return this.skip($(n))},u.desc=function(n){E(n)||(n=[n]);var t=this;return e(function(r,e){var u=t._(r,e);return u.status||(u.expected=n),u})},u.fallback=function(n){return this.or(X(n))},u.ap=function(n){return J(n,this,function(n,t){return n(t)})},u.chain=function(n){var t=this;return e(function(r,e){var u=t._(r,e);return u.status?B(n(u.value)._(r,u.index),u):u})},u.concat=u.or,u.empty=rn,u.of=X,u["fantasy-land/ap"]=u.ap,u["fantasy-land/chain"]=u.chain,u["fantasy-land/concat"]=u.concat,u["fantasy-land/empty"]=u.empty,u["fantasy-land/of"]=u.of,u["fantasy-land/map"]=u.map;var en=e(function(n,t){return b(t,S(n,t))}),un=e(function(n,t){return t>=n.length?x(t,"any character/byte"):b(t+1,L(n,t))}),on=e(function(n,t){return b(n.length,n.slice(t))}),an=e(function(n,t){return t<n.length?x(t,"EOF"):b(t,null)}),fn=Q(/[0-9]/).desc("a digit"),cn=Q(/[0-9]*/).desc("optional digits"),sn=Q(/[a-z]/i).desc("a letter"),ln=Q(/[a-z]*/i).desc("optional letters"),hn=Q(/\s*/).desc("optional whitespace"),pn=Q(/\s+/).desc("whitespace"),dn=K("\r"),vn=K("\n"),gn=K("\r\n"),mn=T(gn,vn,dn).desc("newline"),yn=T(mn,an);e.all=on,e.alt=T,e.any=un,e.cr=dn,e.createLanguage=function(n){var t={};for(var r in n)({}).hasOwnProperty.call(n,r)&&function(r){t[r]=tn(function(){return n[r](t)})}(r);return t},e.crlf=gn,e.custom=function(n){return e(n(b,x))},e.digit=fn,e.digits=cn,e.empty=rn,e.end=yn,e.eof=an,e.fail=Y,e.formatError=N,e.index=en,e.isParser=y,e.lazy=tn,e.letter=sn,e.letters=ln,e.lf=vn,e.lookahead=Z,e.makeFailure=x,e.makeSuccess=b,e.newline=mn,e.noneOf=function(n){return nn(function(t){return n.indexOf(t)<0}).desc("none of '"+n+"'")},e.notFollowedBy=$,e.of=X,e.oneOf=function(n){for(var t=n.split(""),r=0;r<t.length;r++)t[r]="'"+t[r]+"'";return nn(function(t){return n.indexOf(t)>=0}).desc(t)},e.optWhitespace=hn,e.Parser=e,e.range=function(n,t){return nn(function(r){return n<=r&&r<=t}).desc(n+"-"+t)},e.regex=Q,e.regexp=Q,e.sepBy=V,e.sepBy1=H,e.seq=C,e.seqMap=J,e.seqObj=function(){for(var n,t={},r=0,u=(n=arguments,Array.prototype.slice.call(n)),o=u.length,i=0;i<o;i+=1){var a=u[i];if(!y(a)){if(E(a)&&2===a.length&&"string"==typeof a[0]&&y(a[1])){var f=a[0];if(Object.prototype.hasOwnProperty.call(t,f))throw new Error("seqObj: duplicate key "+f);t[f]=!0,r++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(0===r)throw new Error("seqObj expects at least one named parser, found zero");return e(function(n,t){for(var r,e={},i=0;i<o;i+=1){var a,f;if(E(u[i])?(a=u[i][0],f=u[i][1]):(a=null,f=u[i]),!(r=B(f._(n,t),r)).status)return r;a&&(e[a]=r.value),t=r.index}return B(b(t,e),r)})},e.string=K,e.succeed=X,e.takeWhile=function(n){return k(n),e(function(t,r){for(var e=r;e<t.length&&n(L(t,e));)e++;return b(e,t.slice(r,e))})},e.test=nn,e.whitespace=pn,e["fantasy-land/empty"]=rn,e["fantasy-land/of"]=X,e.Binary={bitSeq:l,bitSeqObj:function(n){s();var t={},r=0,e=a(function(n){if(E(n)){var e=n;if(2!==e.length)throw new Error("["+e.join(", ")+"] should be length 2, got length "+e.length);if(P(e[0]),O(e[1]),Object.prototype.hasOwnProperty.call(t,e[0]))throw new Error("duplicate key in bitSeqObj: "+e[0]);return t[e[0]]=!0,r++,e}return O(n),[null,n]},n);if(r<1)throw new Error("bitSeqObj expects at least one named pair, got ["+n.join(", ")+"]");var u=a(function(n){return n[0]},e);return l(a(function(n){return n[1]},e)).map(function(n){return i(function(n,t){return null!==t[0]&&(n[t[0]]=t[1]),n},{},a(function(t,r){return[t,n[r]]},u))})},byte:function(n){if(s(),O(n),n>255)throw new Error("Value specified to byte constructor ("+n+"=0x"+n.toString(16)+") is larger in value than a single byte.");var t=(n>15?"0x":"0x0")+n.toString(16);return e(function(r,e){var u=L(r,e);return u===n?b(e+1,u):x(e,t)})},buffer:function(n){return h("buffer",n).map(function(n){return Buffer.from(n)})},encodedString:function(n,t){return h("string",t).map(function(t){return t.toString(n)})},uintBE:d,uint8BE:d(1),uint16BE:d(2),uint32BE:d(4),uintLE:v,uint8LE:v(1),uint16LE:v(2),uint32LE:v(4),intBE:g,int8BE:g(1),int16BE:g(2),int32BE:g(4),intLE:m,int8LE:m(1),int16LE:m(2),int32LE:m(4),floatBE:h("floatBE",4).map(function(n){return n.readFloatBE(0)}),floatLE:h("floatLE",4).map(function(n){return n.readFloatLE(0)}),doubleBE:h("doubleBE",8).map(function(n){return n.readDoubleBE(0)}),doubleLE:h("doubleLE",8).map(function(n){return n.readDoubleLE(0)})},n.exports=e}])});
10562
9749
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/node_modules/buffer/index.js */ "./node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer))
10563
9750
 
10564
- /***/ }),
10565
-
10566
- /***/ "./node_modules/process/browser.js":
10567
- /*!*****************************************!*\
10568
- !*** ./node_modules/process/browser.js ***!
10569
- \*****************************************/
10570
- /*! no static exports found */
10571
- /***/ (function(module, exports) {
10572
-
10573
- // shim for using process in browser
10574
- var process = module.exports = {};
10575
-
10576
- // cached from whatever global is present so that test runners that stub it
10577
- // don't break things. But we need to wrap it in a try catch in case it is
10578
- // wrapped in strict mode code which doesn't define any globals. It's inside a
10579
- // function because try/catches deoptimize in certain engines.
10580
-
10581
- var cachedSetTimeout;
10582
- var cachedClearTimeout;
10583
-
10584
- function defaultSetTimout() {
10585
- throw new Error('setTimeout has not been defined');
10586
- }
10587
- function defaultClearTimeout () {
10588
- throw new Error('clearTimeout has not been defined');
10589
- }
10590
- (function () {
10591
- try {
10592
- if (typeof setTimeout === 'function') {
10593
- cachedSetTimeout = setTimeout;
10594
- } else {
10595
- cachedSetTimeout = defaultSetTimout;
10596
- }
10597
- } catch (e) {
10598
- cachedSetTimeout = defaultSetTimout;
10599
- }
10600
- try {
10601
- if (typeof clearTimeout === 'function') {
10602
- cachedClearTimeout = clearTimeout;
10603
- } else {
10604
- cachedClearTimeout = defaultClearTimeout;
10605
- }
10606
- } catch (e) {
10607
- cachedClearTimeout = defaultClearTimeout;
10608
- }
10609
- } ())
10610
- function runTimeout(fun) {
10611
- if (cachedSetTimeout === setTimeout) {
10612
- //normal enviroments in sane situations
10613
- return setTimeout(fun, 0);
10614
- }
10615
- // if setTimeout wasn't available but was latter defined
10616
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
10617
- cachedSetTimeout = setTimeout;
10618
- return setTimeout(fun, 0);
10619
- }
10620
- try {
10621
- // when when somebody has screwed with setTimeout but no I.E. maddness
10622
- return cachedSetTimeout(fun, 0);
10623
- } catch(e){
10624
- try {
10625
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
10626
- return cachedSetTimeout.call(null, fun, 0);
10627
- } catch(e){
10628
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
10629
- return cachedSetTimeout.call(this, fun, 0);
10630
- }
10631
- }
10632
-
10633
-
10634
- }
10635
- function runClearTimeout(marker) {
10636
- if (cachedClearTimeout === clearTimeout) {
10637
- //normal enviroments in sane situations
10638
- return clearTimeout(marker);
10639
- }
10640
- // if clearTimeout wasn't available but was latter defined
10641
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
10642
- cachedClearTimeout = clearTimeout;
10643
- return clearTimeout(marker);
10644
- }
10645
- try {
10646
- // when when somebody has screwed with setTimeout but no I.E. maddness
10647
- return cachedClearTimeout(marker);
10648
- } catch (e){
10649
- try {
10650
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
10651
- return cachedClearTimeout.call(null, marker);
10652
- } catch (e){
10653
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
10654
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
10655
- return cachedClearTimeout.call(this, marker);
10656
- }
10657
- }
10658
-
10659
-
10660
-
10661
- }
10662
- var queue = [];
10663
- var draining = false;
10664
- var currentQueue;
10665
- var queueIndex = -1;
10666
-
10667
- function cleanUpNextTick() {
10668
- if (!draining || !currentQueue) {
10669
- return;
10670
- }
10671
- draining = false;
10672
- if (currentQueue.length) {
10673
- queue = currentQueue.concat(queue);
10674
- } else {
10675
- queueIndex = -1;
10676
- }
10677
- if (queue.length) {
10678
- drainQueue();
10679
- }
10680
- }
10681
-
10682
- function drainQueue() {
10683
- if (draining) {
10684
- return;
10685
- }
10686
- var timeout = runTimeout(cleanUpNextTick);
10687
- draining = true;
10688
-
10689
- var len = queue.length;
10690
- while(len) {
10691
- currentQueue = queue;
10692
- queue = [];
10693
- while (++queueIndex < len) {
10694
- if (currentQueue) {
10695
- currentQueue[queueIndex].run();
10696
- }
10697
- }
10698
- queueIndex = -1;
10699
- len = queue.length;
10700
- }
10701
- currentQueue = null;
10702
- draining = false;
10703
- runClearTimeout(timeout);
10704
- }
10705
-
10706
- process.nextTick = function (fun) {
10707
- var args = new Array(arguments.length - 1);
10708
- if (arguments.length > 1) {
10709
- for (var i = 1; i < arguments.length; i++) {
10710
- args[i - 1] = arguments[i];
10711
- }
10712
- }
10713
- queue.push(new Item(fun, args));
10714
- if (queue.length === 1 && !draining) {
10715
- runTimeout(drainQueue);
10716
- }
10717
- };
10718
-
10719
- // v8 likes predictible objects
10720
- function Item(fun, array) {
10721
- this.fun = fun;
10722
- this.array = array;
10723
- }
10724
- Item.prototype.run = function () {
10725
- this.fun.apply(null, this.array);
10726
- };
10727
- process.title = 'browser';
10728
- process.browser = true;
10729
- process.env = {};
10730
- process.argv = [];
10731
- process.version = ''; // empty string to avoid regexp issues
10732
- process.versions = {};
10733
-
10734
- function noop() {}
10735
-
10736
- process.on = noop;
10737
- process.addListener = noop;
10738
- process.once = noop;
10739
- process.off = noop;
10740
- process.removeListener = noop;
10741
- process.removeAllListeners = noop;
10742
- process.emit = noop;
10743
- process.prependListener = noop;
10744
- process.prependOnceListener = noop;
10745
-
10746
- process.listeners = function (name) { return [] }
10747
-
10748
- process.binding = function (name) {
10749
- throw new Error('process.binding is not supported');
10750
- };
10751
-
10752
- process.cwd = function () { return '/' };
10753
- process.chdir = function (dir) {
10754
- throw new Error('process.chdir is not supported');
10755
- };
10756
- process.umask = function() { return 0; };
10757
-
10758
-
10759
9751
  /***/ }),
10760
9752
 
10761
9753
  /***/ "./node_modules/queue-microtask/index.js":
@@ -11914,6 +10906,107 @@ exports.default = _default;
11914
10906
 
11915
10907
  /***/ }),
11916
10908
 
10909
+ /***/ "./node_modules/ts-nested-error/build/nested-error.js":
10910
+ /*!************************************************************!*\
10911
+ !*** ./node_modules/ts-nested-error/build/nested-error.js ***!
10912
+ \************************************************************/
10913
+ /*! no static exports found */
10914
+ /***/ (function(module, exports, __webpack_require__) {
10915
+
10916
+ "use strict";
10917
+
10918
+ Object.defineProperty(exports, "__esModule", { value: true });
10919
+ exports.toError = exports.NestedError = void 0;
10920
+ /**
10921
+ * Subclass of standard `Error` that eagerly collects the callstack of the error
10922
+ * that caused it. This way you can investigate the core problem that happened
10923
+ * by looking at the callstack from up to bottom (from higher level errors to
10924
+ * lower level).
10925
+ */
10926
+ class NestedError extends Error {
10927
+ /**
10928
+ * Allocates an instance of `NestedError` with the given error `message` and
10929
+ * optional `innerError` (which will be automatically coerced using `toError()`).
10930
+ *
10931
+ * @param message Laconic error message to attach to the created `NestedError`.
10932
+ * @param innerErrors Optional errors that will be wrapped by this higher level
10933
+ * error. This value will be automatically coerced using `toError()`.
10934
+ */
10935
+ constructor(message, ...innerErrors) {
10936
+ super(message);
10937
+ const thisErrorReport = NestedError.getErrorReport(this);
10938
+ if (innerErrors.length === 1) {
10939
+ const innerError = toError(innerErrors[0]);
10940
+ this.innerErrors = [innerError];
10941
+ const errReport = NestedError.getErrorReport(innerError);
10942
+ this.stack = `${thisErrorReport}\n\n======= INNER ERROR =======\n\n${errReport}`;
10943
+ return;
10944
+ }
10945
+ this.innerErrors = innerErrors.map(err => toError(err));
10946
+ const innerErrorReports = this.innerErrors
10947
+ .map((error, idx) => {
10948
+ const errReport = NestedError.getErrorReport(error);
10949
+ return `======= INNER ERROR (${idx + 1} of ${innerErrors.length}) =======\n\n${errReport}`;
10950
+ })
10951
+ .join("\n\n");
10952
+ this.stack = `${thisErrorReport}\n\n${innerErrorReports}`;
10953
+ }
10954
+ /**
10955
+ * Provides the first `Error` of the `innerErrors` (if it exists);
10956
+ * otherwise, `null`.
10957
+ *
10958
+ * @deprecated Please shift to using the `innerErrors` (with an 's') property.
10959
+ */
10960
+ get innerError() {
10961
+ return this.innerErrors.length === 0
10962
+ ? null
10963
+ : this.innerErrors[0];
10964
+ }
10965
+ /**
10966
+ * Returns the function that accepts any value that was thrown as the first argument and
10967
+ * throws it wrapped into `NestedError` or class derived from `NestedError` (provided
10968
+ * this method was called directly in the context of that dervied class constructor)
10969
+ * with the given `message`.
10970
+ * Returned function will pass accepted `Error` object directly to `NestedError`
10971
+ * as `innerErrors` by invoking `toError(err)` on it.
10972
+ *
10973
+ * You'll most likely want to use this method with promises:
10974
+ *
10975
+ * ```ts
10976
+ * userService.getPage().then(
10977
+ * data => console.log(`Hooray! data: ${data}`),
10978
+ * NestedError.rethrow('failed to fetch users page')
10979
+ * );
10980
+ * ```
10981
+ *
10982
+ * @param message Message to attach `NestedError` created by the returned function.
10983
+ */
10984
+ static rethrow(message) {
10985
+ return (...errs) => { throw new this(message, ...errs); };
10986
+ }
10987
+ }
10988
+ exports.NestedError = NestedError;
10989
+ NestedError.getErrorReport = typeof new Error().stack === 'string'
10990
+ ? (err) => err.stack
10991
+ : (err) => `${err.name}: ${err.message}`;
10992
+ NestedError.prototype.name = "NestedError";
10993
+ function toError(err) {
10994
+ try {
10995
+ return err instanceof Error
10996
+ ? err
10997
+ : new Error(`Value that is not an instance of Error was thrown: ${err}`);
10998
+ }
10999
+ catch {
11000
+ return new Error("Failed to stringify non-instance of Error that was thrown." +
11001
+ "This is possibly due to the fact that toString() method of the value" +
11002
+ "doesn't return a primitive value.");
11003
+ }
11004
+ }
11005
+ exports.toError = toError;
11006
+ //# sourceMappingURL=nested-error.js.map
11007
+
11008
+ /***/ }),
11009
+
11917
11010
  /***/ "./node_modules/webpack/buildin/global.js":
11918
11011
  /*!***********************************!*\
11919
11012
  !*** (webpack)/buildin/global.js ***!