@vertexvis/utils 0.10.2-canary.7 → 0.11.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.
@@ -116,7 +116,7 @@ var hexRegex = /^(#|0x)?([A-Fa-f0-9]{6})$/;
116
116
  * Constructs a new color with the given red, green, blue and alpha values. If
117
117
  * alpha is undefined, defaults to 1.
118
118
  */
119
- var create = function (r, g, b, a) {
119
+ var create$2 = function (r, g, b, a) {
120
120
  if (a === void 0) { a = 255; }
121
121
  return { r: r, g: g, b: b, a: a };
122
122
  };
@@ -127,7 +127,7 @@ var create = function (r, g, b, a) {
127
127
  var fromNumber = function (num) {
128
128
  // tslint:disable:no-bitwise
129
129
  var normalized = num & 0xffffff;
130
- return create((normalized >> 16) & 0xff, (normalized >> 8) & 0xff, normalized & 0xff);
130
+ return create$2((normalized >> 16) & 0xff, (normalized >> 8) & 0xff, normalized & 0xff);
131
131
  // tslint:enable:no-bitwise
132
132
  };
133
133
  /**
@@ -149,11 +149,11 @@ var fromHexString = function (str) {
149
149
  var fromCss = function (css) {
150
150
  var rgbMatch = rgbRegex.exec(css);
151
151
  if (rgbMatch != null) {
152
- return create(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
152
+ return create$2(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
153
153
  }
154
154
  var rgbaMatch = rgbaRegex.exec(css);
155
155
  if (rgbaMatch != null) {
156
- return create(parseInt(rgbaMatch[1]), parseInt(rgbaMatch[2]), parseInt(rgbaMatch[3]), Math.floor(parseFloat(rgbaMatch[4]) * 255));
156
+ return create$2(parseInt(rgbaMatch[1]), parseInt(rgbaMatch[2]), parseInt(rgbaMatch[3]), Math.floor(parseFloat(rgbaMatch[4]) * 255));
157
157
  }
158
158
  if (hexRegex.test(css)) {
159
159
  return fromHexString(css);
@@ -164,7 +164,7 @@ var fromCss = function (css) {
164
164
  * expected to be `[r, g, b]` or `[r, g, b, a]`.
165
165
  */
166
166
  var fromArray = function (rgba) {
167
- return create(rgba[0], rgba[1], rgba[2], rgba[3]);
167
+ return create$2(rgba[0], rgba[1], rgba[2], rgba[3]);
168
168
  };
169
169
  /**
170
170
  * Returns `true` if the color's alpha channel is 0.
@@ -192,7 +192,7 @@ var componentToHex = function (num) {
192
192
 
193
193
  var color = /*#__PURE__*/Object.freeze({
194
194
  __proto__: null,
195
- create: create,
195
+ create: create$2,
196
196
  fromNumber: fromNumber,
197
197
  fromHexString: fromHexString,
198
198
  fromCss: fromCss,
@@ -580,7 +580,7 @@ function isObjectObject(o) {
580
580
  && Object.prototype.toString.call(o) === '[object Object]';
581
581
  }
582
582
 
583
- function isPlainObject(o) {
583
+ function isPlainObject$1(o) {
584
584
  var ctor,prot;
585
585
 
586
586
  if (isObjectObject(o) === false) return false;
@@ -604,11 +604,8 @@ function isPlainObject(o) {
604
604
 
605
605
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
606
606
 
607
- function createCommonjsModule(fn, module) {
608
- return module = { exports: {} }, fn(module, module.exports), module.exports;
609
- }
607
+ var lodash_isequal = {exports: {}};
610
608
 
611
- var lodash_isequal = createCommonjsModule(function (module, exports) {
612
609
  /**
613
610
  * Lodash (Custom Build) <https://lodash.com/>
614
611
  * Build: `lodash modularize exports="npm" -o ./`
@@ -618,6 +615,7 @@ var lodash_isequal = createCommonjsModule(function (module, exports) {
618
615
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
619
616
  */
620
617
 
618
+ (function (module, exports) {
621
619
  /** Used as the size to enable large array optimizations. */
622
620
  var LARGE_ARRAY_SIZE = 200;
623
621
 
@@ -703,7 +701,7 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self
703
701
  var root = freeGlobal || freeSelf || Function('return this')();
704
702
 
705
703
  /** Detect free variable `exports`. */
706
- var freeExports = exports && !exports.nodeType && exports;
704
+ var freeExports = exports && !exports.nodeType && exports;
707
705
 
708
706
  /** Detect free variable `module`. */
709
707
  var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
@@ -2457,7 +2455,9 @@ function stubFalse() {
2457
2455
  }
2458
2456
 
2459
2457
  module.exports = isEqual;
2460
- });
2458
+ }(lodash_isequal, lodash_isequal.exports));
2459
+
2460
+ var areEqual = lodash_isequal.exports;
2461
2461
 
2462
2462
  function defaults() {
2463
2463
  var objects = [];
@@ -2475,7 +2475,7 @@ function defaults() {
2475
2475
  if (result[key] == null) {
2476
2476
  result[key] = b[key];
2477
2477
  }
2478
- else if (isPlainObject$1(result[key])) {
2478
+ else if (isPlainObject(result[key])) {
2479
2479
  result[key] = defaults(result[key], b[key]);
2480
2480
  }
2481
2481
  }
@@ -2505,8 +2505,8 @@ function defaults() {
2505
2505
  * isPlainObject(Object.create(null)); //=> false
2506
2506
  * ```
2507
2507
  */
2508
- function isPlainObject$1(obj) {
2509
- return isPlainObject(obj);
2508
+ function isPlainObject(obj) {
2509
+ return isPlainObject$1(obj);
2510
2510
  }
2511
2511
  /**
2512
2512
  * Performs a deep comparison of two objects and returns `true` if they're
@@ -2522,8 +2522,8 @@ function isPlainObject$1(obj) {
2522
2522
  * @param b The object to compare with `a`.
2523
2523
  * @returns `true` if the two objects are equal. Otherwise `false`.
2524
2524
  */
2525
- function isEqual(a, b) {
2526
- return lodash_isequal(a, b);
2525
+ function isEqual$1(a, b) {
2526
+ return areEqual(a, b);
2527
2527
  }
2528
2528
  function toPairs(obj) {
2529
2529
  if (obj != null) {
@@ -2554,8 +2554,8 @@ function fromPairs(pairs) {
2554
2554
  var objects = /*#__PURE__*/Object.freeze({
2555
2555
  __proto__: null,
2556
2556
  defaults: defaults,
2557
- isPlainObject: isPlainObject$1,
2558
- isEqual: isEqual,
2557
+ isPlainObject: isPlainObject,
2558
+ isEqual: isEqual$1,
2559
2559
  toPairs: toPairs,
2560
2560
  fromPairs: fromPairs
2561
2561
  });
@@ -2817,7 +2817,7 @@ var parseAndAddParams = function (baseStr, params) {
2817
2817
  var base = parse(baseStr);
2818
2818
  return params ? addQueryParams(params, base) : base;
2819
2819
  };
2820
- var isEqual$1 = function (a, b) {
2820
+ var isEqual = function (a, b) {
2821
2821
  var queryA = JSON.stringify(sortByQueryName(queryAsArray(a)));
2822
2822
  var queryB = JSON.stringify(sortByQueryName(queryAsArray(b)));
2823
2823
  return (a.scheme === b.scheme &&
@@ -2936,7 +2936,7 @@ var uri = /*#__PURE__*/Object.freeze({
2936
2936
  __proto__: null,
2937
2937
  parse: parse,
2938
2938
  parseAndAddParams: parseAndAddParams,
2939
- isEqual: isEqual$1,
2939
+ isEqual: isEqual,
2940
2940
  replacePath: replacePath,
2941
2941
  pathAsArray: pathAsArray,
2942
2942
  appendPath: appendPath,
@@ -3096,11 +3096,11 @@ function v1(options, buf, offset) {
3096
3096
  return buf || stringify(b);
3097
3097
  }
3098
3098
 
3099
- var create$2 = function () { return v1(); };
3099
+ var create = function () { return v1(); };
3100
3100
 
3101
3101
  var uuid = /*#__PURE__*/Object.freeze({
3102
3102
  __proto__: null,
3103
- create: create$2
3103
+ create: create
3104
3104
  });
3105
3105
 
3106
3106
  var EventDispatcher = /** @class */ (function () {