@player-ui/common-expressions-plugin 0.4.0-next.9 → 0.4.1-next.0

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,
@@ -4089,24 +4101,27 @@ class ValidatedBinding {
4089
4101
  });
4090
4102
  }
4091
4103
  }
4092
- runApplicableValidations(runner, canDismiss) {
4093
- this.applicableValidations = this.applicableValidations.map((obj) => {
4104
+ runApplicableValidations(runner, canDismiss, phase) {
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 (phase === "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);
@@ -4115,7 +4130,7 @@ class ValidatedBinding {
4115
4130
  value: obj.value,
4116
4131
  state: response ? "active" : "none",
4117
4132
  isBlockingNavigation,
4118
- dismissable: obj.value.severity === "warning" && this.currentPhase === "navigation",
4133
+ dismissable: obj.value.severity === "warning" && phase === "navigation",
4119
4134
  response: response ? __spreadProps$2(__spreadValues$3({}, obj.value), {
4120
4135
  message: (_b = response.message) != null ? _b : "Something is broken",
4121
4136
  severity: obj.value.severity,
@@ -4133,11 +4148,12 @@ 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
  }
4139
4155
  if (this.currentPhase === "navigation" || phase === this.currentPhase) {
4140
- this.runApplicableValidations(runner, canDismiss);
4156
+ this.runApplicableValidations(runner, canDismiss, phase);
4141
4157
  return;
4142
4158
  }
4143
4159
  if (phase === "load") {
@@ -4150,14 +4166,19 @@ 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,
4155
- ...this.currentPhase === "load" ? this.validationsByState.change : [],
4156
- ...this.validationsByState.navigation
4175
+ ...newApplicableValidations,
4176
+ ...this.validationsByState.navigation,
4177
+ ...this.currentPhase === "load" ? this.validationsByState.change : []
4157
4178
  ];
4158
4179
  this.currentPhase = "navigation";
4159
4180
  }
4160
- this.runApplicableValidations(runner, canDismiss);
4181
+ this.runApplicableValidations(runner, canDismiss, phase);
4161
4182
  }
4162
4183
  }
4163
4184
  class ValidationController {
@@ -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;
@@ -4751,6 +4764,25 @@ class ViewController {
4751
4764
  }
4752
4765
  }
4753
4766
 
4767
+ class ReadOnlyDataController {
4768
+ constructor(controller, logger) {
4769
+ this.controller = controller;
4770
+ this.logger = logger;
4771
+ }
4772
+ get(binding, options) {
4773
+ return this.controller.get(binding, options);
4774
+ }
4775
+ set(transaction, options) {
4776
+ var _a;
4777
+ (_a = this.logger) == null ? void 0 : _a.error("Error: Tried to set in a read only instance of the DataController");
4778
+ return [];
4779
+ }
4780
+ delete(binding, options) {
4781
+ var _a;
4782
+ (_a = this.logger) == null ? void 0 : _a.error("Error: Tried to delete in a read only instance of the DataController");
4783
+ }
4784
+ }
4785
+
4754
4786
  class DataController {
4755
4787
  constructor(model, options) {
4756
4788
  this.hooks = {
@@ -4875,6 +4907,9 @@ class DataController {
4875
4907
  serialize() {
4876
4908
  return this.hooks.serialize.call(this.get(""));
4877
4909
  }
4910
+ makeReadOnly() {
4911
+ return new ReadOnlyDataController(this, this.logger);
4912
+ }
4878
4913
  }
4879
4914
 
4880
4915
  var __defProp$1 = Object.defineProperty;
@@ -5054,8 +5089,8 @@ var __async = (__this, __arguments, generator) => {
5054
5089
  step((generator = generator.apply(__this, __arguments)).next());
5055
5090
  });
5056
5091
  };
5057
- const PLAYER_VERSION = "0.4.0-next.9";
5058
- const COMMIT = "e7681a2757fe0ab15d0c0e27c11d0ed33334d63f";
5092
+ const PLAYER_VERSION = "0.4.1-next.0";
5093
+ const COMMIT = "3fca14a3bf47195b400f5989a2f3ecbc5f73ac4b";
5059
5094
  const _Player = class {
5060
5095
  constructor(config) {
5061
5096
  this.logger = new TapableLogger();
@@ -5329,7 +5364,10 @@ const _Player = class {
5329
5364
  const endProps = {
5330
5365
  ref,
5331
5366
  status: "completed",
5332
- flow: state.flow
5367
+ flow: state.flow,
5368
+ controllers: {
5369
+ data: state.controllers.data.makeReadOnly()
5370
+ }
5333
5371
  };
5334
5372
  return maybeUpdateState(__spreadValues(__spreadValues({}, yield state.flowResult), endProps));
5335
5373
  } catch (error) {
@@ -7555,67 +7593,6 @@ module.exports = Array.isArray || function (arr) {
7555
7593
  };
7556
7594
 
7557
7595
 
7558
- /***/ }),
7559
-
7560
- /***/ "./node_modules/nested-error-stacks/index.js":
7561
- /*!***************************************************!*\
7562
- !*** ./node_modules/nested-error-stacks/index.js ***!
7563
- \***************************************************/
7564
- /*! no static exports found */
7565
- /***/ (function(module, exports, __webpack_require__) {
7566
-
7567
- var inherits = __webpack_require__(/*! util */ "./node_modules/node-libs-browser/node_modules/util/util.js").inherits;
7568
-
7569
- var NestedError = function (message, nested) {
7570
- this.nested = nested;
7571
-
7572
- if (message instanceof Error) {
7573
- nested = message;
7574
- } else if (typeof message !== 'undefined') {
7575
- Object.defineProperty(this, 'message', {
7576
- value: message,
7577
- writable: true,
7578
- enumerable: false,
7579
- configurable: true
7580
- });
7581
- }
7582
-
7583
- Error.captureStackTrace(this, this.constructor);
7584
- var oldStackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
7585
- var stackDescriptor = buildStackDescriptor(oldStackDescriptor, nested);
7586
- Object.defineProperty(this, 'stack', stackDescriptor);
7587
- };
7588
-
7589
- function buildStackDescriptor(oldStackDescriptor, nested) {
7590
- if (oldStackDescriptor.get) {
7591
- return {
7592
- get: function () {
7593
- var stack = oldStackDescriptor.get.call(this);
7594
- return buildCombinedStacks(stack, this.nested);
7595
- }
7596
- };
7597
- } else {
7598
- var stack = oldStackDescriptor.value;
7599
- return {
7600
- value: buildCombinedStacks(stack, nested)
7601
- };
7602
- }
7603
- }
7604
-
7605
- function buildCombinedStacks(stack, nested) {
7606
- if (nested) {
7607
- stack += '\nCaused By: ' + nested.stack;
7608
- }
7609
- return stack;
7610
- }
7611
-
7612
- inherits(NestedError, Error);
7613
- NestedError.prototype.name = 'NestedError';
7614
-
7615
-
7616
- module.exports = NestedError;
7617
-
7618
-
7619
7596
  /***/ }),
7620
7597
 
7621
7598
  /***/ "./node_modules/node-libs-browser/node_modules/buffer/index.js":
@@ -9420,771 +9397,6 @@ function isnan (val) {
9420
9397
 
9421
9398
  /***/ }),
9422
9399
 
9423
- /***/ "./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js":
9424
- /*!**********************************************************************************!*\
9425
- !*** ./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js ***!
9426
- \**********************************************************************************/
9427
- /*! no static exports found */
9428
- /***/ (function(module, exports) {
9429
-
9430
- if (typeof Object.create === 'function') {
9431
- // implementation from standard node.js 'util' module
9432
- module.exports = function inherits(ctor, superCtor) {
9433
- ctor.super_ = superCtor
9434
- ctor.prototype = Object.create(superCtor.prototype, {
9435
- constructor: {
9436
- value: ctor,
9437
- enumerable: false,
9438
- writable: true,
9439
- configurable: true
9440
- }
9441
- });
9442
- };
9443
- } else {
9444
- // old school shim for old browsers
9445
- module.exports = function inherits(ctor, superCtor) {
9446
- ctor.super_ = superCtor
9447
- var TempCtor = function () {}
9448
- TempCtor.prototype = superCtor.prototype
9449
- ctor.prototype = new TempCtor()
9450
- ctor.prototype.constructor = ctor
9451
- }
9452
- }
9453
-
9454
-
9455
- /***/ }),
9456
-
9457
- /***/ "./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js":
9458
- /*!*************************************************************************************!*\
9459
- !*** ./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js ***!
9460
- \*************************************************************************************/
9461
- /*! no static exports found */
9462
- /***/ (function(module, exports) {
9463
-
9464
- module.exports = function isBuffer(arg) {
9465
- return arg && typeof arg === 'object'
9466
- && typeof arg.copy === 'function'
9467
- && typeof arg.fill === 'function'
9468
- && typeof arg.readUInt8 === 'function';
9469
- }
9470
-
9471
- /***/ }),
9472
-
9473
- /***/ "./node_modules/node-libs-browser/node_modules/util/util.js":
9474
- /*!******************************************************************!*\
9475
- !*** ./node_modules/node-libs-browser/node_modules/util/util.js ***!
9476
- \******************************************************************/
9477
- /*! no static exports found */
9478
- /***/ (function(module, exports, __webpack_require__) {
9479
-
9480
- /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
9481
- //
9482
- // Permission is hereby granted, free of charge, to any person obtaining a
9483
- // copy of this software and associated documentation files (the
9484
- // "Software"), to deal in the Software without restriction, including
9485
- // without limitation the rights to use, copy, modify, merge, publish,
9486
- // distribute, sublicense, and/or sell copies of the Software, and to permit
9487
- // persons to whom the Software is furnished to do so, subject to the
9488
- // following conditions:
9489
- //
9490
- // The above copyright notice and this permission notice shall be included
9491
- // in all copies or substantial portions of the Software.
9492
- //
9493
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9494
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9495
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
9496
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
9497
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
9498
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
9499
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
9500
-
9501
- var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
9502
- function getOwnPropertyDescriptors(obj) {
9503
- var keys = Object.keys(obj);
9504
- var descriptors = {};
9505
- for (var i = 0; i < keys.length; i++) {
9506
- descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
9507
- }
9508
- return descriptors;
9509
- };
9510
-
9511
- var formatRegExp = /%[sdj%]/g;
9512
- exports.format = function(f) {
9513
- if (!isString(f)) {
9514
- var objects = [];
9515
- for (var i = 0; i < arguments.length; i++) {
9516
- objects.push(inspect(arguments[i]));
9517
- }
9518
- return objects.join(' ');
9519
- }
9520
-
9521
- var i = 1;
9522
- var args = arguments;
9523
- var len = args.length;
9524
- var str = String(f).replace(formatRegExp, function(x) {
9525
- if (x === '%%') return '%';
9526
- if (i >= len) return x;
9527
- switch (x) {
9528
- case '%s': return String(args[i++]);
9529
- case '%d': return Number(args[i++]);
9530
- case '%j':
9531
- try {
9532
- return JSON.stringify(args[i++]);
9533
- } catch (_) {
9534
- return '[Circular]';
9535
- }
9536
- default:
9537
- return x;
9538
- }
9539
- });
9540
- for (var x = args[i]; i < len; x = args[++i]) {
9541
- if (isNull(x) || !isObject(x)) {
9542
- str += ' ' + x;
9543
- } else {
9544
- str += ' ' + inspect(x);
9545
- }
9546
- }
9547
- return str;
9548
- };
9549
-
9550
-
9551
- // Mark that a method should not be used.
9552
- // Returns a modified function which warns once by default.
9553
- // If --no-deprecation is set, then it is a no-op.
9554
- exports.deprecate = function(fn, msg) {
9555
- if (typeof process !== 'undefined' && process.noDeprecation === true) {
9556
- return fn;
9557
- }
9558
-
9559
- // Allow for deprecating things in the process of starting up.
9560
- if (typeof process === 'undefined') {
9561
- return function() {
9562
- return exports.deprecate(fn, msg).apply(this, arguments);
9563
- };
9564
- }
9565
-
9566
- var warned = false;
9567
- function deprecated() {
9568
- if (!warned) {
9569
- if (process.throwDeprecation) {
9570
- throw new Error(msg);
9571
- } else if (process.traceDeprecation) {
9572
- console.trace(msg);
9573
- } else {
9574
- console.error(msg);
9575
- }
9576
- warned = true;
9577
- }
9578
- return fn.apply(this, arguments);
9579
- }
9580
-
9581
- return deprecated;
9582
- };
9583
-
9584
-
9585
- var debugs = {};
9586
- var debugEnviron;
9587
- exports.debuglog = function(set) {
9588
- if (isUndefined(debugEnviron))
9589
- debugEnviron = process.env.NODE_DEBUG || '';
9590
- set = set.toUpperCase();
9591
- if (!debugs[set]) {
9592
- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
9593
- var pid = process.pid;
9594
- debugs[set] = function() {
9595
- var msg = exports.format.apply(exports, arguments);
9596
- console.error('%s %d: %s', set, pid, msg);
9597
- };
9598
- } else {
9599
- debugs[set] = function() {};
9600
- }
9601
- }
9602
- return debugs[set];
9603
- };
9604
-
9605
-
9606
- /**
9607
- * Echos the value of a value. Trys to print the value out
9608
- * in the best way possible given the different types.
9609
- *
9610
- * @param {Object} obj The object to print out.
9611
- * @param {Object} opts Optional options object that alters the output.
9612
- */
9613
- /* legacy: obj, showHidden, depth, colors*/
9614
- function inspect(obj, opts) {
9615
- // default options
9616
- var ctx = {
9617
- seen: [],
9618
- stylize: stylizeNoColor
9619
- };
9620
- // legacy...
9621
- if (arguments.length >= 3) ctx.depth = arguments[2];
9622
- if (arguments.length >= 4) ctx.colors = arguments[3];
9623
- if (isBoolean(opts)) {
9624
- // legacy...
9625
- ctx.showHidden = opts;
9626
- } else if (opts) {
9627
- // got an "options" object
9628
- exports._extend(ctx, opts);
9629
- }
9630
- // set default options
9631
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
9632
- if (isUndefined(ctx.depth)) ctx.depth = 2;
9633
- if (isUndefined(ctx.colors)) ctx.colors = false;
9634
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
9635
- if (ctx.colors) ctx.stylize = stylizeWithColor;
9636
- return formatValue(ctx, obj, ctx.depth);
9637
- }
9638
- exports.inspect = inspect;
9639
-
9640
-
9641
- // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
9642
- inspect.colors = {
9643
- 'bold' : [1, 22],
9644
- 'italic' : [3, 23],
9645
- 'underline' : [4, 24],
9646
- 'inverse' : [7, 27],
9647
- 'white' : [37, 39],
9648
- 'grey' : [90, 39],
9649
- 'black' : [30, 39],
9650
- 'blue' : [34, 39],
9651
- 'cyan' : [36, 39],
9652
- 'green' : [32, 39],
9653
- 'magenta' : [35, 39],
9654
- 'red' : [31, 39],
9655
- 'yellow' : [33, 39]
9656
- };
9657
-
9658
- // Don't use 'blue' not visible on cmd.exe
9659
- inspect.styles = {
9660
- 'special': 'cyan',
9661
- 'number': 'yellow',
9662
- 'boolean': 'yellow',
9663
- 'undefined': 'grey',
9664
- 'null': 'bold',
9665
- 'string': 'green',
9666
- 'date': 'magenta',
9667
- // "name": intentionally not styling
9668
- 'regexp': 'red'
9669
- };
9670
-
9671
-
9672
- function stylizeWithColor(str, styleType) {
9673
- var style = inspect.styles[styleType];
9674
-
9675
- if (style) {
9676
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
9677
- '\u001b[' + inspect.colors[style][1] + 'm';
9678
- } else {
9679
- return str;
9680
- }
9681
- }
9682
-
9683
-
9684
- function stylizeNoColor(str, styleType) {
9685
- return str;
9686
- }
9687
-
9688
-
9689
- function arrayToHash(array) {
9690
- var hash = {};
9691
-
9692
- array.forEach(function(val, idx) {
9693
- hash[val] = true;
9694
- });
9695
-
9696
- return hash;
9697
- }
9698
-
9699
-
9700
- function formatValue(ctx, value, recurseTimes) {
9701
- // Provide a hook for user-specified inspect functions.
9702
- // Check that value is an object with an inspect function on it
9703
- if (ctx.customInspect &&
9704
- value &&
9705
- isFunction(value.inspect) &&
9706
- // Filter out the util module, it's inspect function is special
9707
- value.inspect !== exports.inspect &&
9708
- // Also filter out any prototype objects using the circular check.
9709
- !(value.constructor && value.constructor.prototype === value)) {
9710
- var ret = value.inspect(recurseTimes, ctx);
9711
- if (!isString(ret)) {
9712
- ret = formatValue(ctx, ret, recurseTimes);
9713
- }
9714
- return ret;
9715
- }
9716
-
9717
- // Primitive types cannot have properties
9718
- var primitive = formatPrimitive(ctx, value);
9719
- if (primitive) {
9720
- return primitive;
9721
- }
9722
-
9723
- // Look up the keys of the object.
9724
- var keys = Object.keys(value);
9725
- var visibleKeys = arrayToHash(keys);
9726
-
9727
- if (ctx.showHidden) {
9728
- keys = Object.getOwnPropertyNames(value);
9729
- }
9730
-
9731
- // IE doesn't make error fields non-enumerable
9732
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
9733
- if (isError(value)
9734
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
9735
- return formatError(value);
9736
- }
9737
-
9738
- // Some type of object without properties can be shortcutted.
9739
- if (keys.length === 0) {
9740
- if (isFunction(value)) {
9741
- var name = value.name ? ': ' + value.name : '';
9742
- return ctx.stylize('[Function' + name + ']', 'special');
9743
- }
9744
- if (isRegExp(value)) {
9745
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
9746
- }
9747
- if (isDate(value)) {
9748
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
9749
- }
9750
- if (isError(value)) {
9751
- return formatError(value);
9752
- }
9753
- }
9754
-
9755
- var base = '', array = false, braces = ['{', '}'];
9756
-
9757
- // Make Array say that they are Array
9758
- if (isArray(value)) {
9759
- array = true;
9760
- braces = ['[', ']'];
9761
- }
9762
-
9763
- // Make functions say that they are functions
9764
- if (isFunction(value)) {
9765
- var n = value.name ? ': ' + value.name : '';
9766
- base = ' [Function' + n + ']';
9767
- }
9768
-
9769
- // Make RegExps say that they are RegExps
9770
- if (isRegExp(value)) {
9771
- base = ' ' + RegExp.prototype.toString.call(value);
9772
- }
9773
-
9774
- // Make dates with properties first say the date
9775
- if (isDate(value)) {
9776
- base = ' ' + Date.prototype.toUTCString.call(value);
9777
- }
9778
-
9779
- // Make error with message first say the error
9780
- if (isError(value)) {
9781
- base = ' ' + formatError(value);
9782
- }
9783
-
9784
- if (keys.length === 0 && (!array || value.length == 0)) {
9785
- return braces[0] + base + braces[1];
9786
- }
9787
-
9788
- if (recurseTimes < 0) {
9789
- if (isRegExp(value)) {
9790
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
9791
- } else {
9792
- return ctx.stylize('[Object]', 'special');
9793
- }
9794
- }
9795
-
9796
- ctx.seen.push(value);
9797
-
9798
- var output;
9799
- if (array) {
9800
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
9801
- } else {
9802
- output = keys.map(function(key) {
9803
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
9804
- });
9805
- }
9806
-
9807
- ctx.seen.pop();
9808
-
9809
- return reduceToSingleString(output, base, braces);
9810
- }
9811
-
9812
-
9813
- function formatPrimitive(ctx, value) {
9814
- if (isUndefined(value))
9815
- return ctx.stylize('undefined', 'undefined');
9816
- if (isString(value)) {
9817
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
9818
- .replace(/'/g, "\\'")
9819
- .replace(/\\"/g, '"') + '\'';
9820
- return ctx.stylize(simple, 'string');
9821
- }
9822
- if (isNumber(value))
9823
- return ctx.stylize('' + value, 'number');
9824
- if (isBoolean(value))
9825
- return ctx.stylize('' + value, 'boolean');
9826
- // For some reason typeof null is "object", so special case here.
9827
- if (isNull(value))
9828
- return ctx.stylize('null', 'null');
9829
- }
9830
-
9831
-
9832
- function formatError(value) {
9833
- return '[' + Error.prototype.toString.call(value) + ']';
9834
- }
9835
-
9836
-
9837
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
9838
- var output = [];
9839
- for (var i = 0, l = value.length; i < l; ++i) {
9840
- if (hasOwnProperty(value, String(i))) {
9841
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
9842
- String(i), true));
9843
- } else {
9844
- output.push('');
9845
- }
9846
- }
9847
- keys.forEach(function(key) {
9848
- if (!key.match(/^\d+$/)) {
9849
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
9850
- key, true));
9851
- }
9852
- });
9853
- return output;
9854
- }
9855
-
9856
-
9857
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
9858
- var name, str, desc;
9859
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
9860
- if (desc.get) {
9861
- if (desc.set) {
9862
- str = ctx.stylize('[Getter/Setter]', 'special');
9863
- } else {
9864
- str = ctx.stylize('[Getter]', 'special');
9865
- }
9866
- } else {
9867
- if (desc.set) {
9868
- str = ctx.stylize('[Setter]', 'special');
9869
- }
9870
- }
9871
- if (!hasOwnProperty(visibleKeys, key)) {
9872
- name = '[' + key + ']';
9873
- }
9874
- if (!str) {
9875
- if (ctx.seen.indexOf(desc.value) < 0) {
9876
- if (isNull(recurseTimes)) {
9877
- str = formatValue(ctx, desc.value, null);
9878
- } else {
9879
- str = formatValue(ctx, desc.value, recurseTimes - 1);
9880
- }
9881
- if (str.indexOf('\n') > -1) {
9882
- if (array) {
9883
- str = str.split('\n').map(function(line) {
9884
- return ' ' + line;
9885
- }).join('\n').substr(2);
9886
- } else {
9887
- str = '\n' + str.split('\n').map(function(line) {
9888
- return ' ' + line;
9889
- }).join('\n');
9890
- }
9891
- }
9892
- } else {
9893
- str = ctx.stylize('[Circular]', 'special');
9894
- }
9895
- }
9896
- if (isUndefined(name)) {
9897
- if (array && key.match(/^\d+$/)) {
9898
- return str;
9899
- }
9900
- name = JSON.stringify('' + key);
9901
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
9902
- name = name.substr(1, name.length - 2);
9903
- name = ctx.stylize(name, 'name');
9904
- } else {
9905
- name = name.replace(/'/g, "\\'")
9906
- .replace(/\\"/g, '"')
9907
- .replace(/(^"|"$)/g, "'");
9908
- name = ctx.stylize(name, 'string');
9909
- }
9910
- }
9911
-
9912
- return name + ': ' + str;
9913
- }
9914
-
9915
-
9916
- function reduceToSingleString(output, base, braces) {
9917
- var numLinesEst = 0;
9918
- var length = output.reduce(function(prev, cur) {
9919
- numLinesEst++;
9920
- if (cur.indexOf('\n') >= 0) numLinesEst++;
9921
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
9922
- }, 0);
9923
-
9924
- if (length > 60) {
9925
- return braces[0] +
9926
- (base === '' ? '' : base + '\n ') +
9927
- ' ' +
9928
- output.join(',\n ') +
9929
- ' ' +
9930
- braces[1];
9931
- }
9932
-
9933
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
9934
- }
9935
-
9936
-
9937
- // NOTE: These type checking functions intentionally don't use `instanceof`
9938
- // because it is fragile and can be easily faked with `Object.create()`.
9939
- function isArray(ar) {
9940
- return Array.isArray(ar);
9941
- }
9942
- exports.isArray = isArray;
9943
-
9944
- function isBoolean(arg) {
9945
- return typeof arg === 'boolean';
9946
- }
9947
- exports.isBoolean = isBoolean;
9948
-
9949
- function isNull(arg) {
9950
- return arg === null;
9951
- }
9952
- exports.isNull = isNull;
9953
-
9954
- function isNullOrUndefined(arg) {
9955
- return arg == null;
9956
- }
9957
- exports.isNullOrUndefined = isNullOrUndefined;
9958
-
9959
- function isNumber(arg) {
9960
- return typeof arg === 'number';
9961
- }
9962
- exports.isNumber = isNumber;
9963
-
9964
- function isString(arg) {
9965
- return typeof arg === 'string';
9966
- }
9967
- exports.isString = isString;
9968
-
9969
- function isSymbol(arg) {
9970
- return typeof arg === 'symbol';
9971
- }
9972
- exports.isSymbol = isSymbol;
9973
-
9974
- function isUndefined(arg) {
9975
- return arg === void 0;
9976
- }
9977
- exports.isUndefined = isUndefined;
9978
-
9979
- function isRegExp(re) {
9980
- return isObject(re) && objectToString(re) === '[object RegExp]';
9981
- }
9982
- exports.isRegExp = isRegExp;
9983
-
9984
- function isObject(arg) {
9985
- return typeof arg === 'object' && arg !== null;
9986
- }
9987
- exports.isObject = isObject;
9988
-
9989
- function isDate(d) {
9990
- return isObject(d) && objectToString(d) === '[object Date]';
9991
- }
9992
- exports.isDate = isDate;
9993
-
9994
- function isError(e) {
9995
- return isObject(e) &&
9996
- (objectToString(e) === '[object Error]' || e instanceof Error);
9997
- }
9998
- exports.isError = isError;
9999
-
10000
- function isFunction(arg) {
10001
- return typeof arg === 'function';
10002
- }
10003
- exports.isFunction = isFunction;
10004
-
10005
- function isPrimitive(arg) {
10006
- return arg === null ||
10007
- typeof arg === 'boolean' ||
10008
- typeof arg === 'number' ||
10009
- typeof arg === 'string' ||
10010
- typeof arg === 'symbol' || // ES6 symbol
10011
- typeof arg === 'undefined';
10012
- }
10013
- exports.isPrimitive = isPrimitive;
10014
-
10015
- exports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ "./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js");
10016
-
10017
- function objectToString(o) {
10018
- return Object.prototype.toString.call(o);
10019
- }
10020
-
10021
-
10022
- function pad(n) {
10023
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
10024
- }
10025
-
10026
-
10027
- var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
10028
- 'Oct', 'Nov', 'Dec'];
10029
-
10030
- // 26 Feb 16:19:34
10031
- function timestamp() {
10032
- var d = new Date();
10033
- var time = [pad(d.getHours()),
10034
- pad(d.getMinutes()),
10035
- pad(d.getSeconds())].join(':');
10036
- return [d.getDate(), months[d.getMonth()], time].join(' ');
10037
- }
10038
-
10039
-
10040
- // log is just a thin wrapper to console.log that prepends a timestamp
10041
- exports.log = function() {
10042
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
10043
- };
10044
-
10045
-
10046
- /**
10047
- * Inherit the prototype methods from one constructor into another.
10048
- *
10049
- * The Function.prototype.inherits from lang.js rewritten as a standalone
10050
- * function (not on Function.prototype). NOTE: If this file is to be loaded
10051
- * during bootstrapping this function needs to be rewritten using some native
10052
- * functions as prototype setup using normal JavaScript does not work as
10053
- * expected during bootstrapping (see mirror.js in r114903).
10054
- *
10055
- * @param {function} ctor Constructor function which needs to inherit the
10056
- * prototype.
10057
- * @param {function} superCtor Constructor function to inherit prototype from.
10058
- */
10059
- exports.inherits = __webpack_require__(/*! inherits */ "./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js");
10060
-
10061
- exports._extend = function(origin, add) {
10062
- // Don't do anything if add isn't an object
10063
- if (!add || !isObject(add)) return origin;
10064
-
10065
- var keys = Object.keys(add);
10066
- var i = keys.length;
10067
- while (i--) {
10068
- origin[keys[i]] = add[keys[i]];
10069
- }
10070
- return origin;
10071
- };
10072
-
10073
- function hasOwnProperty(obj, prop) {
10074
- return Object.prototype.hasOwnProperty.call(obj, prop);
10075
- }
10076
-
10077
- var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
10078
-
10079
- exports.promisify = function promisify(original) {
10080
- if (typeof original !== 'function')
10081
- throw new TypeError('The "original" argument must be of type Function');
10082
-
10083
- if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
10084
- var fn = original[kCustomPromisifiedSymbol];
10085
- if (typeof fn !== 'function') {
10086
- throw new TypeError('The "util.promisify.custom" argument must be of type Function');
10087
- }
10088
- Object.defineProperty(fn, kCustomPromisifiedSymbol, {
10089
- value: fn, enumerable: false, writable: false, configurable: true
10090
- });
10091
- return fn;
10092
- }
10093
-
10094
- function fn() {
10095
- var promiseResolve, promiseReject;
10096
- var promise = new Promise(function (resolve, reject) {
10097
- promiseResolve = resolve;
10098
- promiseReject = reject;
10099
- });
10100
-
10101
- var args = [];
10102
- for (var i = 0; i < arguments.length; i++) {
10103
- args.push(arguments[i]);
10104
- }
10105
- args.push(function (err, value) {
10106
- if (err) {
10107
- promiseReject(err);
10108
- } else {
10109
- promiseResolve(value);
10110
- }
10111
- });
10112
-
10113
- try {
10114
- original.apply(this, args);
10115
- } catch (err) {
10116
- promiseReject(err);
10117
- }
10118
-
10119
- return promise;
10120
- }
10121
-
10122
- Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
10123
-
10124
- if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
10125
- value: fn, enumerable: false, writable: false, configurable: true
10126
- });
10127
- return Object.defineProperties(
10128
- fn,
10129
- getOwnPropertyDescriptors(original)
10130
- );
10131
- }
10132
-
10133
- exports.promisify.custom = kCustomPromisifiedSymbol
10134
-
10135
- function callbackifyOnRejected(reason, cb) {
10136
- // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
10137
- // Because `null` is a special error value in callbacks which means "no error
10138
- // occurred", we error-wrap so the callback consumer can distinguish between
10139
- // "the promise rejected with null" or "the promise fulfilled with undefined".
10140
- if (!reason) {
10141
- var newReason = new Error('Promise was rejected with a falsy value');
10142
- newReason.reason = reason;
10143
- reason = newReason;
10144
- }
10145
- return cb(reason);
10146
- }
10147
-
10148
- function callbackify(original) {
10149
- if (typeof original !== 'function') {
10150
- throw new TypeError('The "original" argument must be of type Function');
10151
- }
10152
-
10153
- // We DO NOT return the promise as it gives the user a false sense that
10154
- // the promise is actually somehow related to the callback's execution
10155
- // and that the callback throwing will reject the promise.
10156
- function callbackified() {
10157
- var args = [];
10158
- for (var i = 0; i < arguments.length; i++) {
10159
- args.push(arguments[i]);
10160
- }
10161
-
10162
- var maybeCb = args.pop();
10163
- if (typeof maybeCb !== 'function') {
10164
- throw new TypeError('The last argument must be of type Function');
10165
- }
10166
- var self = this;
10167
- var cb = function() {
10168
- return maybeCb.apply(self, arguments);
10169
- };
10170
- // In true node style we process the callback on `nextTick` with all the
10171
- // implications (stack, `uncaughtException`, `async_hooks`)
10172
- original.apply(this, args)
10173
- .then(function(ret) { process.nextTick(cb, null, ret) },
10174
- function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });
10175
- }
10176
-
10177
- Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
10178
- Object.defineProperties(callbackified,
10179
- getOwnPropertyDescriptors(original));
10180
- return callbackified;
10181
- }
10182
- exports.callbackify = callbackify;
10183
-
10184
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ "./node_modules/process/browser.js")))
10185
-
10186
- /***/ }),
10187
-
10188
9400
  /***/ "./node_modules/p-defer/index.js":
