vis-util 5.0.2 → 5.0.3

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.
@@ -4,8 +4,8 @@
4
4
  *
5
5
  * utilitie collection for visjs
6
6
  *
7
- * @version 5.0.2
8
- * @date 2021-02-06T21:33:57.447Z
7
+ * @version 5.0.3
8
+ * @date 2022-03-04T18:53:16.725Z
9
9
  *
10
10
  * @copyright (c) 2011-2017 Almende B.V, http://almende.com
11
11
  * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
@@ -28,7 +28,7 @@
28
28
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('component-emitter'), require('@egjs/hammerjs')) :
29
29
  typeof define === 'function' && define.amd ? define(['exports', 'component-emitter', '@egjs/hammerjs'], factory) :
30
30
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.vis = global.vis || {}, global.Emitter, global.Hammer));
31
- }(this, (function (exports, Emitter, RealHammer) {
31
+ })(this, (function (exports, Emitter, RealHammer) {
32
32
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
33
33
 
34
34
  var Emitter__default = /*#__PURE__*/_interopDefaultLegacy(Emitter);
@@ -43,7 +43,6 @@
43
43
  *
44
44
  * @param base - The base object that fullfils the whole interface T.
45
45
  * @param updates - Updates that may change or delete props.
46
- *
47
46
  * @returns A brand new instance with all the supplied objects deeply merged.
48
47
  */
49
48
  function pureDeepObjectAssign(base, ...updates) {
@@ -53,7 +52,6 @@
53
52
  * Deep version of object assign with additional deleting by the DELETE symbol.
54
53
  *
55
54
  * @param values - Objects to be deeply merged.
56
- *
57
55
  * @returns The first object from values.
58
56
  */
59
57
  function deepObjectAssign(...values) {
@@ -66,9 +64,7 @@
66
64
  *
67
65
  * @remarks
68
66
  * This doesn't strip the DELETE symbols so they may end up in the final object.
69
- *
70
67
  * @param values - Objects to be deeply merged.
71
- *
72
68
  * @returns The first object from values.
73
69
  */
74
70
  function deepObjectAssignNonentry(...values) {
@@ -103,7 +99,6 @@
103
99
  * Deep clone given object or array. In case of primitive simply return.
104
100
  *
105
101
  * @param a - Anything.
106
- *
107
102
  * @returns Deep cloned object/array or unchanged a.
108
103
  */
109
104
  function clone(a) {
@@ -146,7 +141,6 @@
146
141
  *
147
142
  * @param seed - All supplied arguments will be used as a seed. In case nothing
148
143
  * is supplied the current time will be used to seed the generator.
149
- *
150
144
  * @returns A ready to use seeded generator.
151
145
  */
152
146
  function Alea(...seed) {
@@ -156,7 +150,6 @@
156
150
  * An implementation of [[Alea]] without user input validation.
157
151
  *
158
152
  * @param seed - The data that will be used to seed the generator.
159
- *
160
153
  * @returns A ready to use seeded generator.
161
154
  */
162
155
  function AleaImplementation(seed) {
@@ -180,7 +173,6 @@
180
173
  * random numbers.
181
174
  *
182
175
  * @param seed - Arbitrary data that will be used as the seed.
183
- *
184
176
  * @returns Three numbers to use as initial values for [[AleaImplementation]].
185
177
  */
186
178
  function mashSeed(...seed) {
@@ -252,9 +244,9 @@
252
244
  };
253
245
  }
254
246
 
255
- const Hammer =
247
+ const Hammer$1 =
256
248
  typeof window !== "undefined"
257
- ? window.Hammer || RealHammer__default['default']
249
+ ? window.Hammer || RealHammer__default["default"]
258
250
  : function () {
259
251
  // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object.
260
252
  return hammerMock();
@@ -271,7 +263,7 @@
271
263
  * @param {Element} container
272
264
  * @class Activator
273
265
  */
274
- function Activator(container) {
266
+ function Activator$1(container) {
275
267
  this._cleanupQueue = [];
276
268
 
277
269
  this.active = false;
@@ -288,7 +280,7 @@
288
280
  this._dom.overlay.parentNode.removeChild(this._dom.overlay);
289
281
  });
290
282
 
291
- const hammer = Hammer(this._dom.overlay);
283
+ const hammer = Hammer$1(this._dom.overlay);
292
284
  hammer.on("tap", this._onTapOverlay.bind(this));
293
285
  this._cleanupQueue.push(() => {
294
286
  hammer.destroy();
@@ -339,15 +331,15 @@
339
331
  }
340
332
 
341
333
  // turn into an event emitter
342
- Emitter__default['default'](Activator.prototype);
334
+ Emitter__default["default"](Activator$1.prototype);
343
335
 
344
336
  // The currently active activator
345
- Activator.current = null;
337
+ Activator$1.current = null;
346
338
 
347
339
  /**
348
340
  * Destroy the activator. Cleans up all created DOM and event listeners
349
341
  */
350
- Activator.prototype.destroy = function () {
342
+ Activator$1.prototype.destroy = function () {
351
343
  this.deactivate();
352
344
 
353
345
  for (const callback of this._cleanupQueue.splice(0).reverse()) {
@@ -359,12 +351,12 @@
359
351
  * Activate the element
360
352
  * Overlay is hidden, element is decorated with a blue shadow border
361
353
  */
362
- Activator.prototype.activate = function () {
354
+ Activator$1.prototype.activate = function () {
363
355
  // we allow only one active activator at a time
364
- if (Activator.current) {
365
- Activator.current.deactivate();
356
+ if (Activator$1.current) {
357
+ Activator$1.current.deactivate();
366
358
  }
367
- Activator.current = this;
359
+ Activator$1.current = this;
368
360
 
369
361
  this.active = true;
370
362
  this._dom.overlay.style.display = "none";
@@ -382,7 +374,7 @@
382
374
  * Deactivate the element
383
375
  * Overlay is displayed on top of the element
384
376
  */
385
- Activator.prototype.deactivate = function () {
377
+ Activator$1.prototype.deactivate = function () {
386
378
  this.active = false;
387
379
  this._dom.overlay.style.display = "block";
388
380
  this._dom.container.classList.remove("vis-active");
@@ -398,7 +390,7 @@
398
390
  * @param {Event} event The event
399
391
  * @private
400
392
  */
401
- Activator.prototype._onTapOverlay = function (event) {
393
+ Activator$1.prototype._onTapOverlay = function (event) {
402
394
  // activate the container
403
395
  this.activate();
404
396
  event.srcEvent.stopPropagation();
@@ -438,7 +430,6 @@
438
430
  * Test whether given object is a number.
439
431
  *
440
432
  * @param value - Input value of unknown type.
441
- *
442
433
  * @returns True if number, false otherwise.
443
434
  */
444
435
  function isNumber(value) {
@@ -464,7 +455,6 @@
464
455
  * Test whether given object is a string.
465
456
  *
466
457
  * @param value - Input value of unknown type.
467
- *
468
458
  * @returns True if string, false otherwise.
469
459
  */
470
460
  function isString(value) {
@@ -474,7 +464,6 @@
474
464
  * Test whether given object is a object (not primitive or null).
475
465
  *
476
466
  * @param value - Input value of unknown type.
477
- *
478
467
  * @returns True if not null object, false otherwise.
479
468
  */
480
469
  function isObject(value) {
@@ -484,7 +473,6 @@
484
473
  * Test whether given object is a Date, or a String containing a Date.
485
474
  *
486
475
  * @param value - Input value of unknown type.
487
- *
488
476
  * @returns True if Date instance or string date representation, false otherwise.
489
477
  */
490
478
  function isDate(value) {
@@ -561,7 +549,6 @@
561
549
  *
562
550
  * @param target - The target object to copy to.
563
551
  * @param source - The source object from which to copy properties.
564
- *
565
552
  * @returns The target object.
566
553
  */
567
554
  const extend = Object.assign;
@@ -570,11 +557,9 @@
570
557
  *
571
558
  * @remarks
572
559
  * Only properties with defined values are copied.
573
- *
574
560
  * @param props - Properties to be copied to a.
575
561
  * @param a - The target.
576
562
  * @param others - The sources.
577
- *
578
563
  * @returns Argument a.
579
564
  */
580
565
  function selectiveExtend(props, a, ...others) {
@@ -599,12 +584,10 @@
599
584
  * Previous version of this routine implied that multiple source objects could
600
585
  * be used; however, the implementation was **wrong**. Since multiple (\>1)
601
586
  * sources weren't used anywhere in the `vis.js` code, this has been removed
602
- *
603
587
  * @param props - Names of first-level properties to copy over.
604
588
  * @param a - Target object.
605
589
  * @param b - Source object.
606
590
  * @param allowDeletion - If true, delete property in a if explicitly set to null in b.
607
- *
608
591
  * @returns Argument a.
609
592
  */
610
593
  function selectiveDeepExtend(props, a, b, allowDeletion = false) {
@@ -644,13 +627,11 @@
644
627
  * The properties of `b` are considered for copying. Properties which are
645
628
  * themselves objects are are also extended. Only properties with defined
646
629
  * values are copied.
647
- *
648
630
  * @param propsToExclude - Names of properties which should *not* be copied.
649
631
  * @param a - Object to extend.
650
632
  * @param b - Object to take properties from for extension.
651
633
  * @param allowDeletion - If true, delete properties in a that are explicitly
652
634
  * set to null in b.
653
- *
654
635
  * @returns Argument a.
655
636
  */
656
637
  function selectiveNotDeepExtend(propsToExclude, a, b, allowDeletion = false) {
@@ -698,7 +679,6 @@
698
679
  * (That is the options objects that inherit from others will also get the
699
680
  * inherited options).
700
681
  * @param allowDeletion - If true, the values of fields that are null will be deleted.
701
- *
702
682
  * @returns Argument a.
703
683
  */
704
684
  function deepExtend(a, b, protoExtend = false, allowDeletion = false) {
@@ -734,7 +714,6 @@
734
714
  *
735
715
  * @param a - First array.
736
716
  * @param b - Second array.
737
- *
738
717
  * @returns True if both arrays have the same length and same elements (1 = '1').
739
718
  */
740
719
  function equalArray(a, b) {
@@ -752,7 +731,6 @@
752
731
  * Get the type of an object, for example exports.getType([]) returns 'Array'.
753
732
  *
754
733
  * @param object - Input value of unknown type.
755
- *
756
734
  * @returns Detected type.
757
735
  */
758
736
  function getType(object) {
@@ -797,7 +775,6 @@
797
775
  *
798
776
  * @param arr - First part.
799
777
  * @param newValue - The value to be aadded into the array.
800
- *
801
778
  * @returns A new array with all items from arr and newValue (which is last).
802
779
  */
803
780
  function copyAndExtendArray(arr, newValue) {
@@ -807,7 +784,6 @@
807
784
  * Used to extend an array and copy it. This is used to propagate paths recursively.
808
785
  *
809
786
  * @param arr - The array to be copied.
810
- *
811
787
  * @returns Shallow copy of arr.
812
788
  */
813
789
  function copyArray(arr) {
@@ -817,7 +793,6 @@
817
793
  * Retrieve the absolute left value of a DOM element.
818
794
  *
819
795
  * @param elem - A dom element, for example a div.
820
- *
821
796
  * @returns The absolute left position of this element in the browser page.
822
797
  */
823
798
  function getAbsoluteLeft(elem) {
@@ -827,7 +802,6 @@
827
802
  * Retrieve the absolute right value of a DOM element.
828
803
  *
829
804
  * @param elem - A dom element, for example a div.
830
- *
831
805
  * @returns The absolute right position of this element in the browser page.
832
806
  */
833
807
  function getAbsoluteRight(elem) {
@@ -837,7 +811,6 @@
837
811
  * Retrieve the absolute top value of a DOM element.
838
812
  *
839
813
  * @param elem - A dom element, for example a div.
840
- *
841
814
  * @returns The absolute top position of this element in the browser page.
842
815
  */
843
816
  function getAbsoluteTop(elem) {
@@ -900,7 +873,6 @@
900
873
  * Convert an object into an array: all objects properties are put into the array. The resulting array is unordered.
901
874
  *
902
875
  * @param o - Object that contains the properties and methods.
903
- *
904
876
  * @returns An array of unordered values.
905
877
  */
906
878
  const toArray = Object.values;
@@ -910,7 +882,6 @@
910
882
  * @param object - The object whose property will be updated.
911
883
  * @param key - Name of the property to be updated.
912
884
  * @param value - The new value to be assigned.
913
- *
914
885
  * @returns Whether the value was updated (true) or already strictly the same in the original object (false).
915
886
  */
916
887
  function updateProperty(object, key, value) {
@@ -926,7 +897,6 @@
926
897
  * Throttle the given function to be only executed once per animation frame.
927
898
  *
928
899
  * @param fn - The original function.
929
- *
930
900
  * @returns The throttled function.
931
901
  */
932
902
  function throttle(fn) {
@@ -1010,7 +980,6 @@
1010
980
  * Get HTML element which is the target of the event.
1011
981
  *
1012
982
  * @param event - The event.
1013
- *
1014
983
  * @returns The element or null if not obtainable.
1015
984
  */
1016
985
  function getTarget(event = window.event) {
@@ -1041,7 +1010,6 @@
1041
1010
  *
1042
1011
  * @param element - The element to be tested.
1043
1012
  * @param parent - The ancestor (not necessarily parent) of the element.
1044
- *
1045
1013
  * @returns True if parent is an ancestor of the element, false otherwise.
1046
1014
  */
1047
1015
  function hasParent(element, parent) {
@@ -1065,7 +1033,6 @@
1065
1033
  *
1066
1034
  * @param value - Value to be converted intoboolean, a function will be executed as `(() => unknown)`.
1067
1035
  * @param defaultValue - If the value or the return value of the function == null then this will be returned.
1068
- *
1069
1036
  * @returns Corresponding boolean value, if none then the default value, if none then null.
1070
1037
  */
1071
1038
  asBoolean(value, defaultValue) {
@@ -1082,7 +1049,6 @@
1082
1049
  *
1083
1050
  * @param value - Value to be converted intonumber, a function will be executed as `(() => unknown)`.
1084
1051
  * @param defaultValue - If the value or the return value of the function == null then this will be returned.
1085
- *
1086
1052
  * @returns Corresponding **boxed** number value, if none then the default value, if none then null.
1087
1053
  */
1088
1054
  asNumber(value, defaultValue) {
@@ -1099,7 +1065,6 @@
1099
1065
  *
1100
1066
  * @param value - Value to be converted intostring, a function will be executed as `(() => unknown)`.
1101
1067
  * @param defaultValue - If the value or the return value of the function == null then this will be returned.
1102
- *
1103
1068
  * @returns Corresponding **boxed** string value, if none then the default value, if none then null.
1104
1069
  */
1105
1070
  asString(value, defaultValue) {
@@ -1116,7 +1081,6 @@
1116
1081
  *
1117
1082
  * @param value - Value to be converted intosize, a function will be executed as `(() => unknown)`.
1118
1083
  * @param defaultValue - If the value or the return value of the function == null then this will be returned.
1119
- *
1120
1084
  * @returns Corresponding string value (number + 'px'), if none then the default value, if none then null.
1121
1085
  */
1122
1086
  asSize(value, defaultValue) {
@@ -1138,7 +1102,6 @@
1138
1102
  *
1139
1103
  * @param value - Value to be converted into DOM Element, a function will be executed as `(() => unknown)`.
1140
1104
  * @param defaultValue - If the value or the return value of the function == null then this will be returned.
1141
- *
1142
1105
  * @returns The DOM Element, if none then the default value, if none then null.
1143
1106
  */
1144
1107
  asElement(value, defaultValue) {
@@ -1153,9 +1116,7 @@
1153
1116
  *
1154
1117
  * @remarks
1155
1118
  * {@link http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb}
1156
- *
1157
1119
  * @param hex - Hex color string (3 or 6 digits, with or without #).
1158
- *
1159
1120
  * @returns RGB color object.
1160
1121
  */
1161
1122
  function hexToRGB(hex) {
@@ -1190,7 +1151,6 @@
1190
1151
  *
1191
1152
  * @param color - The color string (hex, RGB, RGBA).
1192
1153
  * @param opacity - The new opacity.
1193
- *
1194
1154
  * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.
1195
1155
  */
1196
1156
  function overrideOpacity(color, opacity) {
@@ -1220,7 +1180,6 @@
1220
1180
  * @param red - Red channel.
1221
1181
  * @param green - Green channel.
1222
1182
  * @param blue - Blue channel.
1223
- *
1224
1183
  * @returns Hex color string (for example: '#0acdc0').
1225
1184
  */
1226
1185
  function RGBToHex(red, green, blue) {
@@ -1231,7 +1190,6 @@
1231
1190
  *
1232
1191
  * @param inputColor - Shorthand color string or input color object.
1233
1192
  * @param defaultColor - Full color object to fill in missing values in inputColor.
1234
- *
1235
1193
  * @returns Color object.
1236
1194
  */
1237
1195
  function parseColor(inputColor, defaultColor) {
@@ -1353,11 +1311,9 @@
1353
1311
  *
1354
1312
  * @remarks
1355
1313
  * {@link http://www.javascripter.net/faq/rgb2hsv.htm}
1356
- *
1357
1314
  * @param red - Red channel.
1358
1315
  * @param green - Green channel.
1359
1316
  * @param blue - Blue channel.
1360
- *
1361
1317
  * @returns HSV color object.
1362
1318
  */
1363
1319
  function RGBToHSV(red, green, blue) {
@@ -1437,11 +1393,9 @@
1437
1393
  *
1438
1394
  * @remarks
1439
1395
  * {@link https://gist.github.com/mjijackson/5311256}
1440
- *
1441
1396
  * @param h - Hue.
1442
1397
  * @param s - Saturation.
1443
1398
  * @param v - Value.
1444
- *
1445
1399
  * @returns RGB color object.
1446
1400
  */
1447
1401
  function HSVToRGB(h, s, v) {
@@ -1485,7 +1439,6 @@
1485
1439
  * @param h - Hue.
1486
1440
  * @param s - Saturation.
1487
1441
  * @param v - Value.
1488
- *
1489
1442
  * @returns Hex color string.
1490
1443
  */
1491
1444
  function HSVToHex(h, s, v) {
@@ -1496,7 +1449,6 @@
1496
1449
  * Convert hex color string into HSV \<0, 1\>.
1497
1450
  *
1498
1451
  * @param hex - Hex color string.
1499
- *
1500
1452
  * @returns HSV color object.
1501
1453
  */
1502
1454
  function hexToHSV(hex) {
@@ -1510,7 +1462,6 @@
1510
1462
  * Validate hex color string.
1511
1463
  *
1512
1464
  * @param hex - Unknown string that may contain a color.
1513
- *
1514
1465
  * @returns True if the string is valid, false otherwise.
1515
1466
  */
1516
1467
  function isValidHex(hex) {
@@ -1521,7 +1472,6 @@
1521
1472
  * Validate RGB color string.
1522
1473
  *
1523
1474
  * @param rgb - Unknown string that may contain a color.
1524
- *
1525
1475
  * @returns True if the string is valid, false otherwise.
1526
1476
  */
1527
1477
  function isValidRGB(rgb) {
@@ -1531,7 +1481,6 @@
1531
1481
  * Validate RGBA color string.
1532
1482
  *
1533
1483
  * @param rgba - Unknown string that may contain a color.
1534
- *
1535
1484
  * @returns True if the string is valid, false otherwise.
1536
1485
  */
1537
1486
  function isValidRGBA(rgba) {
@@ -1543,7 +1492,6 @@
1543
1492
  *
1544
1493
  * @param fields - Names of properties to be bridged.
1545
1494
  * @param referenceObject - The original object.
1546
- *
1547
1495
  * @returns A new object inheriting from the referenceObject.
1548
1496
  */
1549
1497
  function selectiveBridgeObject(fields, referenceObject) {
@@ -1568,7 +1516,6 @@
1568
1516
  * This is used for default options.
1569
1517
  *
1570
1518
  * @param referenceObject - The original object.
1571
- *
1572
1519
  * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.
1573
1520
  */
1574
1521
  function bridgeObject(referenceObject) {
@@ -1594,7 +1541,6 @@
1594
1541
  *
1595
1542
  * @param a - The array to be sorted (in-place).
1596
1543
  * @param compare - An order comparator.
1597
- *
1598
1544
  * @returns The argument a.
1599
1545
  */
1600
1546
  function insertSort(a, compare) {
@@ -1722,7 +1668,6 @@
1722
1668
  * @param comparator - -1 is lower, 0 is equal, 1 is higher.
1723
1669
  * @param field - Property name on an item (That is item[field]).
1724
1670
  * @param field2 - Second property name on an item (That is item[field][field2]).
1725
- *
1726
1671
  * @returns Index of the found item or -1 if nothing was found.
1727
1672
  */
1728
1673
  function binarySearchCustom(orderedItems, comparator, field, field2) {
@@ -1762,7 +1707,6 @@
1762
1707
  * @param field - Name of the property in items to be searched.
1763
1708
  * @param sidePreference - If the target is between two values, should the index of the before or the after be returned?
1764
1709
  * @param comparator - An optional comparator, returning -1, 0, 1 for \<, ===, \>.
1765
- *
1766
1710
  * @returns The index of found value or -1 if nothing was found.
1767
1711
  */
1768
1712
  function binarySearchValue(orderedItems, target, field, sidePreference, comparator) {
@@ -1831,7 +1775,6 @@
1831
1775
  * Provides no easing and no acceleration.
1832
1776
  *
1833
1777
  * @param t - Time.
1834
- *
1835
1778
  * @returns Value at time t.
1836
1779
  */
1837
1780
  linear(t) {
@@ -1841,7 +1784,6 @@
1841
1784
  * Accelerate from zero velocity.
1842
1785
  *
1843
1786
  * @param t - Time.
1844
- *
1845
1787
  * @returns Value at time t.
1846
1788
  */
1847
1789
  easeInQuad(t) {
@@ -1851,7 +1793,6 @@
1851
1793
  * Decelerate to zero velocity.
1852
1794
  *
1853
1795
  * @param t - Time.
1854
- *
1855
1796
  * @returns Value at time t.
1856
1797
  */
1857
1798
  easeOutQuad(t) {
@@ -1861,7 +1802,6 @@
1861
1802
  * Accelerate until halfway, then decelerate.
1862
1803
  *
1863
1804
  * @param t - Time.
1864
- *
1865
1805
  * @returns Value at time t.
1866
1806
  */
1867
1807
  easeInOutQuad(t) {
@@ -1871,7 +1811,6 @@
1871
1811
  * Accelerate from zero velocity.
1872
1812
  *
1873
1813
  * @param t - Time.
1874
- *
1875
1814
  * @returns Value at time t.
1876
1815
  */
1877
1816
  easeInCubic(t) {
@@ -1881,7 +1820,6 @@
1881
1820
  * Decelerate to zero velocity.
1882
1821
  *
1883
1822
  * @param t - Time.
1884
- *
1885
1823
  * @returns Value at time t.
1886
1824
  */
1887
1825
  easeOutCubic(t) {
@@ -1891,7 +1829,6 @@
1891
1829
  * Accelerate until halfway, then decelerate.
1892
1830
  *
1893
1831
  * @param t - Time.
1894
- *
1895
1832
  * @returns Value at time t.
1896
1833
  */
1897
1834
  easeInOutCubic(t) {
@@ -1901,7 +1838,6 @@
1901
1838
  * Accelerate from zero velocity.
1902
1839
  *
1903
1840
  * @param t - Time.
1904
- *
1905
1841
  * @returns Value at time t.
1906
1842
  */
1907
1843
  easeInQuart(t) {
@@ -1911,7 +1847,6 @@
1911
1847
  * Decelerate to zero velocity.
1912
1848
  *
1913
1849
  * @param t - Time.
1914
- *
1915
1850
  * @returns Value at time t.
1916
1851
  */
1917
1852
  easeOutQuart(t) {
@@ -1921,7 +1856,6 @@
1921
1856
  * Accelerate until halfway, then decelerate.
1922
1857
  *
1923
1858
  * @param t - Time.
1924
- *
1925
1859
  * @returns Value at time t.
1926
1860
  */
1927
1861
  easeInOutQuart(t) {
@@ -1931,7 +1865,6 @@
1931
1865
  * Accelerate from zero velocity.
1932
1866
  *
1933
1867
  * @param t - Time.
1934
- *
1935
1868
  * @returns Value at time t.
1936
1869
  */
1937
1870
  easeInQuint(t) {
@@ -1941,7 +1874,6 @@
1941
1874
  * Decelerate to zero velocity.
1942
1875
  *
1943
1876
  * @param t - Time.
1944
- *
1945
1877
  * @returns Value at time t.
1946
1878
  */
1947
1879
  easeOutQuint(t) {
@@ -1951,7 +1883,6 @@
1951
1883
  * Accelerate until halfway, then decelerate.
1952
1884
  *
1953
1885
  * @param t - Time.
1954
- *
1955
1886
  * @returns Value at time t.
1956
1887
  */
1957
1888
  easeInOutQuint(t) {
@@ -2007,7 +1938,6 @@
2007
1938
  * @param pile - Array of objects, no required format.
2008
1939
  * @param accessors - Array of property names.
2009
1940
  * For example `object['foo']['bar']` → `['foo', 'bar']`.
2010
- *
2011
1941
  * @returns Value of the property with given accessors path from the first pile item where it's not undefined.
2012
1942
  */
2013
1943
  function topMost(pile, accessors) {
@@ -2177,7 +2107,7 @@
2177
2107
  /**
2178
2108
  * @param {number} [pixelRatio=1]
2179
2109
  */
2180
- class ColorPicker {
2110
+ class ColorPicker$1 {
2181
2111
  /**
2182
2112
  * @param {number} [pixelRatio=1]
2183
2113
  */
@@ -2688,7 +2618,7 @@
2688
2618
  _bindHammer() {
2689
2619
  this.drag = {};
2690
2620
  this.pinch = {};
2691
- this.hammer = new Hammer(this.colorPickerCanvas);
2621
+ this.hammer = new Hammer$1(this.colorPickerCanvas);
2692
2622
  this.hammer.get("pinch").set({ enable: true });
2693
2623
 
2694
2624
  this.hammer.on("hammer.input", (event) => {
@@ -2828,7 +2758,6 @@
2828
2758
  * Wrap given text (last argument) in HTML elements (all preceding arguments).
2829
2759
  *
2830
2760
  * @param {...any} rest - List of tag names followed by inner text.
2831
- *
2832
2761
  * @returns An element or a text node.
2833
2762
  */
2834
2763
  function wrapInTag(...rest) {
@@ -2852,7 +2781,7 @@
2852
2781
  *
2853
2782
  * The options are matched with their counterparts in each of the modules and the values used in the configuration are
2854
2783
  */
2855
- class Configurator {
2784
+ class Configurator$1 {
2856
2785
  /**
2857
2786
  * @param {object} parentModule | the location where parentModule.setOptions() can be called
2858
2787
  * @param {object} defaultContainer | the default container of the module
@@ -2890,7 +2819,7 @@
2890
2819
  this.popupDiv = {};
2891
2820
  this.popupLimit = 5;
2892
2821
  this.popupHistory = {};
2893
- this.colorPicker = new ColorPicker(pixelRatio);
2822
+ this.colorPicker = new ColorPicker$1(pixelRatio);
2894
2823
  this.wrapper = undefined;
2895
2824
  }
2896
2825
 
@@ -3626,7 +3555,7 @@
3626
3555
  /**
3627
3556
  * Popup is a class to create a popup window with some text
3628
3557
  */
3629
- class Popup {
3558
+ class Popup$1 {
3630
3559
  /**
3631
3560
  * @param {Element} container The container object.
3632
3561
  * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')
@@ -3763,12 +3692,12 @@
3763
3692
  let errorFound = false;
3764
3693
  let allOptions;
3765
3694
 
3766
- const VALIDATOR_PRINT_STYLE = "background: #FFeeee; color: #dd0000";
3695
+ const VALIDATOR_PRINT_STYLE$1 = "background: #FFeeee; color: #dd0000";
3767
3696
 
3768
3697
  /**
3769
3698
  * Used to validate options.
3770
3699
  */
3771
- class Validator {
3700
+ class Validator$1 {
3772
3701
  /**
3773
3702
  * Main function to be called
3774
3703
  *
@@ -3785,7 +3714,7 @@
3785
3714
  if (subObject !== undefined) {
3786
3715
  usedOptions = referenceOptions[subObject];
3787
3716
  }
3788
- Validator.parse(options, usedOptions, []);
3717
+ Validator$1.parse(options, usedOptions, []);
3789
3718
  return errorFound;
3790
3719
  }
3791
3720
 
@@ -3800,7 +3729,7 @@
3800
3729
  static parse(options, referenceOptions, path) {
3801
3730
  for (const option in options) {
3802
3731
  if (Object.prototype.hasOwnProperty.call(options, option)) {
3803
- Validator.check(option, options, referenceOptions, path);
3732
+ Validator$1.check(option, options, referenceOptions, path);
3804
3733
  }
3805
3734
  }
3806
3735
  }
@@ -3819,7 +3748,7 @@
3819
3748
  referenceOptions[option] === undefined &&
3820
3749
  referenceOptions.__any__ === undefined
3821
3750
  ) {
3822
- Validator.getSuggestion(option, referenceOptions, path);
3751
+ Validator$1.getSuggestion(option, referenceOptions, path);
3823
3752
  return;
3824
3753
  }
3825
3754
 
@@ -3839,7 +3768,7 @@
3839
3768
 
3840
3769
  // if the any-subgroup is not a predefined object in the configurator,
3841
3770
  // we do not look deeper into the object.
3842
- is_object = Validator.getType(options[option]) === "object";
3771
+ is_object = Validator$1.getType(options[option]) === "object";
3843
3772
  }
3844
3773
 
3845
3774
  let refOptionObj = referenceOptions[referenceOption];
@@ -3847,7 +3776,7 @@
3847
3776
  refOptionObj = refOptionObj.__type__;
3848
3777
  }
3849
3778
 
3850
- Validator.checkFields(
3779
+ Validator$1.checkFields(
3851
3780
  option,
3852
3781
  options,
3853
3782
  referenceOptions,
@@ -3877,18 +3806,18 @@
3877
3806
  ) {
3878
3807
  const log = function (message) {
3879
3808
  console.error(
3880
- "%c" + message + Validator.printLocation(path, option),
3881
- VALIDATOR_PRINT_STYLE
3809
+ "%c" + message + Validator$1.printLocation(path, option),
3810
+ VALIDATOR_PRINT_STYLE$1
3882
3811
  );
3883
3812
  };
3884
3813
 
3885
- const optionType = Validator.getType(options[option]);
3814
+ const optionType = Validator$1.getType(options[option]);
3886
3815
  const refOptionType = refOptionObj[optionType];
3887
3816
 
3888
3817
  if (refOptionType !== undefined) {
3889
3818
  // if the type is correct, we check if it is supposed to be one of a few select values
3890
3819
  if (
3891
- Validator.getType(refOptionType) === "array" &&
3820
+ Validator$1.getType(refOptionType) === "array" &&
3892
3821
  refOptionType.indexOf(options[option]) === -1
3893
3822
  ) {
3894
3823
  log(
@@ -3896,7 +3825,7 @@
3896
3825
  option +
3897
3826
  '".' +
3898
3827
  " Allowed values are:" +
3899
- Validator.print(refOptionType) +
3828
+ Validator$1.print(refOptionType) +
3900
3829
  ' not "' +
3901
3830
  options[option] +
3902
3831
  '". '
@@ -3904,7 +3833,7 @@
3904
3833
  errorFound = true;
3905
3834
  } else if (optionType === "object" && referenceOption !== "__any__") {
3906
3835
  path = copyAndExtendArray(path, option);
3907
- Validator.parse(
3836
+ Validator$1.parse(
3908
3837
  options[option],
3909
3838
  referenceOptions[referenceOption],
3910
3839
  path
@@ -3916,7 +3845,7 @@
3916
3845
  'Invalid type received for "' +
3917
3846
  option +
3918
3847
  '". Expected: ' +
3919
- Validator.print(Object.keys(refOptionObj)) +
3848
+ Validator$1.print(Object.keys(refOptionObj)) +
3920
3849
  ". Received [" +
3921
3850
  optionType +
3922
3851
  '] "' +
@@ -3981,8 +3910,8 @@
3981
3910
  * @static
3982
3911
  */
3983
3912
  static getSuggestion(option, options, path) {
3984
- const localSearch = Validator.findInOptions(option, options, path, false);
3985
- const globalSearch = Validator.findInOptions(option, allOptions, [], true);
3913
+ const localSearch = Validator$1.findInOptions(option, options, path, false);
3914
+ const globalSearch = Validator$1.findInOptions(option, allOptions, [], true);
3986
3915
 
3987
3916
  const localSearchThreshold = 8;
3988
3917
  const globalSearchThreshold = 4;
@@ -3991,7 +3920,7 @@
3991
3920
  if (localSearch.indexMatch !== undefined) {
3992
3921
  msg =
3993
3922
  " in " +
3994
- Validator.printLocation(localSearch.path, option, "") +
3923
+ Validator$1.printLocation(localSearch.path, option, "") +
3995
3924
  'Perhaps it was incomplete? Did you mean: "' +
3996
3925
  localSearch.indexMatch +
3997
3926
  '"?\n\n';
@@ -4001,9 +3930,9 @@
4001
3930
  ) {
4002
3931
  msg =
4003
3932
  " in " +
4004
- Validator.printLocation(localSearch.path, option, "") +
3933
+ Validator$1.printLocation(localSearch.path, option, "") +
4005
3934
  "Perhaps it was misplaced? Matching option found at: " +
4006
- Validator.printLocation(
3935
+ Validator$1.printLocation(
4007
3936
  globalSearch.path,
4008
3937
  globalSearch.closestMatch,
4009
3938
  ""
@@ -4013,17 +3942,17 @@
4013
3942
  '. Did you mean "' +
4014
3943
  localSearch.closestMatch +
4015
3944
  '"?' +
4016
- Validator.printLocation(localSearch.path, option);
3945
+ Validator$1.printLocation(localSearch.path, option);
4017
3946
  } else {
4018
3947
  msg =
4019
3948
  ". Did you mean one of these: " +
4020
- Validator.print(Object.keys(options)) +
4021
- Validator.printLocation(path, option);
3949
+ Validator$1.print(Object.keys(options)) +
3950
+ Validator$1.printLocation(path, option);
4022
3951
  }
4023
3952
 
4024
3953
  console.error(
4025
3954
  '%cUnknown option detected: "' + option + '"' + msg,
4026
- VALIDATOR_PRINT_STYLE
3955
+ VALIDATOR_PRINT_STYLE$1
4027
3956
  );
4028
3957
  errorFound = true;
4029
3958
  }
@@ -4047,7 +3976,7 @@
4047
3976
  for (const op in options) {
4048
3977
  let distance;
4049
3978
  if (options[op].__type__ !== undefined && recursive === true) {
4050
- const result = Validator.findInOptions(
3979
+ const result = Validator$1.findInOptions(
4051
3980
  option,
4052
3981
  options[op],
4053
3982
  copyAndExtendArray(path, op)
@@ -4062,7 +3991,7 @@
4062
3991
  if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) {
4063
3992
  indexMatch = op;
4064
3993
  }
4065
- distance = Validator.levenshteinDistance(option, op);
3994
+ distance = Validator$1.levenshteinDistance(option, op);
4066
3995
  if (min > distance) {
4067
3996
  closestMatch = op;
4068
3997
  closestMatchPath = copyArray(path);
@@ -4173,27 +4102,27 @@
4173
4102
  }
4174
4103
  }
4175
4104
 
4176
- const Activator$1 = Activator;
4177
- const ColorPicker$1 = ColorPicker;
4178
- const Configurator$1 = Configurator;
4179
- const Hammer$1 = Hammer;
4180
- const Popup$1 = Popup;
4181
- const VALIDATOR_PRINT_STYLE$1 = VALIDATOR_PRINT_STYLE;
4182
- const Validator$1 = Validator;
4105
+ const Activator = Activator$1;
4106
+ const ColorPicker = ColorPicker$1;
4107
+ const Configurator = Configurator$1;
4108
+ const Hammer = Hammer$1;
4109
+ const Popup = Popup$1;
4110
+ const VALIDATOR_PRINT_STYLE = VALIDATOR_PRINT_STYLE$1;
4111
+ const Validator = Validator$1;
4183
4112
 
4184
- exports.Activator = Activator$1;
4113
+ exports.Activator = Activator;
4185
4114
  exports.Alea = Alea;
4186
- exports.ColorPicker = ColorPicker$1;
4187
- exports.Configurator = Configurator$1;
4115
+ exports.ColorPicker = ColorPicker;
4116
+ exports.Configurator = Configurator;
4188
4117
  exports.DELETE = DELETE;
4189
4118
  exports.HSVToHex = HSVToHex;
4190
4119
  exports.HSVToRGB = HSVToRGB;
4191
- exports.Hammer = Hammer$1;
4192
- exports.Popup = Popup$1;
4120
+ exports.Hammer = Hammer;
4121
+ exports.Popup = Popup;
4193
4122
  exports.RGBToHSV = RGBToHSV;
4194
4123
  exports.RGBToHex = RGBToHex;
4195
- exports.VALIDATOR_PRINT_STYLE = VALIDATOR_PRINT_STYLE$1;
4196
- exports.Validator = Validator$1;
4124
+ exports.VALIDATOR_PRINT_STYLE = VALIDATOR_PRINT_STYLE;
4125
+ exports.Validator = Validator;
4197
4126
  exports.addClassName = addClassName;
4198
4127
  exports.addCssText = addCssText;
4199
4128
  exports.addEventListener = addEventListener;
@@ -4247,5 +4176,5 @@
4247
4176
 
4248
4177
  Object.defineProperty(exports, '__esModule', { value: true });
4249
4178
 
4250
- })));
4179
+ }));
4251
4180
  //# sourceMappingURL=vis-util.js.map