@desynova-digital/player 4.0.19 → 4.0.20

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.
Files changed (71) hide show
  1. package/Manager.js +15 -17
  2. package/actions/player.js +18 -35
  3. package/actions/video.js +25 -50
  4. package/colors.js +1 -2
  5. package/components/AudioMeter.js +31 -34
  6. package/components/BigPlayButton.js +23 -26
  7. package/components/ImageViewer.js +25 -28
  8. package/components/MarkerBar.js +23 -26
  9. package/components/Menu.js +2 -2
  10. package/components/Player.js +36 -39
  11. package/components/PlayerHeader.js +23 -26
  12. package/components/Playlist.js +25 -25
  13. package/components/PointersBar.js +31 -30
  14. package/components/PosterImage.js +2 -3
  15. package/components/SDOutline.js +2 -2
  16. package/components/Shortcut.js +45 -49
  17. package/components/Slider.js +34 -36
  18. package/components/TagsBar.js +22 -25
  19. package/components/Video.js +61 -65
  20. package/components/control-bar/AudioTracksMenuButton.js +21 -24
  21. package/components/control-bar/CameraButton.js +22 -25
  22. package/components/control-bar/CaptionControlMenuButton.js +22 -25
  23. package/components/control-bar/CommentsButton.js +23 -26
  24. package/components/control-bar/ControlBar.js +24 -27
  25. package/components/control-bar/EditorControlMenuButton.js +23 -26
  26. package/components/control-bar/ForwardControl.js +2 -3
  27. package/components/control-bar/ForwardReplayControl.js +23 -26
  28. package/components/control-bar/FullscreenToggle.js +22 -25
  29. package/components/control-bar/PlayToggle.js +22 -25
  30. package/components/control-bar/ReplayControl.js +2 -3
  31. package/components/control-bar/SettingsMenuButton.js +4 -4
  32. package/components/control-bar/SubtitleLanguagesMenuButton.js +21 -24
  33. package/components/control-bar/SubtitleMovementMenu.js +23 -26
  34. package/components/control-bar/VolumeMenuButton.js +23 -26
  35. package/components/control-bar/ZoomMenuButton.js +23 -26
  36. package/components/marking-controls/MarkInControl.js +22 -25
  37. package/components/marking-controls/MarkOutControl.js +22 -25
  38. package/components/marking-controls/MarkingAddButton.js +22 -25
  39. package/components/marking-controls/MarkingControl.js +2 -2
  40. package/components/marking-controls/MarkingDeleteButton.js +22 -25
  41. package/components/marking-controls/MarkingDuration.js +2 -2
  42. package/components/marking-controls/MarkingPreview.js +22 -25
  43. package/components/progress-bar/AudioWaveform.js +22 -25
  44. package/components/progress-bar/LoadProgressBar.js +1 -1
  45. package/components/progress-bar/MouseTimeDisplay.js +2 -3
  46. package/components/progress-bar/PlayProgressBar.js +2 -2
  47. package/components/progress-bar/ProgressControl.js +45 -40
  48. package/components/progress-bar/SeekBar.js +29 -32
  49. package/components/progress-bar/Timeline.js +22 -25
  50. package/components/settings-menu-control/CameraControl.js +6 -7
  51. package/components/settings-menu-control/ChildMenuComponent.js +25 -29
  52. package/components/settings-menu-control/ParentMenuComponent.js +22 -25
  53. package/components/settings-menu-control/PlaybackRateControl.js +22 -25
  54. package/components/settings-menu-control/SafeAreaControl.js +22 -25
  55. package/components/settings-menu-control/SettingsMenu.js +13 -13
  56. package/components/time-controls/CurrentTimeDisplay.js +11 -12
  57. package/components/time-controls/DurationDisplay.js +3 -4
  58. package/components/time-controls/TimeDivider.js +2 -2
  59. package/components/volume-control/VolumeBar.js +31 -34
  60. package/components/volume-control/VolumeControl.js +1 -1
  61. package/components/volume-control/VolumeLevel.js +3 -4
  62. package/components/zoom-control/ZoomBar.js +30 -33
  63. package/components/zoom-control/ZoomLevel.js +3 -4
  64. package/index.js +4 -4
  65. package/package.json +1 -1
  66. package/reducers/index.js +2 -4
  67. package/reducers/operation.js +7 -8
  68. package/reducers/player.js +7 -9
  69. package/utils/browser.js +4 -8
  70. package/utils/fullscreen.js +8 -10
  71. package/utils/index.js +13 -14
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
@@ -15,25 +15,25 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
15
15
  /* eslint-disable jsx-a11y/mouse-events-have-key-events */