10189
9401
  /*!***************************************!*\
10190
9402
  !*** ./node_modules/p-defer/index.js ***!
@@ -10221,201 +9433,6 @@ module.exports = pDefer;
10221
9433
  /* 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}])});
10222
9434
  /* 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))
10223
9435
 
10224
- /***/ }),
10225
-
10226
- /***/ "./node_modules/process/browser.js":
10227
- /*!*****************************************!*\
10228
- !*** ./node_modules/process/browser.js ***!
10229
- \*****************************************/
10230
- /*! no static exports found */
10231
- /***/ (function(module, exports) {
10232
-
10233
- // shim for using process in browser
10234
- var process = module.exports = {};
10235
-
10236
- // cached from whatever global is present so that test runners that stub it
10237
- // don't break things. But we need to wrap it in a try catch in case it is
10238
- // wrapped in strict mode code which doesn't define any globals. It's inside a
10239
- // function because try/catches deoptimize in certain engines.
10240
-
10241
- var cachedSetTimeout;
10242
- var cachedClearTimeout;
10243
-
10244
- function defaultSetTimout() {
10245
- throw new Error('setTimeout has not been defined');
10246
- }
10247
- function defaultClearTimeout () {
10248
- throw new Error('clearTimeout has not been defined');
10249
- }
10250
- (function () {
10251
- try {
10252
- if (typeof setTimeout === 'function') {
10253
- cachedSetTimeout = setTimeout;
10254
- } else {
10255
- cachedSetTimeout = defaultSetTimout;
10256
- }
10257
- } catch (e) {
10258
- cachedSetTimeout = defaultSetTimout;
10259
- }
10260
- try {
10261
- if (typeof clearTimeout === 'function') {
10262
- cachedClearTimeout = clearTimeout;
10263
- } else {
10264
- cachedClearTimeout = defaultClearTimeout;
10265
- }
10266
- } catch (e) {
10267
- cachedClearTimeout = defaultClearTimeout;
10268
- }
10269
- } ())
10270
- function runTimeout(fun) {
10271
- if (cachedSetTimeout === setTimeout) {
10272
- //normal enviroments in sane situations
10273
- return setTimeout(fun, 0);
10274
- }
10275
- // if setTimeout wasn't available but was latter defined
10276
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
10277
- cachedSetTimeout = setTimeout;
10278
- return setTimeout(fun, 0);
10279
- }
10280
- try {
10281
- // when when somebody has screwed with setTimeout but no I.E. maddness
10282
- return cachedSetTimeout(fun, 0);
10283
- } catch(e){
10284
- try {
10285
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
10286
- return cachedSetTimeout.call(null, fun, 0);
10287
- } catch(e){
10288
- // 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
10289
- return cachedSetTimeout.call(this, fun, 0);
10290
- }
10291
- }
10292
-
10293
-
10294
- }
10295
- function runClearTimeout(marker) {
10296
- if (cachedClearTimeout === clearTimeout) {
10297
- //normal enviroments in sane situations
10298
- return clearTimeout(marker);
10299
- }
10300
- // if clearTimeout wasn't available but was latter defined
10301
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
10302
- cachedClearTimeout = clearTimeout;
10303
- return clearTimeout(marker);
10304
- }
10305
- try {
10306
- // when when somebody has screwed with setTimeout but no I.E. maddness
10307
- return cachedClearTimeout(marker);
10308
- } catch (e){
10309
- try {
10310
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
10311
- return cachedClearTimeout.call(null, marker);
10312
- } catch (e){
10313
- // 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.
10314
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
10315
- return cachedClearTimeout.call(this, marker);
10316
- }
10317
- }
10318
-
10319
-
10320
-
10321
- }
10322
- var queue = [];
10323
- var draining = false;
10324
- var currentQueue;
10325
- var queueIndex = -1;
10326
-
10327
- function cleanUpNextTick() {
10328
- if (!draining || !currentQueue) {
10329
- return;
10330
- }
10331
- draining = false;
10332
- if (currentQueue.length) {
10333
- queue = currentQueue.concat(queue);
10334
- } else {
10335
- queueIndex = -1;
10336
- }
10337
- if (queue.length) {
10338
- drainQueue();
10339
- }
10340
- }
10341
-
10342
- function drainQueue() {
10343
- if (draining) {
10344
- return;
10345
- }
10346
- var timeout = runTimeout(cleanUpNextTick);
10347
- draining = true;
10348
-
10349
- var len = queue.length;
10350
- while(len) {
10351
- currentQueue = queue;
10352
- queue = [];
10353
- while (++queueIndex < len) {
10354
- if (currentQueue) {
10355
- currentQueue[queueIndex].run();
10356
- }
10357
- }
10358
- queueIndex = -1;
10359
- len = queue.length;
10360
- }
10361
- currentQueue = null;
10362
- draining = false;
10363
- runClearTimeout(timeout);
10364
- }
10365
-
10366
- process.nextTick = function (fun) {
10367
- var args = new Array(arguments.length - 1);
10368
- if (arguments.length > 1) {
10369
- for (var i = 1; i < arguments.length; i++) {
10370
- args[i - 1] = arguments[i];
10371
- }
10372
- }
10373
- queue.push(new Item(fun, args));
10374
- if (queue.length === 1 && !draining) {
10375
- runTimeout(drainQueue);
10376
- }
10377
- };
10378
-
10379
- // v8 likes predictible objects
10380
- function Item(fun, array) {
10381
- this.fun = fun;
10382
- this.array = array;
10383
- }
10384
- Item.prototype.run = function () {
10385
- this.fun.apply(null, this.array);
10386
- };
10387
- process.title = 'browser';
10388
- process.browser = true;
10389
- process.env = {};
10390
- process.argv = [];
10391
- process.version = ''; // empty string to avoid regexp issues
10392
- process.versions = {};
10393
-
10394
- function noop() {}
10395
-
10396
- process.on = noop;
10397
- process.addListener = noop;
10398
- process.once = noop;
10399
- process.off = noop;
10400
- process.removeListener = noop;
10401
- process.removeAllListeners = noop;
10402
- process.emit = noop;
10403
- process.prependListener = noop;
10404
- process.prependOnceListener = noop;
10405
-
10406
- process.listeners = function (name) { return [] }
10407
-
10408
- process.binding = function (name) {
10409
- throw new Error('process.binding is not supported');
10410
- };
10411
-
10412
- process.cwd = function () { return '/' };
10413
- process.chdir = function (dir) {
10414
- throw new Error('process.chdir is not supported');
10415
- };
10416
- process.umask = function() { return 0; };
10417
-
10418
-
10419
9436
  /***/ }),
