From c35686759fbe93b736b171eb94a60461ecaddfcb Mon Sep 17 00:00:00 2001 From: Joel Costa Date: Thu, 3 Aug 2017 13:45:06 +0100 Subject: [PATCH] Fixes an unverified null variable reference --- dist/@foxdcg/react-select.js | 3914 ++--- dist/@foxdcg/react-select.min.js | 10 +- examples/dist/app.js | 3800 +++- examples/dist/bundle.js | 3914 ++--- examples/dist/common.js | 27384 +++++++++++++++-------------- examples/dist/standalone.js | 3914 ++--- lib/Async.js | 2 +- package.json | 2 +- src/Async.js | 2 +- 9 files changed, 22721 insertions(+), 20221 deletions(-) diff --git a/dist/@foxdcg/react-select.js b/dist/@foxdcg/react-select.js index 10dfedc942..9db107e29e 100644 --- a/dist/@foxdcg/react-select.js +++ b/dist/@foxdcg/react-select.js @@ -561,388 +561,448 @@ module.exports = exports['default']; },{}],8:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +Object.defineProperty(exports, "__esModule", { + value: true +}); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _reduxLibCreateStore = require('redux/lib/createStore'); +var _createStore = require('redux/lib/createStore'); -var _reduxLibCreateStore2 = _interopRequireDefault(_reduxLibCreateStore); +var _createStore2 = _interopRequireDefault(_createStore); var _reducers = require('./reducers'); var _reducers2 = _interopRequireDefault(_reducers); -var _actionsDragDrop = require('./actions/dragDrop'); +var _dragDrop = require('./actions/dragDrop'); -var dragDropActions = _interopRequireWildcard(_actionsDragDrop); +var dragDropActions = _interopRequireWildcard(_dragDrop); var _DragDropMonitor = require('./DragDropMonitor'); var _DragDropMonitor2 = _interopRequireDefault(_DragDropMonitor); -var _HandlerRegistry = require('./HandlerRegistry'); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -var _HandlerRegistry2 = _interopRequireDefault(_HandlerRegistry); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var DragDropManager = (function () { +var DragDropManager = function () { function DragDropManager(createBackend) { - _classCallCheck(this, DragDropManager); + var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var store = _reduxLibCreateStore2['default'](_reducers2['default']); + _classCallCheck(this, DragDropManager); + var store = (0, _createStore2.default)(_reducers2.default); + this.context = context; this.store = store; - this.monitor = new _DragDropMonitor2['default'](store); + this.monitor = new _DragDropMonitor2.default(store); this.registry = this.monitor.registry; this.backend = createBackend(this); store.subscribe(this.handleRefCountChange.bind(this)); } - DragDropManager.prototype.handleRefCountChange = function handleRefCountChange() { - var shouldSetUp = this.store.getState().refCount > 0; - if (shouldSetUp && !this.isSetUp) { - this.backend.setup(); - this.isSetUp = true; - } else if (!shouldSetUp && this.isSetUp) { - this.backend.teardown(); - this.isSetUp = false; + _createClass(DragDropManager, [{ + key: 'handleRefCountChange', + value: function handleRefCountChange() { + var shouldSetUp = this.store.getState().refCount > 0; + if (shouldSetUp && !this.isSetUp) { + this.backend.setup(); + this.isSetUp = true; + } else if (!shouldSetUp && this.isSetUp) { + this.backend.teardown(); + this.isSetUp = false; + } } - }; - - DragDropManager.prototype.getMonitor = function getMonitor() { - return this.monitor; - }; - - DragDropManager.prototype.getBackend = function getBackend() { - return this.backend; - }; - - DragDropManager.prototype.getRegistry = function getRegistry() { - return this.registry; - }; + }, { + key: 'getContext', + value: function getContext() { + return this.context; + } + }, { + key: 'getMonitor', + value: function getMonitor() { + return this.monitor; + } + }, { + key: 'getBackend', + value: function getBackend() { + return this.backend; + } + }, { + key: 'getRegistry', + value: function getRegistry() { + return this.registry; + } + }, { + key: 'getActions', + value: function getActions() { + var manager = this; + var dispatch = this.store.dispatch; + + + function bindActionCreator(actionCreator) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - DragDropManager.prototype.getActions = function getActions() { - var manager = this; - var dispatch = this.store.dispatch; + var action = actionCreator.apply(manager, args); + if (typeof action !== 'undefined') { + dispatch(action); + } + }; + } - function bindActionCreator(actionCreator) { - return function () { - var action = actionCreator.apply(manager, arguments); - if (typeof action !== 'undefined') { - dispatch(action); - } - }; + return Object.keys(dragDropActions).filter(function (key) { + return typeof dragDropActions[key] === 'function'; + }).reduce(function (boundActions, key) { + var action = dragDropActions[key]; + boundActions[key] = bindActionCreator(action); // eslint-disable-line no-param-reassign + return boundActions; + }, {}); } - - return Object.keys(dragDropActions).filter(function (key) { - return typeof dragDropActions[key] === 'function'; - }).reduce(function (boundActions, key) { - boundActions[key] = bindActionCreator(dragDropActions[key]); - return boundActions; - }, {}); - }; + }]); return DragDropManager; -})(); +}(); -exports['default'] = DragDropManager; -module.exports = exports['default']; -},{"./DragDropMonitor":9,"./HandlerRegistry":12,"./actions/dragDrop":13,"./reducers":20,"redux/lib/createStore":249}],9:[function(require,module,exports){ +exports.default = DragDropManager; +},{"./DragDropMonitor":9,"./actions/dragDrop":13,"./reducers":20,"redux/lib/createStore":165}],9:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +Object.defineProperty(exports, "__esModule", { + value: true +}); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _invariant = require('invariant'); var _invariant2 = _interopRequireDefault(_invariant); -var _utilsMatchesType = require('./utils/matchesType'); +var _isArray = require('lodash/isArray'); -var _utilsMatchesType2 = _interopRequireDefault(_utilsMatchesType); +var _isArray2 = _interopRequireDefault(_isArray); -var _lodashIsArray = require('lodash/isArray'); +var _matchesType = require('./utils/matchesType'); -var _lodashIsArray2 = _interopRequireDefault(_lodashIsArray); +var _matchesType2 = _interopRequireDefault(_matchesType); var _HandlerRegistry = require('./HandlerRegistry'); var _HandlerRegistry2 = _interopRequireDefault(_HandlerRegistry); -var _reducersDragOffset = require('./reducers/dragOffset'); +var _dragOffset = require('./reducers/dragOffset'); + +var _dirtyHandlerIds = require('./reducers/dirtyHandlerIds'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _reducersDirtyHandlerIds = require('./reducers/dirtyHandlerIds'); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var DragDropMonitor = (function () { +var DragDropMonitor = function () { function DragDropMonitor(store) { _classCallCheck(this, DragDropMonitor); this.store = store; - this.registry = new _HandlerRegistry2['default'](store); + this.registry = new _HandlerRegistry2.default(store); } - DragDropMonitor.prototype.subscribeToStateChange = function subscribeToStateChange(listener) { - var _this = this; - - var _ref = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + _createClass(DragDropMonitor, [{ + key: 'subscribeToStateChange', + value: function subscribeToStateChange(listener) { + var _this = this; - var handlerIds = _ref.handlerIds; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var handlerIds = options.handlerIds; - _invariant2['default'](typeof listener === 'function', 'listener must be a function.'); - _invariant2['default'](typeof handlerIds === 'undefined' || _lodashIsArray2['default'](handlerIds), 'handlerIds, when specified, must be an array of strings.'); + (0, _invariant2.default)(typeof listener === 'function', 'listener must be a function.'); + (0, _invariant2.default)(typeof handlerIds === 'undefined' || (0, _isArray2.default)(handlerIds), 'handlerIds, when specified, must be an array of strings.'); - var prevStateId = this.store.getState().stateId; - var handleChange = function handleChange() { - var state = _this.store.getState(); - var currentStateId = state.stateId; - try { - var canSkipListener = currentStateId === prevStateId || currentStateId === prevStateId + 1 && !_reducersDirtyHandlerIds.areDirty(state.dirtyHandlerIds, handlerIds); + var prevStateId = this.store.getState().stateId; + var handleChange = function handleChange() { + var state = _this.store.getState(); + var currentStateId = state.stateId; + try { + var canSkipListener = currentStateId === prevStateId || currentStateId === prevStateId + 1 && !(0, _dirtyHandlerIds.areDirty)(state.dirtyHandlerIds, handlerIds); - if (!canSkipListener) { - listener(); + if (!canSkipListener) { + listener(); + } + } finally { + prevStateId = currentStateId; } - } finally { - prevStateId = currentStateId; - } - }; - - return this.store.subscribe(handleChange); - }; - - DragDropMonitor.prototype.subscribeToOffsetChange = function subscribeToOffsetChange(listener) { - var _this2 = this; - - _invariant2['default'](typeof listener === 'function', 'listener must be a function.'); - - var previousState = this.store.getState().dragOffset; - var handleChange = function handleChange() { - var nextState = _this2.store.getState().dragOffset; - if (nextState === previousState) { - return; - } - - previousState = nextState; - listener(); - }; - - return this.store.subscribe(handleChange); - }; - - DragDropMonitor.prototype.canDragSource = function canDragSource(sourceId) { - var source = this.registry.getSource(sourceId); - _invariant2['default'](source, 'Expected to find a valid source.'); - - if (this.isDragging()) { - return false; - } - - return source.canDrag(this, sourceId); - }; - - DragDropMonitor.prototype.canDropOnTarget = function canDropOnTarget(targetId) { - var target = this.registry.getTarget(targetId); - _invariant2['default'](target, 'Expected to find a valid target.'); + }; - if (!this.isDragging() || this.didDrop()) { - return false; + return this.store.subscribe(handleChange); } + }, { + key: 'subscribeToOffsetChange', + value: function subscribeToOffsetChange(listener) { + var _this2 = this; - var targetType = this.registry.getTargetType(targetId); - var draggedItemType = this.getItemType(); - return _utilsMatchesType2['default'](targetType, draggedItemType) && target.canDrop(this, targetId); - }; - - DragDropMonitor.prototype.isDragging = function isDragging() { - return Boolean(this.getItemType()); - }; + (0, _invariant2.default)(typeof listener === 'function', 'listener must be a function.'); - DragDropMonitor.prototype.isDraggingSource = function isDraggingSource(sourceId) { - var source = this.registry.getSource(sourceId, true); - _invariant2['default'](source, 'Expected to find a valid source.'); + var previousState = this.store.getState().dragOffset; + var handleChange = function handleChange() { + var nextState = _this2.store.getState().dragOffset; + if (nextState === previousState) { + return; + } - if (!this.isDragging() || !this.isSourcePublic()) { - return false; - } + previousState = nextState; + listener(); + }; - var sourceType = this.registry.getSourceType(sourceId); - var draggedItemType = this.getItemType(); - if (sourceType !== draggedItemType) { - return false; + return this.store.subscribe(handleChange); } + }, { + key: 'canDragSource', + value: function canDragSource(sourceId) { + var source = this.registry.getSource(sourceId); + (0, _invariant2.default)(source, 'Expected to find a valid source.'); - return source.isDragging(this, sourceId); - }; - - DragDropMonitor.prototype.isOverTarget = function isOverTarget(targetId) { - var _ref2 = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var _ref2$shallow = _ref2.shallow; - var shallow = _ref2$shallow === undefined ? false : _ref2$shallow; + if (this.isDragging()) { + return false; + } - if (!this.isDragging()) { - return false; + return source.canDrag(this, sourceId); } + }, { + key: 'canDropOnTarget', + value: function canDropOnTarget(targetId) { + var target = this.registry.getTarget(targetId); + (0, _invariant2.default)(target, 'Expected to find a valid target.'); - var targetType = this.registry.getTargetType(targetId); - var draggedItemType = this.getItemType(); - if (!_utilsMatchesType2['default'](targetType, draggedItemType)) { - return false; - } + if (!this.isDragging() || this.didDrop()) { + return false; + } - var targetIds = this.getTargetIds(); - if (!targetIds.length) { - return false; + var targetType = this.registry.getTargetType(targetId); + var draggedItemType = this.getItemType(); + return (0, _matchesType2.default)(targetType, draggedItemType) && target.canDrop(this, targetId); } - - var index = targetIds.indexOf(targetId); - if (shallow) { - return index === targetIds.length - 1; - } else { - return index > -1; + }, { + key: 'isDragging', + value: function isDragging() { + return Boolean(this.getItemType()); } - }; - - DragDropMonitor.prototype.getItemType = function getItemType() { - return this.store.getState().dragOperation.itemType; - }; - - DragDropMonitor.prototype.getItem = function getItem() { - return this.store.getState().dragOperation.item; - }; - - DragDropMonitor.prototype.getSourceId = function getSourceId() { - return this.store.getState().dragOperation.sourceId; - }; - - DragDropMonitor.prototype.getTargetIds = function getTargetIds() { - return this.store.getState().dragOperation.targetIds; - }; - - DragDropMonitor.prototype.getDropResult = function getDropResult() { - return this.store.getState().dragOperation.dropResult; - }; + }, { + key: 'isDraggingSource', + value: function isDraggingSource(sourceId) { + var source = this.registry.getSource(sourceId, true); + (0, _invariant2.default)(source, 'Expected to find a valid source.'); - DragDropMonitor.prototype.didDrop = function didDrop() { - return this.store.getState().dragOperation.didDrop; - }; + if (!this.isDragging() || !this.isSourcePublic()) { + return false; + } - DragDropMonitor.prototype.isSourcePublic = function isSourcePublic() { - return this.store.getState().dragOperation.isSourcePublic; - }; + var sourceType = this.registry.getSourceType(sourceId); + var draggedItemType = this.getItemType(); + if (sourceType !== draggedItemType) { + return false; + } - DragDropMonitor.prototype.getInitialClientOffset = function getInitialClientOffset() { - return this.store.getState().dragOffset.initialClientOffset; - }; + return source.isDragging(this, sourceId); + } + }, { + key: 'isOverTarget', + value: function isOverTarget(targetId) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { shallow: false }; + var shallow = options.shallow; - DragDropMonitor.prototype.getInitialSourceClientOffset = function getInitialSourceClientOffset() { - return this.store.getState().dragOffset.initialSourceClientOffset; - }; + if (!this.isDragging()) { + return false; + } - DragDropMonitor.prototype.getClientOffset = function getClientOffset() { - return this.store.getState().dragOffset.clientOffset; - }; + var targetType = this.registry.getTargetType(targetId); + var draggedItemType = this.getItemType(); + if (!(0, _matchesType2.default)(targetType, draggedItemType)) { + return false; + } - DragDropMonitor.prototype.getSourceClientOffset = function getSourceClientOffset() { - return _reducersDragOffset.getSourceClientOffset(this.store.getState().dragOffset); - }; + var targetIds = this.getTargetIds(); + if (!targetIds.length) { + return false; + } - DragDropMonitor.prototype.getDifferenceFromInitialOffset = function getDifferenceFromInitialOffset() { - return _reducersDragOffset.getDifferenceFromInitialOffset(this.store.getState().dragOffset); - }; + var index = targetIds.indexOf(targetId); + if (shallow) { + return index === targetIds.length - 1; + } else { + return index > -1; + } + } + }, { + key: 'getItemType', + value: function getItemType() { + return this.store.getState().dragOperation.itemType; + } + }, { + key: 'getItem', + value: function getItem() { + return this.store.getState().dragOperation.item; + } + }, { + key: 'getSourceId', + value: function getSourceId() { + return this.store.getState().dragOperation.sourceId; + } + }, { + key: 'getTargetIds', + value: function getTargetIds() { + return this.store.getState().dragOperation.targetIds; + } + }, { + key: 'getDropResult', + value: function getDropResult() { + return this.store.getState().dragOperation.dropResult; + } + }, { + key: 'didDrop', + value: function didDrop() { + return this.store.getState().dragOperation.didDrop; + } + }, { + key: 'isSourcePublic', + value: function isSourcePublic() { + return this.store.getState().dragOperation.isSourcePublic; + } + }, { + key: 'getInitialClientOffset', + value: function getInitialClientOffset() { + return this.store.getState().dragOffset.initialClientOffset; + } + }, { + key: 'getInitialSourceClientOffset', + value: function getInitialSourceClientOffset() { + return this.store.getState().dragOffset.initialSourceClientOffset; + } + }, { + key: 'getClientOffset', + value: function getClientOffset() { + return this.store.getState().dragOffset.clientOffset; + } + }, { + key: 'getSourceClientOffset', + value: function getSourceClientOffset() { + return (0, _dragOffset.getSourceClientOffset)(this.store.getState().dragOffset); + } + }, { + key: 'getDifferenceFromInitialOffset', + value: function getDifferenceFromInitialOffset() { + return (0, _dragOffset.getDifferenceFromInitialOffset)(this.store.getState().dragOffset); + } + }]); return DragDropMonitor; -})(); +}(); -exports['default'] = DragDropMonitor; -module.exports = exports['default']; -},{"./HandlerRegistry":12,"./reducers/dirtyHandlerIds":17,"./reducers/dragOffset":18,"./utils/matchesType":24,"invariant":107,"lodash/isArray":97}],10:[function(require,module,exports){ +exports.default = DragDropMonitor; +},{"./HandlerRegistry":12,"./reducers/dirtyHandlerIds":17,"./reducers/dragOffset":18,"./utils/matchesType":24,"invariant":25,"lodash/isArray":116}],10:[function(require,module,exports){ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var DragSource = (function () { +var DragSource = function () { function DragSource() { _classCallCheck(this, DragSource); } - DragSource.prototype.canDrag = function canDrag() { - return true; - }; - - DragSource.prototype.isDragging = function isDragging(monitor, handle) { - return handle === monitor.getSourceId(); - }; - - DragSource.prototype.endDrag = function endDrag() {}; + _createClass(DragSource, [{ + key: "canDrag", + value: function canDrag() { + return true; + } + }, { + key: "isDragging", + value: function isDragging(monitor, handle) { + return handle === monitor.getSourceId(); + } + }, { + key: "endDrag", + value: function endDrag() {} + }]); return DragSource; -})(); +}(); -exports["default"] = DragSource; -module.exports = exports["default"]; +exports.default = DragSource; },{}],11:[function(require,module,exports){ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var DropTarget = (function () { +var DropTarget = function () { function DropTarget() { _classCallCheck(this, DropTarget); } - DropTarget.prototype.canDrop = function canDrop() { - return true; - }; - - DropTarget.prototype.hover = function hover() {}; - - DropTarget.prototype.drop = function drop() {}; + _createClass(DropTarget, [{ + key: "canDrop", + value: function canDrop() { + return true; + } + }, { + key: "hover", + value: function hover() {} + }, { + key: "drop", + value: function drop() {} + }]); return DropTarget; -})(); +}(); -exports["default"] = DropTarget; -module.exports = exports["default"]; +exports.default = DropTarget; },{}],12:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +Object.defineProperty(exports, "__esModule", { + value: true +}); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -function _typeof(obj) { return obj && obj.constructor === Symbol ? 'symbol' : typeof obj; } +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _invariant = require('invariant'); var _invariant2 = _interopRequireDefault(_invariant); -var _lodashIsArray = require('lodash/isArray'); +var _isArray = require('lodash/isArray'); -var _lodashIsArray2 = _interopRequireDefault(_lodashIsArray); +var _isArray2 = _interopRequireDefault(_isArray); -var _utilsGetNextUniqueId = require('./utils/getNextUniqueId'); +var _asap = require('asap'); -var _utilsGetNextUniqueId2 = _interopRequireDefault(_utilsGetNextUniqueId); +var _asap2 = _interopRequireDefault(_asap); -var _actionsRegistry = require('./actions/registry'); +var _registry = require('./actions/registry'); -var _asap = require('asap'); +var _getNextUniqueId = require('./utils/getNextUniqueId'); -var _asap2 = _interopRequireDefault(_asap); +var _getNextUniqueId2 = _interopRequireDefault(_getNextUniqueId); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var HandlerRoles = { SOURCE: 'SOURCE', @@ -950,37 +1010,37 @@ var HandlerRoles = { }; function validateSourceContract(source) { - _invariant2['default'](typeof source.canDrag === 'function', 'Expected canDrag to be a function.'); - _invariant2['default'](typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.'); - _invariant2['default'](typeof source.endDrag === 'function', 'Expected endDrag to be a function.'); + (0, _invariant2.default)(typeof source.canDrag === 'function', 'Expected canDrag to be a function.'); + (0, _invariant2.default)(typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.'); + (0, _invariant2.default)(typeof source.endDrag === 'function', 'Expected endDrag to be a function.'); } function validateTargetContract(target) { - _invariant2['default'](typeof target.canDrop === 'function', 'Expected canDrop to be a function.'); - _invariant2['default'](typeof target.hover === 'function', 'Expected hover to be a function.'); - _invariant2['default'](typeof target.drop === 'function', 'Expected beginDrag to be a function.'); + (0, _invariant2.default)(typeof target.canDrop === 'function', 'Expected canDrop to be a function.'); + (0, _invariant2.default)(typeof target.hover === 'function', 'Expected hover to be a function.'); + (0, _invariant2.default)(typeof target.drop === 'function', 'Expected beginDrag to be a function.'); } function validateType(type, allowArray) { - if (allowArray && _lodashIsArray2['default'](type)) { + if (allowArray && (0, _isArray2.default)(type)) { type.forEach(function (t) { return validateType(t, false); }); return; } - _invariant2['default'](typeof type === 'string' || (typeof type === 'undefined' ? 'undefined' : _typeof(type)) === 'symbol', allowArray ? 'Type can only be a string, a symbol, or an array of either.' : 'Type can only be a string or a symbol.'); + (0, _invariant2.default)(typeof type === 'string' || (typeof type === 'undefined' ? 'undefined' : _typeof(type)) === 'symbol', allowArray ? 'Type can only be a string, a symbol, or an array of either.' : 'Type can only be a string or a symbol.'); } function getNextHandlerId(role) { - var id = _utilsGetNextUniqueId2['default']().toString(); + var id = (0, _getNextUniqueId2.default)().toString(); switch (role) { case HandlerRoles.SOURCE: return 'S' + id; case HandlerRoles.TARGET: return 'T' + id; default: - _invariant2['default'](false, 'Unknown role: ' + role); + (0, _invariant2.default)(false, 'Unknown role: ' + role); } } @@ -991,11 +1051,11 @@ function parseRoleFromHandlerId(handlerId) { case 'T': return HandlerRoles.TARGET; default: - _invariant2['default'](false, 'Cannot parse handler ID: ' + handlerId); + (0, _invariant2.default)(false, 'Cannot parse handler ID: ' + handlerId); } } -var HandlerRegistry = (function () { +var HandlerRegistry = function () { function HandlerRegistry(store) { _classCallCheck(this, HandlerRegistry); @@ -1008,181 +1068,193 @@ var HandlerRegistry = (function () { this.pinnedSource = null; } - HandlerRegistry.prototype.addSource = function addSource(type, source) { - validateType(type); - validateSourceContract(source); - - var sourceId = this.addHandler(HandlerRoles.SOURCE, type, source); - this.store.dispatch(_actionsRegistry.addSource(sourceId)); - return sourceId; - }; - - HandlerRegistry.prototype.addTarget = function addTarget(type, target) { - validateType(type, true); - validateTargetContract(target); - - var targetId = this.addHandler(HandlerRoles.TARGET, type, target); - this.store.dispatch(_actionsRegistry.addTarget(targetId)); - return targetId; - }; - - HandlerRegistry.prototype.addHandler = function addHandler(role, type, handler) { - var id = getNextHandlerId(role); - this.types[id] = type; - this.handlers[id] = handler; - - return id; - }; - - HandlerRegistry.prototype.containsHandler = function containsHandler(handler) { - var _this = this; - - return Object.keys(this.handlers).some(function (key) { - return _this.handlers[key] === handler; - }); - }; - - HandlerRegistry.prototype.getSource = function getSource(sourceId, includePinned) { - _invariant2['default'](this.isSourceId(sourceId), 'Expected a valid source ID.'); - - var isPinned = includePinned && sourceId === this.pinnedSourceId; - var source = isPinned ? this.pinnedSource : this.handlers[sourceId]; - - return source; - }; - - HandlerRegistry.prototype.getTarget = function getTarget(targetId) { - _invariant2['default'](this.isTargetId(targetId), 'Expected a valid target ID.'); - return this.handlers[targetId]; - }; - - HandlerRegistry.prototype.getSourceType = function getSourceType(sourceId) { - _invariant2['default'](this.isSourceId(sourceId), 'Expected a valid source ID.'); - return this.types[sourceId]; - }; - - HandlerRegistry.prototype.getTargetType = function getTargetType(targetId) { - _invariant2['default'](this.isTargetId(targetId), 'Expected a valid target ID.'); - return this.types[targetId]; - }; - - HandlerRegistry.prototype.isSourceId = function isSourceId(handlerId) { - var role = parseRoleFromHandlerId(handlerId); - return role === HandlerRoles.SOURCE; - }; - - HandlerRegistry.prototype.isTargetId = function isTargetId(handlerId) { - var role = parseRoleFromHandlerId(handlerId); - return role === HandlerRoles.TARGET; - }; - - HandlerRegistry.prototype.removeSource = function removeSource(sourceId) { - var _this2 = this; - - _invariant2['default'](this.getSource(sourceId), 'Expected an existing source.'); - this.store.dispatch(_actionsRegistry.removeSource(sourceId)); - - _asap2['default'](function () { - delete _this2.handlers[sourceId]; - delete _this2.types[sourceId]; - }); - }; - - HandlerRegistry.prototype.removeTarget = function removeTarget(targetId) { - var _this3 = this; - - _invariant2['default'](this.getTarget(targetId), 'Expected an existing target.'); - this.store.dispatch(_actionsRegistry.removeTarget(targetId)); - - _asap2['default'](function () { - delete _this3.handlers[targetId]; - delete _this3.types[targetId]; - }); - }; + _createClass(HandlerRegistry, [{ + key: 'addSource', + value: function addSource(type, source) { + validateType(type); + validateSourceContract(source); + + var sourceId = this.addHandler(HandlerRoles.SOURCE, type, source); + this.store.dispatch((0, _registry.addSource)(sourceId)); + return sourceId; + } + }, { + key: 'addTarget', + value: function addTarget(type, target) { + validateType(type, true); + validateTargetContract(target); + + var targetId = this.addHandler(HandlerRoles.TARGET, type, target); + this.store.dispatch((0, _registry.addTarget)(targetId)); + return targetId; + } + }, { + key: 'addHandler', + value: function addHandler(role, type, handler) { + var id = getNextHandlerId(role); + this.types[id] = type; + this.handlers[id] = handler; + + return id; + } + }, { + key: 'containsHandler', + value: function containsHandler(handler) { + var _this = this; + + return Object.keys(this.handlers).some(function (key) { + return _this.handlers[key] === handler; + }); + } + }, { + key: 'getSource', + value: function getSource(sourceId, includePinned) { + (0, _invariant2.default)(this.isSourceId(sourceId), 'Expected a valid source ID.'); + + var isPinned = includePinned && sourceId === this.pinnedSourceId; + var source = isPinned ? this.pinnedSource : this.handlers[sourceId]; + + return source; + } + }, { + key: 'getTarget', + value: function getTarget(targetId) { + (0, _invariant2.default)(this.isTargetId(targetId), 'Expected a valid target ID.'); + return this.handlers[targetId]; + } + }, { + key: 'getSourceType', + value: function getSourceType(sourceId) { + (0, _invariant2.default)(this.isSourceId(sourceId), 'Expected a valid source ID.'); + return this.types[sourceId]; + } + }, { + key: 'getTargetType', + value: function getTargetType(targetId) { + (0, _invariant2.default)(this.isTargetId(targetId), 'Expected a valid target ID.'); + return this.types[targetId]; + } + }, { + key: 'isSourceId', + value: function isSourceId(handlerId) { + var role = parseRoleFromHandlerId(handlerId); + return role === HandlerRoles.SOURCE; + } + }, { + key: 'isTargetId', + value: function isTargetId(handlerId) { + var role = parseRoleFromHandlerId(handlerId); + return role === HandlerRoles.TARGET; + } + }, { + key: 'removeSource', + value: function removeSource(sourceId) { + var _this2 = this; + + (0, _invariant2.default)(this.getSource(sourceId), 'Expected an existing source.'); + this.store.dispatch((0, _registry.removeSource)(sourceId)); + + (0, _asap2.default)(function () { + delete _this2.handlers[sourceId]; + delete _this2.types[sourceId]; + }); + } + }, { + key: 'removeTarget', + value: function removeTarget(targetId) { + var _this3 = this; - HandlerRegistry.prototype.pinSource = function pinSource(sourceId) { - var source = this.getSource(sourceId); - _invariant2['default'](source, 'Expected an existing source.'); + (0, _invariant2.default)(this.getTarget(targetId), 'Expected an existing target.'); + this.store.dispatch((0, _registry.removeTarget)(targetId)); - this.pinnedSourceId = sourceId; - this.pinnedSource = source; - }; + (0, _asap2.default)(function () { + delete _this3.handlers[targetId]; + delete _this3.types[targetId]; + }); + } + }, { + key: 'pinSource', + value: function pinSource(sourceId) { + var source = this.getSource(sourceId); + (0, _invariant2.default)(source, 'Expected an existing source.'); - HandlerRegistry.prototype.unpinSource = function unpinSource() { - _invariant2['default'](this.pinnedSource, 'No source is pinned at the time.'); + this.pinnedSourceId = sourceId; + this.pinnedSource = source; + } + }, { + key: 'unpinSource', + value: function unpinSource() { + (0, _invariant2.default)(this.pinnedSource, 'No source is pinned at the time.'); - this.pinnedSourceId = null; - this.pinnedSource = null; - }; + this.pinnedSourceId = null; + this.pinnedSource = null; + } + }]); return HandlerRegistry; -})(); +}(); -exports['default'] = HandlerRegistry; -module.exports = exports['default']; -},{"./actions/registry":14,"./utils/getNextUniqueId":23,"asap":1,"invariant":107,"lodash/isArray":97}],13:[function(require,module,exports){ +exports.default = HandlerRegistry; +},{"./actions/registry":14,"./utils/getNextUniqueId":23,"asap":1,"invariant":25,"lodash/isArray":116}],13:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.END_DRAG = exports.DROP = exports.HOVER = exports.PUBLISH_DRAG_SOURCE = exports.BEGIN_DRAG = undefined; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + exports.beginDrag = beginDrag; exports.publishDragSource = publishDragSource; exports.hover = hover; exports.drop = drop; exports.endDrag = endDrag; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _utilsMatchesType = require('../utils/matchesType'); - -var _utilsMatchesType2 = _interopRequireDefault(_utilsMatchesType); - var _invariant = require('invariant'); var _invariant2 = _interopRequireDefault(_invariant); -var _lodashIsArray = require('lodash/isArray'); +var _isArray = require('lodash/isArray'); -var _lodashIsArray2 = _interopRequireDefault(_lodashIsArray); +var _isArray2 = _interopRequireDefault(_isArray); -var _lodashIsObject = require('lodash/isObject'); +var _isObject = require('lodash/isObject'); -var _lodashIsObject2 = _interopRequireDefault(_lodashIsObject); +var _isObject2 = _interopRequireDefault(_isObject); -var BEGIN_DRAG = 'dnd-core/BEGIN_DRAG'; -exports.BEGIN_DRAG = BEGIN_DRAG; -var PUBLISH_DRAG_SOURCE = 'dnd-core/PUBLISH_DRAG_SOURCE'; -exports.PUBLISH_DRAG_SOURCE = PUBLISH_DRAG_SOURCE; -var HOVER = 'dnd-core/HOVER'; -exports.HOVER = HOVER; -var DROP = 'dnd-core/DROP'; -exports.DROP = DROP; -var END_DRAG = 'dnd-core/END_DRAG'; +var _matchesType = require('../utils/matchesType'); -exports.END_DRAG = END_DRAG; +var _matchesType2 = _interopRequireDefault(_matchesType); -function beginDrag(sourceIds) { - var _ref = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _ref$publishSource = _ref.publishSource; - var publishSource = _ref$publishSource === undefined ? true : _ref$publishSource; - var _ref$clientOffset = _ref.clientOffset; - var clientOffset = _ref$clientOffset === undefined ? null : _ref$clientOffset; - var getSourceClientOffset = _ref.getSourceClientOffset; +var BEGIN_DRAG = exports.BEGIN_DRAG = 'dnd-core/BEGIN_DRAG'; +var PUBLISH_DRAG_SOURCE = exports.PUBLISH_DRAG_SOURCE = 'dnd-core/PUBLISH_DRAG_SOURCE'; +var HOVER = exports.HOVER = 'dnd-core/HOVER'; +var DROP = exports.DROP = 'dnd-core/DROP'; +var END_DRAG = exports.END_DRAG = 'dnd-core/END_DRAG'; - _invariant2['default'](_lodashIsArray2['default'](sourceIds), 'Expected sourceIds to be an array.'); +function beginDrag(sourceIds) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { publishSource: true, clientOffset: null }; + var publishSource = options.publishSource, + clientOffset = options.clientOffset, + getSourceClientOffset = options.getSourceClientOffset; + + (0, _invariant2.default)((0, _isArray2.default)(sourceIds), 'Expected sourceIds to be an array.'); var monitor = this.getMonitor(); var registry = this.getRegistry(); - _invariant2['default'](!monitor.isDragging(), 'Cannot call beginDrag while dragging.'); + (0, _invariant2.default)(!monitor.isDragging(), 'Cannot call beginDrag while dragging.'); for (var i = 0; i < sourceIds.length; i++) { - _invariant2['default'](registry.getSource(sourceIds[i]), 'Expected sourceIds to be registered.'); + (0, _invariant2.default)(registry.getSource(sourceIds[i]), 'Expected sourceIds to be registered.'); } var sourceId = null; - for (var i = sourceIds.length - 1; i >= 0; i--) { - if (monitor.canDragSource(sourceIds[i])) { - sourceId = sourceIds[i]; + for (var _i = sourceIds.length - 1; _i >= 0; _i--) { + if (monitor.canDragSource(sourceIds[_i])) { + sourceId = sourceIds[_i]; break; } } @@ -1192,13 +1264,13 @@ function beginDrag(sourceIds) { var sourceClientOffset = null; if (clientOffset) { - _invariant2['default'](typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.'); + (0, _invariant2.default)(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.'); sourceClientOffset = getSourceClientOffset(sourceId); } var source = registry.getSource(sourceId); var item = source.beginDrag(monitor, sourceId); - _invariant2['default'](_lodashIsObject2['default'](item), 'Item must be an object.'); + (0, _invariant2.default)((0, _isObject2.default)(item), 'Item must be an object.'); registry.pinSource(sourceId); @@ -1214,38 +1286,35 @@ function beginDrag(sourceIds) { }; } -function publishDragSource(manager) { +function publishDragSource() { var monitor = this.getMonitor(); if (!monitor.isDragging()) { return; } - return { - type: PUBLISH_DRAG_SOURCE - }; + return { type: PUBLISH_DRAG_SOURCE }; } -function hover(targetIds) { - var _ref2 = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; +function hover(targetIdsArg) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$clientOffset = _ref.clientOffset, + clientOffset = _ref$clientOffset === undefined ? null : _ref$clientOffset; - var _ref2$clientOffset = _ref2.clientOffset; - var clientOffset = _ref2$clientOffset === undefined ? null : _ref2$clientOffset; - - _invariant2['default'](_lodashIsArray2['default'](targetIds), 'Expected targetIds to be an array.'); - targetIds = targetIds.slice(0); + (0, _invariant2.default)((0, _isArray2.default)(targetIdsArg), 'Expected targetIds to be an array.'); + var targetIds = targetIdsArg.slice(0); var monitor = this.getMonitor(); var registry = this.getRegistry(); - _invariant2['default'](monitor.isDragging(), 'Cannot call hover while not dragging.'); - _invariant2['default'](!monitor.didDrop(), 'Cannot call hover after drop.'); + (0, _invariant2.default)(monitor.isDragging(), 'Cannot call hover while not dragging.'); + (0, _invariant2.default)(!monitor.didDrop(), 'Cannot call hover after drop.'); // First check invariants. for (var i = 0; i < targetIds.length; i++) { var targetId = targetIds[i]; - _invariant2['default'](targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.'); + (0, _invariant2.default)(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.'); var target = registry.getTarget(targetId); - _invariant2['default'](target, 'Expected targetIds to be registered.'); + (0, _invariant2.default)(target, 'Expected targetIds to be registered.'); } var draggedItemType = monitor.getItemType(); @@ -1253,19 +1322,19 @@ function hover(targetIds) { // Remove those targetIds that don't match the targetType. This // fixes shallow isOver which would only be non-shallow because of // non-matching targets. - for (var i = targetIds.length - 1; i >= 0; i--) { - var targetId = targetIds[i]; - var targetType = registry.getTargetType(targetId); - if (!_utilsMatchesType2['default'](targetType, draggedItemType)) { - targetIds.splice(i, 1); + for (var _i2 = targetIds.length - 1; _i2 >= 0; _i2--) { + var _targetId = targetIds[_i2]; + var targetType = registry.getTargetType(_targetId); + if (!(0, _matchesType2.default)(targetType, draggedItemType)) { + targetIds.splice(_i2, 1); } } // Finally call hover on all matching targets. - for (var i = 0; i < targetIds.length; i++) { - var targetId = targetIds[i]; - var target = registry.getTarget(targetId); - target.hover(monitor, targetId); + for (var _i3 = 0; _i3 < targetIds.length; _i3++) { + var _targetId2 = targetIds[_i3]; + var _target = registry.getTarget(_targetId2); + _target.hover(monitor, _targetId2); } return { @@ -1278,10 +1347,12 @@ function hover(targetIds) { function drop() { var _this = this; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var monitor = this.getMonitor(); var registry = this.getRegistry(); - _invariant2['default'](monitor.isDragging(), 'Cannot call drop while not dragging.'); - _invariant2['default'](!monitor.didDrop(), 'Cannot call drop twice during one drag operation.'); + (0, _invariant2.default)(monitor.isDragging(), 'Cannot call drop while not dragging.'); + (0, _invariant2.default)(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.'); var targetIds = monitor.getTargetIds().filter(monitor.canDropOnTarget, monitor); @@ -1290,14 +1361,14 @@ function drop() { var target = registry.getTarget(targetId); var dropResult = target.drop(monitor, targetId); - _invariant2['default'](typeof dropResult === 'undefined' || _lodashIsObject2['default'](dropResult), 'Drop result must either be an object or undefined.'); + (0, _invariant2.default)(typeof dropResult === 'undefined' || (0, _isObject2.default)(dropResult), 'Drop result must either be an object or undefined.'); if (typeof dropResult === 'undefined') { dropResult = index === 0 ? {} : monitor.getDropResult(); } _this.store.dispatch({ type: DROP, - dropResult: dropResult + dropResult: _extends({}, options, dropResult) }); }); } @@ -1305,7 +1376,7 @@ function drop() { function endDrag() { var monitor = this.getMonitor(); var registry = this.getRegistry(); - _invariant2['default'](monitor.isDragging(), 'Cannot call endDrag while not dragging.'); + (0, _invariant2.default)(monitor.isDragging(), 'Cannot call endDrag while not dragging.'); var sourceId = monitor.getSourceId(); var source = registry.getSource(sourceId, true); @@ -1313,27 +1384,22 @@ function endDrag() { registry.unpinSource(); - return { - type: END_DRAG - }; + return { type: END_DRAG }; } -},{"../utils/matchesType":24,"invariant":107,"lodash/isArray":97,"lodash/isObject":102}],14:[function(require,module,exports){ +},{"../utils/matchesType":24,"invariant":25,"lodash/isArray":116,"lodash/isObject":122}],14:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); exports.addSource = addSource; exports.addTarget = addTarget; exports.removeSource = removeSource; exports.removeTarget = removeTarget; -var ADD_SOURCE = 'dnd-core/ADD_SOURCE'; -exports.ADD_SOURCE = ADD_SOURCE; -var ADD_TARGET = 'dnd-core/ADD_TARGET'; -exports.ADD_TARGET = ADD_TARGET; -var REMOVE_SOURCE = 'dnd-core/REMOVE_SOURCE'; -exports.REMOVE_SOURCE = REMOVE_SOURCE; -var REMOVE_TARGET = 'dnd-core/REMOVE_TARGET'; - -exports.REMOVE_TARGET = REMOVE_TARGET; +var ADD_SOURCE = exports.ADD_SOURCE = 'dnd-core/ADD_SOURCE'; +var ADD_TARGET = exports.ADD_TARGET = 'dnd-core/ADD_TARGET'; +var REMOVE_SOURCE = exports.REMOVE_SOURCE = 'dnd-core/REMOVE_SOURCE'; +var REMOVE_TARGET = exports.REMOVE_TARGET = 'dnd-core/REMOVE_TARGET'; function addSource(sourceId) { return { @@ -1365,133 +1431,174 @@ function removeTarget(targetId) { },{}],15:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; -exports['default'] = createBackend; +Object.defineProperty(exports, "__esModule", { + value: true +}); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +exports.default = createBackend; + +var _noop = require('lodash/noop'); -var _lodashNoop = require('lodash/noop'); +var _noop2 = _interopRequireDefault(_noop); -var _lodashNoop2 = _interopRequireDefault(_lodashNoop); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var TestBackend = (function () { +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var TestBackend = function () { function TestBackend(manager) { _classCallCheck(this, TestBackend); this.actions = manager.getActions(); } - TestBackend.prototype.setup = function setup() { - this.didCallSetup = true; - }; - - TestBackend.prototype.teardown = function teardown() { - this.didCallTeardown = true; - }; - - TestBackend.prototype.connectDragSource = function connectDragSource() { - return _lodashNoop2['default']; - }; - - TestBackend.prototype.connectDragPreview = function connectDragPreview() { - return _lodashNoop2['default']; - }; - - TestBackend.prototype.connectDropTarget = function connectDropTarget() { - return _lodashNoop2['default']; - }; - - TestBackend.prototype.simulateBeginDrag = function simulateBeginDrag(sourceIds, options) { - this.actions.beginDrag(sourceIds, options); - }; - - TestBackend.prototype.simulatePublishDragSource = function simulatePublishDragSource() { - this.actions.publishDragSource(); - }; - - TestBackend.prototype.simulateHover = function simulateHover(targetIds, options) { - this.actions.hover(targetIds, options); - }; - - TestBackend.prototype.simulateDrop = function simulateDrop() { - this.actions.drop(); - }; - - TestBackend.prototype.simulateEndDrag = function simulateEndDrag() { - this.actions.endDrag(); - }; + _createClass(TestBackend, [{ + key: 'setup', + value: function setup() { + this.didCallSetup = true; + } + }, { + key: 'teardown', + value: function teardown() { + this.didCallTeardown = true; + } + }, { + key: 'connectDragSource', + value: function connectDragSource() { + return _noop2.default; + } + }, { + key: 'connectDragPreview', + value: function connectDragPreview() { + return _noop2.default; + } + }, { + key: 'connectDropTarget', + value: function connectDropTarget() { + return _noop2.default; + } + }, { + key: 'simulateBeginDrag', + value: function simulateBeginDrag(sourceIds, options) { + this.actions.beginDrag(sourceIds, options); + } + }, { + key: 'simulatePublishDragSource', + value: function simulatePublishDragSource() { + this.actions.publishDragSource(); + } + }, { + key: 'simulateHover', + value: function simulateHover(targetIds, options) { + this.actions.hover(targetIds, options); + } + }, { + key: 'simulateDrop', + value: function simulateDrop() { + this.actions.drop(); + } + }, { + key: 'simulateEndDrag', + value: function simulateEndDrag() { + this.actions.endDrag(); + } + }]); return TestBackend; -})(); +}(); function createBackend(manager) { return new TestBackend(manager); } - -module.exports = exports['default']; -},{"lodash/noop":104}],16:[function(require,module,exports){ +},{"lodash/noop":128}],16:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; - -function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } +Object.defineProperty(exports, "__esModule", { + value: true +}); var _DragDropManager = require('./DragDropManager'); -exports.DragDropManager = _interopRequire(_DragDropManager); +Object.defineProperty(exports, 'DragDropManager', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_DragDropManager).default; + } +}); var _DragSource = require('./DragSource'); -exports.DragSource = _interopRequire(_DragSource); +Object.defineProperty(exports, 'DragSource', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_DragSource).default; + } +}); var _DropTarget = require('./DropTarget'); -exports.DropTarget = _interopRequire(_DropTarget); +Object.defineProperty(exports, 'DropTarget', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_DropTarget).default; + } +}); + +var _createTestBackend = require('./backends/createTestBackend'); -var _backendsCreateTestBackend = require('./backends/createTestBackend'); +Object.defineProperty(exports, 'createTestBackend', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_createTestBackend).default; + } +}); -exports.createTestBackend = _interopRequire(_backendsCreateTestBackend); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } },{"./DragDropManager":8,"./DragSource":10,"./DropTarget":11,"./backends/createTestBackend":15}],17:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; -exports['default'] = dirtyHandlerIds; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = dirtyHandlerIds; exports.areDirty = areDirty; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +var _xor = require('lodash/xor'); -var _lodashXor = require('lodash/xor'); +var _xor2 = _interopRequireDefault(_xor); -var _lodashXor2 = _interopRequireDefault(_lodashXor); +var _intersection = require('lodash/intersection'); -var _lodashIntersection = require('lodash/intersection'); +var _intersection2 = _interopRequireDefault(_intersection); -var _lodashIntersection2 = _interopRequireDefault(_lodashIntersection); +var _dragDrop = require('../actions/dragDrop'); -var _actionsDragDrop = require('../actions/dragDrop'); +var _registry = require('../actions/registry'); -var _actionsRegistry = require('../actions/registry'); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NONE = []; var ALL = []; -function dirtyHandlerIds(state, action, dragOperation) { - if (state === undefined) state = NONE; +function dirtyHandlerIds() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : NONE; + var action = arguments[1]; + var dragOperation = arguments[2]; switch (action.type) { - case _actionsDragDrop.HOVER: + case _dragDrop.HOVER: break; - case _actionsRegistry.ADD_SOURCE: - case _actionsRegistry.ADD_TARGET: - case _actionsRegistry.REMOVE_TARGET: - case _actionsRegistry.REMOVE_SOURCE: + case _registry.ADD_SOURCE: + case _registry.ADD_TARGET: + case _registry.REMOVE_TARGET: + case _registry.REMOVE_SOURCE: return NONE; - case _actionsDragDrop.BEGIN_DRAG: - case _actionsDragDrop.PUBLISH_DRAG_SOURCE: - case _actionsDragDrop.END_DRAG: - case _actionsDragDrop.DROP: + case _dragDrop.BEGIN_DRAG: + case _dragDrop.PUBLISH_DRAG_SOURCE: + case _dragDrop.END_DRAG: + case _dragDrop.DROP: default: return ALL; } @@ -1499,10 +1606,10 @@ function dirtyHandlerIds(state, action, dragOperation) { var targetIds = action.targetIds; var prevTargetIds = dragOperation.targetIds; - var dirtyHandlerIds = _lodashXor2['default'](targetIds, prevTargetIds); + var result = (0, _xor2.default)(targetIds, prevTargetIds); var didChange = false; - if (dirtyHandlerIds.length === 0) { + if (result.length === 0) { for (var i = 0; i < targetIds.length; i++) { if (targetIds[i] !== prevTargetIds[i]) { didChange = true; @@ -1522,14 +1629,14 @@ function dirtyHandlerIds(state, action, dragOperation) { if (prevInnermostTargetId !== innermostTargetId) { if (prevInnermostTargetId) { - dirtyHandlerIds.push(prevInnermostTargetId); + result.push(prevInnermostTargetId); } if (innermostTargetId) { - dirtyHandlerIds.push(innermostTargetId); + result.push(innermostTargetId); } } - return dirtyHandlerIds; + return result; } function areDirty(state, handlerIds) { @@ -1541,20 +1648,22 @@ function areDirty(state, handlerIds) { return true; } - return _lodashIntersection2['default'](handlerIds, state).length > 0; + return (0, _intersection2.default)(handlerIds, state).length > 0; } -},{"../actions/dragDrop":13,"../actions/registry":14,"lodash/intersection":95,"lodash/xor":106}],18:[function(require,module,exports){ +},{"../actions/dragDrop":13,"../actions/registry":14,"lodash/intersection":114,"lodash/xor":132}],18:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -exports['default'] = dragOffset; +exports.default = dragOffset; exports.getSourceClientOffset = getSourceClientOffset; exports.getDifferenceFromInitialOffset = getDifferenceFromInitialOffset; -var _actionsDragDrop = require('../actions/dragDrop'); +var _dragDrop = require('../actions/dragDrop'); var initialState = { initialSourceClientOffset: null, @@ -1569,25 +1678,26 @@ function areOffsetsEqual(offsetA, offsetB) { return offsetA && offsetB && offsetA.x === offsetB.x && offsetA.y === offsetB.y; } -function dragOffset(state, action) { - if (state === undefined) state = initialState; +function dragOffset() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; switch (action.type) { - case _actionsDragDrop.BEGIN_DRAG: + case _dragDrop.BEGIN_DRAG: return { initialSourceClientOffset: action.sourceClientOffset, initialClientOffset: action.clientOffset, clientOffset: action.clientOffset }; - case _actionsDragDrop.HOVER: + case _dragDrop.HOVER: if (areOffsetsEqual(state.clientOffset, action.clientOffset)) { return state; } return _extends({}, state, { clientOffset: action.clientOffset }); - case _actionsDragDrop.END_DRAG: - case _actionsDragDrop.DROP: + case _dragDrop.END_DRAG: + case _dragDrop.DROP: return initialState; default: return state; @@ -1595,9 +1705,9 @@ function dragOffset(state, action) { } function getSourceClientOffset(state) { - var clientOffset = state.clientOffset; - var initialClientOffset = state.initialClientOffset; - var initialSourceClientOffset = state.initialSourceClientOffset; + var clientOffset = state.clientOffset, + initialClientOffset = state.initialClientOffset, + initialSourceClientOffset = state.initialSourceClientOffset; if (!clientOffset || !initialClientOffset || !initialSourceClientOffset) { return null; @@ -1609,8 +1719,8 @@ function getSourceClientOffset(state) { } function getDifferenceFromInitialOffset(state) { - var clientOffset = state.clientOffset; - var initialClientOffset = state.initialClientOffset; + var clientOffset = state.clientOffset, + initialClientOffset = state.initialClientOffset; if (!clientOffset || !initialClientOffset) { return null; @@ -1623,21 +1733,23 @@ function getDifferenceFromInitialOffset(state) { },{"../actions/dragDrop":13}],19:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -exports['default'] = dragOperation; +exports.default = dragOperation; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +var _without = require('lodash/without'); -var _actionsDragDrop = require('../actions/dragDrop'); +var _without2 = _interopRequireDefault(_without); -var _actionsRegistry = require('../actions/registry'); +var _dragDrop = require('../actions/dragDrop'); -var _lodashWithout = require('lodash/without'); +var _registry = require('../actions/registry'); -var _lodashWithout2 = _interopRequireDefault(_lodashWithout); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var initialState = { itemType: null, @@ -1649,11 +1761,12 @@ var initialState = { isSourcePublic: null }; -function dragOperation(state, action) { - if (state === undefined) state = initialState; +function dragOperation() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; switch (action.type) { - case _actionsDragDrop.BEGIN_DRAG: + case _dragDrop.BEGIN_DRAG: return _extends({}, state, { itemType: action.itemType, item: action.item, @@ -1662,28 +1775,28 @@ function dragOperation(state, action) { dropResult: null, didDrop: false }); - case _actionsDragDrop.PUBLISH_DRAG_SOURCE: + case _dragDrop.PUBLISH_DRAG_SOURCE: return _extends({}, state, { isSourcePublic: true }); - case _actionsDragDrop.HOVER: + case _dragDrop.HOVER: return _extends({}, state, { targetIds: action.targetIds }); - case _actionsRegistry.REMOVE_TARGET: + case _registry.REMOVE_TARGET: if (state.targetIds.indexOf(action.targetId) === -1) { return state; } return _extends({}, state, { - targetIds: _lodashWithout2['default'](state.targetIds, action.targetId) + targetIds: (0, _without2.default)(state.targetIds, action.targetId) }); - case _actionsDragDrop.DROP: + case _dragDrop.DROP: return _extends({}, state, { dropResult: action.dropResult, didDrop: true, targetIds: [] }); - case _actionsDragDrop.END_DRAG: + case _dragDrop.END_DRAG: return _extends({}, state, { itemType: null, item: null, @@ -1697,14 +1810,13 @@ function dragOperation(state, action) { return state; } } - -module.exports = exports['default']; -},{"../actions/dragDrop":13,"../actions/registry":14,"lodash/without":105}],20:[function(require,module,exports){ +},{"../actions/dragDrop":13,"../actions/registry":14,"lodash/without":131}],20:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = reduce; var _dragOffset = require('./dragOffset'); @@ -1726,82 +1838,85 @@ var _stateId = require('./stateId'); var _stateId2 = _interopRequireDefault(_stateId); -exports['default'] = function (state, action) { - if (state === undefined) state = {}; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function reduce() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments[1]; return { - dirtyHandlerIds: _dirtyHandlerIds2['default'](state.dirtyHandlerIds, action, state.dragOperation), - dragOffset: _dragOffset2['default'](state.dragOffset, action), - refCount: _refCount2['default'](state.refCount, action), - dragOperation: _dragOperation2['default'](state.dragOperation, action), - stateId: _stateId2['default'](state.stateId) + dirtyHandlerIds: (0, _dirtyHandlerIds2.default)(state.dirtyHandlerIds, action, state.dragOperation), + dragOffset: (0, _dragOffset2.default)(state.dragOffset, action), + refCount: (0, _refCount2.default)(state.refCount, action), + dragOperation: (0, _dragOperation2.default)(state.dragOperation, action), + stateId: (0, _stateId2.default)(state.stateId) }; -}; - -module.exports = exports['default']; +} },{"./dirtyHandlerIds":17,"./dragOffset":18,"./dragOperation":19,"./refCount":21,"./stateId":22}],21:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; -exports['default'] = refCount; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = refCount; -var _actionsRegistry = require('../actions/registry'); +var _registry = require('../actions/registry'); -function refCount(state, action) { - if (state === undefined) state = 0; +function refCount() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var action = arguments[1]; switch (action.type) { - case _actionsRegistry.ADD_SOURCE: - case _actionsRegistry.ADD_TARGET: + case _registry.ADD_SOURCE: + case _registry.ADD_TARGET: return state + 1; - case _actionsRegistry.REMOVE_SOURCE: - case _actionsRegistry.REMOVE_TARGET: + case _registry.REMOVE_SOURCE: + case _registry.REMOVE_TARGET: return state - 1; default: return state; } } - -module.exports = exports['default']; },{"../actions/registry":14}],22:[function(require,module,exports){ "use strict"; -exports.__esModule = true; -exports["default"] = stateId; - +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = stateId; function stateId() { - var state = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0]; + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; return state + 1; } - -module.exports = exports["default"]; },{}],23:[function(require,module,exports){ "use strict"; -exports.__esModule = true; -exports["default"] = getNextUniqueId; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getNextUniqueId; var nextUniqueId = 0; function getNextUniqueId() { return nextUniqueId++; } - -module.exports = exports["default"]; },{}],24:[function(require,module,exports){ 'use strict'; -exports.__esModule = true; -exports['default'] = matchesType; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = matchesType; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +var _isArray = require('lodash/isArray'); -var _lodashIsArray = require('lodash/isArray'); +var _isArray2 = _interopRequireDefault(_isArray); -var _lodashIsArray2 = _interopRequireDefault(_lodashIsArray); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function matchesType(targetType, draggedItemType) { - if (_lodashIsArray2['default'](targetType)) { + if ((0, _isArray2.default)(targetType)) { return targetType.some(function (t) { return t === draggedItemType; }); @@ -1809,9 +1924,60 @@ function matchesType(targetType, draggedItemType) { return targetType === draggedItemType; } } +},{"lodash/isArray":116}],25:[function(require,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ -module.exports = exports['default']; -},{"lodash/isArray":97}],25:[function(require,module,exports){ +'use strict'; + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if ("production" !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + +},{}],26:[function(require,module,exports){ var hashClear = require('./_hashClear'), hashDelete = require('./_hashDelete'), hashGet = require('./_hashGet'), @@ -1845,7 +2011,7 @@ Hash.prototype.set = hashSet; module.exports = Hash; -},{"./_hashClear":63,"./_hashDelete":64,"./_hashGet":65,"./_hashHas":66,"./_hashSet":67}],26:[function(require,module,exports){ +},{"./_hashClear":74,"./_hashDelete":75,"./_hashGet":76,"./_hashHas":77,"./_hashSet":78}],27:[function(require,module,exports){ var listCacheClear = require('./_listCacheClear'), listCacheDelete = require('./_listCacheDelete'), listCacheGet = require('./_listCacheGet'), @@ -1879,7 +2045,7 @@ ListCache.prototype.set = listCacheSet; module.exports = ListCache; -},{"./_listCacheClear":71,"./_listCacheDelete":72,"./_listCacheGet":73,"./_listCacheHas":74,"./_listCacheSet":75}],27:[function(require,module,exports){ +},{"./_listCacheClear":85,"./_listCacheDelete":86,"./_listCacheGet":87,"./_listCacheHas":88,"./_listCacheSet":89}],28:[function(require,module,exports){ var getNative = require('./_getNative'), root = require('./_root'); @@ -1888,7 +2054,7 @@ var Map = getNative(root, 'Map'); module.exports = Map; -},{"./_getNative":60,"./_root":84}],28:[function(require,module,exports){ +},{"./_getNative":70,"./_root":101}],29:[function(require,module,exports){ var mapCacheClear = require('./_mapCacheClear'), mapCacheDelete = require('./_mapCacheDelete'), mapCacheGet = require('./_mapCacheGet'), @@ -1922,7 +2088,7 @@ MapCache.prototype.set = mapCacheSet; module.exports = MapCache; -},{"./_mapCacheClear":76,"./_mapCacheDelete":77,"./_mapCacheGet":78,"./_mapCacheHas":79,"./_mapCacheSet":80}],29:[function(require,module,exports){ +},{"./_mapCacheClear":90,"./_mapCacheDelete":91,"./_mapCacheGet":92,"./_mapCacheHas":93,"./_mapCacheSet":94}],30:[function(require,module,exports){ var getNative = require('./_getNative'), root = require('./_root'); @@ -1931,7 +2097,7 @@ var Set = getNative(root, 'Set'); module.exports = Set; -},{"./_getNative":60,"./_root":84}],30:[function(require,module,exports){ +},{"./_getNative":70,"./_root":101}],31:[function(require,module,exports){ var MapCache = require('./_MapCache'), setCacheAdd = require('./_setCacheAdd'), setCacheHas = require('./_setCacheHas'); @@ -1960,7 +2126,7 @@ SetCache.prototype.has = setCacheHas; module.exports = SetCache; -},{"./_MapCache":28,"./_setCacheAdd":85,"./_setCacheHas":86}],31:[function(require,module,exports){ +},{"./_MapCache":29,"./_setCacheAdd":102,"./_setCacheHas":103}],32:[function(require,module,exports){ var root = require('./_root'); /** Built-in value references. */ @@ -1968,7 +2134,7 @@ var Symbol = root.Symbol; module.exports = Symbol; -},{"./_root":84}],32:[function(require,module,exports){ +},{"./_root":101}],33:[function(require,module,exports){ /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. @@ -1991,7 +2157,7 @@ function apply(func, thisArg, args) { module.exports = apply; -},{}],33:[function(require,module,exports){ +},{}],34:[function(require,module,exports){ /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. @@ -2018,7 +2184,7 @@ function arrayFilter(array, predicate) { module.exports = arrayFilter; -},{}],34:[function(require,module,exports){ +},{}],35:[function(require,module,exports){ var baseIndexOf = require('./_baseIndexOf'); /** @@ -2037,7 +2203,7 @@ function arrayIncludes(array, value) { module.exports = arrayIncludes; -},{"./_baseIndexOf":43}],35:[function(require,module,exports){ +},{"./_baseIndexOf":47}],36:[function(require,module,exports){ /** * This function is like `arrayIncludes` except that it accepts a comparator. * @@ -2061,7 +2227,58 @@ function arrayIncludesWith(array, value, comparator) { module.exports = arrayIncludesWith; -},{}],36:[function(require,module,exports){ +},{}],37:[function(require,module,exports){ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; + +},{"./_baseTimes":56,"./_isIndex":80,"./isArguments":115,"./isArray":116,"./isBuffer":119,"./isTypedArray":125}],38:[function(require,module,exports){ /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. @@ -2084,7 +2301,7 @@ function arrayMap(array, iteratee) { module.exports = arrayMap; -},{}],37:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ /** * Appends the elements of `values` to `array`. * @@ -2106,7 +2323,37 @@ function arrayPush(array, values) { module.exports = arrayPush; -},{}],38:[function(require,module,exports){ +},{}],40:[function(require,module,exports){ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; + +},{"./_baseAssignValue":42,"./eq":112}],41:[function(require,module,exports){ var eq = require('./eq'); /** @@ -2129,19 +2376,46 @@ function assocIndexOf(array, key) { module.exports = assocIndexOf; -},{"./eq":93}],39:[function(require,module,exports){ -var SetCache = require('./_SetCache'), - arrayIncludes = require('./_arrayIncludes'), - arrayIncludesWith = require('./_arrayIncludesWith'), - arrayMap = require('./_arrayMap'), - baseUnary = require('./_baseUnary'), - cacheHas = require('./_cacheHas'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; +},{"./eq":112}],42:[function(require,module,exports){ +var defineProperty = require('./_defineProperty'); /** - * The base implementation of methods like `_.difference` without support + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; + +},{"./_defineProperty":67}],43:[function(require,module,exports){ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support * for excluding multiple arrays or iteratee shorthands. * * @private @@ -2198,7 +2472,7 @@ function baseDifference(array, values, iteratee, comparator) { module.exports = baseDifference; -},{"./_SetCache":30,"./_arrayIncludes":34,"./_arrayIncludesWith":35,"./_arrayMap":36,"./_baseUnary":50,"./_cacheHas":53}],40:[function(require,module,exports){ +},{"./_SetCache":31,"./_arrayIncludes":35,"./_arrayIncludesWith":36,"./_arrayMap":38,"./_baseUnary":57,"./_cacheHas":60}],44:[function(require,module,exports){ /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. @@ -2224,7 +2498,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) { module.exports = baseFindIndex; -},{}],41:[function(require,module,exports){ +},{}],45:[function(require,module,exports){ var arrayPush = require('./_arrayPush'), isFlattenable = require('./_isFlattenable'); @@ -2264,7 +2538,7 @@ function baseFlatten(array, depth, predicate, isStrict, result) { module.exports = baseFlatten; -},{"./_arrayPush":37,"./_isFlattenable":68}],42:[function(require,module,exports){ +},{"./_arrayPush":39,"./_isFlattenable":79}],46:[function(require,module,exports){ var Symbol = require('./_Symbol'), getRawTag = require('./_getRawTag'), objectToString = require('./_objectToString'); @@ -2287,15 +2561,14 @@ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } - value = Object(value); - return (symToStringTag && symToStringTag in value) + return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; -},{"./_Symbol":31,"./_getRawTag":61,"./_objectToString":82}],43:[function(require,module,exports){ +},{"./_Symbol":32,"./_getRawTag":72,"./_objectToString":98}],47:[function(require,module,exports){ var baseFindIndex = require('./_baseFindIndex'), baseIsNaN = require('./_baseIsNaN'), strictIndexOf = require('./_strictIndexOf'); @@ -2317,7 +2590,7 @@ function baseIndexOf(array, value, fromIndex) { module.exports = baseIndexOf; -},{"./_baseFindIndex":40,"./_baseIsNaN":46,"./_strictIndexOf":90}],44:[function(require,module,exports){ +},{"./_baseFindIndex":44,"./_baseIsNaN":50,"./_strictIndexOf":107}],48:[function(require,module,exports){ var SetCache = require('./_SetCache'), arrayIncludes = require('./_arrayIncludes'), arrayIncludesWith = require('./_arrayIncludesWith'), @@ -2393,7 +2666,7 @@ function baseIntersection(arrays, iteratee, comparator) { module.exports = baseIntersection; -},{"./_SetCache":30,"./_arrayIncludes":34,"./_arrayIncludesWith":35,"./_arrayMap":36,"./_baseUnary":50,"./_cacheHas":53}],45:[function(require,module,exports){ +},{"./_SetCache":31,"./_arrayIncludes":35,"./_arrayIncludesWith":36,"./_arrayMap":38,"./_baseUnary":57,"./_cacheHas":60}],49:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObjectLike = require('./isObjectLike'); @@ -2413,7 +2686,7 @@ function baseIsArguments(value) { module.exports = baseIsArguments; -},{"./_baseGetTag":42,"./isObjectLike":103}],46:[function(require,module,exports){ +},{"./_baseGetTag":46,"./isObjectLike":123}],50:[function(require,module,exports){ /** * The base implementation of `_.isNaN` without support for number objects. * @@ -2427,7 +2700,7 @@ function baseIsNaN(value) { module.exports = baseIsNaN; -},{}],47:[function(require,module,exports){ +},{}],51:[function(require,module,exports){ var isFunction = require('./isFunction'), isMasked = require('./_isMasked'), isObject = require('./isObject'), @@ -2476,7 +2749,104 @@ function baseIsNative(value) { module.exports = baseIsNative; -},{"./_isMasked":70,"./_toSource":91,"./isFunction":100,"./isObject":102}],48:[function(require,module,exports){ +},{"./_isMasked":83,"./_toSource":108,"./isFunction":120,"./isObject":122}],52:[function(require,module,exports){ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; + +},{"./_baseGetTag":46,"./isLength":121,"./isObjectLike":123}],53:[function(require,module,exports){ +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; + +},{"./_isPrototype":84,"./_nativeKeysIn":96,"./isObject":122}],54:[function(require,module,exports){ var identity = require('./identity'), overRest = require('./_overRest'), setToString = require('./_setToString'); @@ -2495,7 +2865,7 @@ function baseRest(func, start) { module.exports = baseRest; -},{"./_overRest":83,"./_setToString":88,"./identity":94}],49:[function(require,module,exports){ +},{"./_overRest":100,"./_setToString":105,"./identity":113}],55:[function(require,module,exports){ var constant = require('./constant'), defineProperty = require('./_defineProperty'), identity = require('./identity'); @@ -2519,7 +2889,29 @@ var baseSetToString = !defineProperty ? identity : function(func, string) { module.exports = baseSetToString; -},{"./_defineProperty":57,"./constant":92,"./identity":94}],50:[function(require,module,exports){ +},{"./_defineProperty":67,"./constant":110,"./identity":113}],56:[function(require,module,exports){ +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; + +},{}],57:[function(require,module,exports){ /** * The base implementation of `_.unary` without support for storing metadata. * @@ -2535,7 +2927,7 @@ function baseUnary(func) { module.exports = baseUnary; -},{}],51:[function(require,module,exports){ +},{}],58:[function(require,module,exports){ var SetCache = require('./_SetCache'), arrayIncludes = require('./_arrayIncludes'), arrayIncludesWith = require('./_arrayIncludesWith'), @@ -2609,7 +3001,7 @@ function baseUniq(array, iteratee, comparator) { module.exports = baseUniq; -},{"./_SetCache":30,"./_arrayIncludes":34,"./_arrayIncludesWith":35,"./_cacheHas":53,"./_createSet":56,"./_setToArray":87}],52:[function(require,module,exports){ +},{"./_SetCache":31,"./_arrayIncludes":35,"./_arrayIncludesWith":36,"./_cacheHas":60,"./_createSet":65,"./_setToArray":104}],59:[function(require,module,exports){ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), baseUniq = require('./_baseUniq'); @@ -2647,7 +3039,7 @@ function baseXor(arrays, iteratee, comparator) { module.exports = baseXor; -},{"./_baseDifference":39,"./_baseFlatten":41,"./_baseUniq":51}],53:[function(require,module,exports){ +},{"./_baseDifference":43,"./_baseFlatten":45,"./_baseUniq":58}],60:[function(require,module,exports){ /** * Checks if a `cache` value for `key` exists. * @@ -2662,7 +3054,7 @@ function cacheHas(cache, key) { module.exports = cacheHas; -},{}],54:[function(require,module,exports){ +},{}],61:[function(require,module,exports){ var isArrayLikeObject = require('./isArrayLikeObject'); /** @@ -2678,7 +3070,49 @@ function castArrayLikeObject(value) { module.exports = castArrayLikeObject; -},{"./isArrayLikeObject":99}],55:[function(require,module,exports){ +},{"./isArrayLikeObject":118}],62:[function(require,module,exports){ +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; + +},{"./_assignValue":40,"./_baseAssignValue":42}],63:[function(require,module,exports){ var root = require('./_root'); /** Used to detect overreaching core-js shims. */ @@ -2686,7 +3120,46 @@ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; -},{"./_root":84}],56:[function(require,module,exports){ +},{"./_root":101}],64:[function(require,module,exports){ +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; + +},{"./_baseRest":54,"./_isIterateeCall":81}],65:[function(require,module,exports){ var Set = require('./_Set'), noop = require('./noop'), setToArray = require('./_setToArray'); @@ -2707,32 +3180,63 @@ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop module.exports = createSet; -},{"./_Set":29,"./_setToArray":87,"./noop":104}],57:[function(require,module,exports){ -var getNative = require('./_getNative'); - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -module.exports = defineProperty; - -},{"./_getNative":60}],58:[function(require,module,exports){ -(function (global){ -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; +},{"./_Set":30,"./_setToArray":104,"./noop":128}],66:[function(require,module,exports){ +var eq = require('./eq'); -module.exports = freeGlobal; +/** Used for built-in method references. */ +var objectProto = Object.prototype; -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],59:[function(require,module,exports){ -var isKeyable = require('./_isKeyable'); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Gets the data for `map`. + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ +function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; +} + +module.exports = customDefaultsAssignIn; + +},{"./eq":112}],67:[function(require,module,exports){ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; + +},{"./_getNative":70}],68:[function(require,module,exports){ +(function (global){ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],69:[function(require,module,exports){ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. * * @private * @param {Object} map The map to query. @@ -2748,7 +3252,7 @@ function getMapData(map, key) { module.exports = getMapData; -},{"./_isKeyable":69}],60:[function(require,module,exports){ +},{"./_isKeyable":82}],70:[function(require,module,exports){ var baseIsNative = require('./_baseIsNative'), getValue = require('./_getValue'); @@ -2767,7 +3271,15 @@ function getNative(object, key) { module.exports = getNative; -},{"./_baseIsNative":47,"./_getValue":62}],61:[function(require,module,exports){ +},{"./_baseIsNative":51,"./_getValue":73}],71:[function(require,module,exports){ +var overArg = require('./_overArg'); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; + +},{"./_overArg":99}],72:[function(require,module,exports){ var Symbol = require('./_Symbol'); /** Used for built-in method references. */ @@ -2815,7 +3327,7 @@ function getRawTag(value) { module.exports = getRawTag; -},{"./_Symbol":31}],62:[function(require,module,exports){ +},{"./_Symbol":32}],73:[function(require,module,exports){ /** * Gets the value at `key` of `object`. * @@ -2830,7 +3342,7 @@ function getValue(object, key) { module.exports = getValue; -},{}],63:[function(require,module,exports){ +},{}],74:[function(require,module,exports){ var nativeCreate = require('./_nativeCreate'); /** @@ -2847,7 +3359,7 @@ function hashClear() { module.exports = hashClear; -},{"./_nativeCreate":81}],64:[function(require,module,exports){ +},{"./_nativeCreate":95}],75:[function(require,module,exports){ /** * Removes `key` and its value from the hash. * @@ -2866,7 +3378,7 @@ function hashDelete(key) { module.exports = hashDelete; -},{}],65:[function(require,module,exports){ +},{}],76:[function(require,module,exports){ var nativeCreate = require('./_nativeCreate'); /** Used to stand-in for `undefined` hash values. */ @@ -2898,7 +3410,7 @@ function hashGet(key) { module.exports = hashGet; -},{"./_nativeCreate":81}],66:[function(require,module,exports){ +},{"./_nativeCreate":95}],77:[function(require,module,exports){ var nativeCreate = require('./_nativeCreate'); /** Used for built-in method references. */ @@ -2918,12 +3430,12 @@ var hasOwnProperty = objectProto.hasOwnProperty; */ function hashHas(key) { var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; -},{"./_nativeCreate":81}],67:[function(require,module,exports){ +},{"./_nativeCreate":95}],78:[function(require,module,exports){ var nativeCreate = require('./_nativeCreate'); /** Used to stand-in for `undefined` hash values. */ @@ -2948,7 +3460,7 @@ function hashSet(key, value) { module.exports = hashSet; -},{"./_nativeCreate":81}],68:[function(require,module,exports){ +},{"./_nativeCreate":95}],79:[function(require,module,exports){ var Symbol = require('./_Symbol'), isArguments = require('./isArguments'), isArray = require('./isArray'); @@ -2970,7 +3482,63 @@ function isFlattenable(value) { module.exports = isFlattenable; -},{"./_Symbol":31,"./isArguments":96,"./isArray":97}],69:[function(require,module,exports){ +},{"./_Symbol":32,"./isArguments":115,"./isArray":116}],80:[function(require,module,exports){ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; + +},{}],81:[function(require,module,exports){ +var eq = require('./eq'), + isArrayLike = require('./isArrayLike'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +module.exports = isIterateeCall; + +},{"./_isIndex":80,"./eq":112,"./isArrayLike":117,"./isObject":122}],82:[function(require,module,exports){ /** * Checks if `value` is suitable for use as unique object key. * @@ -2987,7 +3555,7 @@ function isKeyable(value) { module.exports = isKeyable; -},{}],70:[function(require,module,exports){ +},{}],83:[function(require,module,exports){ var coreJsData = require('./_coreJsData'); /** Used to detect methods masquerading as native. */ @@ -3009,7 +3577,27 @@ function isMasked(func) { module.exports = isMasked; -},{"./_coreJsData":55}],71:[function(require,module,exports){ +},{"./_coreJsData":63}],84:[function(require,module,exports){ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; + +},{}],85:[function(require,module,exports){ /** * Removes all key-value entries from the list cache. * @@ -3024,7 +3612,7 @@ function listCacheClear() { module.exports = listCacheClear; -},{}],72:[function(require,module,exports){ +},{}],86:[function(require,module,exports){ var assocIndexOf = require('./_assocIndexOf'); /** Used for built-in method references. */ @@ -3061,7 +3649,7 @@ function listCacheDelete(key) { module.exports = listCacheDelete; -},{"./_assocIndexOf":38}],73:[function(require,module,exports){ +},{"./_assocIndexOf":41}],87:[function(require,module,exports){ var assocIndexOf = require('./_assocIndexOf'); /** @@ -3082,7 +3670,7 @@ function listCacheGet(key) { module.exports = listCacheGet; -},{"./_assocIndexOf":38}],74:[function(require,module,exports){ +},{"./_assocIndexOf":41}],88:[function(require,module,exports){ var assocIndexOf = require('./_assocIndexOf'); /** @@ -3100,7 +3688,7 @@ function listCacheHas(key) { module.exports = listCacheHas; -},{"./_assocIndexOf":38}],75:[function(require,module,exports){ +},{"./_assocIndexOf":41}],89:[function(require,module,exports){ var assocIndexOf = require('./_assocIndexOf'); /** @@ -3128,7 +3716,7 @@ function listCacheSet(key, value) { module.exports = listCacheSet; -},{"./_assocIndexOf":38}],76:[function(require,module,exports){ +},{"./_assocIndexOf":41}],90:[function(require,module,exports){ var Hash = require('./_Hash'), ListCache = require('./_ListCache'), Map = require('./_Map'); @@ -3151,7 +3739,7 @@ function mapCacheClear() { module.exports = mapCacheClear; -},{"./_Hash":25,"./_ListCache":26,"./_Map":27}],77:[function(require,module,exports){ +},{"./_Hash":26,"./_ListCache":27,"./_Map":28}],91:[function(require,module,exports){ var getMapData = require('./_getMapData'); /** @@ -3171,7 +3759,7 @@ function mapCacheDelete(key) { module.exports = mapCacheDelete; -},{"./_getMapData":59}],78:[function(require,module,exports){ +},{"./_getMapData":69}],92:[function(require,module,exports){ var getMapData = require('./_getMapData'); /** @@ -3189,7 +3777,7 @@ function mapCacheGet(key) { module.exports = mapCacheGet; -},{"./_getMapData":59}],79:[function(require,module,exports){ +},{"./_getMapData":69}],93:[function(require,module,exports){ var getMapData = require('./_getMapData'); /** @@ -3207,7 +3795,7 @@ function mapCacheHas(key) { module.exports = mapCacheHas; -},{"./_getMapData":59}],80:[function(require,module,exports){ +},{"./_getMapData":69}],94:[function(require,module,exports){ var getMapData = require('./_getMapData'); /** @@ -3231,7 +3819,7 @@ function mapCacheSet(key, value) { module.exports = mapCacheSet; -},{"./_getMapData":59}],81:[function(require,module,exports){ +},{"./_getMapData":69}],95:[function(require,module,exports){ var getNative = require('./_getNative'); /* Built-in method references that are verified to be native. */ @@ -3239,7 +3827,53 @@ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; -},{"./_getNative":60}],82:[function(require,module,exports){ +},{"./_getNative":70}],96:[function(require,module,exports){ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; + +},{}],97:[function(require,module,exports){ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; + +},{"./_freeGlobal":68}],98:[function(require,module,exports){ /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -3263,7 +3897,24 @@ function objectToString(value) { module.exports = objectToString; -},{}],83:[function(require,module,exports){ +},{}],99:[function(require,module,exports){ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + +},{}],100:[function(require,module,exports){ var apply = require('./_apply'); /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -3301,7 +3952,7 @@ function overRest(func, start, transform) { module.exports = overRest; -},{"./_apply":32}],84:[function(require,module,exports){ +},{"./_apply":33}],101:[function(require,module,exports){ var freeGlobal = require('./_freeGlobal'); /** Detect free variable `self`. */ @@ -3312,7 +3963,7 @@ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; -},{"./_freeGlobal":58}],85:[function(require,module,exports){ +},{"./_freeGlobal":68}],102:[function(require,module,exports){ /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; @@ -3333,7 +3984,7 @@ function setCacheAdd(value) { module.exports = setCacheAdd; -},{}],86:[function(require,module,exports){ +},{}],103:[function(require,module,exports){ /** * Checks if `value` is in the array cache. * @@ -3349,7 +4000,7 @@ function setCacheHas(value) { module.exports = setCacheHas; -},{}],87:[function(require,module,exports){ +},{}],104:[function(require,module,exports){ /** * Converts `set` to an array of its values. * @@ -3369,7 +4020,7 @@ function setToArray(set) { module.exports = setToArray; -},{}],88:[function(require,module,exports){ +},{}],105:[function(require,module,exports){ var baseSetToString = require('./_baseSetToString'), shortOut = require('./_shortOut'); @@ -3385,7 +4036,7 @@ var setToString = shortOut(baseSetToString); module.exports = setToString; -},{"./_baseSetToString":49,"./_shortOut":89}],89:[function(require,module,exports){ +},{"./_baseSetToString":55,"./_shortOut":106}],106:[function(require,module,exports){ /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; @@ -3424,7 +4075,7 @@ function shortOut(func) { module.exports = shortOut; -},{}],90:[function(require,module,exports){ +},{}],107:[function(require,module,exports){ /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. @@ -3449,7 +4100,7 @@ function strictIndexOf(array, value, fromIndex) { module.exports = strictIndexOf; -},{}],91:[function(require,module,exports){ +},{}],108:[function(require,module,exports){ /** Used for built-in method references. */ var funcProto = Function.prototype; @@ -3477,7 +4128,47 @@ function toSource(func) { module.exports = toSource; -},{}],92:[function(require,module,exports){ +},{}],109:[function(require,module,exports){ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); +}); + +module.exports = assignInWith; + +},{"./_copyObject":62,"./_createAssigner":64,"./keysIn":126}],110:[function(require,module,exports){ /** * Creates a function that returns `value`. * @@ -3505,27 +4196,61 @@ function constant(value) { module.exports = constant; -},{}],93:[function(require,module,exports){ +},{}],111:[function(require,module,exports){ +var apply = require('./_apply'), + assignInWith = require('./assignInWith'), + baseRest = require('./_baseRest'), + customDefaultsAssignIn = require('./_customDefaultsAssignIn'); + /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. * * @static + * @since 0.1.0 * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep * @example * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(args) { + args.push(undefined, customDefaultsAssignIn); + return apply(assignInWith, undefined, args); +}); + +module.exports = defaults; + +},{"./_apply":33,"./_baseRest":54,"./_customDefaultsAssignIn":66,"./assignInWith":109}],112:[function(require,module,exports){ +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * * _.eq(object, other); * // => false * @@ -3544,7 +4269,7 @@ function eq(value, other) { module.exports = eq; -},{}],94:[function(require,module,exports){ +},{}],113:[function(require,module,exports){ /** * This method returns the first argument it receives. * @@ -3567,7 +4292,7 @@ function identity(value) { module.exports = identity; -},{}],95:[function(require,module,exports){ +},{}],114:[function(require,module,exports){ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), baseRest = require('./_baseRest'), @@ -3599,7 +4324,7 @@ var intersection = baseRest(function(arrays) { module.exports = intersection; -},{"./_arrayMap":36,"./_baseIntersection":44,"./_baseRest":48,"./_castArrayLikeObject":54}],96:[function(require,module,exports){ +},{"./_arrayMap":38,"./_baseIntersection":48,"./_baseRest":54,"./_castArrayLikeObject":61}],115:[function(require,module,exports){ var baseIsArguments = require('./_baseIsArguments'), isObjectLike = require('./isObjectLike'); @@ -3637,7 +4362,7 @@ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsAr module.exports = isArguments; -},{"./_baseIsArguments":45,"./isObjectLike":103}],97:[function(require,module,exports){ +},{"./_baseIsArguments":49,"./isObjectLike":123}],116:[function(require,module,exports){ /** * Checks if `value` is classified as an `Array` object. * @@ -3665,7 +4390,7 @@ var isArray = Array.isArray; module.exports = isArray; -},{}],98:[function(require,module,exports){ +},{}],117:[function(require,module,exports){ var isFunction = require('./isFunction'), isLength = require('./isLength'); @@ -3700,7 +4425,7 @@ function isArrayLike(value) { module.exports = isArrayLike; -},{"./isFunction":100,"./isLength":101}],99:[function(require,module,exports){ +},{"./isFunction":120,"./isLength":121}],118:[function(require,module,exports){ var isArrayLike = require('./isArrayLike'), isObjectLike = require('./isObjectLike'); @@ -3735,7 +4460,47 @@ function isArrayLikeObject(value) { module.exports = isArrayLikeObject; -},{"./isArrayLike":98,"./isObjectLike":103}],100:[function(require,module,exports){ +},{"./isArrayLike":117,"./isObjectLike":123}],119:[function(require,module,exports){ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; + +},{"./_root":101,"./stubFalse":129}],120:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObject = require('./isObject'); @@ -3774,7 +4539,7 @@ function isFunction(value) { module.exports = isFunction; -},{"./_baseGetTag":42,"./isObject":102}],101:[function(require,module,exports){ +},{"./_baseGetTag":46,"./isObject":122}],121:[function(require,module,exports){ /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -3811,7 +4576,7 @@ function isLength(value) { module.exports = isLength; -},{}],102:[function(require,module,exports){ +},{}],122:[function(require,module,exports){ /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) @@ -3844,7 +4609,7 @@ function isObject(value) { module.exports = isObject; -},{}],103:[function(require,module,exports){ +},{}],123:[function(require,module,exports){ /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". @@ -3875,142 +4640,339 @@ function isObjectLike(value) { module.exports = isObjectLike; -},{}],104:[function(require,module,exports){ +},{}],124:[function(require,module,exports){ +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + /** - * This method returns `undefined`. + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ - * @since 2.3.0 - * @category Util + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * - * _.times(2, _.noop); - * // => [undefined, undefined] + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true */ -function noop() { - // No operation performed. +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } -module.exports = noop; +module.exports = isPlainObject; -},{}],105:[function(require,module,exports){ -var baseDifference = require('./_baseDifference'), - baseRest = require('./_baseRest'), - isArrayLikeObject = require('./isArrayLikeObject'); +},{"./_baseGetTag":46,"./_getPrototype":71,"./isObjectLike":123}],125:[function(require,module,exports){ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** - * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.pull`, this method returns a new array. + * Checks if `value` is classified as a typed array. * * @static * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.xor + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * - * _.without([2, 1, 2, 3], 1, 2); - * // => [3] + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false */ -var without = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, values) - : []; -}); +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; -module.exports = without; +module.exports = isTypedArray; -},{"./_baseDifference":39,"./_baseRest":48,"./isArrayLikeObject":99}],106:[function(require,module,exports){ -var arrayFilter = require('./_arrayFilter'), - baseRest = require('./_baseRest'), - baseXor = require('./_baseXor'), - isArrayLikeObject = require('./isArrayLikeObject'); +},{"./_baseIsTypedArray":52,"./_baseUnary":57,"./_nodeUtil":97}],126:[function(require,module,exports){ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); /** - * Creates an array of unique values that is the - * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the given arrays. The order of result values is determined by the order - * they occur in the arrays. + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ - * @since 2.4.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.without + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. * @example * - * _.xor([2, 1], [2, 3]); - * // => [1, 3] + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ -var xor = baseRest(function(arrays) { - return baseXor(arrayFilter(arrays, isArrayLikeObject)); -}); +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} -module.exports = xor; +module.exports = keysIn; -},{"./_arrayFilter":33,"./_baseRest":48,"./_baseXor":52,"./isArrayLikeObject":99}],107:[function(require,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ +},{"./_arrayLikeKeys":37,"./_baseKeysIn":53,"./isArrayLike":117}],127:[function(require,module,exports){ +var MapCache = require('./_MapCache'); -'use strict'; +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; /** - * Use invariant() to assert state which your program assumes to be true. + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - -var invariant = function(condition, format, a, b, c, d, e, f) { - if ("production" !== 'production') { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - error.name = 'Invariant Violation'; + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -}; +// Expose `MapCache`. +memoize.Cache = MapCache; -module.exports = invariant; +module.exports = memoize; -},{}],108:[function(require,module,exports){ +},{"./_MapCache":29}],128:[function(require,module,exports){ +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = noop; + +},{}],129:[function(require,module,exports){ +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = stubFalse; + +},{}],130:[function(require,module,exports){ +var baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + baseUniq = require('./_baseUniq'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); +}); + +module.exports = union; + +},{"./_baseFlatten":45,"./_baseRest":54,"./_baseUniq":58,"./isArrayLikeObject":118}],131:[function(require,module,exports){ +var baseDifference = require('./_baseDifference'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ +var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; +}); + +module.exports = without; + +},{"./_baseDifference":43,"./_baseRest":54,"./isArrayLikeObject":118}],132:[function(require,module,exports){ +var arrayFilter = require('./_arrayFilter'), + baseRest = require('./_baseRest'), + baseXor = require('./_baseXor'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ +var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); +}); + +module.exports = xor; + +},{"./_arrayFilter":34,"./_baseRest":54,"./_baseXor":59,"./isArrayLikeObject":118}],133:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -4181,6 +5143,10 @@ process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); @@ -4192,7 +5158,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],109:[function(require,module,exports){ +},{}],134:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -4213,7 +5179,7 @@ var isSafari = _lodashMemoize2['default'](function () { return Boolean(window.safari); }); exports.isSafari = isSafari; -},{"lodash/memoize":212}],110:[function(require,module,exports){ +},{"lodash/memoize":127}],135:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -4266,7 +5232,7 @@ var EnterLeaveCounter = (function () { exports['default'] = EnterLeaveCounter; module.exports = exports['default']; -},{"lodash/union":215,"lodash/without":216}],111:[function(require,module,exports){ +},{"lodash/union":130,"lodash/without":131}],136:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -4843,7 +5809,7 @@ var HTML5Backend = (function () { exports['default'] = HTML5Backend; module.exports = exports['default']; -},{"./BrowserDetector":109,"./EnterLeaveCounter":110,"./NativeDragSources":113,"./NativeTypes":114,"./OffsetUtils":115,"./shallowEqual":118,"lodash/defaults":198}],112:[function(require,module,exports){ +},{"./BrowserDetector":134,"./EnterLeaveCounter":135,"./NativeDragSources":138,"./NativeTypes":139,"./OffsetUtils":140,"./shallowEqual":143,"lodash/defaults":111}],137:[function(require,module,exports){ "use strict"; exports.__esModule = true; @@ -4956,7 +5922,7 @@ var MonotonicInterpolant = (function () { exports["default"] = MonotonicInterpolant; module.exports = exports["default"]; -},{}],113:[function(require,module,exports){ +},{}],138:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -5060,7 +6026,7 @@ function matchNativeItemType(dataTransfer) { }); })[0] || null; } -},{"./NativeTypes":114}],114:[function(require,module,exports){ +},{"./NativeTypes":139}],139:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -5070,7 +6036,7 @@ var URL = '__NATIVE_URL__'; exports.URL = URL; var TEXT = '__NATIVE_TEXT__'; exports.TEXT = TEXT; -},{}],115:[function(require,module,exports){ +},{}],140:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -5166,7 +6132,7 @@ function getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint return { x: x, y: y }; } -},{"./BrowserDetector":109,"./MonotonicInterpolant":112}],116:[function(require,module,exports){ +},{"./BrowserDetector":134,"./MonotonicInterpolant":137}],141:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -5183,7 +6149,7 @@ function getEmptyImage() { } module.exports = exports['default']; -},{}],117:[function(require,module,exports){ +},{}],142:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -5191,975 +6157,64 @@ exports['default'] = createHTML5Backend; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _HTML5Backend = require('./HTML5Backend'); - -var _HTML5Backend2 = _interopRequireDefault(_HTML5Backend); - -var _getEmptyImage = require('./getEmptyImage'); - -var _getEmptyImage2 = _interopRequireDefault(_getEmptyImage); - -var _NativeTypes = require('./NativeTypes'); - -var NativeTypes = _interopRequireWildcard(_NativeTypes); - -exports.NativeTypes = NativeTypes; -exports.getEmptyImage = _getEmptyImage2['default']; - -function createHTML5Backend(manager) { - return new _HTML5Backend2['default'](manager); -} -},{"./HTML5Backend":111,"./NativeTypes":114,"./getEmptyImage":116}],118:[function(require,module,exports){ -"use strict"; - -exports.__esModule = true; -exports["default"] = shallowEqual; - -function shallowEqual(objA, objB) { - if (objA === objB) { - return true; - } - - var keysA = Object.keys(objA); - var keysB = Object.keys(objB); - - if (keysA.length !== keysB.length) { - return false; - } - - // Test for A's keys different from B. - var hasOwn = Object.prototype.hasOwnProperty; - for (var i = 0; i < keysA.length; i++) { - if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { - return false; - } - - var valA = objA[keysA[i]]; - var valB = objB[keysA[i]]; - - if (valA !== valB) { - return false; - } - } - - return true; -} - -module.exports = exports["default"]; -},{}],119:[function(require,module,exports){ -arguments[4][25][0].apply(exports,arguments) -},{"./_hashClear":162,"./_hashDelete":163,"./_hashGet":164,"./_hashHas":165,"./_hashSet":166,"dup":25}],120:[function(require,module,exports){ -arguments[4][26][0].apply(exports,arguments) -},{"./_listCacheClear":173,"./_listCacheDelete":174,"./_listCacheGet":175,"./_listCacheHas":176,"./_listCacheSet":177,"dup":26}],121:[function(require,module,exports){ -arguments[4][27][0].apply(exports,arguments) -},{"./_getNative":159,"./_root":188,"dup":27}],122:[function(require,module,exports){ -arguments[4][28][0].apply(exports,arguments) -},{"./_mapCacheClear":178,"./_mapCacheDelete":179,"./_mapCacheGet":180,"./_mapCacheHas":181,"./_mapCacheSet":182,"dup":28}],123:[function(require,module,exports){ -arguments[4][29][0].apply(exports,arguments) -},{"./_getNative":159,"./_root":188,"dup":29}],124:[function(require,module,exports){ -arguments[4][30][0].apply(exports,arguments) -},{"./_MapCache":122,"./_setCacheAdd":189,"./_setCacheHas":190,"dup":30}],125:[function(require,module,exports){ -arguments[4][31][0].apply(exports,arguments) -},{"./_root":188,"dup":31}],126:[function(require,module,exports){ -arguments[4][32][0].apply(exports,arguments) -},{"dup":32}],127:[function(require,module,exports){ -arguments[4][34][0].apply(exports,arguments) -},{"./_baseIndexOf":140,"dup":34}],128:[function(require,module,exports){ -arguments[4][35][0].apply(exports,arguments) -},{"dup":35}],129:[function(require,module,exports){ -var baseTimes = require('./_baseTimes'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isIndex = require('./_isIndex'), - isTypedArray = require('./isTypedArray'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -module.exports = arrayLikeKeys; - -},{"./_baseTimes":148,"./_isIndex":168,"./isArguments":201,"./isArray":202,"./isBuffer":205,"./isTypedArray":210}],130:[function(require,module,exports){ -arguments[4][36][0].apply(exports,arguments) -},{"dup":36}],131:[function(require,module,exports){ -arguments[4][37][0].apply(exports,arguments) -},{"dup":37}],132:[function(require,module,exports){ -var eq = require('./eq'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used by `_.defaults` to customize its `_.assignIn` use. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. - */ -function assignInDefaults(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; -} - -module.exports = assignInDefaults; - -},{"./eq":199}],133:[function(require,module,exports){ -var baseAssignValue = require('./_baseAssignValue'), - eq = require('./eq'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -module.exports = assignValue; - -},{"./_baseAssignValue":135,"./eq":199}],134:[function(require,module,exports){ -arguments[4][38][0].apply(exports,arguments) -},{"./eq":199,"dup":38}],135:[function(require,module,exports){ -var defineProperty = require('./_defineProperty'); - -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } -} - -module.exports = baseAssignValue; - -},{"./_defineProperty":156}],136:[function(require,module,exports){ -arguments[4][39][0].apply(exports,arguments) -},{"./_SetCache":124,"./_arrayIncludes":127,"./_arrayIncludesWith":128,"./_arrayMap":130,"./_baseUnary":149,"./_cacheHas":151,"dup":39}],137:[function(require,module,exports){ -arguments[4][40][0].apply(exports,arguments) -},{"dup":40}],138:[function(require,module,exports){ -arguments[4][41][0].apply(exports,arguments) -},{"./_arrayPush":131,"./_isFlattenable":167,"dup":41}],139:[function(require,module,exports){ -arguments[4][42][0].apply(exports,arguments) -},{"./_Symbol":125,"./_getRawTag":160,"./_objectToString":186,"dup":42}],140:[function(require,module,exports){ -arguments[4][43][0].apply(exports,arguments) -},{"./_baseFindIndex":137,"./_baseIsNaN":142,"./_strictIndexOf":194,"dup":43}],141:[function(require,module,exports){ -arguments[4][45][0].apply(exports,arguments) -},{"./_baseGetTag":139,"./isObjectLike":209,"dup":45}],142:[function(require,module,exports){ -arguments[4][46][0].apply(exports,arguments) -},{"dup":46}],143:[function(require,module,exports){ -arguments[4][47][0].apply(exports,arguments) -},{"./_isMasked":171,"./_toSource":195,"./isFunction":206,"./isObject":208,"dup":47}],144:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - isLength = require('./isLength'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -module.exports = baseIsTypedArray; - -},{"./_baseGetTag":139,"./isLength":207,"./isObjectLike":209}],145:[function(require,module,exports){ -var isObject = require('./isObject'), - isPrototype = require('./_isPrototype'), - nativeKeysIn = require('./_nativeKeysIn'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = baseKeysIn; - -},{"./_isPrototype":172,"./_nativeKeysIn":184,"./isObject":208}],146:[function(require,module,exports){ -arguments[4][48][0].apply(exports,arguments) -},{"./_overRest":187,"./_setToString":192,"./identity":200,"dup":48}],147:[function(require,module,exports){ -arguments[4][49][0].apply(exports,arguments) -},{"./_defineProperty":156,"./constant":197,"./identity":200,"dup":49}],148:[function(require,module,exports){ -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -module.exports = baseTimes; - -},{}],149:[function(require,module,exports){ -arguments[4][50][0].apply(exports,arguments) -},{"dup":50}],150:[function(require,module,exports){ -arguments[4][51][0].apply(exports,arguments) -},{"./_SetCache":124,"./_arrayIncludes":127,"./_arrayIncludesWith":128,"./_cacheHas":151,"./_createSet":155,"./_setToArray":191,"dup":51}],151:[function(require,module,exports){ -arguments[4][53][0].apply(exports,arguments) -},{"dup":53}],152:[function(require,module,exports){ -var assignValue = require('./_assignValue'), - baseAssignValue = require('./_baseAssignValue'); - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; -} - -module.exports = copyObject; - -},{"./_assignValue":133,"./_baseAssignValue":135}],153:[function(require,module,exports){ -arguments[4][55][0].apply(exports,arguments) -},{"./_root":188,"dup":55}],154:[function(require,module,exports){ -var baseRest = require('./_baseRest'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -module.exports = createAssigner; - -},{"./_baseRest":146,"./_isIterateeCall":169}],155:[function(require,module,exports){ -arguments[4][56][0].apply(exports,arguments) -},{"./_Set":123,"./_setToArray":191,"./noop":213,"dup":56}],156:[function(require,module,exports){ -arguments[4][57][0].apply(exports,arguments) -},{"./_getNative":159,"dup":57}],157:[function(require,module,exports){ -arguments[4][58][0].apply(exports,arguments) -},{"dup":58}],158:[function(require,module,exports){ -arguments[4][59][0].apply(exports,arguments) -},{"./_isKeyable":170,"dup":59}],159:[function(require,module,exports){ -arguments[4][60][0].apply(exports,arguments) -},{"./_baseIsNative":143,"./_getValue":161,"dup":60}],160:[function(require,module,exports){ -arguments[4][61][0].apply(exports,arguments) -},{"./_Symbol":125,"dup":61}],161:[function(require,module,exports){ -arguments[4][62][0].apply(exports,arguments) -},{"dup":62}],162:[function(require,module,exports){ -arguments[4][63][0].apply(exports,arguments) -},{"./_nativeCreate":183,"dup":63}],163:[function(require,module,exports){ -arguments[4][64][0].apply(exports,arguments) -},{"dup":64}],164:[function(require,module,exports){ -arguments[4][65][0].apply(exports,arguments) -},{"./_nativeCreate":183,"dup":65}],165:[function(require,module,exports){ -arguments[4][66][0].apply(exports,arguments) -},{"./_nativeCreate":183,"dup":66}],166:[function(require,module,exports){ -arguments[4][67][0].apply(exports,arguments) -},{"./_nativeCreate":183,"dup":67}],167:[function(require,module,exports){ -arguments[4][68][0].apply(exports,arguments) -},{"./_Symbol":125,"./isArguments":201,"./isArray":202,"dup":68}],168:[function(require,module,exports){ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -module.exports = isIndex; - -},{}],169:[function(require,module,exports){ -var eq = require('./eq'), - isArrayLike = require('./isArrayLike'), - isIndex = require('./_isIndex'), - isObject = require('./isObject'); - -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} - -module.exports = isIterateeCall; - -},{"./_isIndex":168,"./eq":199,"./isArrayLike":203,"./isObject":208}],170:[function(require,module,exports){ -arguments[4][69][0].apply(exports,arguments) -},{"dup":69}],171:[function(require,module,exports){ -arguments[4][70][0].apply(exports,arguments) -},{"./_coreJsData":153,"dup":70}],172:[function(require,module,exports){ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -module.exports = isPrototype; - -},{}],173:[function(require,module,exports){ -arguments[4][71][0].apply(exports,arguments) -},{"dup":71}],174:[function(require,module,exports){ -arguments[4][72][0].apply(exports,arguments) -},{"./_assocIndexOf":134,"dup":72}],175:[function(require,module,exports){ -arguments[4][73][0].apply(exports,arguments) -},{"./_assocIndexOf":134,"dup":73}],176:[function(require,module,exports){ -arguments[4][74][0].apply(exports,arguments) -},{"./_assocIndexOf":134,"dup":74}],177:[function(require,module,exports){ -arguments[4][75][0].apply(exports,arguments) -},{"./_assocIndexOf":134,"dup":75}],178:[function(require,module,exports){ -arguments[4][76][0].apply(exports,arguments) -},{"./_Hash":119,"./_ListCache":120,"./_Map":121,"dup":76}],179:[function(require,module,exports){ -arguments[4][77][0].apply(exports,arguments) -},{"./_getMapData":158,"dup":77}],180:[function(require,module,exports){ -arguments[4][78][0].apply(exports,arguments) -},{"./_getMapData":158,"dup":78}],181:[function(require,module,exports){ -arguments[4][79][0].apply(exports,arguments) -},{"./_getMapData":158,"dup":79}],182:[function(require,module,exports){ -arguments[4][80][0].apply(exports,arguments) -},{"./_getMapData":158,"dup":80}],183:[function(require,module,exports){ -arguments[4][81][0].apply(exports,arguments) -},{"./_getNative":159,"dup":81}],184:[function(require,module,exports){ -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} - -module.exports = nativeKeysIn; - -},{}],185:[function(require,module,exports){ -var freeGlobal = require('./_freeGlobal'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding('util'); - } catch (e) {} -}()); - -module.exports = nodeUtil; - -},{"./_freeGlobal":157}],186:[function(require,module,exports){ -arguments[4][82][0].apply(exports,arguments) -},{"dup":82}],187:[function(require,module,exports){ -arguments[4][83][0].apply(exports,arguments) -},{"./_apply":126,"dup":83}],188:[function(require,module,exports){ -arguments[4][84][0].apply(exports,arguments) -},{"./_freeGlobal":157,"dup":84}],189:[function(require,module,exports){ -arguments[4][85][0].apply(exports,arguments) -},{"dup":85}],190:[function(require,module,exports){ -arguments[4][86][0].apply(exports,arguments) -},{"dup":86}],191:[function(require,module,exports){ -arguments[4][87][0].apply(exports,arguments) -},{"dup":87}],192:[function(require,module,exports){ -arguments[4][88][0].apply(exports,arguments) -},{"./_baseSetToString":147,"./_shortOut":193,"dup":88}],193:[function(require,module,exports){ -arguments[4][89][0].apply(exports,arguments) -},{"dup":89}],194:[function(require,module,exports){ -arguments[4][90][0].apply(exports,arguments) -},{"dup":90}],195:[function(require,module,exports){ -arguments[4][91][0].apply(exports,arguments) -},{"dup":91}],196:[function(require,module,exports){ -var copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - keysIn = require('./keysIn'); - -/** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); -}); - -module.exports = assignInWith; - -},{"./_copyObject":152,"./_createAssigner":154,"./keysIn":211}],197:[function(require,module,exports){ -arguments[4][92][0].apply(exports,arguments) -},{"dup":92}],198:[function(require,module,exports){ -var apply = require('./_apply'), - assignInDefaults = require('./_assignInDefaults'), - assignInWith = require('./assignInWith'), - baseRest = require('./_baseRest'); - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(args) { - args.push(undefined, assignInDefaults); - return apply(assignInWith, undefined, args); -}); - -module.exports = defaults; - -},{"./_apply":126,"./_assignInDefaults":132,"./_baseRest":146,"./assignInWith":196}],199:[function(require,module,exports){ -arguments[4][93][0].apply(exports,arguments) -},{"dup":93}],200:[function(require,module,exports){ -arguments[4][94][0].apply(exports,arguments) -},{"dup":94}],201:[function(require,module,exports){ -arguments[4][96][0].apply(exports,arguments) -},{"./_baseIsArguments":141,"./isObjectLike":209,"dup":96}],202:[function(require,module,exports){ -arguments[4][97][0].apply(exports,arguments) -},{"dup":97}],203:[function(require,module,exports){ -arguments[4][98][0].apply(exports,arguments) -},{"./isFunction":206,"./isLength":207,"dup":98}],204:[function(require,module,exports){ -arguments[4][99][0].apply(exports,arguments) -},{"./isArrayLike":203,"./isObjectLike":209,"dup":99}],205:[function(require,module,exports){ -var root = require('./_root'), - stubFalse = require('./stubFalse'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -module.exports = isBuffer; - -},{"./_root":188,"./stubFalse":214}],206:[function(require,module,exports){ -arguments[4][100][0].apply(exports,arguments) -},{"./_baseGetTag":139,"./isObject":208,"dup":100}],207:[function(require,module,exports){ -arguments[4][101][0].apply(exports,arguments) -},{"dup":101}],208:[function(require,module,exports){ -arguments[4][102][0].apply(exports,arguments) -},{"dup":102}],209:[function(require,module,exports){ -arguments[4][103][0].apply(exports,arguments) -},{"dup":103}],210:[function(require,module,exports){ -var baseIsTypedArray = require('./_baseIsTypedArray'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -module.exports = isTypedArray; - -},{"./_baseIsTypedArray":144,"./_baseUnary":149,"./_nodeUtil":185}],211:[function(require,module,exports){ -var arrayLikeKeys = require('./_arrayLikeKeys'), - baseKeysIn = require('./_baseKeysIn'), - isArrayLike = require('./isArrayLike'); - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} - -module.exports = keysIn; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -},{"./_arrayLikeKeys":129,"./_baseKeysIn":145,"./isArrayLike":203}],212:[function(require,module,exports){ -var MapCache = require('./_MapCache'); +var _HTML5Backend = require('./HTML5Backend'); -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; +var _HTML5Backend2 = _interopRequireDefault(_HTML5Backend); -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; +var _getEmptyImage = require('./getEmptyImage'); - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} +var _getEmptyImage2 = _interopRequireDefault(_getEmptyImage); -// Expose `MapCache`. -memoize.Cache = MapCache; +var _NativeTypes = require('./NativeTypes'); -module.exports = memoize; +var NativeTypes = _interopRequireWildcard(_NativeTypes); -},{"./_MapCache":122}],213:[function(require,module,exports){ -arguments[4][104][0].apply(exports,arguments) -},{"dup":104}],214:[function(require,module,exports){ -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; +exports.NativeTypes = NativeTypes; +exports.getEmptyImage = _getEmptyImage2['default']; + +function createHTML5Backend(manager) { + return new _HTML5Backend2['default'](manager); } +},{"./HTML5Backend":136,"./NativeTypes":139,"./getEmptyImage":141}],143:[function(require,module,exports){ +"use strict"; -module.exports = stubFalse; +exports.__esModule = true; +exports["default"] = shallowEqual; -},{}],215:[function(require,module,exports){ -var baseFlatten = require('./_baseFlatten'), - baseRest = require('./_baseRest'), - baseUniq = require('./_baseUniq'), - isArrayLikeObject = require('./isArrayLikeObject'); +function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); -}); + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); -module.exports = union; + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var hasOwn = Object.prototype.hasOwnProperty; + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + + var valA = objA[keysA[i]]; + var valB = objB[keysA[i]]; + + if (valA !== valB) { + return false; + } + } -},{"./_baseFlatten":138,"./_baseRest":146,"./_baseUniq":150,"./isArrayLikeObject":204}],216:[function(require,module,exports){ -arguments[4][105][0].apply(exports,arguments) -},{"./_baseDifference":136,"./_baseRest":146,"./isArrayLikeObject":204,"dup":105}],217:[function(require,module,exports){ + return true; +} + +module.exports = exports["default"]; +},{}],144:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -6260,7 +6315,7 @@ function DragDropContext(backendOrModule) { } module.exports = exports['default']; -},{"./utils/checkDecoratorArguments":232,"dnd-core":16,"invariant":107,"react":undefined}],218:[function(require,module,exports){ +},{"./utils/checkDecoratorArguments":159,"dnd-core":16,"invariant":25,"react":undefined}],145:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -6399,7 +6454,7 @@ function DragLayer(collect) { } module.exports = exports['default']; -},{"./utils/checkDecoratorArguments":232,"./utils/shallowEqual":235,"./utils/shallowEqualScalar":236,"invariant":107,"lodash/isPlainObject":248,"react":undefined}],219:[function(require,module,exports){ +},{"./utils/checkDecoratorArguments":159,"./utils/shallowEqual":162,"./utils/shallowEqualScalar":163,"invariant":25,"lodash/isPlainObject":124,"react":undefined}],146:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -6479,7 +6534,7 @@ function DragSource(type, spec, collect) { } module.exports = exports['default']; -},{"./createSourceConnector":222,"./createSourceFactory":223,"./createSourceMonitor":224,"./decorateHandler":228,"./registerSource":230,"./utils/checkDecoratorArguments":232,"./utils/isValidType":234,"invariant":107,"lodash/isPlainObject":248}],220:[function(require,module,exports){ +},{"./createSourceConnector":149,"./createSourceFactory":150,"./createSourceMonitor":151,"./decorateHandler":155,"./registerSource":157,"./utils/checkDecoratorArguments":159,"./utils/isValidType":161,"invariant":25,"lodash/isPlainObject":124}],147:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -6559,7 +6614,7 @@ function DropTarget(type, spec, collect) { } module.exports = exports['default']; -},{"./createTargetConnector":225,"./createTargetFactory":226,"./createTargetMonitor":227,"./decorateHandler":228,"./registerTarget":231,"./utils/checkDecoratorArguments":232,"./utils/isValidType":234,"invariant":107,"lodash/isPlainObject":248}],221:[function(require,module,exports){ +},{"./createTargetConnector":152,"./createTargetFactory":153,"./createTargetMonitor":154,"./decorateHandler":155,"./registerTarget":158,"./utils/checkDecoratorArguments":159,"./utils/isValidType":161,"invariant":25,"lodash/isPlainObject":124}],148:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -6580,7 +6635,7 @@ function areOptionsEqual(nextOptions, currentOptions) { } module.exports = exports['default']; -},{"./utils/shallowEqual":235}],222:[function(require,module,exports){ +},{"./utils/shallowEqual":162}],149:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -6670,7 +6725,7 @@ function createSourceConnector(backend) { } module.exports = exports['default']; -},{"./areOptionsEqual":221,"./wrapConnectorHooks":237}],223:[function(require,module,exports){ +},{"./areOptionsEqual":148,"./wrapConnectorHooks":164}],150:[function(require,module,exports){ (function (process){ 'use strict'; @@ -6760,7 +6815,7 @@ function createSourceFactory(spec) { module.exports = exports['default']; }).call(this,require('_process')) -},{"_process":108,"invariant":107,"lodash/isPlainObject":248}],224:[function(require,module,exports){ +},{"_process":133,"invariant":25,"lodash/isPlainObject":124}],151:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -6854,7 +6909,7 @@ function createSourceMonitor(manager) { } module.exports = exports['default']; -},{"invariant":107}],225:[function(require,module,exports){ +},{"invariant":25}],152:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -6917,7 +6972,7 @@ function createTargetConnector(backend) { } module.exports = exports['default']; -},{"./areOptionsEqual":221,"./wrapConnectorHooks":237}],226:[function(require,module,exports){ +},{"./areOptionsEqual":148,"./wrapConnectorHooks":164}],153:[function(require,module,exports){ (function (process){ 'use strict'; @@ -7003,7 +7058,7 @@ function createTargetFactory(spec) { module.exports = exports['default']; }).call(this,require('_process')) -},{"_process":108,"invariant":107,"lodash/isPlainObject":248}],227:[function(require,module,exports){ +},{"_process":133,"invariant":25,"lodash/isPlainObject":124}],154:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -7089,7 +7144,7 @@ function createTargetMonitor(manager) { } module.exports = exports['default']; -},{"invariant":107}],228:[function(require,module,exports){ +},{"invariant":25}],155:[function(require,module,exports){ (function (process){ 'use strict'; @@ -7284,7 +7339,7 @@ function decorateHandler(_ref) { module.exports = exports['default']; }).call(this,require('_process')) -},{"./utils/shallowEqual":235,"./utils/shallowEqualScalar":236,"_process":108,"disposables":6,"invariant":107,"lodash/isPlainObject":248,"react":undefined}],229:[function(require,module,exports){ +},{"./utils/shallowEqual":162,"./utils/shallowEqualScalar":163,"_process":133,"disposables":6,"invariant":25,"lodash/isPlainObject":124,"react":undefined}],156:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -7306,7 +7361,7 @@ exports.DragSource = _interopRequire(_DragSource); var _DropTarget = require('./DropTarget'); exports.DropTarget = _interopRequire(_DropTarget); -},{"./DragDropContext":217,"./DragLayer":218,"./DragSource":219,"./DropTarget":220}],230:[function(require,module,exports){ +},{"./DragDropContext":144,"./DragLayer":145,"./DragSource":146,"./DropTarget":147}],157:[function(require,module,exports){ "use strict"; exports.__esModule = true; @@ -7327,7 +7382,7 @@ function registerSource(type, source, manager) { } module.exports = exports["default"]; -},{}],231:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ "use strict"; exports.__esModule = true; @@ -7348,7 +7403,7 @@ function registerTarget(type, target, manager) { } module.exports = exports["default"]; -},{}],232:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ (function (process){ 'use strict'; @@ -7374,7 +7429,7 @@ function checkDecoratorArguments(functionName, signature) { module.exports = exports['default']; }).call(this,require('_process')) -},{"_process":108}],233:[function(require,module,exports){ +},{"_process":133}],160:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -7411,7 +7466,7 @@ function cloneWithRef(element, newRef) { } module.exports = exports['default']; -},{"invariant":107,"react":undefined}],234:[function(require,module,exports){ +},{"invariant":25,"react":undefined}],161:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -7430,9 +7485,9 @@ function isValidType(type, allowArray) { } module.exports = exports['default']; -},{"lodash/isArray":246}],235:[function(require,module,exports){ -arguments[4][118][0].apply(exports,arguments) -},{"dup":118}],236:[function(require,module,exports){ +},{"lodash/isArray":116}],162:[function(require,module,exports){ +arguments[4][143][0].apply(exports,arguments) +},{"dup":143}],163:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -7473,7 +7528,7 @@ function shallowEqualScalar(objA, objB) { } module.exports = exports['default']; -},{}],237:[function(require,module,exports){ +},{}],164:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -7541,112 +7596,7 @@ function wrapConnectorHooks(hooks) { } module.exports = exports['default']; -},{"./utils/cloneWithRef":233,"react":undefined}],238:[function(require,module,exports){ -arguments[4][31][0].apply(exports,arguments) -},{"./_root":245,"dup":31}],239:[function(require,module,exports){ -arguments[4][42][0].apply(exports,arguments) -},{"./_Symbol":238,"./_getRawTag":242,"./_objectToString":243,"dup":42}],240:[function(require,module,exports){ -arguments[4][58][0].apply(exports,arguments) -},{"dup":58}],241:[function(require,module,exports){ -var overArg = require('./_overArg'); - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -module.exports = getPrototype; - -},{"./_overArg":244}],242:[function(require,module,exports){ -arguments[4][61][0].apply(exports,arguments) -},{"./_Symbol":238,"dup":61}],243:[function(require,module,exports){ -arguments[4][82][0].apply(exports,arguments) -},{"dup":82}],244:[function(require,module,exports){ -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -module.exports = overArg; - -},{}],245:[function(require,module,exports){ -arguments[4][84][0].apply(exports,arguments) -},{"./_freeGlobal":240,"dup":84}],246:[function(require,module,exports){ -arguments[4][97][0].apply(exports,arguments) -},{"dup":97}],247:[function(require,module,exports){ -arguments[4][103][0].apply(exports,arguments) -},{"dup":103}],248:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - getPrototype = require('./_getPrototype'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} - -module.exports = isPlainObject; - -},{"./_baseGetTag":239,"./_getPrototype":241,"./isObjectLike":247}],249:[function(require,module,exports){ +},{"./utils/cloneWithRef":160,"react":undefined}],165:[function(require,module,exports){ 'use strict'; exports.__esModule = true; @@ -7671,34 +7621,33 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd */ var ActionTypes = exports.ActionTypes = { INIT: '@@redux/INIT' -}; -/** - * Creates a Redux store that holds the state tree. - * The only way to change the data in the store is to call `dispatch()` on it. - * - * There should only be a single store in your app. To specify how different - * parts of the state tree respond to actions, you may combine several reducers - * into a single reducer function by using `combineReducers`. - * - * @param {Function} reducer A function that returns the next state tree, given - * the current state tree and the action to handle. - * - * @param {any} [preloadedState] The initial state. You may optionally specify it - * to hydrate the state from the server in universal apps, or to restore a - * previously serialized user session. - * If you use `combineReducers` to produce the root reducer function, this must be - * an object with the same shape as `combineReducers` keys. - * - * @param {Function} enhancer The store enhancer. You may optionally specify it - * to enhance the store with third-party capabilities such as middleware, - * time travel, persistence, etc. The only store enhancer that ships with Redux - * is `applyMiddleware()`. - * - * @returns {Store} A Redux store that lets you read the state, dispatch actions - * and subscribe to changes. - */ -function createStore(reducer, preloadedState, enhancer) { + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ +};function createStore(reducer, preloadedState, enhancer) { var _ref2; if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { @@ -7832,7 +7781,8 @@ function createStore(reducer, preloadedState, enhancer) { var listeners = currentListeners = nextListeners; for (var i = 0; i < listeners.length; i++) { - listeners[i](); + var listener = listeners[i]; + listener(); } return action; @@ -7861,7 +7811,7 @@ function createStore(reducer, preloadedState, enhancer) { * Interoperability point for observable/reactive libraries. * @returns {observable} A minimal observable of state changes. * For more information, see the observable proposal: - * https://github.com/zenparsing/es-observable + * https://github.com/tc39/proposal-observable */ function observable() { var _ref; @@ -7908,30 +7858,10 @@ function createStore(reducer, preloadedState, enhancer) { replaceReducer: replaceReducer }, _ref2[_symbolObservable2['default']] = observable, _ref2; } -},{"lodash/isPlainObject":259,"symbol-observable":260}],250:[function(require,module,exports){ -arguments[4][31][0].apply(exports,arguments) -},{"./_root":257,"dup":31}],251:[function(require,module,exports){ -arguments[4][42][0].apply(exports,arguments) -},{"./_Symbol":250,"./_getRawTag":254,"./_objectToString":255,"dup":42}],252:[function(require,module,exports){ -arguments[4][58][0].apply(exports,arguments) -},{"dup":58}],253:[function(require,module,exports){ -arguments[4][241][0].apply(exports,arguments) -},{"./_overArg":256,"dup":241}],254:[function(require,module,exports){ -arguments[4][61][0].apply(exports,arguments) -},{"./_Symbol":250,"dup":61}],255:[function(require,module,exports){ -arguments[4][82][0].apply(exports,arguments) -},{"dup":82}],256:[function(require,module,exports){ -arguments[4][244][0].apply(exports,arguments) -},{"dup":244}],257:[function(require,module,exports){ -arguments[4][84][0].apply(exports,arguments) -},{"./_freeGlobal":252,"dup":84}],258:[function(require,module,exports){ -arguments[4][103][0].apply(exports,arguments) -},{"dup":103}],259:[function(require,module,exports){ -arguments[4][248][0].apply(exports,arguments) -},{"./_baseGetTag":251,"./_getPrototype":253,"./isObjectLike":258,"dup":248}],260:[function(require,module,exports){ +},{"lodash/isPlainObject":124,"symbol-observable":166}],166:[function(require,module,exports){ module.exports = require('./lib/index'); -},{"./lib/index":261}],261:[function(require,module,exports){ +},{"./lib/index":167}],167:[function(require,module,exports){ (function (global){ 'use strict'; @@ -7963,7 +7893,7 @@ if (typeof self !== 'undefined') { var result = (0, _ponyfill2['default'])(root); exports['default'] = result; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./ponyfill":262}],262:[function(require,module,exports){ +},{"./ponyfill":168}],168:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -7987,7 +7917,7 @@ function symbolObservablePonyfill(root) { return result; }; -},{}],263:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ (function (global){ 'use strict'; @@ -8226,7 +8156,7 @@ var Async = (function (_Component) { } }, onChange: function onChange(newValues) { - if (_this3.props.value && newValues.length > _this3.props.value.length) { + if (_this3.props.value && (!newValues || newValues.length > _this3.props.value.length)) { _this3.clearOptions(); } _this3.props.onChange(newValues); @@ -8254,7 +8184,7 @@ function defaultChildren(props) { module.exports = exports['default']; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./Select":267,"./utils/stripDiacritics":275}],264:[function(require,module,exports){ +},{"./Select":173,"./utils/stripDiacritics":181}],170:[function(require,module,exports){ (function (global){ 'use strict'; @@ -8300,7 +8230,7 @@ var AsyncCreatable = _react2['default'].createClass({ module.exports = AsyncCreatable; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./Select":267}],265:[function(require,module,exports){ +},{"./Select":173}],171:[function(require,module,exports){ (function (global){ 'use strict'; @@ -8603,7 +8533,7 @@ function shouldKeyDownEventCreateNewOption(_ref6) { module.exports = Creatable; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./Select":267,"./utils/defaultFilterOptions":273,"./utils/defaultMenuRenderer":274}],266:[function(require,module,exports){ +},{"./Select":173,"./utils/defaultFilterOptions":179,"./utils/defaultMenuRenderer":180}],172:[function(require,module,exports){ (function (global){ 'use strict'; @@ -8718,7 +8648,7 @@ var Option = _react2['default'].createClass({ module.exports = Option; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],267:[function(require,module,exports){ +},{}],173:[function(require,module,exports){ (function (global){ /*! Copyright (c) 2016 Jed Watson. @@ -9998,7 +9928,7 @@ exports['default'] = SelectComposite; module.exports = exports['default']; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./Async":263,"./AsyncCreatable":264,"./Creatable":265,"./Option":266,"./Value":268,"./dnd/DragDropContainer":270,"./dnd/DragDropItem":271,"./utils/defaultArrowRenderer":272,"./utils/defaultFilterOptions":273,"./utils/defaultMenuRenderer":274,"react-dnd":229,"react-dnd-html5-backend":117}],268:[function(require,module,exports){ +},{"./Async":169,"./AsyncCreatable":170,"./Creatable":171,"./Option":172,"./Value":174,"./dnd/DragDropContainer":176,"./dnd/DragDropItem":177,"./utils/defaultArrowRenderer":178,"./utils/defaultFilterOptions":179,"./utils/defaultMenuRenderer":180,"react-dnd":156,"react-dnd-html5-backend":142}],174:[function(require,module,exports){ (function (global){ 'use strict'; @@ -10109,7 +10039,7 @@ var Value = _react2['default'].createClass({ module.exports = Value; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],269:[function(require,module,exports){ +},{}],175:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, '__esModule', { @@ -10118,7 +10048,7 @@ Object.defineProperty(exports, '__esModule', { var MULTI_SELECT = 'multiSelect'; exports.MULTI_SELECT = MULTI_SELECT; -},{}],270:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ (function (global){ 'use strict'; @@ -10212,7 +10142,7 @@ exports['default'] = (0, _reactDnd.DropTarget)(_constantsDragDropTypes.MULTI_SEL module.exports = exports['default']; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../constants/dragDropTypes":269,"react-dnd":229}],271:[function(require,module,exports){ +},{"../constants/dragDropTypes":175,"react-dnd":156}],177:[function(require,module,exports){ (function (global){ 'use strict'; @@ -10292,7 +10222,7 @@ exports['default'] = (0, _reactDnd.DragSource)(_constantsDragDropTypes.MULTI_SEL module.exports = exports['default']; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../constants/dragDropTypes":269,"react-dnd":229}],272:[function(require,module,exports){ +},{"../constants/dragDropTypes":175,"react-dnd":156}],178:[function(require,module,exports){ (function (global){ "use strict"; @@ -10320,7 +10250,7 @@ function arrowRenderer(_ref) { module.exports = exports["default"]; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],273:[function(require,module,exports){ +},{}],179:[function(require,module,exports){ 'use strict'; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } @@ -10364,7 +10294,7 @@ function filterOptions(options, filterValue, excludeOptions, props) { module.exports = filterOptions; -},{"./stripDiacritics":275}],274:[function(require,module,exports){ +},{"./stripDiacritics":181}],180:[function(require,module,exports){ (function (global){ 'use strict'; @@ -10429,7 +10359,7 @@ function menuRenderer(_ref) { module.exports = menuRenderer; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],275:[function(require,module,exports){ +},{}],181:[function(require,module,exports){ 'use strict'; var map = [{ 'base': 'A', 'letters': /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g }, { 'base': 'AA', 'letters': /[\uA732]/g }, { 'base': 'AE', 'letters': /[\u00C6\u01FC\u01E2]/g }, { 'base': 'AO', 'letters': /[\uA734]/g }, { 'base': 'AU', 'letters': /[\uA736]/g }, { 'base': 'AV', 'letters': /[\uA738\uA73A]/g }, { 'base': 'AY', 'letters': /[\uA73C]/g }, { 'base': 'B', 'letters': /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g }, { 'base': 'C', 'letters': /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g }, { 'base': 'D', 'letters': /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g }, { 'base': 'DZ', 'letters': /[\u01F1\u01C4]/g }, { 'base': 'Dz', 'letters': /[\u01F2\u01C5]/g }, { 'base': 'E', 'letters': /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g }, { 'base': 'F', 'letters': /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g }, { 'base': 'G', 'letters': /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g }, { 'base': 'H', 'letters': /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g }, { 'base': 'I', 'letters': /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g }, { 'base': 'J', 'letters': /[\u004A\u24BF\uFF2A\u0134\u0248]/g }, { 'base': 'K', 'letters': /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g }, { 'base': 'L', 'letters': /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g }, { 'base': 'LJ', 'letters': /[\u01C7]/g }, { 'base': 'Lj', 'letters': /[\u01C8]/g }, { 'base': 'M', 'letters': /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g }, { 'base': 'N', 'letters': /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g }, { 'base': 'NJ', 'letters': /[\u01CA]/g }, { 'base': 'Nj', 'letters': /[\u01CB]/g }, { 'base': 'O', 'letters': /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g }, { 'base': 'OI', 'letters': /[\u01A2]/g }, { 'base': 'OO', 'letters': /[\uA74E]/g }, { 'base': 'OU', 'letters': /[\u0222]/g }, { 'base': 'P', 'letters': /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g }, { 'base': 'Q', 'letters': /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g }, { 'base': 'R', 'letters': /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g }, { 'base': 'S', 'letters': /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g }, { 'base': 'T', 'letters': /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g }, { 'base': 'TZ', 'letters': /[\uA728]/g }, { 'base': 'U', 'letters': /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g }, { 'base': 'V', 'letters': /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g }, { 'base': 'VY', 'letters': /[\uA760]/g }, { 'base': 'W', 'letters': /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g }, { 'base': 'X', 'letters': /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g }, { 'base': 'Y', 'letters': /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g }, { 'base': 'Z', 'letters': /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g }, { 'base': 'a', 'letters': /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g }, { 'base': 'aa', 'letters': /[\uA733]/g }, { 'base': 'ae', 'letters': /[\u00E6\u01FD\u01E3]/g }, { 'base': 'ao', 'letters': /[\uA735]/g }, { 'base': 'au', 'letters': /[\uA737]/g }, { 'base': 'av', 'letters': /[\uA739\uA73B]/g }, { 'base': 'ay', 'letters': /[\uA73D]/g }, { 'base': 'b', 'letters': /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g }, { 'base': 'c', 'letters': /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g }, { 'base': 'd', 'letters': /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g }, { 'base': 'dz', 'letters': /[\u01F3\u01C6]/g }, { 'base': 'e', 'letters': /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g }, { 'base': 'f', 'letters': /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g }, { 'base': 'g', 'letters': /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g }, { 'base': 'h', 'letters': /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g }, { 'base': 'hv', 'letters': /[\u0195]/g }, { 'base': 'i', 'letters': /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g }, { 'base': 'j', 'letters': /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g }, { 'base': 'k', 'letters': /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g }, { 'base': 'l', 'letters': /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g }, { 'base': 'lj', 'letters': /[\u01C9]/g }, { 'base': 'm', 'letters': /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g }, { 'base': 'n', 'letters': /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g }, { 'base': 'nj', 'letters': /[\u01CC]/g }, { 'base': 'o', 'letters': /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g }, { 'base': 'oi', 'letters': /[\u01A3]/g }, { 'base': 'ou', 'letters': /[\u0223]/g }, { 'base': 'oo', 'letters': /[\uA74F]/g }, { 'base': 'p', 'letters': /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g }, { 'base': 'q', 'letters': /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g }, { 'base': 'r', 'letters': /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g }, { 'base': 's', 'letters': /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g }, { 'base': 't', 'letters': /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g }, { 'base': 'tz', 'letters': /[\uA729]/g }, { 'base': 'u', 'letters': /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g }, { 'base': 'v', 'letters': /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g }, { 'base': 'vy', 'letters': /[\uA761]/g }, { 'base': 'w', 'letters': /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g }, { 'base': 'x', 'letters': /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g }, { 'base': 'y', 'letters': /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g }, { 'base': 'z', 'letters': /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g }]; @@ -10441,5 +10371,5 @@ module.exports = function stripDiacritics(str) { return str; }; -},{}]},{},[267])(267) +},{}]},{},[173])(173) }); \ No newline at end of file diff --git a/dist/@foxdcg/react-select.min.js b/dist/@foxdcg/react-select.min.js index 8c20134c94..679128d1fd 100644 --- a/dist/@foxdcg/react-select.min.js +++ b/dist/@foxdcg/react-select.min.js @@ -1,5 +1,5 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Select=e()}}(function(){return function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!u&&s)return s(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;ic){for(var t=0,n=u.length-l;t0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)},e.prototype.getMonitor=function(){return this.monitor},e.prototype.getBackend=function(){return this.backend},e.prototype.getRegistry=function(){return this.registry},e.prototype.getActions=function(){function e(e){return function(){var r=e.apply(t,arguments);"undefined"!=typeof r&&n(r)}}var t=this,n=this.store.dispatch;return Object.keys(p).filter(function(e){return"function"==typeof p[e]}).reduce(function(t,n){return t[n]=e(p[n]),t},{})},e}());n["default"]=g,t.exports=n["default"]},{"./DragDropMonitor":9,"./HandlerRegistry":12,"./actions/dragDrop":13,"./reducers":20,"redux/lib/createStore":249}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var a=e("invariant"),i=r(a),u=e("./utils/matchesType"),s=r(u),l=e("lodash/isArray"),c=r(l),p=e("./HandlerRegistry"),d=r(p),f=e("./reducers/dragOffset"),h=e("./reducers/dirtyHandlerIds"),g=function(){function e(t){o(this,e),this.store=t,this.registry=new d["default"](t)}return e.prototype.subscribeToStateChange=function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=n.handlerIds;i["default"]("function"==typeof e,"listener must be a function."),i["default"]("undefined"==typeof r||c["default"](r),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,a=function(){var n=t.store.getState(),a=n.stateId;try{var i=a===o||a===o+1&&!h.areDirty(n.dirtyHandlerIds,r);i||e()}finally{o=a}};return this.store.subscribe(a)},e.prototype.subscribeToOffsetChange=function(e){var t=this;i["default"]("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset,r=function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())};return this.store.subscribe(r)},e.prototype.canDragSource=function(e){var t=this.registry.getSource(e);return i["default"](t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)},e.prototype.canDropOnTarget=function(e){var t=this.registry.getTarget(e);if(i["default"](t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),r=this.getItemType();return s["default"](n,r)&&t.canDrop(this,e)},e.prototype.isDragging=function(){return Boolean(this.getItemType())},e.prototype.isDraggingSource=function(e){var t=this.registry.getSource(e,!0);if(i["default"](t,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var n=this.registry.getSourceType(e),r=this.getItemType();return n===r&&t.isDragging(this,e)},e.prototype.isOverTarget=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.shallow,r=void 0!==n&&n;if(!this.isDragging())return!1;var o=this.registry.getTargetType(e),a=this.getItemType();if(!s["default"](o,a))return!1;var i=this.getTargetIds();if(!i.length)return!1;var u=i.indexOf(e);return r?u===i.length-1:u>-1},e.prototype.getItemType=function(){return this.store.getState().dragOperation.itemType},e.prototype.getItem=function(){return this.store.getState().dragOperation.item},e.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},e.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},e.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},e.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},e.prototype.isSourcePublic=function(){return this.store.getState().dragOperation.isSourcePublic},e.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},e.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},e.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},e.prototype.getSourceClientOffset=function(){return f.getSourceClientOffset(this.store.getState().dragOffset)},e.prototype.getDifferenceFromInitialOffset=function(){return f.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},e}();n["default"]=g,t.exports=n["default"]},{"./HandlerRegistry":12,"./reducers/dirtyHandlerIds":17,"./reducers/dragOffset":18,"./utils/matchesType":24,invariant:107,"lodash/isArray":97}],10:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function(){function e(){r(this,e)}return e.prototype.canDrag=function(){return!0},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}();n["default"]=o,t.exports=n["default"]},{}],11:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function(){function e(){r(this,e)}return e.prototype.canDrop=function(){return!0},e.prototype.hover=function(){},e.prototype.drop=function(){},e}();n["default"]=o,t.exports=n["default"]},{}],12:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return e&&e.constructor===Symbol?"symbol":typeof e}function i(e){d["default"]("function"==typeof e.canDrag,"Expected canDrag to be a function."),d["default"]("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),d["default"]("function"==typeof e.endDrag,"Expected endDrag to be a function.")}function u(e){d["default"]("function"==typeof e.canDrop,"Expected canDrop to be a function."),d["default"]("function"==typeof e.hover,"Expected hover to be a function."),d["default"]("function"==typeof e.drop,"Expected beginDrag to be a function.")}function s(e,t){return t&&h["default"](e)?void e.forEach(function(e){return s(e,!1)}):void d["default"]("string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":a(e)),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function l(e){var t=y["default"]().toString();switch(e){case _.SOURCE:return"S"+t;case _.TARGET:return"T"+t;default:d["default"](!1,"Unknown role: "+e)}}function c(e){switch(e[0]){case"S":return _.SOURCE;case"T":return _.TARGET;default:d["default"](!1,"Cannot parse handler ID: "+e)}}n.__esModule=!0;var p=e("invariant"),d=r(p),f=e("lodash/isArray"),h=r(f),g=e("./utils/getNextUniqueId"),y=r(g),v=e("./actions/registry"),b=e("asap"),m=r(b),_={SOURCE:"SOURCE",TARGET:"TARGET"},E=function(){function e(t){o(this,e),this.store=t,this.types={},this.handlers={},this.pinnedSourceId=null,this.pinnedSource=null}return e.prototype.addSource=function(e,t){s(e),i(t);var n=this.addHandler(_.SOURCE,e,t);return this.store.dispatch(v.addSource(n)),n},e.prototype.addTarget=function(e,t){s(e,!0),u(t);var n=this.addHandler(_.TARGET,e,t);return this.store.dispatch(v.addTarget(n)),n},e.prototype.addHandler=function(e,t,n){var r=l(e);return this.types[r]=t,this.handlers[r]=n,r},e.prototype.containsHandler=function(e){var t=this;return Object.keys(this.handlers).some(function(n){return t.handlers[n]===e})},e.prototype.getSource=function(e,t){d["default"](this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,r=n?this.pinnedSource:this.handlers[e];return r},e.prototype.getTarget=function(e){return d["default"](this.isTargetId(e),"Expected a valid target ID."),this.handlers[e]},e.prototype.getSourceType=function(e){return d["default"](this.isSourceId(e),"Expected a valid source ID."),this.types[e]},e.prototype.getTargetType=function(e){return d["default"](this.isTargetId(e),"Expected a valid target ID."),this.types[e]},e.prototype.isSourceId=function(e){var t=c(e);return t===_.SOURCE},e.prototype.isTargetId=function(e){var t=c(e);return t===_.TARGET},e.prototype.removeSource=function(e){var t=this;d["default"](this.getSource(e),"Expected an existing source."),this.store.dispatch(v.removeSource(e)),m["default"](function(){delete t.handlers[e],delete t.types[e]})},e.prototype.removeTarget=function(e){var t=this;d["default"](this.getTarget(e),"Expected an existing target."),this.store.dispatch(v.removeTarget(e)),m["default"](function(){delete t.handlers[e],delete t.types[e]})},e.prototype.pinSource=function(e){var t=this.getSource(e);d["default"](t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t},e.prototype.unpinSource=function(){d["default"](this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},e}();n["default"]=E,t.exports=n["default"]},{"./actions/registry":14,"./utils/getNextUniqueId":23,asap:1,invariant:107,"lodash/isArray":97}],13:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.publishSource,r=void 0===n||n,o=t.clientOffset,a=void 0===o?null:o,i=t.getSourceClientOffset;d["default"](h["default"](e),"Expected sourceIds to be an array.");var u=this.getMonitor(),s=this.getRegistry();d["default"](!u.isDragging(),"Cannot call beginDrag while dragging.");for(var l=0;l=0;l--)if(u.canDragSource(e[l])){c=e[l];break}if(null!==c){var p=null;a&&(d["default"]("function"==typeof i,"When clientOffset is provided, getSourceClientOffset must be a function."),p=i(c));var f=s.getSource(c),g=f.beginDrag(u,c);d["default"](y["default"](g),"Item must be an object."),s.pinSource(c);var b=s.getSourceType(c);return{type:v,itemType:b,item:g,sourceId:c,clientOffset:a,sourceClientOffset:p,isSourcePublic:r}}}function a(e){var t=this.getMonitor();if(t.isDragging())return{type:b}}function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.clientOffset,r=void 0===n?null:n;d["default"](h["default"](e),"Expected targetIds to be an array."),e=e.slice(0);var o=this.getMonitor(),a=this.getRegistry();d["default"](o.isDragging(),"Cannot call hover while not dragging."),d["default"](!o.didDrop(),"Cannot call hover after drop.");for(var i=0;i=0;i--){var u=e[i],p=a.getTargetType(u);c["default"](p,l)||e.splice(i,1)}for(var i=0;i0)}n.__esModule=!0,n["default"]=o,n.areDirty=a;var i=e("lodash/xor"),u=r(i),s=e("lodash/intersection"),l=r(s),c=e("../actions/dragDrop"),p=e("../actions/registry"),d=[],f=[]},{"../actions/dragDrop":13,"../actions/registry":14,"lodash/intersection":95,"lodash/xor":106}],18:[function(e,t,n){"use strict";function r(e,t){return e===t||e&&t&&e.x===t.x&&e.y===t.y}function o(e,t){switch(void 0===e&&(e=l),t.type){case s.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case s.HOVER:return r(e.clientOffset,t.clientOffset)?e:u({},e,{clientOffset:t.clientOffset});case s.END_DRAG:case s.DROP:return l;default:return e}}function a(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;return t&&n&&r?{x:t.x+r.x-n.x,y:t.y+r.y-n.y}:null}function i(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?{x:t.x-n.x,y:t.y-n.y}:null}n.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t-1}var o=e("./_baseIndexOf");t.exports=r},{"./_baseIndexOf":43}],35:[function(e,t,n){function r(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=c&&(d=l,f=!1,t=new o(t));e:for(;++p0&&n(c)?t>1?r(c,t-1,n,i,u):o(u,c):i||(u[u.length]=c)}return u}var o=e("./_arrayPush"),a=e("./_isFlattenable");t.exports=r},{"./_arrayPush":37,"./_isFlattenable":68}],42:[function(e,t,n){function r(e){return null==e?void 0===e?s:u:(e=Object(e),l&&l in e?a(e):i(e))}var o=e("./_Symbol"),a=e("./_getRawTag"),i=e("./_objectToString"),u="[object Null]",s="[object Undefined]",l=o?o.toStringTag:void 0;t.exports=r},{"./_Symbol":31,"./_getRawTag":61,"./_objectToString":82}],43:[function(e,t,n){function r(e,t,n){return t===t?i(e,t,n):o(e,a,n)}var o=e("./_baseFindIndex"),a=e("./_baseIsNaN"),i=e("./_strictIndexOf");t.exports=r},{"./_baseFindIndex":40,"./_baseIsNaN":46,"./_strictIndexOf":90}],44:[function(e,t,n){function r(e,t,n){for(var r=n?i:a,p=e[0].length,d=e.length,f=d,h=Array(d),g=1/0,y=[];f--;){var v=e[f];f&&t&&(v=u(v,s(t))),g=c(v.length,g),h[f]=!n&&(t||p>=120&&v.length>=120)?new o(f&&v):void 0}v=e[0];var b=-1,m=h[0];e:for(;++b=c){var y=t?null:s(e);if(y)return l(y);f=!1,p=u,g=new o}else g=t?[]:h;e:for(;++r-1}var o=e("./_assocIndexOf");t.exports=r},{"./_assocIndexOf":38}],75:[function(e,t,n){function r(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var o=e("./_assocIndexOf");t.exports=r},{"./_assocIndexOf":38}],76:[function(e,t,n){function r(){this.size=0,this.__data__={hash:new o,map:new(i||a),string:new o}}var o=e("./_Hash"),a=e("./_ListCache"),i=e("./_Map");t.exports=r},{"./_Hash":25,"./_ListCache":26,"./_Map":27}],77:[function(e,t,n){function r(e){var t=o(this,e)["delete"](e);return this.size-=t?1:0,t}var o=e("./_getMapData");t.exports=r},{"./_getMapData":59}],78:[function(e,t,n){function r(e){return o(this,e).get(e)}var o=e("./_getMapData");t.exports=r},{"./_getMapData":59}],79:[function(e,t,n){function r(e){return o(this,e).has(e)}var o=e("./_getMapData");t.exports=r},{"./_getMapData":59}],80:[function(e,t,n){function r(e,t){var n=o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var o=e("./_getMapData");t.exports=r},{"./_getMapData":59}],81:[function(e,t,n){var r=e("./_getNative"),o=r(Object,"create");t.exports=o},{"./_getNative":60}],82:[function(e,t,n){function r(e){return a.call(e)}var o=Object.prototype,a=o.toString;t.exports=r},{}],83:[function(e,t,n){function r(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,u=a(r.length-t,0),s=Array(u);++i0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var o=800,a=16,i=Date.now;t.exports=r},{}],90:[function(e,t,n){function r(e,t,n){for(var r=n-1,o=e.length;++r-1&&e%1==0&&e<=o}var o=9007199254740991;t.exports=r},{}],102:[function(e,t,n){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=r},{}],103:[function(e,t,n){function r(e){return null!=e&&"object"==typeof e}t.exports=r},{}],104:[function(e,t,n){function r(){}t.exports=r},{}],105:[function(e,t,n){var r=e("./_baseDifference"),o=e("./_baseRest"),a=e("./isArrayLikeObject"),i=o(function(e,t){return a(e)?r(e,t):[]});t.exports=i},{"./_baseDifference":39,"./_baseRest":48,"./isArrayLikeObject":99}],106:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./_baseRest"),a=e("./_baseXor"),i=e("./isArrayLikeObject"),u=o(function(e){return a(r(e,i))});t.exports=u},{"./_arrayFilter":33,"./_baseRest":48,"./_baseXor":52,"./isArrayLikeObject":99}],107:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],c=0;s=new Error(t.replace(/%s/g,function(){return l[c++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};t.exports=r},{}],108:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function i(e){if(d===clearTimeout)return clearTimeout(e);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function u(){y&&h&&(y=!1,h.length?g=h.concat(g):v=-1,g.length&&s())}function s(){if(!y){var e=a(u);y=!0;for(var t=g.length;t;){for(h=g,g=[];++v1)for(var n=1;n0},e.prototype.leave=function(e){var t=this.entered.length;return this.entered=s["default"](this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();n["default"]=l,t.exports=n["default"]},{"lodash/union":215,"lodash/without":216}],111:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=e("lodash/defaults"),u=o(i),s=e("./shallowEqual"),l=o(s),c=e("./EnterLeaveCounter"),p=o(c),d=e("./BrowserDetector"),f=e("./OffsetUtils"),h=e("./NativeDragSources"),g=e("./NativeTypes"),y=r(g),v=function(){function e(t){a(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new p["default"],this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),this.endDragNativeItem=this.endDragNativeItem.bind(this)}return e.prototype.setup=function(){if("undefined"!=typeof window){if(this.constructor.isSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.constructor.isSetUp=!0,this.addEventListeners(window)}},e.prototype.teardown=function(){"undefined"!=typeof window&&(this.constructor.isSetUp=!1,this.removeEventListeners(window),this.clearCurrentDragSourceNode())},e.prototype.addEventListeners=function(e){e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.removeEventListeners=function(e){e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.connectDragPreview=function(e,t,n){var r=this;return this.sourcePreviewNodeOptions[e]=n,this.sourcePreviewNodes[e]=t,function(){delete r.sourcePreviewNodes[e],delete r.sourcePreviewNodeOptions[e]}},e.prototype.connectDragSource=function(e,t,n){var r=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=n;var o=function(t){return r.handleDragStart(t,e)},a=function(t){return r.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",o),t.addEventListener("selectstart",a),function(){delete r.sourceNodes[e],delete r.sourceNodeOptions[e],t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",a),t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},o=function(t){return n.handleDragOver(t,e)},a=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",a),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",a)}},e.prototype.getCurrentSourceNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return u["default"](t||{},{dropEffect:"move"})},e.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},e.prototype.getCurrentSourcePreviewNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return u["default"](t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},e.prototype.getSourceClientOffset=function(e){return f.getNodeClientOffset(this.sourceNodes[e])},e.prototype.isDraggingNativeItem=function(){var e=this.monitor.getItemType();return Object.keys(y).some(function(t){return y[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=h.createNativeDragSource(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]),d.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(d.isFirefox()&&window.removeEventListener("mousemove",this.endDragNativeItem,!0),this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},e.prototype.endDragIfSourceWasRemovedFromDOM=function(){var e=this.currentDragSourceNode;document.body.contains(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.setCurrentDragSourceNode=function(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=f.getNodeClientOffset(e),this.currentDragSourceNodeOffsetChanged=!1,window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},e.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),!0)},e.prototype.checkIfCurrentDragSourceRectChanged=function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!l["default"](f.getNodeClientOffset(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))},e.prototype.handleTopDragStartCapture=function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},e.prototype.handleDragStart=function(e,t){this.dragStartSourceIds.unshift(t)},e.prototype.handleTopDragStart=function(e){var t=this,n=this.dragStartSourceIds;this.dragStartSourceIds=null;var r=f.getEventClientOffset(e);this.actions.beginDrag(n,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});var o=e.dataTransfer,a=h.matchNativeItemType(o);if(this.monitor.isDragging()){if("function"==typeof o.setDragImage){var i=this.monitor.getSourceId(),u=this.sourceNodes[i],s=this.sourcePreviewNodes[i]||u,l=this.getCurrentSourcePreviewNodeOptions(),c=l.anchorX,p=l.anchorY,d={anchorX:c,anchorY:p},g=f.getDragPreviewOffset(u,s,r,d);o.setDragImage(s,g.x,g.y)}try{o.setData("application/json",{})}catch(y){}this.setCurrentDragSourceNode(e.target);var v=this.getCurrentSourcePreviewNodeOptions(),b=v.captureDraggingState;b?this.actions.publishDragSource():setTimeout(function(){return t.actions.publishDragSource()})}else if(a)this.beginDragNativeItem(a);else{if(!(o.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}},e.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.handleTopDragEnterCapture=function(e){this.dragEnterTargetIds=[];var t=this.enterLeaveCounter.enter(e.target);if(t&&!this.monitor.isDragging()){var n=e.dataTransfer,r=h.matchNativeItemType(n);r&&this.beginDragNativeItem(r)}},e.prototype.handleDragEnter=function(e,t){this.dragEnterTargetIds.unshift(t)},e.prototype.handleTopDragEnter=function(e){var t=this,n=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){d.isFirefox()||this.actions.hover(n,{clientOffset:f.getEventClientOffset(e)});var r=n.some(function(e){return t.monitor.canDropOnTarget(e)});r&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}},e.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[]},e.prototype.handleDragOver=function(e,t){this.dragOverTargetIds.unshift(t)},e.prototype.handleTopDragOver=function(e){var t=this,n=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.actions.hover(n,{clientOffset:f.getEventClientOffset(e)});var r=n.some(function(e){return t.monitor.canDropOnTarget(e)});r?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),e.dataTransfer.dropEffect="move")},e.prototype.handleTopDragLeaveCapture=function(e){this.isDraggingNativeItem()&&e.preventDefault();var t=this.enterLeaveCounter.leave(e.target);t&&this.isDraggingNativeItem()&&this.endDragNativeItem()},e.prototype.handleTopDropCapture=function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()},e.prototype.handleDrop=function(e,t){this.dropTargetIds.unshift(t)},e.prototype.handleTopDrop=function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:f.getEventClientOffset(e)}),this.actions.drop(),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},e.prototype.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},e}();n["default"]=v,t.exports=n["default"]},{"./BrowserDetector":109,"./EnterLeaveCounter":110,"./NativeDragSources":113,"./NativeTypes":114,"./OffsetUtils":115,"./shallowEqual":118,"lodash/defaults":198}],112:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function(){function e(t,n){r(this,e);for(var o=t.length,a=[],i=0;ie))return n[l];s=l-1}}i=Math.max(0,s);var p=e-t[i],d=p*p;return n[i]+r[i]*p+o[i]*d+a[i]*p*d},e}();n["default"]=o,t.exports=n["default"]},{}],113:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n){var r=t.reduce(function(t,n){return t||e.getData(n)},null);return null!=r?r:n}function u(e){var t=d[e],n=t.exposeProperty,r=t.matchesTypes,i=t.getData;return function(){function e(){o(this,e),this.item=Object.defineProperties({},a({},n,{get:function(){return console.warn("Browser doesn't allow reading \""+n+'" until the drop event.'),null},configurable:!0,enumerable:!0}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){delete this.item[n],this.item[n]=i(e,r)},e.prototype.canDrag=function(){return!0},e.prototype.beginDrag=function(){return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}()}function s(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(d).filter(function(e){var n=d[e].matchesTypes;return n.some(function(e){return t.indexOf(e)>-1})})[0]||null}n.__esModule=!0;var l;n.createNativeDragSource=u,n.matchNativeItemType=s;var c=e("./NativeTypes"),p=r(c),d=(l={},a(l,p.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),a(l,p.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return i(e,t,"").split("\n")}}),a(l,p.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return i(e,t,"")}}),l)},{"./NativeTypes":114}],114:[function(e,t,n){"use strict";n.__esModule=!0;var r="__NATIVE_FILE__";n.FILE=r;var o="__NATIVE_URL__";n.URL=o;var a="__NATIVE_TEXT__";n.TEXT=a},{}],115:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.nodeType===c?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top,o=n.left;return{x:o,y:r}}function a(e){return{x:e.clientX,y:e.clientY}}function i(e,t,n,r){var a="IMG"===t.nodeName&&(u.isFirefox()||!document.documentElement.contains(t)),i=a?e:t,s=o(i),c={x:n.x-s.x,y:n.y-s.y},p=e.offsetWidth,d=e.offsetHeight,f=r.anchorX,h=r.anchorY,g=a?t.width:p,y=a?t.height:d;u.isSafari()&&a?(y/=window.devicePixelRatio,g/=window.devicePixelRatio):u.isFirefox()&&!a&&(y*=window.devicePixelRatio,g*=window.devicePixelRatio);var v=new l["default"]([0,.5,1],[c.x,c.x/p*g,c.x+g-p]),b=new l["default"]([0,.5,1],[c.y,c.y/d*y,c.y+y-d]),m=v.interpolate(f),_=b.interpolate(h);return u.isSafari()&&a&&(_+=(window.devicePixelRatio-1)*y),{x:m,y:_}}n.__esModule=!0,n.getNodeClientOffset=o,n.getEventClientOffset=a,n.getDragPreviewOffset=i;var u=e("./BrowserDetector"),s=e("./MonotonicInterpolant"),l=r(s),c=1},{"./BrowserDetector":109,"./MonotonicInterpolant":112}],116:[function(e,t,n){"use strict";function r(){return o||(o=new Image,o.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),o}n.__esModule=!0,n["default"]=r;var o=void 0;t.exports=n["default"]},{}],117:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return new u["default"](e)}n.__esModule=!0,n["default"]=a;var i=e("./HTML5Backend"),u=o(i),s=e("./getEmptyImage"),l=o(s),c=e("./NativeTypes"),p=r(c);n.NativeTypes=p,n.getEmptyImage=l["default"]},{"./HTML5Backend":111,"./NativeTypes":114,"./getEmptyImage":116}],118:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a1?n[o-1]:void 0,u=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,u&&a(n[0],n[1],u)&&(i=o<3?void 0:i,o=1),t=Object(t);++r-1&&e%1==0&&e-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',p.join(", "),t),s["default"]("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),d.forEach(function(t){s["default"]("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])});var t=function(){function t(e){a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrag=function(){return!e.canDrag||e.canDrag(this.props,this.monitor)},t.prototype.isDragging=function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()},t.prototype.beginDrag=function(){var t=e.beginDrag(this.props,this.monitor,this.component);return"production"!==r.env.NODE_ENV&&s["default"](c["default"](t),"beginDrag() must return a plain object that represents the dragged item. Instead received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t),t},t.prototype.endDrag=function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)},t}();return function(e){return new t(e)}}n.__esModule=!0,n["default"]=i;var u=e("invariant"),s=o(u),l=e("lodash/isPlainObject"),c=o(l),p=["canDrag","beginDrag","canDrag","isDragging","endDrag"],d=["beginDrag"];t.exports=n["default"]}).call(this,e("_process"))},{_process:108,invariant:107,"lodash/isPlainObject":248}],224:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return new c(e)}n.__esModule=!0,n["default"]=a;var i=e("invariant"),u=r(i),s=!1,l=!1,c=function(){function e(t){o(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.sourceId=e},e.prototype.canDrag=function(){u["default"](!s,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return s=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{s=!1}},e.prototype.isDragging=function(){u["default"](!l,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return l=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{l=!1}},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();t.exports=n["default"]},{invariant:107}],225:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){function t(){u&&(u(),u=null),r&&o&&(u=e.connectDropTarget(r,o,a))}function n(e){e!==r&&(r=e,t())}var r=void 0,o=void 0,a=void 0,u=void 0,l=i["default"]({dropTarget:function(e,n){e===o&&s["default"](n,a)||(o=e,a=n,t())}});return{receiveHandlerId:n,hooks:l}}n.__esModule=!0,n["default"]=o;var a=e("./wrapConnectorHooks"),i=r(a),u=e("./areOptionsEqual"),s=r(u);t.exports=n["default"]},{"./areOptionsEqual":221,"./wrapConnectorHooks":237}],226:[function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){Object.keys(e).forEach(function(t){s["default"](p.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',p.join(", "),t),s["default"]("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html",t,t,e[t])});var t=function(){function t(e){a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveMonitor=function(e){this.monitor=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrop=function(){return!e.canDrop||e.canDrop(this.props,this.monitor)},t.prototype.hover=function(){e.hover&&e.hover(this.props,this.monitor,this.component)},t.prototype.drop=function(){if(e.drop){var t=e.drop(this.props,this.monitor,this.component);return"production"!==r.env.NODE_ENV&&s["default"]("undefined"==typeof t||c["default"](t),"drop() must either return undefined, or an object that represents the drop result. Instead received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html",t),t}},t}();return function(e){return new t(e)}}n.__esModule=!0,n["default"]=i;var u=e("invariant"),s=o(u),l=e("lodash/isPlainObject"),c=o(l),p=["canDrop","hover","drop"];t.exports=n["default"]}).call(this,e("_process"))},{_process:108,invariant:107,"lodash/isPlainObject":248}],227:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return new l(e)}n.__esModule=!0,n["default"]=a;var i=e("invariant"),u=r(i),s=!1,l=function(){function e(t){o(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.targetId=e},e.prototype.canDrop=function(){u["default"](!s,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drop-target-monitor.html");try{return s=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{s=!1}},e.prototype.isOver=function(e){return this.internalMonitor.isOverTarget(this.targetId,e)},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();t.exports=n["default"]},{invariant:107}],228:[function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){var t=e.DecoratedComponent,n=e.createHandler,o=e.createMonitor,u=e.createConnector,f=e.registerHandler,g=e.containerDisplayName,v=e.getType,m=e.collect,E=e.options,D=E.arePropsEqual,O=void 0===D?y["default"]:D,C=t.displayName||t.name||"Component";return function(e){function y(t,r){a(this,y),e.call(this,t,r),this.handleChange=this.handleChange.bind(this),this.handleChildRef=this.handleChildRef.bind(this),_["default"]("object"==typeof this.context.dragDropManager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",C,C),this.manager=this.context.dragDropManager,this.handlerMonitor=o(this.manager),this.handlerConnector=u(this.manager.getBackend()),this.handler=n(this.handlerMonitor),this.disposable=new d.SerialDisposable,this.receiveProps(t),this.state=this.getCurrentState(),this.dispose()}return i(y,e),y.prototype.getHandlerId=function(){return this.handlerId},y.prototype.getDecoratedComponentInstance=function(){return this.decoratedComponentInstance},y.prototype.shouldComponentUpdate=function(e,t){return!O(e,this.props)||!h["default"](t,this.state)},l(y,null,[{key:"DecoratedComponent",value:t,enumerable:!0},{key:"displayName",value:g+"("+C+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:c.PropTypes.object.isRequired},enumerable:!0}]),y.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.disposable=new d.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()},y.prototype.componentWillReceiveProps=function(e){O(e,this.props)||(this.receiveProps(e),this.handleChange())},y.prototype.componentWillUnmount=function(){this.dispose(),this.isCurrentlyMounted=!1},y.prototype.receiveProps=function(e){this.handler.receiveProps(e),this.receiveType(v(e))},y.prototype.receiveType=function(e){if(e!==this.currentType){this.currentType=e;var t=f(e,this.handler,this.manager),n=t.handlerId,r=t.unregister;this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var o=this.manager.getMonitor(),a=o.subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new d.CompositeDisposable(new d.Disposable(a),new d.Disposable(r)))}},y.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();h["default"](e,this.state)||this.setState(e)}},y.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)},y.prototype.handleChildRef=function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)},y.prototype.getCurrentState=function(){var e=m(this.handlerConnector.hooks,this.handlerMonitor);return"production"!==r.env.NODE_ENV&&_["default"](b["default"](e),"Expected `collect` specified as the second argument to %s for %s to return a plain object of props to inject. Instead, received %s.",g,C,e), -e},y.prototype.render=function(){return p["default"].createElement(t,s({},this.props,this.state,{ref:this.handleChildRef}))},y}(c.Component)}n.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t2?r-2:0),a=2;a or
. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?u.cloneElement(e,{ref:function(e){t(e),n&&n(e)}}):u.cloneElement(e,{ref:t})}n.__esModule=!0,n["default"]=o;var a=e("invariant"),i=r(a),u=e("react");t.exports=n["default"]},{invariant:107,react:void 0}],234:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return"string"==typeof e||"symbol"==typeof e||t&&i["default"](e)&&e.every(function(e){return o(e,!1)})}n.__esModule=!0,n["default"]=o;var a=e("lodash/isArray"),i=r(a);t.exports=n["default"]},{"lodash/isArray":246}],235:[function(e,t,n){arguments[4][118][0].apply(n,arguments)},{dup:118}],236:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a, or turn it into a ")+"drag source or a drop target itself.")}}function a(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],n=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(!l.isValidElement(t)){var r=t;return void e(r,n)}var a=t;o(a);var i=n?function(t){return e(t,n)}:e;return s["default"](a,i)}}function i(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n],o=a(r);t[n]=function(){return o}}),t}n.__esModule=!0,n["default"]=i;var u=e("./utils/cloneWithRef"),s=r(u),l=e("react");t.exports=n["default"]},{"./utils/cloneWithRef":233,react:void 0}],238:[function(e,t,n){arguments[4][31][0].apply(n,arguments)},{"./_root":245,dup:31}],239:[function(e,t,n){arguments[4][42][0].apply(n,arguments)},{"./_Symbol":238,"./_getRawTag":242,"./_objectToString":243,dup:42}],240:[function(e,t,n){arguments[4][58][0].apply(n,arguments)},{dup:58}],241:[function(e,t,n){var r=e("./_overArg"),o=r(Object.getPrototypeOf,Object);t.exports=o},{"./_overArg":244}],242:[function(e,t,n){arguments[4][61][0].apply(n,arguments)},{"./_Symbol":238,dup:61}],243:[function(e,t,n){arguments[4][82][0].apply(n,arguments)},{dup:82}],244:[function(e,t,n){function r(e,t){return function(n){return e(t(n))}}t.exports=r},{}],245:[function(e,t,n){arguments[4][84][0].apply(n,arguments)},{"./_freeGlobal":240,dup:84}],246:[function(e,t,n){arguments[4][97][0].apply(n,arguments)},{dup:97}],247:[function(e,t,n){arguments[4][103][0].apply(n,arguments)},{dup:103}],248:[function(e,t,n){function r(e){if(!i(e)||o(e)!=u)return!1;var t=a(e);if(null===t)return!0;var n=p.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}var o=e("./_baseGetTag"),a=e("./_getPrototype"),i=e("./isObjectLike"),u="[object Object]",s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,d=c.call(Object);t.exports=r},{"./_baseGetTag":239,"./_getPrototype":241,"./isObjectLike":247}],249:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){function r(){v===y&&(v=y.slice())}function a(){return g}function u(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),v.push(e),function(){if(t){t=!1,r();var n=v.indexOf(e);v.splice(n,1)}}}function c(e){if(!(0,i["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(b)throw new Error("Reducers may not dispatch actions.");try{b=!0,g=h(g,e)}finally{b=!1}for(var t=y=v,n=0;ne.props.value.length&&e.clearOptions(),e.props.onChange(t)}};return n(l({},this.props,s,{isLoading:i,onInputChange:this._onInputChange}))}}]),t}(d.Component);n["default"]=E,E.propTypes=b,E.defaultProps=_,t.exports=n["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Select":267,"./utils/stripDiacritics":275}],264:[function(e,t,n){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return f["default"].createElement(g["default"],e)}function i(e){var t=e.option,n=e.options,r=e.labelKey,o=e.valueKey;return 0===n.filter(function(e){return e[r]===t[r]||e[o]===t[o]}).length}function u(e){var t=e.label;return!!t}function s(e){var t=e.label,n=e.labelKey,r=e.valueKey,o={};return o[r]=t,o[n]=t,o.className="Select-create-option-placeholder",o}function l(e){return'Create option "'+e+'"'}function c(e){var t=e.keyCode;switch(t){case 9:case 13:case 188:return!0}return!1}var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tu.bottom||i.topt.offsetHeight&&!(t.scrollHeight-t.offsetHeight-t.scrollTop)&&this.props.onMenuScrollToBottom()}},handleRequired:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},getOptionLabel:function(e){return e[this.props.labelKey]},getValueArray:function(e,t){var n=this,r="object"==typeof t?t:this.props;if(r.multi){if("string"==typeof e&&(e=e.split(r.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return n.expandValue(e,r)}).filter(function(e){return e})}var o=this.expandValue(e,r);return o?[o]:[]},expandValue:function(e,t){var n=typeof e;if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var r=t.options,o=t.valueKey;if(r)for(var a=0;a0?n-=1:n=t.length-1;else if("start"===e)n=0;else if("end"===e)n=t.length-1;else if("page_up"===e){var o=n-this.props.pageSize;n=o<0?0:o}else if("page_down"===e){var o=n+this.props.pageSize;n=o>t.length-1?t.length-1:o}n===-1&&(n=0),this.setState({focusedIndex:t[n].index,focusedOption:t[n].option})}},getFocusedOption:function(){return this._focusedOption},getInputValue:function(){return this.state.inputValue},selectFocusedOption:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)},reorderValueArray:function(e,t){if(e!==t){var n=this.getValueArray(this.props.value),r=n.splice(e,1);n.splice.apply(n,[t,0].concat(i(r))),this.setValue(n)}},renderLoading:function(){if(this.props.isLoading)return p["default"].createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},p["default"].createElement("span",{className:"Select-loading"}))},renderMultiValueComponent:function(e,t,n){var r=this.props.valueRenderer||this.getOptionLabel,o=this.props.valueComponent,a=this.props.onValueClick?this.handleValueClick:null,i=this._instancePrefix+"-value-"+t,u="value-"+t+"-"+e[this.props.valueKey];return p["default"].createElement(o,{id:i,instancePrefix:this._instancePrefix,disabled:this.props.disabled||e.clearableValue===!1,key:u,onClick:a,onRemove:this.removeValue,value:e,reorder:n},r(e,t),p["default"].createElement("span",{className:"Select-aria-only"}," "))},renderValue:function(e,t){var n=this;if(!e.length)return this.state.inputValue?null:p["default"].createElement("div",{className:"Select-placeholder"},this.props.placeholder);if(this.props.multi)return this.props.reorder&&!this.props.disabled?e.map(function(e,t){var r=!0;return p["default"].createElement(L["default"],{key:t,index:t,contextId:n._instancePrefix,className:"Select-drag-container",handleSorting:n.reorderValueArray},p["default"].createElement(B["default"],{index:t,contextId:n._instancePrefix},n.renderMultiValueComponent(e,t,r)))}):e.map(function(e,t){var r=!1;return n.renderMultiValueComponent(e,t,r)});if(!this.state.inputValue){var r=this.props.valueRenderer||this.getOptionLabel,o=this.props.valueComponent,a=this.props.onValueClick?this.handleValueClick:null;t&&(a=null);this._instancePrefix+"-value-item";return p["default"].createElement(o,{id:this._instancePrefix+"-value-item",disabled:this.props.disabled,instancePrefix:this._instancePrefix,onClick:a,value:e[0]},r(e[0]))}},renderInput:function(e,t){var n=this;if(this.props.inputRenderer)return this.props.inputRenderer();var r,o=(0,v["default"])("Select-input",this.props.inputProps.className),i=!!this.state.isOpen,s=(0,v["default"])((r={},u(r,this._instancePrefix+"-list",i),u(r,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),r)),c=l({},this.props.inputProps,{role:"combobox","aria-expanded":""+i,"aria-owns":s,"aria-haspopup":""+i,"aria-activedescendant":i?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:o,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},required:this.state.required,value:this.state.inputValue});if(this.props.disabled||!this.props.searchable){var d=this.props.inputProps,f=(d.inputClassName,a(d,["inputClassName"]));return p["default"].createElement("div",l({},f,{role:"combobox","aria-expanded":i,"aria-owns":i?this._instancePrefix+"-list":this._instancePrefix+"-value","aria-activedescendant":i?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value",className:o,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},"aria-readonly":""+!!this.props.disabled,style:{border:0,width:1,display:"inline-block"}}))}return this.props.autosize?p["default"].createElement(g["default"],l({},c,{minWidth:"5"})):p["default"].createElement("div",{className:o},p["default"].createElement("input",c))},renderClear:function(){if(this.props.clearable&&this.props.value&&0!==this.props.value&&(!this.props.multi||this.props.value.length)&&!this.props.disabled&&!this.props.isLoading)return p["default"].createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},p["default"].createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}}))},renderArrow:function(){var e=this.handleMouseDownOnArrow,t=this.props.arrowRenderer({onMouseDown:e});return p["default"].createElement("span",{className:"Select-arrow-zone",onMouseDown:e},t)},filterOptions:function G(e){var t=this.state.inputValue,n=this.props.options||[];if(this.props.filterOptions){var G="function"==typeof this.props.filterOptions?this.props.filterOptions:E["default"];return G(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,valueKey:this.props.valueKey})}return n},onOptionRef:function(e,t){t&&(this.focused=e)},renderMenu:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey,onOptionRef:this.onOptionRef}):this.props.noResultsText?p["default"].createElement("div",{className:"Select-noresults"},this.props.noResultsText):null},renderHiddenField:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map(function(e){return s(e[t.props.valueKey])}).join(this.props.delimiter);return p["default"].createElement("input",{type:"hidden",ref:function(e){return t.value=e},name:this.props.name,value:n,disabled:this.props.disabled})}return e.map(function(e,n){return p["default"].createElement("input",{key:"hidden."+n,type:"hidden",ref:"value"+n,name:t.props.name,value:s(e[t.props.valueKey]),disabled:t.props.disabled})})}},getFocusableOptionIndex:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.state.focusedOption||e;if(n&&!n.disabled){var r=t.indexOf(n);if(r!==-1)return r}for(var o=0;o-1)return!1;if(r.filterOption)return r.filterOption.call(o,e,t);if(!t)return!0;var a=String(e[r.valueKey]),u=String(e[r.labelKey]);return r.ignoreAccents&&("label"!==r.matchProp&&(a=(0,i["default"])(a)),"value"!==r.matchProp&&(u=(0,i["default"])(u))),r.ignoreCase&&("label"!==r.matchProp&&(a=a.toLowerCase()),"value"!==r.matchProp&&(u=u.toLowerCase())),"start"===r.matchPos?"label"!==r.matchProp&&a.substr(0,t.length)===t||"value"!==r.matchProp&&u.substr(0,t.length)===t:"label"!==r.matchProp&&a.indexOf(t)>=0||"value"!==r.matchProp&&u.indexOf(t)>=0})}var a=e("./stripDiacritics"),i=r(a);t.exports=o},{"./stripDiacritics":275}],274:[function(e,t,n){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){var t=e.focusedOption,n=e.instancePrefix,r=(e.labelKey,e.onFocus),o=e.onSelect,i=e.optionClassName,s=e.optionComponent,l=e.optionRenderer,c=e.options,p=e.valueArray,d=e.valueKey,f=e.onOptionRef,h=s;return c.map(function(e,s){var c=p&&p.indexOf(e)>-1,g=e===t,y=(0,a["default"])(i,{"Select-option":!0,"is-selected":c,"is-focused":g,"is-disabled":e.disabled});return u["default"].createElement(h,{className:y,instancePrefix:n,isDisabled:e.disabled,isFocused:g,isSelected:c,key:"option-"+s+"-"+e[d],onFocus:r,onSelect:o,option:e,optionIndex:s,ref:function(e){f(e,g)}},l(e,s))})}var o="undefined"!=typeof window?window.classNames:"undefined"!=typeof e?e.classNames:null,a=n(o),i="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,u=n(i);t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],275:[function(e,t,n){"use strict";var r=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}];t.exports=function(e){for(var t=0;tc){for(var t=0,n=u.length-l;t1&&void 0!==arguments[1]?arguments[1]:{};a(this,e);var r=(0,s["default"])(c["default"]);this.context=n,this.store=r,this.monitor=new h["default"](r),this.registry=this.monitor.registry,this.backend=t(this),r.subscribe(this.handleRefCountChange.bind(this))}return i(e,[{key:"handleRefCountChange",value:function(){var e=this.store.getState().refCount>0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)}},{key:"getContext",value:function(){return this.context}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){function e(e){return function(){for(var r=arguments.length,o=Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:{},r=n.handlerIds;(0,u["default"])("function"==typeof e,"listener must be a function."),(0,u["default"])("undefined"==typeof r||(0,l["default"])(r),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,a=function(){var n=t.store.getState(),a=n.stateId;try{var i=a===o||a===o+1&&!(0,g.areDirty)(n.dirtyHandlerIds,r);i||e()}finally{o=a}};return this.store.subscribe(a)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,u["default"])("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset,r=function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())};return this.store.subscribe(r)}},{key:"canDragSource",value:function(e){var t=this.registry.getSource(e);return(0,u["default"])(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){var t=this.registry.getTarget(e);if((0,u["default"])(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),r=this.getItemType();return(0,p["default"])(n,r)&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){var t=this.registry.getSource(e,!0);if((0,u["default"])(t,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var n=this.registry.getSourceType(e),r=this.getItemType();return n===r&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1},n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),o=this.getItemType();if(!(0,p["default"])(r,o))return!1;var a=this.getTargetIds();if(!a.length)return!1;var i=a.indexOf(e);return n?i===a.length-1:i>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return(0,h.getSourceClientOffset)(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return(0,h.getDifferenceFromInitialOffset)(this.store.getState().dragOffset)}}]),e}();n["default"]=v},{"./HandlerRegistry":12,"./reducers/dirtyHandlerIds":17,"./reducers/dragOffset":18,"./utils/matchesType":24,invariant:25,"lodash/isArray":116}],10:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0,clientOffset:null},n=t.publishSource,r=t.clientOffset,o=t.getSourceClientOffset;(0,p["default"])((0,f["default"])(e),"Expected sourceIds to be an array.");var a=this.getMonitor(),i=this.getRegistry();(0,p["default"])(!a.isDragging(),"Cannot call beginDrag while dragging.");for(var u=0;u=0;l--)if(a.canDragSource(e[l])){s=e[l];break}if(null!==s){var c=null;r&&((0,p["default"])("function"==typeof o,"When clientOffset is provided, getSourceClientOffset must be a function."),c=o(s));var d=i.getSource(s),h=d.beginDrag(a,s);(0,p["default"])((0,g["default"])(h),"Item must be an object."),i.pinSource(s);var v=i.getSourceType(s);return{type:b,itemType:v,item:h,sourceId:s,clientOffset:r,sourceClientOffset:c,isSourcePublic:n}}}function a(){var e=this.getMonitor();if(e.isDragging())return{type:m}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clientOffset,r=void 0===n?null:n;(0,p["default"])((0,f["default"])(e),"Expected targetIds to be an array.");var o=e.slice(0),a=this.getMonitor(),i=this.getRegistry();(0,p["default"])(a.isDragging(),"Cannot call hover while not dragging."),(0,p["default"])(!a.didDrop(),"Cannot call hover after drop.");for(var u=0;u=0;d--){var h=o[d],g=i.getTargetType(h);(0,y["default"])(g,c)||o.splice(d,1)}for(var v=0;v0&&void 0!==arguments[0]?arguments[0]:{},n=this.getMonitor(),r=this.getRegistry();(0,p["default"])(n.isDragging(),"Cannot call drop while not dragging."),(0,p["default"])(!n.didDrop(),"Cannot call drop twice during one drag operation.");var o=n.getTargetIds().filter(n.canDropOnTarget,n);o.reverse(),o.forEach(function(o,a){var i=r.getTarget(o),u=i.drop(n,o);(0,p["default"])("undefined"==typeof u||(0,g["default"])(u),"Drop result must either be an object or undefined."),"undefined"==typeof u&&(u=0===a?{}:n.getDropResult()),e.store.dispatch({type:D,dropResult:l({},t,u)})})}function s(){var e=this.getMonitor(),t=this.getRegistry();(0,p["default"])(e.isDragging(),"Cannot call endDrag while not dragging.");var n=e.getSourceId(),r=t.getSource(n,!0);return r.endDrag(e,n),t.unpinSource(),{type:_}}Object.defineProperty(n,"__esModule",{value:!0}),n.END_DRAG=n.DROP=n.HOVER=n.PUBLISH_DRAG_SOURCE=n.BEGIN_DRAG=void 0;var l=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,arguments[1]),t=arguments[2];switch(e.type){case c.HOVER:break;case p.ADD_SOURCE:case p.ADD_TARGET:case p.REMOVE_TARGET:case p.REMOVE_SOURCE:return d;case c.BEGIN_DRAG:case c.PUBLISH_DRAG_SOURCE:case c.END_DRAG:case c.DROP:default:return f}var n=e.targetIds,r=t.targetIds,o=(0,u["default"])(n,r),a=!1;if(0===o.length){for(var i=0;i0)}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=o,n.areDirty=a;var i=e("lodash/xor"),u=r(i),s=e("lodash/intersection"),l=r(s),c=e("../actions/dragDrop"),p=e("../actions/registry"),d=[],f=[]},{"../actions/dragDrop":13,"../actions/registry":14,"lodash/intersection":114,"lodash/xor":132}],18:[function(e,t,n){"use strict";function r(e,t){return e===t||e&&t&&e.x===t.x&&e.y===t.y}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments[1];switch(t.type){case s.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case s.HOVER:return r(e.clientOffset,t.clientOffset)?e:u({},e,{clientOffset:t.clientOffset});case s.END_DRAG:case s.DROP:return l;default:return e}}function a(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;return t&&n&&r?{x:t.x+r.x-n.x,y:t.y+r.y-n.y}:null}function i(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?{x:t.x-n.x,y:t.y-n.y}:null}Object.defineProperty(n,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case s.BEGIN_DRAG:return a({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case s.PUBLISH_DRAG_SOURCE:return a({},e,{isSourcePublic:!0});case s.HOVER:return a({},e,{targetIds:t.targetIds});case l.REMOVE_TARGET:return e.targetIds.indexOf(t.targetId)===-1?e:a({},e,{targetIds:(0,u["default"])(e.targetIds,t.targetId)});case s.DROP:return a({},e,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case s.END_DRAG:return a({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}Object.defineProperty(n,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{dirtyHandlerIds:(0,d["default"])(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:(0,i["default"])(e.dragOffset,t),refCount:(0,c["default"])(e.refCount,t),dragOperation:(0,s["default"])(e.dragOperation,t),stateId:(0,h["default"])(e.stateId)}}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=o;var a=e("./dragOffset"),i=r(a),u=e("./dragOperation"),s=r(u),l=e("./refCount"),c=r(l),p=e("./dirtyHandlerIds"),d=r(p),f=e("./stateId"),h=r(f)},{"./dirtyHandlerIds":17,"./dragOffset":18,"./dragOperation":19,"./refCount":21,"./stateId":22}],21:[function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments[1];switch(t.type){case o.ADD_SOURCE:case o.ADD_TARGET:return e+1;case o.REMOVE_SOURCE:case o.REMOVE_TARGET:return e-1;default:return e}}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=r;var o=e("../actions/registry")},{"../actions/registry":14}],22:[function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=r},{}],23:[function(e,t,n){"use strict";function r(){return o++}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=r;var o=0},{}],24:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return(0,i["default"])(e)?e.some(function(e){return e===t}):e===t}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=o;var a=e("lodash/isArray"),i=r(a)},{"lodash/isArray":116}],25:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],c=0;s=new Error(t.replace(/%s/g,function(){return l[c++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};t.exports=r},{}],26:[function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1}var o=e("./_baseIndexOf");t.exports=r},{"./_baseIndexOf":47}],36:[function(e,t,n){function r(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=c&&(d=l,f=!1,t=new o(t));e:for(;++p0&&n(c)?t>1?r(c,t-1,n,i,u):o(u,c):i||(u[u.length]=c)}return u}var o=e("./_arrayPush"),a=e("./_isFlattenable");t.exports=r},{"./_arrayPush":39,"./_isFlattenable":79}],46:[function(e,t,n){function r(e){return null==e?void 0===e?s:u:l&&l in Object(e)?a(e):i(e)}var o=e("./_Symbol"),a=e("./_getRawTag"),i=e("./_objectToString"),u="[object Null]",s="[object Undefined]",l=o?o.toStringTag:void 0;t.exports=r},{"./_Symbol":32,"./_getRawTag":72,"./_objectToString":98}],47:[function(e,t,n){function r(e,t,n){return t===t?i(e,t,n):o(e,a,n)}var o=e("./_baseFindIndex"),a=e("./_baseIsNaN"),i=e("./_strictIndexOf");t.exports=r},{"./_baseFindIndex":44,"./_baseIsNaN":50,"./_strictIndexOf":107}],48:[function(e,t,n){function r(e,t,n){for(var r=n?i:a,p=e[0].length,d=e.length,f=d,h=Array(d),g=1/0,v=[];f--;){var y=e[f];f&&t&&(y=u(y,s(t))),g=c(y.length,g),h[f]=!n&&(t||p>=120&&y.length>=120)?new o(f&&y):void 0}y=e[0];var b=-1,m=h[0];e:for(;++b=c){var v=t?null:s(e);if(v)return l(v);f=!1,p=u,g=new o}else g=t?[]:h;e:for(;++r1?n[o-1]:void 0,u=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,u&&a(n[0],n[1],u)&&(i=o<3?void 0:i,o=1),t=Object(t);++r-1&&e%1==0&&e-1}var o=e("./_assocIndexOf");t.exports=r},{"./_assocIndexOf":41}],89:[function(e,t,n){function r(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var o=e("./_assocIndexOf");t.exports=r},{"./_assocIndexOf":41}],90:[function(e,t,n){function r(){this.size=0,this.__data__={hash:new o,map:new(i||a),string:new o}}var o=e("./_Hash"),a=e("./_ListCache"),i=e("./_Map");t.exports=r},{"./_Hash":26,"./_ListCache":27,"./_Map":28}],91:[function(e,t,n){function r(e){var t=o(this,e)["delete"](e);return this.size-=t?1:0,t}var o=e("./_getMapData");t.exports=r},{"./_getMapData":69}],92:[function(e,t,n){function r(e){return o(this,e).get(e)}var o=e("./_getMapData");t.exports=r},{"./_getMapData":69}],93:[function(e,t,n){function r(e){return o(this,e).has(e)}var o=e("./_getMapData");t.exports=r},{"./_getMapData":69}],94:[function(e,t,n){function r(e,t){var n=o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var o=e("./_getMapData");t.exports=r},{"./_getMapData":69}],95:[function(e,t,n){var r=e("./_getNative"),o=r(Object,"create");t.exports=o},{"./_getNative":70}],96:[function(e,t,n){function r(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}t.exports=r},{}],97:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof n&&n&&!n.nodeType&&n,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,i=a&&a.exports===o,u=i&&r.process,s=function(){try{return u&&u.binding&&u.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":68}],98:[function(e,t,n){function r(e){return a.call(e)}var o=Object.prototype,a=o.toString;t.exports=r},{}],99:[function(e,t,n){function r(e,t){return function(n){return e(t(n))}}t.exports=r},{}],100:[function(e,t,n){function r(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,u=a(r.length-t,0),s=Array(u);++i0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var o=800,a=16,i=Date.now;t.exports=r},{}],107:[function(e,t,n){function r(e,t,n){for(var r=n-1,o=e.length;++r-1&&e%1==0&&e<=o}var o=9007199254740991;t.exports=r},{}],122:[function(e,t,n){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=r},{}],123:[function(e,t,n){function r(e){return null!=e&&"object"==typeof e}t.exports=r},{}],124:[function(e,t,n){function r(e){if(!i(e)||o(e)!=u)return!1;var t=a(e);if(null===t)return!0;var n=p.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}var o=e("./_baseGetTag"),a=e("./_getPrototype"),i=e("./isObjectLike"),u="[object Object]",s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,d=c.call(Object);t.exports=r},{"./_baseGetTag":46,"./_getPrototype":71,"./isObjectLike":123}],125:[function(e,t,n){var r=e("./_baseIsTypedArray"),o=e("./_baseUnary"),a=e("./_nodeUtil"),i=a&&a.isTypedArray,u=i?o(i):r;t.exports=u},{"./_baseIsTypedArray":52,"./_baseUnary":57,"./_nodeUtil":97}],126:[function(e,t,n){function r(e){return i(e)?o(e,!0):a(e)}var o=e("./_arrayLikeKeys"),a=e("./_baseKeysIn"),i=e("./isArrayLike");t.exports=r},{"./_arrayLikeKeys":37,"./_baseKeysIn":53,"./isArrayLike":117}],127:[function(e,t,n){function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(a);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(r.Cache||o),n}var o=e("./_MapCache"),a="Expected a function";r.Cache=o,t.exports=r},{"./_MapCache":29}],128:[function(e,t,n){function r(){}t.exports=r},{}],129:[function(e,t,n){function r(){return!1}t.exports=r},{}],130:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseRest"),a=e("./_baseUniq"),i=e("./isArrayLikeObject"),u=o(function(e){return a(r(e,1,i,!0))});t.exports=u},{"./_baseFlatten":45,"./_baseRest":54,"./_baseUniq":58,"./isArrayLikeObject":118}],131:[function(e,t,n){var r=e("./_baseDifference"),o=e("./_baseRest"),a=e("./isArrayLikeObject"),i=o(function(e,t){return a(e)?r(e,t):[]});t.exports=i},{"./_baseDifference":43,"./_baseRest":54,"./isArrayLikeObject":118}],132:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./_baseRest"),a=e("./_baseXor"),i=e("./isArrayLikeObject"),u=o(function(e){return a(r(e,i))});t.exports=u},{"./_arrayFilter":34,"./_baseRest":54,"./_baseXor":59,"./isArrayLikeObject":118}],133:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function i(e){if(d===clearTimeout)return clearTimeout(e);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function u(){v&&h&&(v=!1,h.length?g=h.concat(g):y=-1,g.length&&s())}function s(){if(!v){var e=a(u);v=!0;for(var t=g.length;t;){for(h=g,g=[];++y1)for(var n=1;n0},e.prototype.leave=function(e){var t=this.entered.length;return this.entered=s["default"](this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();n["default"]=l,t.exports=n["default"]},{"lodash/union":130,"lodash/without":131}],136:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=e("lodash/defaults"),u=o(i),s=e("./shallowEqual"),l=o(s),c=e("./EnterLeaveCounter"),p=o(c),d=e("./BrowserDetector"),f=e("./OffsetUtils"),h=e("./NativeDragSources"),g=e("./NativeTypes"),v=r(g),y=function(){function e(t){a(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new p["default"],this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),this.endDragNativeItem=this.endDragNativeItem.bind(this)}return e.prototype.setup=function(){if("undefined"!=typeof window){if(this.constructor.isSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.constructor.isSetUp=!0,this.addEventListeners(window)}},e.prototype.teardown=function(){"undefined"!=typeof window&&(this.constructor.isSetUp=!1,this.removeEventListeners(window),this.clearCurrentDragSourceNode())},e.prototype.addEventListeners=function(e){e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.removeEventListeners=function(e){e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.connectDragPreview=function(e,t,n){var r=this;return this.sourcePreviewNodeOptions[e]=n,this.sourcePreviewNodes[e]=t,function(){delete r.sourcePreviewNodes[e],delete r.sourcePreviewNodeOptions[e]}},e.prototype.connectDragSource=function(e,t,n){var r=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=n;var o=function(t){return r.handleDragStart(t,e)},a=function(t){return r.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",o),t.addEventListener("selectstart",a),function(){delete r.sourceNodes[e],delete r.sourceNodeOptions[e],t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",a),t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},o=function(t){return n.handleDragOver(t,e)},a=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",a),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",a)}},e.prototype.getCurrentSourceNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return u["default"](t||{},{dropEffect:"move"})},e.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},e.prototype.getCurrentSourcePreviewNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return u["default"](t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},e.prototype.getSourceClientOffset=function(e){return f.getNodeClientOffset(this.sourceNodes[e])},e.prototype.isDraggingNativeItem=function(){var e=this.monitor.getItemType();return Object.keys(v).some(function(t){return v[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=h.createNativeDragSource(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]),d.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(d.isFirefox()&&window.removeEventListener("mousemove",this.endDragNativeItem,!0),this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},e.prototype.endDragIfSourceWasRemovedFromDOM=function(){var e=this.currentDragSourceNode;document.body.contains(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.setCurrentDragSourceNode=function(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=f.getNodeClientOffset(e),this.currentDragSourceNodeOffsetChanged=!1,window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},e.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),!0)},e.prototype.checkIfCurrentDragSourceRectChanged=function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!l["default"](f.getNodeClientOffset(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))},e.prototype.handleTopDragStartCapture=function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},e.prototype.handleDragStart=function(e,t){this.dragStartSourceIds.unshift(t)},e.prototype.handleTopDragStart=function(e){var t=this,n=this.dragStartSourceIds;this.dragStartSourceIds=null;var r=f.getEventClientOffset(e);this.actions.beginDrag(n,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});var o=e.dataTransfer,a=h.matchNativeItemType(o);if(this.monitor.isDragging()){if("function"==typeof o.setDragImage){var i=this.monitor.getSourceId(),u=this.sourceNodes[i],s=this.sourcePreviewNodes[i]||u,l=this.getCurrentSourcePreviewNodeOptions(),c=l.anchorX,p=l.anchorY,d={anchorX:c,anchorY:p},g=f.getDragPreviewOffset(u,s,r,d);o.setDragImage(s,g.x,g.y)}try{o.setData("application/json",{})}catch(v){}this.setCurrentDragSourceNode(e.target);var y=this.getCurrentSourcePreviewNodeOptions(),b=y.captureDraggingState;b?this.actions.publishDragSource():setTimeout(function(){return t.actions.publishDragSource()})}else if(a)this.beginDragNativeItem(a);else{if(!(o.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}},e.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.handleTopDragEnterCapture=function(e){this.dragEnterTargetIds=[];var t=this.enterLeaveCounter.enter(e.target);if(t&&!this.monitor.isDragging()){var n=e.dataTransfer,r=h.matchNativeItemType(n);r&&this.beginDragNativeItem(r)}},e.prototype.handleDragEnter=function(e,t){this.dragEnterTargetIds.unshift(t)},e.prototype.handleTopDragEnter=function(e){var t=this,n=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){d.isFirefox()||this.actions.hover(n,{clientOffset:f.getEventClientOffset(e)});var r=n.some(function(e){return t.monitor.canDropOnTarget(e)});r&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}},e.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[]},e.prototype.handleDragOver=function(e,t){this.dragOverTargetIds.unshift(t)},e.prototype.handleTopDragOver=function(e){var t=this,n=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.actions.hover(n,{clientOffset:f.getEventClientOffset(e)});var r=n.some(function(e){return t.monitor.canDropOnTarget(e)});r?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),e.dataTransfer.dropEffect="move")},e.prototype.handleTopDragLeaveCapture=function(e){this.isDraggingNativeItem()&&e.preventDefault();var t=this.enterLeaveCounter.leave(e.target);t&&this.isDraggingNativeItem()&&this.endDragNativeItem()},e.prototype.handleTopDropCapture=function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()},e.prototype.handleDrop=function(e,t){this.dropTargetIds.unshift(t)},e.prototype.handleTopDrop=function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:f.getEventClientOffset(e) +}),this.actions.drop(),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},e.prototype.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},e}();n["default"]=y,t.exports=n["default"]},{"./BrowserDetector":134,"./EnterLeaveCounter":135,"./NativeDragSources":138,"./NativeTypes":139,"./OffsetUtils":140,"./shallowEqual":143,"lodash/defaults":111}],137:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function(){function e(t,n){r(this,e);for(var o=t.length,a=[],i=0;ie))return n[l];s=l-1}}i=Math.max(0,s);var p=e-t[i],d=p*p;return n[i]+r[i]*p+o[i]*d+a[i]*p*d},e}();n["default"]=o,t.exports=n["default"]},{}],138:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n){var r=t.reduce(function(t,n){return t||e.getData(n)},null);return null!=r?r:n}function u(e){var t=d[e],n=t.exposeProperty,r=t.matchesTypes,i=t.getData;return function(){function e(){o(this,e),this.item=Object.defineProperties({},a({},n,{get:function(){return console.warn("Browser doesn't allow reading \""+n+'" until the drop event.'),null},configurable:!0,enumerable:!0}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){delete this.item[n],this.item[n]=i(e,r)},e.prototype.canDrag=function(){return!0},e.prototype.beginDrag=function(){return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}()}function s(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(d).filter(function(e){var n=d[e].matchesTypes;return n.some(function(e){return t.indexOf(e)>-1})})[0]||null}n.__esModule=!0;var l;n.createNativeDragSource=u,n.matchNativeItemType=s;var c=e("./NativeTypes"),p=r(c),d=(l={},a(l,p.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),a(l,p.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return i(e,t,"").split("\n")}}),a(l,p.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return i(e,t,"")}}),l)},{"./NativeTypes":139}],139:[function(e,t,n){"use strict";n.__esModule=!0;var r="__NATIVE_FILE__";n.FILE=r;var o="__NATIVE_URL__";n.URL=o;var a="__NATIVE_TEXT__";n.TEXT=a},{}],140:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.nodeType===c?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top,o=n.left;return{x:o,y:r}}function a(e){return{x:e.clientX,y:e.clientY}}function i(e,t,n,r){var a="IMG"===t.nodeName&&(u.isFirefox()||!document.documentElement.contains(t)),i=a?e:t,s=o(i),c={x:n.x-s.x,y:n.y-s.y},p=e.offsetWidth,d=e.offsetHeight,f=r.anchorX,h=r.anchorY,g=a?t.width:p,v=a?t.height:d;u.isSafari()&&a?(v/=window.devicePixelRatio,g/=window.devicePixelRatio):u.isFirefox()&&!a&&(v*=window.devicePixelRatio,g*=window.devicePixelRatio);var y=new l["default"]([0,.5,1],[c.x,c.x/p*g,c.x+g-p]),b=new l["default"]([0,.5,1],[c.y,c.y/d*v,c.y+v-d]),m=y.interpolate(f),E=b.interpolate(h);return u.isSafari()&&a&&(E+=(window.devicePixelRatio-1)*v),{x:m,y:E}}n.__esModule=!0,n.getNodeClientOffset=o,n.getEventClientOffset=a,n.getDragPreviewOffset=i;var u=e("./BrowserDetector"),s=e("./MonotonicInterpolant"),l=r(s),c=1},{"./BrowserDetector":134,"./MonotonicInterpolant":137}],141:[function(e,t,n){"use strict";function r(){return o||(o=new Image,o.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),o}n.__esModule=!0,n["default"]=r;var o=void 0;t.exports=n["default"]},{}],142:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return new u["default"](e)}n.__esModule=!0,n["default"]=a;var i=e("./HTML5Backend"),u=o(i),s=e("./getEmptyImage"),l=o(s),c=e("./NativeTypes"),p=r(c);n.NativeTypes=p,n.getEmptyImage=l["default"]},{"./HTML5Backend":136,"./NativeTypes":139,"./getEmptyImage":141}],143:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',p.join(", "),t),s["default"]("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),d.forEach(function(t){s["default"]("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])});var t=function(){function t(e){a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrag=function(){return!e.canDrag||e.canDrag(this.props,this.monitor)},t.prototype.isDragging=function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()},t.prototype.beginDrag=function(){var t=e.beginDrag(this.props,this.monitor,this.component);return"production"!==r.env.NODE_ENV&&s["default"](c["default"](t),"beginDrag() must return a plain object that represents the dragged item. Instead received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t),t},t.prototype.endDrag=function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)},t}();return function(e){return new t(e)}}n.__esModule=!0,n["default"]=i;var u=e("invariant"),s=o(u),l=e("lodash/isPlainObject"),c=o(l),p=["canDrag","beginDrag","canDrag","isDragging","endDrag"],d=["beginDrag"];t.exports=n["default"]}).call(this,e("_process"))},{_process:133,invariant:25,"lodash/isPlainObject":124}],151:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return new c(e)}n.__esModule=!0,n["default"]=a;var i=e("invariant"),u=r(i),s=!1,l=!1,c=function(){function e(t){o(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.sourceId=e},e.prototype.canDrag=function(){u["default"](!s,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return s=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{s=!1}},e.prototype.isDragging=function(){u["default"](!l,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return l=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{l=!1}},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();t.exports=n["default"]},{invariant:25}],152:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){function t(){u&&(u(),u=null),r&&o&&(u=e.connectDropTarget(r,o,a))}function n(e){e!==r&&(r=e,t())}var r=void 0,o=void 0,a=void 0,u=void 0,l=i["default"]({dropTarget:function(e,n){e===o&&s["default"](n,a)||(o=e,a=n,t())}});return{receiveHandlerId:n,hooks:l}}n.__esModule=!0,n["default"]=o;var a=e("./wrapConnectorHooks"),i=r(a),u=e("./areOptionsEqual"),s=r(u);t.exports=n["default"]},{"./areOptionsEqual":148,"./wrapConnectorHooks":164}],153:[function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){Object.keys(e).forEach(function(t){s["default"](p.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',p.join(", "),t),s["default"]("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html",t,t,e[t])});var t=function(){function t(e){a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveMonitor=function(e){this.monitor=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrop=function(){return!e.canDrop||e.canDrop(this.props,this.monitor)},t.prototype.hover=function(){e.hover&&e.hover(this.props,this.monitor,this.component)},t.prototype.drop=function(){if(e.drop){var t=e.drop(this.props,this.monitor,this.component);return"production"!==r.env.NODE_ENV&&s["default"]("undefined"==typeof t||c["default"](t),"drop() must either return undefined, or an object that represents the drop result. Instead received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html",t),t}},t}();return function(e){return new t(e)}}n.__esModule=!0,n["default"]=i;var u=e("invariant"),s=o(u),l=e("lodash/isPlainObject"),c=o(l),p=["canDrop","hover","drop"];t.exports=n["default"]}).call(this,e("_process"))},{_process:133,invariant:25,"lodash/isPlainObject":124}],154:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return new l(e)}n.__esModule=!0,n["default"]=a;var i=e("invariant"),u=r(i),s=!1,l=function(){function e(t){o(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.targetId=e},e.prototype.canDrop=function(){u["default"](!s,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drop-target-monitor.html");try{return s=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{s=!1}},e.prototype.isOver=function(e){return this.internalMonitor.isOverTarget(this.targetId,e)},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();t.exports=n["default"]},{invariant:25}],155:[function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){var t=e.DecoratedComponent,n=e.createHandler,o=e.createMonitor,u=e.createConnector,f=e.registerHandler,g=e.containerDisplayName,y=e.getType,m=e.collect,D=e.options,_=D.arePropsEqual,O=void 0===_?v["default"]:_,T=t.displayName||t.name||"Component";return function(e){function v(t,r){a(this,v),e.call(this,t,r),this.handleChange=this.handleChange.bind(this),this.handleChildRef=this.handleChildRef.bind(this),E["default"]("object"==typeof this.context.dragDropManager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",T,T),this.manager=this.context.dragDropManager,this.handlerMonitor=o(this.manager),this.handlerConnector=u(this.manager.getBackend()),this.handler=n(this.handlerMonitor),this.disposable=new d.SerialDisposable,this.receiveProps(t),this.state=this.getCurrentState(),this.dispose()}return i(v,e),v.prototype.getHandlerId=function(){return this.handlerId},v.prototype.getDecoratedComponentInstance=function(){return this.decoratedComponentInstance},v.prototype.shouldComponentUpdate=function(e,t){return!O(e,this.props)||!h["default"](t,this.state)},l(v,null,[{key:"DecoratedComponent",value:t,enumerable:!0},{key:"displayName",value:g+"("+T+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:c.PropTypes.object.isRequired},enumerable:!0}]),v.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.disposable=new d.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()},v.prototype.componentWillReceiveProps=function(e){O(e,this.props)||(this.receiveProps(e),this.handleChange())},v.prototype.componentWillUnmount=function(){this.dispose(),this.isCurrentlyMounted=!1},v.prototype.receiveProps=function(e){this.handler.receiveProps(e),this.receiveType(y(e))},v.prototype.receiveType=function(e){if(e!==this.currentType){this.currentType=e;var t=f(e,this.handler,this.manager),n=t.handlerId,r=t.unregister;this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var o=this.manager.getMonitor(),a=o.subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new d.CompositeDisposable(new d.Disposable(a),new d.Disposable(r)))}},v.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();h["default"](e,this.state)||this.setState(e)}},v.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)},v.prototype.handleChildRef=function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)},v.prototype.getCurrentState=function(){var e=m(this.handlerConnector.hooks,this.handlerMonitor);return"production"!==r.env.NODE_ENV&&E["default"](b["default"](e),"Expected `collect` specified as the second argument to %s for %s to return a plain object of props to inject. Instead, received %s.",g,T,e),e},v.prototype.render=function(){return p["default"].createElement(t,s({},this.props,this.state,{ref:this.handleChildRef}))},v}(c.Component)}n.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t2?r-2:0),a=2;a or
. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?u.cloneElement(e,{ref:function(e){t(e),n&&n(e)}}):u.cloneElement(e,{ref:t})}n.__esModule=!0,n["default"]=o;var a=e("invariant"),i=r(a),u=e("react");t.exports=n["default"]},{invariant:25,react:void 0}],161:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return"string"==typeof e||"symbol"==typeof e||t&&i["default"](e)&&e.every(function(e){return o(e,!1)})}n.__esModule=!0,n["default"]=o; +var a=e("lodash/isArray"),i=r(a);t.exports=n["default"]},{"lodash/isArray":116}],162:[function(e,t,n){arguments[4][143][0].apply(n,arguments)},{dup:143}],163:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a, or turn it into a ")+"drag source or a drop target itself.")}}function a(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],n=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(!l.isValidElement(t)){var r=t;return void e(r,n)}var a=t;o(a);var i=n?function(t){return e(t,n)}:e;return s["default"](a,i)}}function i(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n],o=a(r);t[n]=function(){return o}}),t}n.__esModule=!0,n["default"]=i;var u=e("./utils/cloneWithRef"),s=r(u),l=e("react");t.exports=n["default"]},{"./utils/cloneWithRef":160,react:void 0}],165:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){function r(){y===v&&(y=v.slice())}function a(){return g}function u(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),y.push(e),function(){if(t){t=!1,r();var n=y.indexOf(e);y.splice(n,1)}}}function c(e){if(!(0,i["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(b)throw new Error("Reducers may not dispatch actions.");try{b=!0,g=h(g,e)}finally{b=!1}for(var t=v=y,n=0;ne.props.value.length)&&e.clearOptions(),e.props.onChange(t)}};return n(l({},this.props,s,{isLoading:i,onInputChange:this._onInputChange}))}}]),t}(d.Component);n["default"]=D,D.propTypes=b,D.defaultProps=E,t.exports=n["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Select":173,"./utils/stripDiacritics":181}],170:[function(e,t,n){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return f["default"].createElement(g["default"],e)}function i(e){var t=e.option,n=e.options,r=e.labelKey,o=e.valueKey;return 0===n.filter(function(e){return e[r]===t[r]||e[o]===t[o]}).length}function u(e){var t=e.label;return!!t}function s(e){var t=e.label,n=e.labelKey,r=e.valueKey,o={};return o[r]=t,o[n]=t,o.className="Select-create-option-placeholder",o}function l(e){return'Create option "'+e+'"'}function c(e){var t=e.keyCode;switch(t){case 9:case 13:case 188:return!0}return!1}var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tu.bottom||i.topt.offsetHeight&&!(t.scrollHeight-t.offsetHeight-t.scrollTop)&&this.props.onMenuScrollToBottom()}},handleRequired:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},getOptionLabel:function(e){return e[this.props.labelKey]},getValueArray:function(e,t){var n=this,r="object"==typeof t?t:this.props;if(r.multi){if("string"==typeof e&&(e=e.split(r.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return n.expandValue(e,r)}).filter(function(e){return e})}var o=this.expandValue(e,r);return o?[o]:[]},expandValue:function(e,t){var n=typeof e;if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var r=t.options,o=t.valueKey;if(r)for(var a=0;a0?n-=1:n=t.length-1;else if("start"===e)n=0;else if("end"===e)n=t.length-1;else if("page_up"===e){var o=n-this.props.pageSize;n=o<0?0:o}else if("page_down"===e){var o=n+this.props.pageSize;n=o>t.length-1?t.length-1:o}n===-1&&(n=0),this.setState({focusedIndex:t[n].index,focusedOption:t[n].option})}},getFocusedOption:function(){return this._focusedOption},getInputValue:function(){return this.state.inputValue},selectFocusedOption:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)},reorderValueArray:function(e,t){if(e!==t){var n=this.getValueArray(this.props.value),r=n.splice(e,1);n.splice.apply(n,[t,0].concat(i(r))),this.setValue(n)}},renderLoading:function(){if(this.props.isLoading)return p["default"].createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},p["default"].createElement("span",{className:"Select-loading"}))},renderMultiValueComponent:function(e,t,n){var r=this.props.valueRenderer||this.getOptionLabel,o=this.props.valueComponent,a=this.props.onValueClick?this.handleValueClick:null,i=this._instancePrefix+"-value-"+t,u="value-"+t+"-"+e[this.props.valueKey];return p["default"].createElement(o,{id:i,instancePrefix:this._instancePrefix,disabled:this.props.disabled||e.clearableValue===!1,key:u,onClick:a,onRemove:this.removeValue,value:e,reorder:n},r(e,t),p["default"].createElement("span",{className:"Select-aria-only"}," "))},renderValue:function(e,t){var n=this;if(!e.length)return this.state.inputValue?null:p["default"].createElement("div",{className:"Select-placeholder"},this.props.placeholder);if(this.props.multi)return this.props.reorder&&!this.props.disabled?e.map(function(e,t){ +var r=!0;return p["default"].createElement(V["default"],{key:t,index:t,contextId:n._instancePrefix,className:"Select-drag-container",handleSorting:n.reorderValueArray},p["default"].createElement(B["default"],{index:t,contextId:n._instancePrefix},n.renderMultiValueComponent(e,t,r)))}):e.map(function(e,t){var r=!1;return n.renderMultiValueComponent(e,t,r)});if(!this.state.inputValue){var r=this.props.valueRenderer||this.getOptionLabel,o=this.props.valueComponent,a=this.props.onValueClick?this.handleValueClick:null;t&&(a=null);this._instancePrefix+"-value-item";return p["default"].createElement(o,{id:this._instancePrefix+"-value-item",disabled:this.props.disabled,instancePrefix:this._instancePrefix,onClick:a,value:e[0]},r(e[0]))}},renderInput:function(e,t){var n=this;if(this.props.inputRenderer)return this.props.inputRenderer();var r,o=(0,y["default"])("Select-input",this.props.inputProps.className),i=!!this.state.isOpen,s=(0,y["default"])((r={},u(r,this._instancePrefix+"-list",i),u(r,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),r)),c=l({},this.props.inputProps,{role:"combobox","aria-expanded":""+i,"aria-owns":s,"aria-haspopup":""+i,"aria-activedescendant":i?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:o,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},required:this.state.required,value:this.state.inputValue});if(this.props.disabled||!this.props.searchable){var d=this.props.inputProps,f=(d.inputClassName,a(d,["inputClassName"]));return p["default"].createElement("div",l({},f,{role:"combobox","aria-expanded":i,"aria-owns":i?this._instancePrefix+"-list":this._instancePrefix+"-value","aria-activedescendant":i?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value",className:o,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},"aria-readonly":""+!!this.props.disabled,style:{border:0,width:1,display:"inline-block"}}))}return this.props.autosize?p["default"].createElement(g["default"],l({},c,{minWidth:"5"})):p["default"].createElement("div",{className:o},p["default"].createElement("input",c))},renderClear:function(){if(this.props.clearable&&this.props.value&&0!==this.props.value&&(!this.props.multi||this.props.value.length)&&!this.props.disabled&&!this.props.isLoading)return p["default"].createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},p["default"].createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}}))},renderArrow:function(){var e=this.handleMouseDownOnArrow,t=this.props.arrowRenderer({onMouseDown:e});return p["default"].createElement("span",{className:"Select-arrow-zone",onMouseDown:e},t)},filterOptions:function G(e){var t=this.state.inputValue,n=this.props.options||[];if(this.props.filterOptions){var G="function"==typeof this.props.filterOptions?this.props.filterOptions:D["default"];return G(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,valueKey:this.props.valueKey})}return n},onOptionRef:function(e,t){t&&(this.focused=e)},renderMenu:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey,onOptionRef:this.onOptionRef}):this.props.noResultsText?p["default"].createElement("div",{className:"Select-noresults"},this.props.noResultsText):null},renderHiddenField:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map(function(e){return s(e[t.props.valueKey])}).join(this.props.delimiter);return p["default"].createElement("input",{type:"hidden",ref:function(e){return t.value=e},name:this.props.name,value:n,disabled:this.props.disabled})}return e.map(function(e,n){return p["default"].createElement("input",{key:"hidden."+n,type:"hidden",ref:"value"+n,name:t.props.name,value:s(e[t.props.valueKey]),disabled:t.props.disabled})})}},getFocusableOptionIndex:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.state.focusedOption||e;if(n&&!n.disabled){var r=t.indexOf(n);if(r!==-1)return r}for(var o=0;o-1)return!1;if(r.filterOption)return r.filterOption.call(o,e,t);if(!t)return!0;var a=String(e[r.valueKey]),u=String(e[r.labelKey]);return r.ignoreAccents&&("label"!==r.matchProp&&(a=(0,i["default"])(a)),"value"!==r.matchProp&&(u=(0,i["default"])(u))),r.ignoreCase&&("label"!==r.matchProp&&(a=a.toLowerCase()),"value"!==r.matchProp&&(u=u.toLowerCase())),"start"===r.matchPos?"label"!==r.matchProp&&a.substr(0,t.length)===t||"value"!==r.matchProp&&u.substr(0,t.length)===t:"label"!==r.matchProp&&a.indexOf(t)>=0||"value"!==r.matchProp&&u.indexOf(t)>=0})}var a=e("./stripDiacritics"),i=r(a);t.exports=o},{"./stripDiacritics":181}],180:[function(e,t,n){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){var t=e.focusedOption,n=e.instancePrefix,r=(e.labelKey,e.onFocus),o=e.onSelect,i=e.optionClassName,s=e.optionComponent,l=e.optionRenderer,c=e.options,p=e.valueArray,d=e.valueKey,f=e.onOptionRef,h=s;return c.map(function(e,s){var c=p&&p.indexOf(e)>-1,g=e===t,v=(0,a["default"])(i,{"Select-option":!0,"is-selected":c,"is-focused":g,"is-disabled":e.disabled});return u["default"].createElement(h,{className:v,instancePrefix:n,isDisabled:e.disabled,isFocused:g,isSelected:c,key:"option-"+s+"-"+e[d],onFocus:r,onSelect:o,option:e,optionIndex:s,ref:function(e){f(e,g)}},l(e,s))})}var o="undefined"!=typeof window?window.classNames:"undefined"!=typeof e?e.classNames:null,a=n(o),i="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,u=n(i);t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],181:[function(e,t,n){"use strict";var r=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}];t.exports=function(e){for(var t=0;t>> (32 - b)); - }, +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - // Bit-wise rotation right - rotr: function(n, b) { - return (n << (32 - b)) | (n >>> b); - }, +'use strict'; - // Swap big-endian to little-endian and vice versa - endian: function(n) { - // If number given, swap endian - if (n.constructor == Number) { - return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00; - } +var _assign = require('object-assign'); - // Else, assume array and swap all items - for (var i = 0; i < n.length; i++) - n[i] = crypt.endian(n[i]); - return n; - }, +var emptyObject = require('fbjs/lib/emptyObject'); +var _invariant = require('fbjs/lib/invariant'); - // Generate an array of any length of random bytes - randomBytes: function(n) { - for (var bytes = []; n > 0; n--) - bytes.push(Math.floor(Math.random() * 256)); - return bytes; - }, +if ("production" !== 'production') { + var warning = require('fbjs/lib/warning'); +} - // Convert a byte array to big-endian 32-bit words - bytesToWords: function(bytes) { - for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) - words[b >>> 5] |= bytes[i] << (24 - b % 32); - return words; - }, +var MIXINS_KEY = 'mixins'; - // Convert big-endian 32-bit words to a byte array - wordsToBytes: function(words) { - for (var bytes = [], b = 0; b < words.length * 32; b += 8) - bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF); - return bytes; - }, +// Helper function to allow the creation of anonymous functions which do not +// have .name set to the name of the variable being assigned to. +function identity(fn) { + return fn; +} - // Convert a byte array to a hex string - bytesToHex: function(bytes) { - for (var hex = [], i = 0; i < bytes.length; i++) { - hex.push((bytes[i] >>> 4).toString(16)); - hex.push((bytes[i] & 0xF).toString(16)); - } - return hex.join(''); - }, +var ReactPropTypeLocationNames; +if ("production" !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} else { + ReactPropTypeLocationNames = {}; +} - // Convert a hex string to a byte array - hexToBytes: function(hex) { - for (var bytes = [], c = 0; c < hex.length; c += 2) - bytes.push(parseInt(hex.substr(c, 2), 16)); - return bytes; - }, +function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ - // Convert a byte array to a base-64 string - bytesToBase64: function(bytes) { - for (var base64 = [], i = 0; i < bytes.length; i += 3) { - var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; - for (var j = 0; j < 4; j++) - if (i * 8 + j * 6 <= bytes.length * 8) - base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F)); - else - base64.push('='); - } - return base64.join(''); - }, + var injectedMixins = []; - // Convert a base-64 string to a byte array - base64ToBytes: function(base64) { - // Remove non-base-64 characters - base64 = base64.replace(/[^A-Z0-9+\/]/ig, ''); + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return
Hello World
; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', - for (var bytes = [], i = 0, imod4 = 0; i < base64.length; - imod4 = ++i % 4) { - if (imod4 == 0) continue; - bytes.push(((base64map.indexOf(base64.charAt(i - 1)) - & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) - | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2))); - } - return bytes; - } - }; + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', - module.exports = crypt; -})(); + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', -},{}],18:[function(require,module,exports){ -'use strict'; -module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -},{}],19:[function(require,module,exports){ -'use strict'; + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', -var canUseDOM = require('./inDOM'); + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', -var size; + // ==== Definition methods ==== -module.exports = function (recalc) { - if (!size || recalc) { - if (canUseDOM) { - var scrollDiv = document.createElement('div'); + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', - scrollDiv.style.position = 'absolute'; - scrollDiv.style.top = '-9999px'; - scrollDiv.style.width = '50px'; - scrollDiv.style.height = '50px'; - scrollDiv.style.overflow = 'scroll'; + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', - document.body.appendChild(scrollDiv); - size = scrollDiv.offsetWidth - scrollDiv.clientWidth; - document.body.removeChild(scrollDiv); - } - } + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', - return size; -}; -},{"./inDOM":18}],20:[function(require,module,exports){ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks - * - */ + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return
Hello, {name}!
; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', -/*eslint-disable no-self-compare */ + // ==== Delegate methods ==== -'use strict'; + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', -var hasOwnProperty = Object.prototype.hasOwnProperty; + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', -/** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ -function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - // Added the nonzero y check to make Flow happy, but it is redundant - return x !== 0 || y !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } -} + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', -/** - * Performs equality by iterating through keys on an object and returning false - * when any key has values which are not strictly equal between the arguments. - * Returns true when the values of all keys are strictly equal. - */ -function shallowEqual(objA, objB) { - if (is(objA, objB)) { - return true; - } + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', - if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { - return false; - } + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', - var keysA = Object.keys(objA); - var keysB = Object.keys(objB); + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', - if (keysA.length !== keysB.length) { - return false; - } + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', - // Test for A's keys different from B. - for (var i = 0; i < keysA.length; i++) { - if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { - return false; - } - } + // ==== Advanced methods ==== - return true; -} + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + }; -module.exports = shallowEqual; -},{}],21:[function(require,module,exports){ -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function(Constructor, childContextTypes) { + if ("production" !== 'production') { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if ("production" !== 'production') { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if ("production" !== 'production') { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if ("production" !== 'production') { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if ("production" !== 'production') { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if ("production" !== 'production') { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.' + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.' + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || + specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if ("production" !== 'production') { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ); + + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ); + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if ("production" !== 'production') { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function(newThis) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if ("production" !== 'production') { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ); + } + } else if (!args.length) { + if ("production" !== 'production') { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function() { + this.__isMounted = true; + } + }; + + var IsMountedPostMixin = { + componentWillUnmount: function() { + this.__isMounted = false; + } + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if ("production" !== 'production') { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || + this.name || + 'Component' + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + } + }; + + var ReactClassComponent = function() {}; + _assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function(props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if ("production" !== 'production') { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if ("production" !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if ( + initialState === undefined && + this.getInitialState._isMockFunction + ) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if ("production" !== 'production') { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ); + + if ("production" !== 'production') { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component' + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; +} + +module.exports = factory; + +},{"fbjs/lib/emptyObject":23,"fbjs/lib/invariant":24,"fbjs/lib/warning":26,"object-assign":31}],18:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +var React = require('react'); +var factory = require('./factory'); + +if (typeof React === 'undefined') { + throw Error( + 'create-react-class could not find the React object. If you are using script tags, ' + + 'make sure that React is being loaded before create-react-class.' + ); +} + +// Hack to grab NoopUpdateQueue from isomorphic React +var ReactNoopUpdateQueue = new React.Component().updater; + +module.exports = factory( + React.Component, + React.isValidElement, + ReactNoopUpdateQueue +); + +},{"./factory":17,"react":undefined}],19:[function(require,module,exports){ +(function() { + var base64map + = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + + crypt = { + // Bit-wise rotation left + rotl: function(n, b) { + return (n << b) | (n >>> (32 - b)); + }, + + // Bit-wise rotation right + rotr: function(n, b) { + return (n << (32 - b)) | (n >>> b); + }, + + // Swap big-endian to little-endian and vice versa + endian: function(n) { + // If number given, swap endian + if (n.constructor == Number) { + return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00; + } + + // Else, assume array and swap all items + for (var i = 0; i < n.length; i++) + n[i] = crypt.endian(n[i]); + return n; + }, + + // Generate an array of any length of random bytes + randomBytes: function(n) { + for (var bytes = []; n > 0; n--) + bytes.push(Math.floor(Math.random() * 256)); + return bytes; + }, + + // Convert a byte array to big-endian 32-bit words + bytesToWords: function(bytes) { + for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) + words[b >>> 5] |= bytes[i] << (24 - b % 32); + return words; + }, + + // Convert big-endian 32-bit words to a byte array + wordsToBytes: function(words) { + for (var bytes = [], b = 0; b < words.length * 32; b += 8) + bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF); + return bytes; + }, + + // Convert a byte array to a hex string + bytesToHex: function(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + } + return hex.join(''); + }, + + // Convert a hex string to a byte array + hexToBytes: function(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; + }, + + // Convert a byte array to a base-64 string + bytesToBase64: function(bytes) { + for (var base64 = [], i = 0; i < bytes.length; i += 3) { + var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; + for (var j = 0; j < 4; j++) + if (i * 8 + j * 6 <= bytes.length * 8) + base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F)); + else + base64.push('='); + } + return base64.join(''); + }, + + // Convert a base-64 string to a byte array + base64ToBytes: function(base64) { + // Remove non-base-64 characters + base64 = base64.replace(/[^A-Z0-9+\/]/ig, ''); + + for (var bytes = [], i = 0, imod4 = 0; i < base64.length; + imod4 = ++i % 4) { + if (imod4 == 0) continue; + bytes.push(((base64map.indexOf(base64.charAt(i - 1)) + & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) + | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2))); + } + return bytes; + } + }; + + module.exports = crypt; +})(); + +},{}],20:[function(require,module,exports){ +'use strict'; +module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement); +},{}],21:[function(require,module,exports){ +'use strict'; + +var canUseDOM = require('./inDOM'); + +var size; + +module.exports = function (recalc) { + if (!size || recalc) { + if (canUseDOM) { + var scrollDiv = document.createElement('div'); + + scrollDiv.style.position = 'absolute'; + scrollDiv.style.top = '-9999px'; + scrollDiv.style.width = '50px'; + scrollDiv.style.height = '50px'; + scrollDiv.style.overflow = 'scroll'; + + document.body.appendChild(scrollDiv); + size = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + } + } + + return size; +}; +},{"./inDOM":20}],22:[function(require,module,exports){ +"use strict"; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; +},{}],23:[function(require,module,exports){ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +var emptyObject = {}; + +if ("production" !== 'production') { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; +},{}],24:[function(require,module,exports){ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if ("production" !== 'production') { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; +} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; +},{}],25:[function(require,module,exports){ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + * + */ + +/*eslint-disable no-self-compare */ + +'use strict'; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ +function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + // Added the nonzero y check to make Flow happy, but it is redundant + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } +} + +/** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ +function shallowEqual(objA, objB) { + if (is(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + +module.exports = shallowEqual; +},{}],26:[function(require,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +var emptyFunction = require('./emptyFunction'); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if ("production" !== 'production') { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; +} + +module.exports = warning; +},{"./emptyFunction":22}],27:[function(require,module,exports){ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh * @license MIT */ @@ -1509,7 +2595,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],22:[function(require,module,exports){ +},{}],28:[function(require,module,exports){ module.exports = function() { var mediaQuery; if (typeof window !== "undefined" && window !== null) { @@ -1524,7 +2610,7 @@ module.exports = function() { return false; }; -},{}],23:[function(require,module,exports){ +},{}],29:[function(require,module,exports){ // the whatwg-fetch polyfill installs the fetch() function // on the global object (window or self) // @@ -1532,7 +2618,7 @@ module.exports = function() { require('whatwg-fetch'); module.exports = self.fetch.bind(self); -},{"whatwg-fetch":93}],24:[function(require,module,exports){ +},{"whatwg-fetch":104}],30:[function(require,module,exports){ (function(){ var crypt = require('crypt'), utf8 = require('charenc').utf8, @@ -1694,314 +2780,1103 @@ module.exports = self.fetch.bind(self); })(); -},{"charenc":16,"crypt":17,"is-buffer":21}],25:[function(require,module,exports){ +},{"charenc":16,"crypt":19,"is-buffer":27}],31:[function(require,module,exports){ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + 'use strict'; /* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + +},{}],32:[function(require,module,exports){ +(function (process){ +// Generated by CoffeeScript 1.12.2 +(function() { + var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; + + if ((typeof performance !== "undefined" && performance !== null) && performance.now) { + module.exports = function() { + return performance.now(); + }; + } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { + module.exports = function() { + return (getNanoSeconds() - nodeLoadTime) / 1e6; + }; + hrtime = process.hrtime; + getNanoSeconds = function() { + var hr; + hr = hrtime(); + return hr[0] * 1e9 + hr[1]; + }; + moduleLoadTime = getNanoSeconds(); + upTime = process.uptime() * 1e9; + nodeLoadTime = moduleLoadTime - upTime; + } else if (Date.now) { + module.exports = function() { + return Date.now() - loadTime; + }; + loadTime = Date.now(); + } else { + module.exports = function() { + return new Date().getTime() - loadTime; + }; + loadTime = new Date().getTime(); + } + +}).call(this); + + + +}).call(this,require('_process')) +},{"_process":33}],33:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; - return Object(val); +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; } +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } +function noop() {} - // Detect buggy property enumeration order in older V8 versions. +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } +process.listeners = function (name) { return [] } - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; - return true; - } catch (e) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } +},{}],34:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +if ("production" !== 'production') { + var invariant = require('fbjs/lib/invariant'); + var warning = require('fbjs/lib/warning'); + var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); + var loggedTypeFailures = {}; } -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if ("production" !== 'production') { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); + var stack = getStack ? getStack() : ''; - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } +} - if (Object.getOwnPropertySymbols) { - symbols = Object.getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } +module.exports = checkPropTypes; - return to; +},{"./lib/ReactPropTypesSecret":38,"fbjs/lib/invariant":24,"fbjs/lib/warning":26}],35:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +var emptyFunction = require('fbjs/lib/emptyFunction'); +var invariant = require('fbjs/lib/invariant'); +var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; + + ReactPropTypes.checkPropTypes = emptyFunction; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; }; -},{}],26:[function(require,module,exports){ -(function (process){ -// Generated by CoffeeScript 1.7.1 -(function() { - var getNanoSeconds, hrtime, loadTime; +},{"./lib/ReactPropTypesSecret":38,"fbjs/lib/emptyFunction":22,"fbjs/lib/invariant":24}],36:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ - if ((typeof performance !== "undefined" && performance !== null) && performance.now) { - module.exports = function() { - return performance.now(); - }; - } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { - module.exports = function() { - return (getNanoSeconds() - loadTime) / 1e6; - }; - hrtime = process.hrtime; - getNanoSeconds = function() { - var hr; - hr = hrtime(); - return hr[0] * 1e9 + hr[1]; - }; - loadTime = getNanoSeconds(); - } else if (Date.now) { - module.exports = function() { - return Date.now() - loadTime; - }; - loadTime = Date.now(); - } else { - module.exports = function() { - return new Date().getTime() - loadTime; - }; - loadTime = new Date().getTime(); - } +'use strict'; -}).call(this); +var emptyFunction = require('fbjs/lib/emptyFunction'); +var invariant = require('fbjs/lib/invariant'); +var warning = require('fbjs/lib/warning'); -}).call(this,require('_process')) -},{"_process":27}],27:[function(require,module,exports){ -// shim for using process in browser -var process = module.exports = {}; +var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); +var checkPropTypes = require('./checkPropTypes'); -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. -var cachedSetTimeout; -var cachedClearTimeout; + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if ("production" !== 'production') { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } else if ("production" !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', + propFullName, + componentName + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } } - } catch (e) { - cachedSetTimeout = defaultSetTimout; + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; + } + return null; } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + "production" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } + return createChainableTypeChecker(validate); + } + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + "production" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + warning( + false, + 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + + 'received %s at index %s.', + getPostfixForTypeWarning(checker), + i + ); + return emptyFunction.thatReturnsNull; + } } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; + } + } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; } + return createChainableTypeChecker(validate); + } + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; + return true; + default: + return false; + } + } -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; } - if (queue.length) { - drainQueue(); + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; } -} -function drainQueue() { - if (draining) { - return; + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; } - var timeout = runTimeout(cleanUpNextTick); - draining = true; + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} + return propType; + } -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; }; -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; +},{"./checkPropTypes":34,"./lib/ReactPropTypesSecret":38,"fbjs/lib/emptyFunction":22,"fbjs/lib/invariant":24,"fbjs/lib/warning":26}],37:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +if ("production" !== 'production') { + var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; + + var isValidElement = function(object) { + return typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE; + }; + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); +} else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); } -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; -function noop() {} +},{"./factoryWithThrowingShims":35,"./factoryWithTypeCheckers":36}],38:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; +'use strict'; -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; +module.exports = ReactPropTypesSecret; -},{}],28:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ 'use strict'; var strictUriEncode = require('strict-uri-encode'); var objectAssign = require('object-assign'); +function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null ? [ + encode(key, opts), + '[', + index, + ']' + ].join('') : [ + encode(key, opts), + '[', + encode(index, opts), + ']=', + encode(value, opts) + ].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '[]=', + encode(value, opts) + ].join(''); + }; + + default: + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '=', + encode(value, opts) + ].join(''); + }; + } +} + +function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } else if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } +} + function encode(value, opts) { if (opts.encode) { return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); @@ -2010,11 +3885,29 @@ function encode(value, opts) { return value; } +function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)).sort(function (a, b) { + return Number(a) - Number(b); + }).map(function (key) { + return input[key]; + }); + } + + return input; +} + exports.extract = function (str) { return str.split('?')[1] || ''; }; -exports.parse = function (str) { +exports.parse = function (str, opts) { + opts = objectAssign({arrayFormat: 'none'}, opts); + + var formatter = parserForArrayFormat(opts); + // Create an object with no prototype // https://github.com/sindresorhus/query-string/issues/47 var ret = Object.create(null); @@ -2036,32 +3929,37 @@ exports.parse = function (str) { var key = parts.shift(); var val = parts.length > 0 ? parts.join('=') : undefined; - key = decodeURIComponent(key); - // missing `=` should be `null`: // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters val = val === undefined ? null : decodeURIComponent(val); - if (ret[key] === undefined) { - ret[key] = val; - } else if (Array.isArray(ret[key])) { - ret[key].push(val); + formatter(decodeURIComponent(key), val, ret); + }); + + return Object.keys(ret).sort().reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); } else { - ret[key] = [ret[key], val]; + result[key] = val; } - }); - return ret; + return result; + }, Object.create(null)); }; exports.stringify = function (obj, opts) { var defaults = { encode: true, - strict: true + strict: true, + arrayFormat: 'none' }; opts = objectAssign(defaults, opts); + var formatter = encoderForArrayFormat(opts); + return obj ? Object.keys(obj).sort().map(function (key) { var val = obj[key]; @@ -2081,11 +3979,7 @@ exports.stringify = function (obj, opts) { return; } - if (val2 === null) { - result.push(encode(key, opts)); - } else { - result.push(encode(key, opts) + '=' + encode(val2, opts)); - } + result.push(formatter(key, val2, result.length)); }); return result.join('&'); @@ -2097,7 +3991,7 @@ exports.stringify = function (obj, opts) { }).join('&') : ''; }; -},{"object-assign":25,"strict-uri-encode":92}],29:[function(require,module,exports){ +},{"object-assign":31,"strict-uri-encode":103}],40:[function(require,module,exports){ (function (global){ var now = require('performance-now') , root = typeof window === 'undefined' ? global : window @@ -2173,9 +4067,37 @@ module.exports.polyfill = function() { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"performance-now":26}],30:[function(require,module,exports){ -module.exports = require('react/lib/shallowCompare'); -},{"react/lib/shallowCompare":91}],31:[function(require,module,exports){ +},{"performance-now":32}],41:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule shallowCompare + */ + +'use strict'; + +var shallowEqual = require('fbjs/lib/shallowEqual'); + +/** + * Does a shallow comparison for props and state. + * See ReactComponentWithPureRenderMixin + * See also https://facebook.github.io/react/docs/shallow-compare.html + */ +function shallowCompare(instance, nextProps, nextState) { + return ( + !shallowEqual(instance.props, nextProps) || + !shallowEqual(instance.state, nextState) + ); +} + +module.exports = shallowCompare; + +},{"fbjs/lib/shallowEqual":25}],42:[function(require,module,exports){ 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -2198,6 +4120,10 @@ var _isRetina = require('is-retina'); var _isRetina2 = _interopRequireDefault(_isRetina); +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -2214,7 +4140,7 @@ var Gravatar = function (_React$Component) { function Gravatar() { _classCallCheck(this, Gravatar); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Gravatar).apply(this, arguments)); + return _possibleConstructorReturn(this, (Gravatar.__proto__ || Object.getPrototypeOf(Gravatar)).apply(this, arguments)); } _createClass(Gravatar, [{ @@ -2241,7 +4167,7 @@ var Gravatar = function (_React$Component) { if (this.props.md5) { hash = this.props.md5; } else if (typeof this.props.email === 'string') { - hash = (0, _md2.default)(formattedEmail); + hash = (0, _md2.default)(formattedEmail, { encoding: "binary" }); } else { console.warn('Gravatar image can not be fetched. Either the "email" or "md5" prop must be specified.'); return _react2.default.createElement('script', null); @@ -2304,14 +4230,14 @@ var Gravatar = function (_React$Component) { Gravatar.displayName = 'Gravatar'; Gravatar.propTypes = { - email: _react2.default.PropTypes.string, - md5: _react2.default.PropTypes.string, - size: _react2.default.PropTypes.number, - rating: _react2.default.PropTypes.string, - default: _react2.default.PropTypes.string, - className: _react2.default.PropTypes.string, - protocol: _react2.default.PropTypes.string, - style: _react2.default.PropTypes.object + email: _propTypes2.default.string, + md5: _propTypes2.default.string, + size: _propTypes2.default.number, + rating: _propTypes2.default.string, + default: _propTypes2.default.string, + className: _propTypes2.default.string, + protocol: _propTypes2.default.string, + style: _propTypes2.default.object }; Gravatar.defaultProps = { size: 50, @@ -2322,7 +4248,7 @@ Gravatar.defaultProps = { module.exports = Gravatar; -},{"is-retina":22,"md5":24,"query-string":28,"react":undefined}],32:[function(require,module,exports){ +},{"is-retina":28,"md5":30,"prop-types":37,"query-string":39,"react":undefined}],43:[function(require,module,exports){ module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache @@ -2595,7 +4521,7 @@ module.exports = /***/ } /******/ ]); -},{"react":undefined}],33:[function(require,module,exports){ +},{"react":undefined}],44:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, '__esModule', { @@ -2620,6 +4546,10 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react); +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + var _Select = require('./Select'); var _Select2 = _interopRequireDefault(_Select); @@ -2629,23 +4559,32 @@ var _utilsStripDiacritics = require('./utils/stripDiacritics'); var _utilsStripDiacritics2 = _interopRequireDefault(_utilsStripDiacritics); var propTypes = { - autoload: _react2['default'].PropTypes.bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true - cache: _react2['default'].PropTypes.any, // object to use to cache results; set to null/false to disable caching - children: _react2['default'].PropTypes.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element - ignoreAccents: _react2['default'].PropTypes.bool, // strip diacritics when filtering; defaults to true - ignoreCase: _react2['default'].PropTypes.bool, // perform case-insensitive filtering; defaults to true - loadingPlaceholder: _react.PropTypes.string.isRequired, // replaces the placeholder while options are loading - loadOptions: _react2['default'].PropTypes.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise - options: _react.PropTypes.array.isRequired, // array of options - placeholder: _react2['default'].PropTypes.oneOfType([// field placeholder, displayed when there's no value (shared with Select) - _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]), - searchPromptText: _react2['default'].PropTypes.oneOfType([// label to prompt for search input - _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]) -}; + autoload: _propTypes2['default'].bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true + cache: _propTypes2['default'].any, // object to use to cache results; set to null/false to disable caching + children: _propTypes2['default'].func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element + ignoreAccents: _propTypes2['default'].bool, // strip diacritics when filtering; defaults to true + ignoreCase: _propTypes2['default'].bool, // perform case-insensitive filtering; defaults to true + loadingPlaceholder: _propTypes2['default'].oneOfType([// replaces the placeholder while options are loading + _propTypes2['default'].string, _propTypes2['default'].node]), + loadOptions: _propTypes2['default'].func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise + multi: _propTypes2['default'].bool, // multi-value input + options: _propTypes2['default'].array.isRequired, // array of options + placeholder: _propTypes2['default'].oneOfType([// field placeholder, displayed when there's no value (shared with Select) + _propTypes2['default'].string, _propTypes2['default'].node]), + noResultsText: _propTypes2['default'].oneOfType([// field noResultsText, displayed when no options come back from the server + _propTypes2['default'].string, _propTypes2['default'].node]), + onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {} + searchPromptText: _propTypes2['default'].oneOfType([// label to prompt for search input + _propTypes2['default'].string, _propTypes2['default'].node]), + onInputChange: _propTypes2['default'].func, // optional for keeping track of what is being typed + value: _propTypes2['default'].any }; + +// initial field value +var defaultCache = {}; var defaultProps = { autoload: true, - cache: {}, + cache: defaultCache, children: defaultChildren, ignoreAccents: true, ignoreCase: true, @@ -2662,6 +4601,8 @@ var Async = (function (_Component) { _get(Object.getPrototypeOf(Async.prototype), 'constructor', this).call(this, props, context); + this._cache = props.cache === defaultCache ? {} : props.cache; + this.state = { isLoading: false, options: props.options @@ -2691,14 +4632,19 @@ var Async = (function (_Component) { } }); } + }, { + key: 'clearOptions', + value: function clearOptions() { + this.setState({ options: [] }); + } }, { key: 'loadOptions', value: function loadOptions(inputValue) { var _this2 = this; - var _props = this.props; - var cache = _props.cache; - var loadOptions = _props.loadOptions; + var loadOptions = this.props.loadOptions; + + var cache = this._cache; if (cache && cache.hasOwnProperty(inputValue)) { this.setState({ @@ -2748,9 +4694,10 @@ var Async = (function (_Component) { }, { key: '_onInputChange', value: function _onInputChange(inputValue) { - var _props2 = this.props; - var ignoreAccents = _props2.ignoreAccents; - var ignoreCase = _props2.ignoreCase; + var _props = this.props; + var ignoreAccents = _props.ignoreAccents; + var ignoreCase = _props.ignoreCase; + var onInputChange = _props.onInputChange; if (ignoreAccents) { inputValue = (0, _utilsStripDiacritics2['default'])(inputValue); @@ -2760,24 +4707,70 @@ var Async = (function (_Component) { inputValue = inputValue.toLowerCase(); } + if (onInputChange) { + onInputChange(inputValue); + } + return this.loadOptions(inputValue); } + }, { + key: 'inputValue', + value: function inputValue() { + if (this.select) { + return this.select.state.inputValue; + } + return ''; + } + }, { + key: 'noResultsText', + value: function noResultsText() { + var _props2 = this.props; + var loadingPlaceholder = _props2.loadingPlaceholder; + var noResultsText = _props2.noResultsText; + var searchPromptText = _props2.searchPromptText; + var isLoading = this.state.isLoading; + + var inputValue = this.inputValue(); + + if (isLoading) { + return loadingPlaceholder; + } + if (inputValue && noResultsText) { + return noResultsText; + } + return searchPromptText; + } + }, { + key: 'focus', + value: function focus() { + this.select.focus(); + } }, { key: 'render', value: function render() { + var _this3 = this; + var _props3 = this.props; var children = _props3.children; var loadingPlaceholder = _props3.loadingPlaceholder; var placeholder = _props3.placeholder; - var searchPromptText = _props3.searchPromptText; var _state = this.state; var isLoading = _state.isLoading; var options = _state.options; var props = { - noResultsText: isLoading ? loadingPlaceholder : searchPromptText, + noResultsText: this.noResultsText(), placeholder: isLoading ? loadingPlaceholder : placeholder, - options: isLoading ? [] : options + options: isLoading && loadingPlaceholder ? [] : options, + ref: function ref(_ref) { + return _this3.select = _ref; + }, + onChange: function onChange(newValues) { + if (_this3.props.multi && _this3.props.value && newValues.length > _this3.props.value.length) { + _this3.clearOptions(); + } + _this3.props.onChange(newValues); + } }; return children(_extends({}, this.props, props, { @@ -2797,9 +4790,9 @@ Async.defaultProps = defaultProps; function defaultChildren(props) { return _react2['default'].createElement(_Select2['default'], props); -}; +} module.exports = exports['default']; -},{"./Select":37,"./utils/stripDiacritics":42,"react":undefined}],34:[function(require,module,exports){ +},{"./Select":48,"./utils/stripDiacritics":54,"prop-types":37,"react":undefined}],45:[function(require,module,exports){ 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -2810,13 +4803,31 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react); +var _createReactClass = require('create-react-class'); + +var _createReactClass2 = _interopRequireDefault(_createReactClass); + var _Select = require('./Select'); var _Select2 = _interopRequireDefault(_Select); -var AsyncCreatable = _react2['default'].createClass({ +function reduce(obj) { + var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + return Object.keys(obj).reduce(function (props, key) { + var value = obj[key]; + if (value !== undefined) props[key] = value; + return props; + }, props); +} + +var AsyncCreatable = (0, _createReactClass2['default'])({ displayName: 'AsyncCreatableSelect', + focus: function focus() { + this.select.focus(); + }, + render: function render() { var _this = this; @@ -2828,10 +4839,15 @@ var AsyncCreatable = _react2['default'].createClass({ _Select2['default'].Creatable, _this.props, function (creatableProps) { - return _react2['default'].createElement(_Select2['default'], _extends({}, asyncProps, creatableProps, { + return _react2['default'].createElement(_Select2['default'], _extends({}, reduce(asyncProps, reduce(creatableProps, {})), { onInputChange: function (input) { creatableProps.onInputChange(input); return asyncProps.onInputChange(input); + }, + ref: function (ref) { + _this.select = ref; + creatableProps.ref(ref); + asyncProps.ref(ref); } })); } @@ -2842,7 +4858,7 @@ var AsyncCreatable = _react2['default'].createClass({ }); module.exports = AsyncCreatable; -},{"./Select":37,"react":undefined}],35:[function(require,module,exports){ +},{"./Select":48,"create-react-class":18,"react":undefined}],46:[function(require,module,exports){ 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -2855,6 +4871,14 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react); +var _createReactClass = require('create-react-class'); + +var _createReactClass2 = _interopRequireDefault(_createReactClass); + +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + var _Select = require('./Select'); var _Select2 = _interopRequireDefault(_Select); @@ -2867,43 +4891,52 @@ var _utilsDefaultMenuRenderer = require('./utils/defaultMenuRenderer'); var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer); -var Creatable = _react2['default'].createClass({ +var Creatable = (0, _createReactClass2['default'])({ displayName: 'CreatableSelect', propTypes: { // Child function responsible for creating the inner Select component // This component can be used to compose HOCs (eg Creatable and Async) // (props: Object): PropTypes.element - children: _react2['default'].PropTypes.func, + children: _propTypes2['default'].func, // See Select.propTypes.filterOptions - filterOptions: _react2['default'].PropTypes.any, + filterOptions: _propTypes2['default'].any, // Searches for any matching option within the set of options. // This function prevents duplicate options from being created. // ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean - isOptionUnique: _react2['default'].PropTypes.func, + isOptionUnique: _propTypes2['default'].func, // Determines if the current input text represents a valid option. // ({ label: string }): boolean - isValidNewOption: _react2['default'].PropTypes.func, + isValidNewOption: _propTypes2['default'].func, // See Select.propTypes.menuRenderer - menuRenderer: _react2['default'].PropTypes.any, + menuRenderer: _propTypes2['default'].any, // Factory to create new option. // ({ label: string, labelKey: string, valueKey: string }): Object - newOptionCreator: _react2['default'].PropTypes.func, + newOptionCreator: _propTypes2['default'].func, + + // input change handler: function (inputValue) {} + onInputChange: _propTypes2['default'].func, + + // input keyDown handler: function (event) {} + onInputKeyDown: _propTypes2['default'].func, + + // new option click handler: function (option) {} + onNewOptionClick: _propTypes2['default'].func, // See Select.propTypes.options - options: _react2['default'].PropTypes.array, + options: _propTypes2['default'].array, // Creates prompt/placeholder option text. // (filterText: string): string - promptTextCreator: _react2['default'].PropTypes.func, + promptTextCreator: _propTypes2['default'].func, // Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option. - shouldKeyDownEventCreateNewOption: _react2['default'].PropTypes.func + shouldKeyDownEventCreateNewOption: _propTypes2['default'].func }, // Default prop methods @@ -2931,6 +4964,7 @@ var Creatable = _react2['default'].createClass({ var _props = this.props; var isValidNewOption = _props.isValidNewOption; var newOptionCreator = _props.newOptionCreator; + var onNewOptionClick = _props.onNewOptionClick; var _props$options = _props.options; var options = _props$options === undefined ? [] : _props$options; var shouldKeyDownEventCreateNewOption = _props.shouldKeyDownEventCreateNewOption; @@ -2941,9 +4975,13 @@ var Creatable = _react2['default'].createClass({ // Don't add the same option twice. if (_isOptionUnique) { - options.unshift(option); + if (onNewOptionClick) { + onNewOptionClick(option); + } else { + options.unshift(option); - this.select.selectValue(option); + this.select.selectValue(option); + } } } }, @@ -3013,17 +5051,26 @@ var Creatable = _react2['default'].createClass({ var menuRenderer = this.props.menuRenderer; return menuRenderer(_extends({}, params, { - onSelect: this.onOptionSelect + onSelect: this.onOptionSelect, + selectValue: this.onOptionSelect })); }, onInputChange: function onInputChange(input) { + var onInputChange = this.props.onInputChange; + + if (onInputChange) { + onInputChange(input); + } + // This value may be needed in between Select mounts (when this.select is null) this.inputValue = input; }, onInputKeyDown: function onInputKeyDown(event) { - var shouldKeyDownEventCreateNewOption = this.props.shouldKeyDownEventCreateNewOption; + var _props3 = this.props; + var shouldKeyDownEventCreateNewOption = _props3.shouldKeyDownEventCreateNewOption; + var onInputKeyDown = _props3.onInputKeyDown; var focusedOption = this.select.getFocusedOption(); @@ -3032,6 +5079,8 @@ var Creatable = _react2['default'].createClass({ // Prevent decorated Select from doing anything additional with this keyDown event event.preventDefault(); + } else if (onInputKeyDown) { + onInputKeyDown(event); } }, @@ -3043,16 +5092,27 @@ var Creatable = _react2['default'].createClass({ } }, + focus: function focus() { + this.select.focus(); + }, + render: function render() { var _this = this; - var _props3 = this.props; - var _props3$children = _props3.children; - var children = _props3$children === undefined ? defaultChildren : _props3$children; - var newOptionCreator = _props3.newOptionCreator; - var shouldKeyDownEventCreateNewOption = _props3.shouldKeyDownEventCreateNewOption; + var _props4 = this.props; + var newOptionCreator = _props4.newOptionCreator; + var shouldKeyDownEventCreateNewOption = _props4.shouldKeyDownEventCreateNewOption; - var restProps = _objectWithoutProperties(_props3, ['children', 'newOptionCreator', 'shouldKeyDownEventCreateNewOption']); + var restProps = _objectWithoutProperties(_props4, ['newOptionCreator', 'shouldKeyDownEventCreateNewOption']); + + var children = this.props.children; + + // We can't use destructuring default values to set the children, + // because it won't apply work if `children` is null. A falsy check is + // more reliable in real world use-cases. + if (!children) { + children = defaultChildren; + } var props = _extends({}, restProps, { allowCreate: true, @@ -3127,7 +5187,7 @@ function shouldKeyDownEventCreateNewOption(_ref6) { }; module.exports = Creatable; -},{"./Select":37,"./utils/defaultFilterOptions":40,"./utils/defaultMenuRenderer":41,"react":undefined}],36:[function(require,module,exports){ +},{"./Select":48,"./utils/defaultFilterOptions":52,"./utils/defaultMenuRenderer":53,"create-react-class":18,"prop-types":37,"react":undefined}],47:[function(require,module,exports){ 'use strict'; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } @@ -3136,25 +5196,31 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react); +var _createReactClass = require('create-react-class'); + +var _createReactClass2 = _interopRequireDefault(_createReactClass); + +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames); -var Option = _react2['default'].createClass({ - displayName: 'Option', - +var Option = (0, _createReactClass2['default'])({ propTypes: { - children: _react2['default'].PropTypes.node, - className: _react2['default'].PropTypes.string, // className (based on mouse position) - instancePrefix: _react2['default'].PropTypes.string.isRequired, // unique prefix for the ids (used for aria) - isDisabled: _react2['default'].PropTypes.bool, // the option is disabled - isFocused: _react2['default'].PropTypes.bool, // the option is focused - isSelected: _react2['default'].PropTypes.bool, // the option is selected - onFocus: _react2['default'].PropTypes.func, // method to handle mouseEnter on option element - onSelect: _react2['default'].PropTypes.func, // method to handle click on option element - onUnfocus: _react2['default'].PropTypes.func, // method to handle mouseLeave on option element - option: _react2['default'].PropTypes.object.isRequired, // object that is base for that option - optionIndex: _react2['default'].PropTypes.number }, + children: _propTypes2['default'].node, + className: _propTypes2['default'].string, // className (based on mouse position) + instancePrefix: _propTypes2['default'].string.isRequired, // unique prefix for the ids (used for aria) + isDisabled: _propTypes2['default'].bool, // the option is disabled + isFocused: _propTypes2['default'].bool, // the option is focused + isSelected: _propTypes2['default'].bool, // the option is selected + onFocus: _propTypes2['default'].func, // method to handle mouseEnter on option element + onSelect: _propTypes2['default'].func, // method to handle click on option element + onUnfocus: _propTypes2['default'].func, // method to handle mouseLeave on option element + option: _propTypes2['default'].object.isRequired, // object that is base for that option + optionIndex: _propTypes2['default'].number }, // index of the option, used to generate unique ids for aria blockEvent: function blockEvent(event) { event.preventDefault(); @@ -3239,7 +5305,7 @@ var Option = _react2['default'].createClass({ }); module.exports = Option; -},{"classnames":undefined,"react":undefined}],37:[function(require,module,exports){ +},{"classnames":undefined,"create-react-class":18,"prop-types":37,"react":undefined}],48:[function(require,module,exports){ /*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see @@ -3264,6 +5330,14 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react); +var _createReactClass = require('create-react-class'); + +var _createReactClass2 = _interopRequireDefault(_createReactClass); + +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + var _reactDom = require('react-dom'); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -3288,6 +5362,10 @@ var _utilsDefaultMenuRenderer = require('./utils/defaultMenuRenderer'); var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer); +var _utilsDefaultClearRenderer = require('./utils/defaultClearRenderer'); + +var _utilsDefaultClearRenderer2 = _interopRequireDefault(_utilsDefaultClearRenderer); + var _Async = require('./Async'); var _Async2 = _interopRequireDefault(_Async); @@ -3321,82 +5399,85 @@ function stringifyValue(value) { } } -var stringOrNode = _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.node]); +var stringOrNode = _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].node]); var instanceId = 1; -var Select = _react2['default'].createClass({ +var Select = (0, _createReactClass2['default'])({ displayName: 'Select', propTypes: { - addLabelText: _react2['default'].PropTypes.string, // placeholder displayed when you want to add a label on a multi-value input - 'aria-label': _react2['default'].PropTypes.string, // Aria label (for assistive tech) - 'aria-labelledby': _react2['default'].PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech) - arrowRenderer: _react2['default'].PropTypes.func, // Create drop-down caret element - autoBlur: _react2['default'].PropTypes.bool, // automatically blur the component when an option is selected - autofocus: _react2['default'].PropTypes.bool, // autofocus the component on mount - autosize: _react2['default'].PropTypes.bool, // whether to enable autosizing or not - backspaceRemoves: _react2['default'].PropTypes.bool, // whether backspace removes an item if there is no text input - backspaceToRemoveMessage: _react2['default'].PropTypes.string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label - className: _react2['default'].PropTypes.string, // className for the outer element + addLabelText: _propTypes2['default'].string, // placeholder displayed when you want to add a label on a multi-value input + 'aria-describedby': _propTypes2['default'].string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech) + 'aria-label': _propTypes2['default'].string, // Aria label (for assistive tech) + 'aria-labelledby': _propTypes2['default'].string, // HTML ID of an element that should be used as the label (for assistive tech) + arrowRenderer: _propTypes2['default'].func, // Create drop-down caret element + autoBlur: _propTypes2['default'].bool, // automatically blur the component when an option is selected + autofocus: _propTypes2['default'].bool, // autofocus the component on mount + autosize: _propTypes2['default'].bool, // whether to enable autosizing or not + backspaceRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input + backspaceToRemoveMessage: _propTypes2['default'].string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label + className: _propTypes2['default'].string, // className for the outer element clearAllText: stringOrNode, // title for the "clear" control when multi: true + clearRenderer: _propTypes2['default'].func, // create clearable x element clearValueText: stringOrNode, // title for the "clear" control - clearable: _react2['default'].PropTypes.bool, // should it be possible to reset value - delimiter: _react2['default'].PropTypes.string, // delimiter to use to join multiple values for the hidden field value - disabled: _react2['default'].PropTypes.bool, // whether the Select is disabled or not - escapeClearsValue: _react2['default'].PropTypes.bool, // whether escape clears the value when the menu is closed - filterOption: _react2['default'].PropTypes.func, // method to filter a single option (option, filterString) - filterOptions: _react2['default'].PropTypes.any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values]) - ignoreAccents: _react2['default'].PropTypes.bool, // whether to strip diacritics when filtering - ignoreCase: _react2['default'].PropTypes.bool, // whether to perform case-insensitive filtering - inputProps: _react2['default'].PropTypes.object, // custom attributes for the Input - inputRenderer: _react2['default'].PropTypes.func, // returns a custom input component - instanceId: _react2['default'].PropTypes.string, // set the components instanceId - isLoading: _react2['default'].PropTypes.bool, // whether the Select is loading externally or not (such as options being loaded) - joinValues: _react2['default'].PropTypes.bool, // joins multiple values into a single form field with the delimiter (legacy mode) - labelKey: _react2['default'].PropTypes.string, // path of the label value in option objects - matchPos: _react2['default'].PropTypes.string, // (any|start) match the start or entire string when filtering - matchProp: _react2['default'].PropTypes.string, // (any|label|value) which option property to filter on - menuBuffer: _react2['default'].PropTypes.number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu - menuContainerStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu container - menuRenderer: _react2['default'].PropTypes.func, // renders a custom menu with options - menuStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu - multi: _react2['default'].PropTypes.bool, // multi-value input - name: _react2['default'].PropTypes.string, // generates a hidden tag with this field name for html forms + clearable: _propTypes2['default'].bool, // should it be possible to reset value + deleteRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input + delimiter: _propTypes2['default'].string, // delimiter to use to join multiple values for the hidden field value + disabled: _propTypes2['default'].bool, // whether the Select is disabled or not + escapeClearsValue: _propTypes2['default'].bool, // whether escape clears the value when the menu is closed + filterOption: _propTypes2['default'].func, // method to filter a single option (option, filterString) + filterOptions: _propTypes2['default'].any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values]) + ignoreAccents: _propTypes2['default'].bool, // whether to strip diacritics when filtering + ignoreCase: _propTypes2['default'].bool, // whether to perform case-insensitive filtering + inputProps: _propTypes2['default'].object, // custom attributes for the Input + inputRenderer: _propTypes2['default'].func, // returns a custom input component + instanceId: _propTypes2['default'].string, // set the components instanceId + isLoading: _propTypes2['default'].bool, // whether the Select is loading externally or not (such as options being loaded) + joinValues: _propTypes2['default'].bool, // joins multiple values into a single form field with the delimiter (legacy mode) + labelKey: _propTypes2['default'].string, // path of the label value in option objects + matchPos: _propTypes2['default'].string, // (any|start) match the start or entire string when filtering + matchProp: _propTypes2['default'].string, // (any|label|value) which option property to filter on + menuBuffer: _propTypes2['default'].number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu + menuContainerStyle: _propTypes2['default'].object, // optional style to apply to the menu container + menuRenderer: _propTypes2['default'].func, // renders a custom menu with options + menuStyle: _propTypes2['default'].object, // optional style to apply to the menu + multi: _propTypes2['default'].bool, // multi-value input + name: _propTypes2['default'].string, // generates a hidden tag with this field name for html forms noResultsText: stringOrNode, // placeholder displayed when there are no matching search results - onBlur: _react2['default'].PropTypes.func, // onBlur handler: function (event) {} - onBlurResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared on blur - onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {} - onClose: _react2['default'].PropTypes.func, // fires when the menu is closed - onCloseResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared when menu is closed through the arrow - onFocus: _react2['default'].PropTypes.func, // onFocus handler: function (event) {} - onInputChange: _react2['default'].PropTypes.func, // onInputChange handler: function (inputValue) {} - onInputKeyDown: _react2['default'].PropTypes.func, // input keyDown handler: function (event) {} - onMenuScrollToBottom: _react2['default'].PropTypes.func, // fires when the menu is scrolled to the bottom; can be used to paginate options - onOpen: _react2['default'].PropTypes.func, // fires when the menu is opened - onValueClick: _react2['default'].PropTypes.func, // onClick handler for value labels: function (value, event) {} - openAfterFocus: _react2['default'].PropTypes.bool, // boolean to enable opening dropdown when focused - openOnFocus: _react2['default'].PropTypes.bool, // always open options menu on focus - optionClassName: _react2['default'].PropTypes.string, // additional class(es) to apply to the
; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', -var _hyphenPattern = /-(.)/g; + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', -/** - * Camelcases a hyphenated string, for example: - * - * > camelize('background-color') - * < "backgroundColor" - * - * @param {string} string - * @return {string} - */ -function camelize(string) { - return string.replace(_hyphenPattern, function (_, character) { - return character.toUpperCase(); - }); -} + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', -module.exports = camelize; -},{}],4:[function(require,module,exports){ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks - */ + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', -'use strict'; + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', -var camelize = require('./camelize'); + // ==== Definition methods ==== -var msPattern = /^-ms-/; + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', -/** - * Camelcases a hyphenated CSS property name, for example: - * - * > camelizeStyleName('background-color') - * < "backgroundColor" - * > camelizeStyleName('-moz-transition') - * < "MozTransition" - * > camelizeStyleName('-ms-transition') - * < "msTransition" - * - * As Andi Smith suggests - * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix - * is converted to lowercase `ms`. - * - * @param {string} string - * @return {string} - */ -function camelizeStyleName(string) { - return camelize(string.replace(msPattern, 'ms-')); -} + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', -module.exports = camelizeStyleName; -},{"./camelize":3}],5:[function(require,module,exports){ -'use strict'; + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return
Hello, {name}!
; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', -var isTextNode = require('./isTextNode'); + // ==== Delegate methods ==== -/*eslint-disable no-bitwise */ + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', -/** - * Checks if a given DOM node contains or is another DOM node. - */ -function containsNode(outerNode, innerNode) { - if (!outerNode || !innerNode) { - return false; - } else if (outerNode === innerNode) { - return true; - } else if (isTextNode(outerNode)) { - return false; - } else if (isTextNode(innerNode)) { - return containsNode(outerNode, innerNode.parentNode); - } else if ('contains' in outerNode) { - return outerNode.contains(innerNode); - } else if (outerNode.compareDocumentPosition) { - return !!(outerNode.compareDocumentPosition(innerNode) & 16); - } else { - return false; - } -} + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', -module.exports = containsNode; -},{"./isTextNode":18}],6:[function(require,module,exports){ -'use strict'; + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks - */ + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', -var invariant = require('./invariant'); + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', -/** - * Convert array-like objects to arrays. - * - * This API assumes the caller knows the contents of the data type. For less - * well defined inputs use createArrayFromMixed. - * - * @param {object|function|filelist} obj - * @return {array} - */ -function toArray(obj) { - var length = obj.length; + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', - // Some browsers builtin objects can report typeof 'function' (e.g. NodeList - // in old versions of Safari). - !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? "production" !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', - !(typeof length === 'number') ? "production" !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; + // ==== Advanced methods ==== - !(length === 0 || length - 1 in obj) ? "production" !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + }; - !(typeof obj.callee !== 'function') ? "production" !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function(Constructor, childContextTypes) { + if ("production" !== 'production') { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if ("production" !== 'production') { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if ("production" !== 'production') { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }; - // Old IE doesn't give collections access to hasOwnProperty. Assume inputs - // without method will throw during the slice call and skip straight to the - // fallback. - if (obj.hasOwnProperty) { - try { - return Array.prototype.slice.call(obj); - } catch (e) { - // IE < 9 does not support Array#slice on collections objects + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if ("production" !== 'production') { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ); + } + } } } - // Fall back to copying key by key. This assumes all keys have a value, - // so will not preserve sparsely populated inputs. - var ret = Array(length); - for (var ii = 0; ii < length; ii++) { - ret[ii] = obj[ii]; - } - return ret; -} + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; -/** - * Perform a heuristic test to determine if an object is "array-like". - * - * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" - * Joshu replied: "Mu." - * - * This function determines if its argument has "array nature": it returns - * true if the argument is an actual array, an `arguments' object, or an - * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). - * - * It will return false for other array-like objects like Filelist. - * - * @param {*} obj - * @return {boolean} - */ -function hasArrayNature(obj) { - return ( - // not null/false - !!obj && ( - // arrays are objects, NodeLists are functions in Safari - typeof obj == 'object' || typeof obj == 'function') && - // quacks like an array - 'length' in obj && - // not window - !('setInterval' in obj) && - // no DOM node should be considered an array-like - // a 'select' element has 'length' and 'item' properties on IE8 - typeof obj.nodeType != 'number' && ( - // a real array - Array.isArray(obj) || - // arguments - 'callee' in obj || - // HTMLCollection/NodeList - 'item' in obj) - ); -} + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ); + } -/** - * Ensure that the argument is an array by wrapping it in an array if it is not. - * Creates a copy of the argument if it is already an array. - * - * This is mostly useful idiomatically: - * - * var createArrayFromMixed = require('createArrayFromMixed'); - * - * function takesOneOrMoreThings(things) { - * things = createArrayFromMixed(things); - * ... - * } - * - * This allows you to treat `things' as an array, but accept scalars in the API. - * - * If you need to convert an array-like object, like `arguments`, into an array - * use toArray instead. - * - * @param {*} obj - * @return {array} - */ -function createArrayFromMixed(obj) { - if (!hasArrayNature(obj)) { - return [obj]; - } else if (Array.isArray(obj)) { - return obj.slice(); - } else { - return toArray(obj); + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ); + } } -} - -module.exports = createArrayFromMixed; -},{"./invariant":16}],7:[function(require,module,exports){ -'use strict'; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks - */ + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if ("production" !== 'production') { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; -/*eslint-disable fb-www/unsafe-html*/ + if ("production" !== 'production') { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec + ); + } + } -var ExecutionEnvironment = require('./ExecutionEnvironment'); + return; + } -var createArrayFromMixed = require('./createArrayFromMixed'); -var getMarkupWrap = require('./getMarkupWrap'); -var invariant = require('./invariant'); + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.' + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.' + ); -/** - * Dummy container used to render all markup. - */ -var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; -/** - * Pattern used by `getNodeName`. - */ -var nodeNamePattern = /^\s*<(\w+)/; + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } -/** - * Extracts the `nodeName` of the first element in a string of markup. - * - * @param {string} markup String of markup. - * @return {?string} Node name of the supplied markup. - */ -function getNodeName(markup) { - var nodeNameMatch = markup.match(nodeNamePattern); - return nodeNameMatch && nodeNameMatch[1].toLowerCase(); -} + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } -/** - * Creates an array containing the nodes rendered from the supplied markup. The - * optionally supplied `handleScript` function will be invoked once for each - *