16
16
  /* eslint-disable jsx-a11y/click-events-have-key-events */
17
17
  /* eslint-disable react/no-array-index-key */
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
28
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
29
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
32
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
33
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
34
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
35
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
36
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
21
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
24
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
25
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
26
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
27
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
28
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
29
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
30
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
31
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
32
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
33
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
34
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
35
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
36
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
37
37
  /*
38
38
  * import { colors } from '@desynova-digital/tokens';
39
39
  * import colors from '../colors';
@@ -48,25 +48,26 @@ var propTypes = {
48
48
  var defaultProps = {
49
49
  player: {}
50
50
  };
51
- var ScrollableDiv = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-height: 65px; /* Set the maximum height */\n overflow-y: scroll; /* Enable vertical scrolling */\n\n /* Optional: Hide the scrollbar */\n &::-webkit-scrollbar {\n width: 0; /* For Webkit browsers */\n }\n scrollbar-width: none; /* For Firefox */\n -ms-overflow-style: none; /* For IE 10+ */\n"])));
51
+ var ScrollableDiv = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-height: 65px; /* Set the maximum height */\n overflow-y: ", ";\n\n /* Optional: Hide the scrollbar */\n &::-webkit-scrollbar {\n width: 0; /* For Webkit browsers */\n }\n scrollbar-width: none; /* For Firefox */\n -ms-overflow-style: none; /* For IE 10+ */\n"])), function (_ref) {
52
+ var markers = _ref.markers;
53
+ return markers.length > 3 ? 'scroll' : 'visible';
54
+ });
52
55
  var PointersContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n width: ", ";\n"])), function (props) {
53
56
  return props.width || '100%';
54
57
  });
55
- var PointerBlock = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 20px;\n position: relative;\n border-top: 2px solid #333333;\n div:last-child {\n border-bottom: none; // Remove border-bottom for the last div inside PointerBlock\n }\n .empty-pointers-msg {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n p {\n font-family: SFUIText-Medium;\n font-size: 11px;\n color: #aaaaaa;\n }\n ", " {\n margin: 0 5px;\n }\n }\n"])), _components.Icon.Element);
58
+ var PointerBlock = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 20px;\n position: relative;\n border-top: 1px solid #333333;\n border-bottom: 1px solid #333333;\n div:last-child {\n border-bottom: none; // Remove border-bottom for the last div inside PointerBlock\n }\n .empty-pointers-msg {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n p {\n font-family: SFUIText-Medium;\n font-size: 11px;\n color: #aaaaaa;\n }\n ", " {\n margin: 0 5px;\n }\n }\n"])), _components.Icon.Element);
56
59
  var MarkerTagsBlock = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-width: 100px;\n max-width: 100px;\n position: relative;\n height: 100%;\n .tags-block {\n height: 20px;\n font-family: SFUIText-Medium;\n font-size: 10px;\n color: #ffffff;\n text-transform: uppercase;\n border-top: 1px solid #333333;\n border-bottom: 1px solid #333333;\n p {\n line-height: 18px;\n padding: 0 10px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n"])));
57
60
  var ToolTipStyles = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 2;\n height: 18px;\n transition: left 0.1s ease-in-out;\n\n .tooltip-container {\n border-radius: 0.25rem;\n padding: 5px;\n width: fit-content;\n background: #ffffff;\n color: #666666;\n\n i,em{\n font-style: italic; \n }\n\n strong{\n font-weight: bold; \n }\n\n h4 {\n white-space: nowrap;\n font-size: 12px;\n }\n\n &:after {\n content: '';\n position: absolute;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n border-top: 5px solid white;\n ", "\n left: ", ";\n transform: translateX(-50%);\n }\n }\n"])), function (props) {
58
61
  return props.multiline ? 'bottom: -21px;' : 'bottom: -9px;';
59
62
  }, function (props) {
60
63
  return props.tooltipPointer ? props.tooltipPointer + 'px' : '50%';
61
64
  });