10420
9437
 
10421
9438
  /***/ "./node_modules/queue-microtask/index.js":
@@ -11574,6 +10591,107 @@ exports.default = _default;
11574
10591
 
11575
10592
  /***/ }),
11576
10593
 
10594
+ /***/ "./node_modules/ts-nested-error/build/nested-error.js":
10595
+ /*!************************************************************!*\
10596
+ !*** ./node_modules/ts-nested-error/build/nested-error.js ***!
10597
+ \************************************************************/
10598
+ /*! no static exports found */
10599
+ /***/ (function(module, exports, __webpack_require__) {
10600
+
10601
+ "use strict";
10602
+
10603
+ Object.defineProperty(exports, "__esModule", { value: true });
10604
+ exports.toError = exports.NestedError = void 0;
10605
+ /**
10606
+ * Subclass of standard `Error` that eagerly collects the callstack of the error
10607
+ * that caused it. This way you can investigate the core problem that happened
10608
+ * by looking at the callstack from up to bottom (from higher level errors to
10609
+ * lower level).
10610
+ */
10611
+ class NestedError extends Error {
10612
+ /**
10613
+ * Allocates an instance of `NestedError` with the given error `message` and
10614
+ * optional `innerError` (which will be automatically coerced using `toError()`).
10615
+ *
10616
+ * @param message Laconic error message to attach to the created `NestedError`.
10617
+ * @param innerErrors Optional errors that will be wrapped by this higher level
10618
+ * error. This value will be automatically coerced using `toError()`.
10619
+ */
10620
+ constructor(message, ...innerErrors) {
10621
+ super(message);
10622
+ const thisErrorReport = NestedError.getErrorReport(this);
10623
+ if (innerErrors.length === 1) {
10624
+ const innerError = toError(innerErrors[0]);
10625
+ this.innerErrors = [innerError];
10626
+ const errReport = NestedError.getErrorReport(innerError);
10627
+ this.stack = `${thisErrorReport}\n\n======= INNER ERROR =======\n\n${errReport}`;
10628
+ return;
10629
+ }
10630
+ this.innerErrors = innerErrors.map(err => toError(err));
10631
+ const innerErrorReports = this.innerErrors
10632
+ .map((error, idx) => {
10633
+ const errReport = NestedError.getErrorReport(error);
10634
+ return `======= INNER ERROR (${idx + 1} of ${innerErrors.length}) =======\n\n${errReport}`;
10635
+ })
10636
+ .join("\n\n");
10637
+ this.stack = `${thisErrorReport}\n\n${innerErrorReports}`;
10638
+ }
10639
+ /**
10640
+ * Provides the first `Error` of the `innerErrors` (if it exists);
10641
+ * otherwise, `null`.
10642
+ *
10643
+ * @deprecated Please shift to using the `innerErrors` (with an 's') property.
10644
+ */
10645
+ get innerError() {
10646
+ return this.innerErrors.length === 0
10647
+ ? null
10648
+ : this.innerErrors[0];
10649
+ }
10650
+ /**
10651
+ * Returns the function that accepts any value that was thrown as the first argument and
10652
+ * throws it wrapped into `NestedError` or class derived from `NestedError` (provided
10653
+ * this method was called directly in the context of that dervied class constructor)
10654
+ * with the given `message`.
10655
+ * Returned function will pass accepted `Error` object directly to `NestedError`
10656
+ * as `innerErrors` by invoking `toError(err)` on it.
10657
+ *
10658
+ * You'll most likely want to use this method with promises:
10659
+ *
10660
+ * ```ts
10661
+ * userService.getPage().then(
10662
+ * data => console.log(`Hooray! data: ${data}`),
10663
+ * NestedError.rethrow('failed to fetch users page')
10664
+ * );
10665
+ * ```
10666
+ *
10667
+ * @param message Message to attach `NestedError` created by the returned function.
10668
+ */
10669
+ static rethrow(message) {
10670
+ return (...errs) => { throw new this(message, ...errs); };
10671
+ }
10672
+ }
10673
+ exports.NestedError = NestedError;
10674
+ NestedError.getErrorReport = typeof new Error().stack === 'string'
10675
+ ? (err) => err.stack
10676
+ : (err) => `${err.name}: ${err.message}`;
10677
+ NestedError.prototype.name = "NestedError";
10678
+ function toError(err) {
10679
+ try {
10680
+ return err instanceof Error
10681
+ ? err
10682
+ : new Error(`Value that is not an instance of Error was thrown: ${err}`);
10683
+ }
10684
+ catch {
10685
+ return new Error("Failed to stringify non-instance of Error that was thrown." +
10686
+ "This is possibly due to the fact that toString() method of the value" +
10687
+ "doesn't return a primitive value.");
10688
+ }
10689
+ }
10690
+ exports.toError = toError;
10691
+ //# sourceMappingURL=nested-error.js.map
10692
+
10693
+ /***/ }),
10694
+
11577
10695
  /***/ "./node_modules/webpack/buildin/global.js":
11578
10696
  /*!***********************************!*\
11579
10697
  !*** (webpack)/buildin/global.js ***!