62
- var PointersBar = /*#__PURE__*/function (_Component) {
63
- _inherits(PointersBar, _Component);
64
- var _super = _createSuper(PointersBar);
65
+ var PointersBar = exports["default"] = /*#__PURE__*/function (_Component) {
65
66
  function PointersBar(props) {
66
67
  var _this;
67
68
  _classCallCheck(this, PointersBar);
68
- _this = _super.call(this, props);
69
- _this.getPointerStyle = _this.getPointerStyle.bind(_assertThisInitialized(_this));
69
+ _this = _callSuper(this, PointersBar, [props]);
70
+ _this.getPointerStyle = _this.getPointerStyle.bind(_this);
70
71
  _this.state = {
71
72
  tooltip: {
72
73
  isVisible: false
@@ -78,7 +79,8 @@ var PointersBar = /*#__PURE__*/function (_Component) {
78
79
  _this.zoom = 0;
79
80
  return _this;
80
81
  }
81
- _createClass(PointersBar, [{
82
+ _inherits(PointersBar, _Component);
83
+ return _createClass(PointersBar, [{
82
84
  key: "shouldComponentUpdate",
83
85
  value: function shouldComponentUpdate(nextProps, nextState) {
84
86
  if (nextProps.zoom !== this.props.zoom) {
@@ -213,6 +215,7 @@ var PointersBar = /*#__PURE__*/function (_Component) {
213
215
  width = _this$state.width;
214
216
  var self = this;
215
217
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(ScrollableDiv, {
218
+ markers: markers,
216
219
  onScroll: function onScroll(e) {
217
220
  var scrollTop = e.target.scrollTop;
218
221
  _this3.props.onScroll(scrollTop);
@@ -292,9 +295,7 @@ var PointersBar = /*#__PURE__*/function (_Component) {
292
295
  }))));
293
296
  }
294
297
  }]);
295
- return PointersBar;
296
298
  }(_react.Component);
297
- exports["default"] = PointersBar;
298
299
  PointersBar.propTypes = propTypes;
299
300
  PointersBar.defaultProps = defaultProps;
300
301
  PointersBar.displayName = 'PointersBar';
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _propTypes = require("prop-types");
8
8
  var _react = _interopRequireDefault(require("react"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  var propTypes = {
11
11
  poster: _propTypes.PropTypes.string,
12
12
  player: _propTypes.PropTypes.instanceOf(Object),
@@ -47,5 +47,4 @@ function PosterImage(_ref) {
47
47
  PosterImage.propTypes = propTypes;
48
48
  PosterImage.defaultProps = defaultProps;
49
49
  PosterImage.displayName = 'PosterImage';
50
- var _default = PosterImage;
51
- exports["default"] = _default;
50
+ var _default = exports["default"] = PosterImage;
@@ -9,8 +9,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _propTypes = require("prop-types");
10
10
  var _colors = _interopRequireDefault(require("../colors"));
11
11
  var _templateObject, _templateObject2;
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
14
14
  var propTypes = {
15
15
  player: _propTypes.PropTypes.instanceOf(Object),
16
16
  actions: _propTypes.PropTypes.instanceOf(Object)
@@ -9,31 +9,31 @@ var _propTypes = require("prop-types");
9
9
  var _lodash = require("lodash");
10
10
  var _hotkeysJs = _interopRequireDefault(require("hotkeys-js"));
11
11
  var _utils = require("../utils");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
14
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
15
15
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
17
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
18
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
17
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
18
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
19
19
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
20
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
22
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
23
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
30
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
31
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
32
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
34
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
36
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
20
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
21
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
22
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
23
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
24
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
25
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
26
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
27
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
28
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
29
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
30
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
31
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
32
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
33
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
34
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
35
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
36
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
37
37
  var propTypes = {
38
38
  clickable: _propTypes.PropTypes.bool,
39
39
  dblclickable: _propTypes.PropTypes.bool,
@@ -54,14 +54,12 @@ var defaultProps = {
54
54
  player: {},
55
55
  shortcuts: []
56
56
  };
57
- var Shortcut = /*#__PURE__*/function (_Component) {
58
- _inherits(Shortcut, _Component);
59
- var _super = _createSuper(Shortcut);
57
+ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
60
58
  function Shortcut(props, context) {
61
59
  var _this;
62
60
  _classCallCheck(this, Shortcut);
63
- _this = _super.call(this, props, context);
64
- _defineProperty(_assertThisInitialized(_this), "segmentShift", function (direction) {
61
+ _this = _callSuper(this, Shortcut, [props, context]);
62
+ _defineProperty(_this, "segmentShift", function (direction) {
65
63
  var _this$props = _this.props,
66
64
  leftMarker = _this$props.playerSelectedMarker.leftMarker,
67
65
  onTagClick = _this$props.onTagClick;
@@ -86,13 +84,13 @@ var Shortcut = /*#__PURE__*/function (_Component) {
86
84
  onTagClick((_values$newIndex2 = values[newIndex]) === null || _values$newIndex2 === void 0 ? void 0 : _values$newIndex2.start_time, (_values$newIndex3 = values[newIndex]) === null || _values$newIndex3 === void 0 ? void 0 : _values$newIndex3.end_time, values[newIndex]);
87
85
  }
88
86
  });
89
- _defineProperty(_assertThisInitialized(_this), "debounceSegmentShiftForward", (0, _lodash.debounce)(function () {
87
+ _defineProperty(_this, "debounceSegmentShiftForward", (0, _lodash.debounce)(function () {
90
88
  _this.segmentShift('forward');
91
89
  }, 0));
92
- _defineProperty(_assertThisInitialized(_this), "debounceSegmentShiftBackward", (0, _lodash.debounce)(function () {
90
+ _defineProperty(_this, "debounceSegmentShiftBackward", (0, _lodash.debounce)(function () {
93
91
  _this.segmentShift('backward');
94
92
  }, 0));
95
- _defineProperty(_assertThisInitialized(_this), "debounceKeyFunc", (0, _lodash.debounce)(function (keyCode) {
93
+ _defineProperty(_this, "debounceKeyFunc", (0, _lodash.debounce)(function (keyCode) {
96
94
  _this.handleKeyMovement(keyCode);
97
95
  }));
98
96
  /**
@@ -101,7 +99,7 @@ var Shortcut = /*#__PURE__*/function (_Component) {
101
99
  * @param {boolean} currentTimeRequired currentTime value required or not to perform key functionality
102
100
  *common function to handle the key functionalies. eg-> W Key and Q key functionalities
103
101
  */
104
- _defineProperty(_assertThisInitialized(_this), "handleKeyMovement", function (keyCode) {
102
+ _defineProperty(_this, "handleKeyMovement", function (keyCode) {
105
103
  var _this$props$markers$, _this$props$playerSel, _this$props$player, _this$props$player2;
106
104
  if (keyCode === 81 || keyCode === 87) {
107
105
  _this.isCalled = true;
@@ -133,7 +131,7 @@ var Shortcut = /*#__PURE__*/function (_Component) {
133
131
  * this function executed the Q and W key functionality first and then performs I and O key functionality provided 3 key combo is still pressed
134
132
  * Once we leave the keyCombo isCalled variable is set to false. This ensures that on the next combo press we will again execute Q/W key combo first.
135
133
  */
136
- _defineProperty(_assertThisInitialized(_this), "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
134
+ _defineProperty(_this, "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
137
135
  var _this$props3 = _this.props,
138
136
  playerReadOnlyMode = _this$props3.playerReadOnlyMode,
139
137
  disablePlayerActions = _this$props3.disablePlayerActions;
@@ -151,26 +149,26 @@ var Shortcut = /*#__PURE__*/function (_Component) {
151
149
  _this.isCalled = false;
152
150
  }
153
151
  });
154
- _defineProperty(_assertThisInitialized(_this), "threeKeyCombo1", (0, _lodash.debounce)(function (event) {
155
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Right');
152
+ _defineProperty(_this, "threeKeyCombo1", (0, _lodash.debounce)(function (event) {
153
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 87), _this.debounceKeyFunc.bind(_this, 79), 'Ctrl + O + Right');
156
154
  }, 0, {
157
155
  leading: true,
158
156
  trailing: true
159
157
  }));
160
- _defineProperty(_assertThisInitialized(_this), "threeKeyCombo2", (0, _lodash.debounce)(function (event) {
161
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Left');
158
+ _defineProperty(_this, "threeKeyCombo2", (0, _lodash.debounce)(function (event) {
159
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 87), _this.debounceKeyFunc.bind(_this, 79), 'Ctrl + O + Left');
162
160
  }, 0, {
163
161
  leading: true,
164
162
  trailing: true
165
163
  }));
166
- _defineProperty(_assertThisInitialized(_this), "threeKeyCombo3", (0, _lodash.debounce)(function (event) {
167
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Right');
164
+ _defineProperty(_this, "threeKeyCombo3", (0, _lodash.debounce)(function (event) {
165
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 81), _this.debounceKeyFunc.bind(_this, 73), 'Ctrl + I + Right');
168
166
  }, 0, {
169
167
  leading: true,
170
168
  trailing: true
171
169
  }));
172
- _defineProperty(_assertThisInitialized(_this), "threeKeyCombo4", (0, _lodash.debounce)(function (event) {
173
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Left');
170
+ _defineProperty(_this, "threeKeyCombo4", (0, _lodash.debounce)(function (event) {
171
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 81), _this.debounceKeyFunc.bind(_this, 73), 'Ctrl + I + Left');
174
172
  }, 0, {
175
173
  leading: true,
176
174
  trailing: true
@@ -416,7 +414,6 @@ var Shortcut = /*#__PURE__*/function (_Component) {
416
414
  // }
417
415
  }
418
416
  }
419
-
420
417
  if (playerSelectedMarker.leftMarker > -1 && currentAdjustedTime > -1 && playerSelectedMarker.markerCreate && createPoint && currentAdjustedTime > playerSelectedMarker.leftMarker) {
421
418
  // actions.handleMarkerPointChange('create');
422
419
  onAddMarker(playerSelectedMarker.leftMarker, currentAdjustedTime, '', false, {
@@ -527,13 +524,14 @@ var Shortcut = /*#__PURE__*/function (_Component) {
527
524
  }];
528
525
  _this.shortcuts = _toConsumableArray(_this.defaultShortcuts);
529
526
  _this.isCalled = false;
530
- _this.mergeShortcuts = _this.mergeShortcuts.bind(_assertThisInitialized(_this));
531
- _this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_this));
532
- _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
533
- _this.handleDoubleClick = _this.handleDoubleClick.bind(_assertThisInitialized(_this));
527
+ _this.mergeShortcuts = _this.mergeShortcuts.bind(_this);
528
+ _this.handleKeyPress = _this.handleKeyPress.bind(_this);
529
+ _this.handleClick = _this.handleClick.bind(_this);
530
+ _this.handleDoubleClick = _this.handleDoubleClick.bind(_this);
534
531
  return _this;
535
532
  }
536
- _createClass(Shortcut, [{
533
+ _inherits(Shortcut, _Component);
534
+ return _createClass(Shortcut, [{
537
535
  key: "componentDidMount",
538
536
  value: function componentDidMount() {
539
537
  this.mergeShortcuts();
@@ -816,9 +814,7 @@ var Shortcut = /*#__PURE__*/function (_Component) {
816
814
  return null;
817
815
  }
818
816
  }]);
819
- return Shortcut;
820
817
  }(_react.Component);
821
- exports["default"] = Shortcut;
822
818
  Shortcut.propTypes = propTypes;
823
819
  Shortcut.defaultProps = defaultProps;
824
820
  Shortcut.displayName = 'Shortcut';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
@@ -12,22 +12,23 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
12
12
  var Dom = _interopRequireWildcard(require("../utils/dom"));
13
13
  var _tokens = require("@desynova-digital/tokens");
14
14
  var _templateObject;
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
20
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
21
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
22
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
23
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
25
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
26
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
27
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
29
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
30
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
16
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
18
+ function _readOnlyError(r) { throw new TypeError('"' + r + '" is read-only'); }
19
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
20
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
21
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
22
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
23
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
25
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
26
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
29
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
30
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
31
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
31
32
  var propTypes = {
32
33
  theme: _propTypes.PropTypes.string,
33
34
  onMouseDown: _propTypes.PropTypes.func,
@@ -68,31 +69,30 @@ var defaultProps = {
68
69
  var SliderBlock = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n z-index: 2;\n width: 100%;\n height: 100%;\n background: ", ";\n"])), function (props) {
69
70
  return props.theme ? " ".concat(_tokens.colors[props.theme].base) : '#121d29';
70
71
  });
71
- var Slider = /*#__PURE__*/function (_Component) {
72
- _inherits(Slider, _Component);
73
- var _super = _createSuper(Slider);
72
+ var Slider = exports["default"] = /*#__PURE__*/function (_Component) {
74
73
  function Slider(props, context) {
75
74
  var _this;
76
75
  _classCallCheck(this, Slider);
77
- _this = _super.call(this, props, context);
78
- _this.handleMouseDown = _this.handleMouseDown.bind(_assertThisInitialized(_this));
79
- _this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));
80
- _this.handleMouseUp = _this.handleMouseUp.bind(_assertThisInitialized(_this));
81
- _this.handleFocus = _this.handleFocus.bind(_assertThisInitialized(_this));
82
- _this.handleBlur = _this.handleBlur.bind(_assertThisInitialized(_this));
83
- _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
84
- _this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_this));
85
- _this.stepForward = _this.stepForward.bind(_assertThisInitialized(_this));
86
- _this.stepBack = _this.stepBack.bind(_assertThisInitialized(_this));
87
- _this.calculateDistance = _this.calculateDistance.bind(_assertThisInitialized(_this));
88
- _this.getProgress = _this.getProgress.bind(_assertThisInitialized(_this));
89
- _this.renderChildren = _this.renderChildren.bind(_assertThisInitialized(_this));
76
+ _this = _callSuper(this, Slider, [props, context]);
77
+ _this.handleMouseDown = _this.handleMouseDown.bind(_this);
78
+ _this.handleMouseMove = _this.handleMouseMove.bind(_this);
79
+ _this.handleMouseUp = _this.handleMouseUp.bind(_this);
80
+ _this.handleFocus = _this.handleFocus.bind(_this);
81
+ _this.handleBlur = _this.handleBlur.bind(_this);
82
+ _this.handleClick = _this.handleClick.bind(_this);
83
+ _this.handleKeyPress = _this.handleKeyPress.bind(_this);
84
+ _this.stepForward = _this.stepForward.bind(_this);
85
+ _this.stepBack = _this.stepBack.bind(_this);
86
+ _this.calculateDistance = _this.calculateDistance.bind(_this);
87
+ _this.getProgress = _this.getProgress.bind(_this);
88
+ _this.renderChildren = _this.renderChildren.bind(_this);
90
89
  _this.state = {
91
90
  // active: false,
92
91
  };
93
92
  return _this;
94
93
  }
95
- _createClass(Slider, [{
94
+ _inherits(Slider, _Component);
95
+ return _createClass(Slider, [{
96
96
  key: "getProgress",
97
97
  value: function getProgress() {
98
98
  var getPercent = this.props.getPercent;
@@ -272,9 +272,7 @@ var Slider = /*#__PURE__*/function (_Component) {
272
272
  }, this.renderChildren());
273
273
  }
274
274
  }]);
275
- return Slider;
276
275
  }(_react.Component);
277
- exports["default"] = Slider;
278
276
  Slider.propTypes = propTypes;
279
277
  Slider.defaultProps = defaultProps;
280
278
  Slider.displayName = 'Slider';