\n );\n }\n return this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n\nconst container = {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column'\n};\n\nconst whiteKingStyle = {\n width: 250,\n height: 250,\n transform: `rotate(90deg)`\n};\n","import React, { Component } from 'react';\nimport Board from './Board';\nimport PropTypes from 'prop-types';\nimport isEqual from 'lodash.isequal';\nimport { DragDropContext } from 'react-dnd';\nimport MultiBackend from 'react-dnd-multi-backend';\nimport HTML5toTouch from 'react-dnd-multi-backend/lib/HTML5toTouch';\n\nimport SparePieces from './SparePieces';\nimport {\n fenToObj,\n validFen,\n validPositionObject,\n constructPositionAttributes\n} from './helpers';\nimport CustomDragLayer from './CustomDragLayer';\nimport defaultPieces from './svg/chesspieces/standard';\nimport ErrorBoundary from './ErrorBoundary';\n\nconst ChessboardContext = React.createContext();\n\nconst getPositionObject = position => {\n if (position === 'start')\n return fenToObj('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR');\n if (validFen(position)) return fenToObj(position);\n if (validPositionObject(position)) return position;\n\n return {};\n};\n\nclass Chessboard extends Component {\n static propTypes = {\n /**\n * The id prop is necessary if more than one board is mounted.\n * Drag and drop will not work as expected if not provided.\n */\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n /**\n * The position to display on the board. Can be either a FEN string or a position object.\n * See https://www.chessboardjsx.com/basics/fen and https://www.chessboardjsx.com/basics/position-object\n * for examples.\n */\n position: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n /**\n * An object with functions returning jsx as values(render prop).\n * See https://www.chessboardjsx.com/custom\n * Signature: { wK:\n * function({ isDragging, squareWidth, droppedPiece, targetSquare, sourceSquare }) => jsx }\n */\n pieces: PropTypes.object,\n /**\n * The width in pixels. For a responsive width, use calcWidth.\n */\n width: PropTypes.number,\n /**\n * Orientation of the board.\n */\n orientation: PropTypes.oneOf(['white', 'black']),\n /**\n * If false, notation will not be shown on the board.\n */\n showNotation: PropTypes.bool,\n /**\n * If true, spare pieces will appear above and below the board.\n */\n sparePieces: PropTypes.bool,\n /**\n * If false, the pieces will not be draggable\n */\n draggable: PropTypes.bool,\n /**\n * The behavior of the piece when dropped off the board. 'snapback' brings the piece\n * back to it's original square and 'trash' deletes the piece from the board\n */\n dropOffBoard: PropTypes.oneOf(['snapback', 'trash']),\n /**\n * The time it takes for a piece to slide to the target square. Only used\n * when the next position comes from the position prop. See chessboardjsx.com/integrations/random for an example\n */\n transitionDuration: PropTypes.number,\n /**\n * The style object for the board.\n */\n boardStyle: PropTypes.object,\n /**\n * The style object for the light square.\n */\n lightSquareStyle: PropTypes.object,\n /**\n * The style object for the dark square.\n */\n darkSquareStyle: PropTypes.object,\n /**\n * An object containing custom styles for squares. For example {'e4': {backgroundColor: 'orange'},\n * 'd4': {backgroundColor: 'blue'}}. See chessboardjsx.com/integrations/move-validation for an example\n */\n squareStyles: PropTypes.object,\n /**\n * The style object for the current drop square. { backgroundColor: 'sienna' }\n */\n dropSquareStyle: PropTypes.object,\n /**\n * A function for responsive size control, returns the width of the board.\n *\n * Signature: function({ screenWidth: number, screenHeight: number }) => number\n */\n calcWidth: PropTypes.func,\n /**\n * A function that gives access to the underlying square element. It\n * allows for customizations with rough.js. See chessboardjsx.com/custom for an\n * example.\n *\n * Signature: function({ squareElement: node, squareWidth: number }) => void\n */\n roughSquare: PropTypes.func,\n /**\n * A function to call when the mouse is over a square.\n * See chessboardjsx.com/integrations/move-validation for an example.\n *\n * Signature: function(square: string) => void\n */\n onMouseOverSquare: PropTypes.func,\n /**\n * A function to call when the mouse has left the square.\n * See chessboardjsx.com/integrations/move-validation for an example.\n *\n * Signature: function(square: string) => void\n */\n onMouseOutSquare: PropTypes.func,\n /**\n * The logic to be performed on piece drop. See chessboardjsx.com/integrations for examples.\n *\n * Signature: function({ sourceSquare: string, targetSquare: string, piece: string }) => void\n */\n onDrop: PropTypes.func,\n /**\n * A function that gives access to the current position object.\n * For example, getPosition = position => this.setState({ myPosition: position }).\n *\n * Signature: function(currentPosition: object) => void\n */\n getPosition: PropTypes.func,\n /**\n * A function to call when a piece is dragged over a specific square.\n *\n * Signature: function(square: string) => void\n */\n onDragOverSquare: PropTypes.func,\n /**\n * A function to call when a square is clicked.\n *\n * Signature: function(square: string) => void\n */\n onSquareClick: PropTypes.func,\n /**\n * A function to call when a piece is clicked.\n *\n * Signature: function(piece: string) => void\n */\n onPieceClick: PropTypes.func,\n /**\n * A function to call when a square is right clicked.\n *\n * Signature: function(square: string) => void\n */\n onSquareRightClick: PropTypes.func,\n /**\n * A function to call when a piece drag is initiated. Returns true if the piece is draggable,\n * false if not.\n *\n * Signature: function( { piece: string, sourceSquare: string } ) => bool\n */\n allowDrag: PropTypes.func,\n /**\n When set to true it undos previous move\n */\n undo: PropTypes.bool\n };\n\n static defaultProps = {\n id: '0',\n position: '',\n pieces: {},\n width: 560,\n orientation: 'white',\n showNotation: true,\n sparePieces: false,\n draggable: true,\n undo: false,\n dropOffBoard: 'snapback',\n transitionDuration: 300,\n boardStyle: {},\n lightSquareStyle: { backgroundColor: 'rgb(240, 217, 181)' },\n darkSquareStyle: { backgroundColor: 'rgb(181, 136, 99)' },\n squareStyles: {},\n dropSquareStyle: { boxShadow: 'inset 0 0 1px 4px yellow' },\n calcWidth: () => {},\n roughSquare: () => {},\n onMouseOverSquare: () => {},\n onMouseOutSquare: () => {},\n onDrop: () => {},\n getPosition: () => {},\n onDragOverSquare: () => {},\n onSquareClick: () => {},\n onPieceClick: () => {},\n onSquareRightClick: () => {},\n allowDrag: () => true\n };\n\n static Consumer = ChessboardContext.Consumer;\n\n state = {\n previousPositionFromProps: getPositionObject(this.props.position),\n currentPosition: getPositionObject(this.props.position),\n sourceSquare: '',\n targetSquare: '',\n sourcePiece: '',\n waitForTransition: false,\n phantomPiece: null,\n wasPieceTouched: false,\n manualDrop: false,\n squareClicked: false,\n firstMove: false,\n pieces: { ...defaultPieces, ...this.props.pieces },\n undoMove: this.props.undo\n };\n\n componentDidMount() {\n this.updateWindowDimensions();\n window.addEventListener('resize', this.updateWindowDimensions);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.updateWindowDimensions);\n }\n\n updateWindowDimensions = () => {\n this.setState({\n screenWidth: window.innerWidth,\n screenHeight: window.innerHeight\n });\n };\n\n componentDidUpdate(prevProps) {\n const { position, transitionDuration, getPosition } = this.props;\n const { waitForTransition, undoMove } = this.state;\n const positionFromProps = getPositionObject(position);\n const previousPositionFromProps = getPositionObject(prevProps.position);\n\n // Check if there is a new position coming from props or undo is called\n if (!isEqual(positionFromProps, previousPositionFromProps) || undoMove) {\n this.setState({\n previousPositionFromProps: previousPositionFromProps,\n undoMove: false\n });\n\n // get board position for user\n getPosition(positionFromProps);\n\n // Give piece time to transition.\n if (waitForTransition) {\n return new Promise(resolve => {\n this.setState({ currentPosition: positionFromProps }, () =>\n setTimeout(() => {\n this.setState({ waitForTransition: false });\n resolve();\n }, transitionDuration)\n );\n }).then(() =>\n setTimeout(\n () => this.setState({ phantomPiece: null }),\n transitionDuration\n )\n );\n }\n }\n }\n\n static getDerivedStateFromProps(props, state) {\n const { position, undo } = props;\n const {\n currentPosition,\n previousPositionFromProps,\n manualDrop,\n squareClicked\n } = state;\n let positionFromProps = getPositionObject(position);\n\n // If positionFromProps is a new position then execute, else return null\n if (\n !isEqual(positionFromProps, previousPositionFromProps) &&\n !isEqual(positionFromProps, currentPosition)\n ) {\n // Position attributes from the diff between currentPosition and positionFromProps\n const {\n sourceSquare,\n targetSquare,\n sourcePiece,\n squaresAffected\n } = constructPositionAttributes(currentPosition, positionFromProps);\n\n if (manualDrop) {\n return {\n sourceSquare,\n targetSquare,\n sourcePiece,\n currentPosition: positionFromProps,\n waitForTransition: false,\n manualDrop: false\n };\n }\n\n /* If the new position involves many pieces, then disregard the transition effect.\n Possible to add functionality for transitioning of multiple pieces later */\n if (squaresAffected && squaresAffected !== 2) {\n return {\n currentPosition: positionFromProps,\n waitForTransition: false,\n manualDrop: false,\n sourceSquare,\n targetSquare,\n sourcePiece\n };\n }\n\n // Check if currentPosition has a piece occupying the target square\n if (currentPosition[targetSquare]) {\n // Temporarily delete the target square from the new position\n delete positionFromProps[targetSquare];\n\n return {\n sourceSquare,\n targetSquare,\n sourcePiece,\n // Set the current position to the new position minus the targetSquare\n currentPosition: positionFromProps,\n waitForTransition: squareClicked ? false : true,\n phantomPiece: squareClicked\n ? null\n : { [targetSquare]: currentPosition[targetSquare] },\n manualDrop: false,\n squareClicked: false\n };\n }\n\n // allows for taking back a move\n if (undo) {\n return {\n sourceSquare,\n targetSquare,\n sourcePiece,\n currentPosition: positionFromProps,\n waitForTransition: true,\n manualDrop: false,\n squareClicked: false,\n undoMove: true\n };\n }\n\n return {\n sourceSquare,\n targetSquare,\n sourcePiece,\n currentPosition: positionFromProps,\n waitForTransition: squareClicked ? false : true,\n manualDrop: false,\n squareClicked: false\n };\n }\n\n // default case\n return null;\n }\n\n wasManuallyDropped = bool => this.setState({ manualDrop: bool });\n wasSquareClicked = bool => this.setState({ squareClicked: bool });\n\n /* Called on drop if there is no onDrop prop. This is what executes when a position does not\n change through the position prop, i.e., simple drag and drop operations on the pieces.*/\n setPosition = ({ sourceSquare, targetSquare, piece }) => {\n const { currentPosition } = this.state;\n const { getPosition, dropOffBoard } = this.props;\n\n if (sourceSquare === targetSquare) return;\n\n if (dropOffBoard === 'trash' && !targetSquare) {\n let newPosition = currentPosition;\n delete newPosition[sourceSquare];\n this.setState({ currentPosition: newPosition, manualDrop: true });\n // get board position for user\n return getPosition(currentPosition);\n }\n\n let newPosition = currentPosition;\n sourceSquare !== 'spare' && delete newPosition[sourceSquare];\n newPosition[targetSquare] = piece;\n\n this.setState({ currentPosition: newPosition, manualDrop: true });\n // get board position for user\n getPosition(currentPosition);\n };\n\n // Allows for touch drag and drop\n setTouchState = e => this.setState({ wasPieceTouched: e.isTrusted });\n\n getWidth = () => {\n const { calcWidth, width } = this.props;\n const { screenWidth, screenHeight } = this.state;\n return calcWidth({ screenWidth, screenHeight })\n ? calcWidth({ screenWidth, screenHeight })\n : width;\n };\n\n render() {\n const { sparePieces, id, orientation, dropOffBoard } = this.props;\n const {\n sourceSquare,\n targetSquare,\n sourcePiece,\n waitForTransition,\n phantomPiece,\n wasPieceTouched,\n currentPosition,\n manualDrop,\n screenWidth,\n screenHeight,\n pieces\n } = this.state;\n\n const getScreenDimensions = screenWidth && screenHeight;\n\n return (\n \n \n
\n \n \n \n );\n }\n}\n\nexport default DragDropContext(MultiBackend(HTML5toTouch))(Chessboard);\n","/**\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TouchBackend = undefined;\n\nvar _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; };\n\nvar _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; }; }();\n\nexports.default = createTouchBackend;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getEventClientTouchOffset(e) {\n if (e.targetTouches.length === 1) {\n return getEventClientOffset(e.targetTouches[0]);\n }\n}\n\nfunction getEventClientOffset(e) {\n if (e.targetTouches) {\n return getEventClientTouchOffset(e);\n } else {\n return {\n x: e.clientX,\n y: e.clientY\n };\n }\n}\n\n// Used for MouseEvent.buttons (note the s on the end).\nvar MouseButtons = {\n Left: 1,\n Right: 2,\n Center: 4\n\n // Used for e.button (note the lack of an s on the end).\n};var MouseButton = {\n Left: 0,\n Center: 1,\n Right: 2\n\n /**\n * Only touch events and mouse events where the left button is pressed should initiate a drag.\n * @param {MouseEvent | TouchEvent} e The event\n */\n};function eventShouldStartDrag(e) {\n // For touch events, button will be undefined. If e.button is defined,\n // then it should be MouseButton.Left.\n return e.button === undefined || e.button === MouseButton.Left;\n}\n\n/**\n * Only touch events and mouse events where the left mouse button is no longer held should end a drag.\n * It's possible the user mouse downs with the left mouse button, then mouse down and ups with the right mouse button.\n * We don't want releasing the right mouse button to end the drag.\n * @param {MouseEvent | TouchEvent} e The event\n */\nfunction eventShouldEndDrag(e) {\n // Touch events will have buttons be undefined, while mouse events will have e.buttons's left button\n // bit field unset if the left mouse button has been released\n return e.buttons === undefined || (e.buttons & MouseButtons.Left) === 0;\n}\n\n// Polyfill for document.elementsFromPoint\nvar elementsFromPoint = (typeof document !== 'undefined' && document.elementsFromPoint || function (x, y) {\n\n if (document.msElementsFromPoint) {\n // msElementsFromPoint is much faster but returns a node-list, so convert it to an array\n var msElements = document.msElementsFromPoint(x, y);\n return msElements && Array.prototype.slice.call(msElements, 0);\n }\n\n var elements = [],\n previousPointerEvents = [],\n current,\n i,\n d;\n\n // get all elements via elementFromPoint, and remove them from hit-testing in order\n while ((current = document.elementFromPoint(x, y)) && elements.indexOf(current) === -1 && current !== null) {\n\n // push the element and its current style\n elements.push(current);\n previousPointerEvents.push({\n value: current.style.getPropertyValue('pointer-events'),\n priority: current.style.getPropertyPriority('pointer-events')\n });\n\n // add \"pointer-events: none\", to get to the underlying element\n current.style.setProperty('pointer-events', 'none', 'important');\n }\n\n // restore the previous pointer-events values\n for (i = previousPointerEvents.length; d = previousPointerEvents[--i];) {\n elements[i].style.setProperty('pointer-events', d.value ? d.value : '', d.priority);\n }\n\n // return our results\n return elements;\n}).bind(typeof document !== 'undefined' ? document : null);\n\nvar supportsPassive = function () {\n // simular to jQuery's test\n var supported = false;\n try {\n addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: function get() {\n supported = true;\n }\n }));\n } catch (e) {}\n return supported;\n}();\n\nvar ELEMENT_NODE = 1;\nfunction getNodeClientOffset(node) {\n var el = node.nodeType === ELEMENT_NODE ? node : node.parentElement;\n\n if (!el) {\n return null;\n }\n\n var _el$getBoundingClient = el.getBoundingClientRect(),\n top = _el$getBoundingClient.top,\n left = _el$getBoundingClient.left;\n\n return { x: left, y: top };\n}\n\nvar eventNames = {\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n end: 'mouseup',\n contextmenu: 'contextmenu'\n },\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n end: 'touchend'\n },\n keyboard: {\n keydown: 'keydown'\n }\n};\n\nvar TouchBackend = exports.TouchBackend = function () {\n function TouchBackend(manager) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, TouchBackend);\n\n options.delayTouchStart = options.delayTouchStart || options.delay;\n\n options = _extends({\n enableTouchEvents: true,\n enableMouseEvents: false,\n enableKeyboardEvents: false,\n ignoreContextMenu: false,\n delayTouchStart: 0,\n delayMouseStart: 0,\n touchSlop: 0\n }, options);\n\n this.actions = manager.getActions();\n this.monitor = manager.getMonitor();\n this.registry = manager.getRegistry();\n\n this.enableKeyboardEvents = options.enableKeyboardEvents;\n this.enableMouseEvents = options.enableMouseEvents;\n this.delayTouchStart = options.delayTouchStart;\n this.delayMouseStart = options.delayMouseStart;\n this.ignoreContextMenu = options.ignoreContextMenu;\n this.touchSlop = options.touchSlop;\n this.sourceNodes = {};\n this.sourceNodeOptions = {};\n this.sourcePreviewNodes = {};\n this.sourcePreviewNodeOptions = {};\n this.targetNodes = {};\n this.targetNodeOptions = {};\n this.listenerTypes = [];\n this._mouseClientOffset = {};\n\n if (options.enableMouseEvents) {\n this.listenerTypes.push('mouse');\n }\n\n if (options.enableTouchEvents) {\n this.listenerTypes.push('touch');\n }\n\n if (options.enableKeyboardEvents) {\n this.listenerTypes.push('keyboard');\n }\n\n this.getSourceClientOffset = this.getSourceClientOffset.bind(this);\n this.handleTopMoveStart = this.handleTopMoveStart.bind(this);\n this.handleTopMoveStartDelay = this.handleTopMoveStartDelay.bind(this);\n this.handleTopMoveStartCapture = this.handleTopMoveStartCapture.bind(this);\n this.handleTopMoveCapture = this.handleTopMoveCapture.bind(this);\n this.handleTopMove = this.handleTopMove.bind(this);\n this.handleTopMoveEndCapture = this.handleTopMoveEndCapture.bind(this);\n this.handleCancelOnEscape = this.handleCancelOnEscape.bind(this);\n }\n\n _createClass(TouchBackend, [{\n key: 'setup',\n value: function setup() {\n if (typeof window === 'undefined') {\n return;\n }\n\n (0, _invariant2.default)(!this.constructor.isSetUp, 'Cannot have two Touch backends at the same time.');\n this.constructor.isSetUp = true;\n\n this.addEventListener(window, 'start', this.getTopMoveStartHandler());\n this.addEventListener(window, 'start', this.handleTopMoveStartCapture, true);\n this.addEventListener(window, 'move', this.handleTopMove);\n this.addEventListener(window, 'move', this.handleTopMoveCapture, true);\n this.addEventListener(window, 'end', this.handleTopMoveEndCapture, true);\n\n if (this.enableMouseEvents && !this.ignoreContextMenu) {\n this.addEventListener(window, 'contextmenu', this.handleTopMoveEndCapture);\n }\n\n if (this.enableKeyboardEvents) {\n this.addEventListener(window, 'keydown', this.handleCancelOnEscape, true);\n }\n }\n }, {\n key: 'teardown',\n value: function teardown() {\n if (typeof window === 'undefined') {\n return;\n }\n\n this.constructor.isSetUp = false;\n this._mouseClientOffset = {};\n\n this.removeEventListener(window, 'start', this.handleTopMoveStartCapture, true);\n this.removeEventListener(window, 'start', this.handleTopMoveStart);\n this.removeEventListener(window, 'move', this.handleTopMoveCapture, true);\n this.removeEventListener(window, 'move', this.handleTopMove);\n this.removeEventListener(window, 'end', this.handleTopMoveEndCapture, true);\n\n if (this.enableMouseEvents && !this.ignoreContextMenu) {\n this.removeEventListener(window, 'contextmenu', this.handleTopMoveEndCapture);\n }\n\n if (this.enableKeyboardEvents) {\n this.removeEventListener(window, 'keydown', this.handleCancelOnEscape, true);\n }\n\n this.uninstallSourceNodeRemovalObserver();\n }\n }, {\n key: 'addEventListener',\n value: function addEventListener(subject, event, handler, capture) {\n var options = supportsPassive ? { capture: capture, passive: false } : capture;\n\n this.listenerTypes.forEach(function (listenerType) {\n var evt = eventNames[listenerType][event];\n\n if (evt) {\n subject.addEventListener(evt, handler, options);\n }\n });\n }\n }, {\n key: 'removeEventListener',\n value: function removeEventListener(subject, event, handler, capture) {\n var options = supportsPassive ? { capture: capture, passive: false } : capture;\n\n this.listenerTypes.forEach(function (listenerType) {\n var evt = eventNames[listenerType][event];\n\n if (evt) {\n subject.removeEventListener(evt, handler, options);\n }\n });\n }\n }, {\n key: 'connectDragSource',\n value: function connectDragSource(sourceId, node, options) {\n var _this = this;\n\n var handleMoveStart = this.handleMoveStart.bind(this, sourceId);\n this.sourceNodes[sourceId] = node;\n\n this.addEventListener(node, 'start', handleMoveStart);\n\n return function () {\n delete _this.sourceNodes[sourceId];\n _this.removeEventListener(node, 'start', handleMoveStart);\n };\n }\n }, {\n key: 'connectDragPreview',\n value: function connectDragPreview(sourceId, node, options) {\n var _this2 = this;\n\n this.sourcePreviewNodeOptions[sourceId] = options;\n this.sourcePreviewNodes[sourceId] = node;\n\n return function () {\n delete _this2.sourcePreviewNodes[sourceId];\n delete _this2.sourcePreviewNodeOptions[sourceId];\n };\n }\n }, {\n key: 'connectDropTarget',\n value: function connectDropTarget(targetId, node) {\n var _this3 = this;\n\n var handleMove = function handleMove(e) {\n var coords = void 0;\n\n if (!_this3.monitor.isDragging()) {\n return;\n }\n\n /**\n * Grab the coordinates for the current mouse/touch position\n */\n switch (e.type) {\n case eventNames.mouse.move:\n coords = { x: e.clientX, y: e.clientY };\n break;\n\n case eventNames.touch.move:\n coords = { x: e.touches[0].clientX, y: e.touches[0].clientY };\n break;\n }\n\n /**\n * Use the coordinates to grab the element the drag ended on.\n * If the element is the same as the target node (or any of it's children) then we have hit a drop target and can handle the move.\n */\n var droppedOn = document.elementFromPoint(coords.x, coords.y);\n var childMatch = node.contains(droppedOn);\n\n if (droppedOn === node || childMatch) {\n return _this3.handleMove(e, targetId);\n }\n };\n\n /**\n * Attaching the event listener to the body so that touchmove will work while dragging over multiple target elements.\n */\n this.addEventListener(document.querySelector('body'), 'move', handleMove);\n this.targetNodes[targetId] = node;\n\n return function () {\n delete _this3.targetNodes[targetId];\n _this3.removeEventListener(document.querySelector('body'), 'move', handleMove);\n };\n }\n }, {\n key: 'getSourceClientOffset',\n value: function getSourceClientOffset(sourceId) {\n return getNodeClientOffset(this.sourceNodes[sourceId]);\n }\n }, {\n key: 'handleTopMoveStartCapture',\n value: function handleTopMoveStartCapture(e) {\n if (!eventShouldStartDrag(e)) {\n return;\n }\n\n this.moveStartSourceIds = [];\n }\n }, {\n key: 'handleMoveStart',\n value: function handleMoveStart(sourceId) {\n // Just because we received an event doesn't necessarily mean we need to collect drag sources.\n // We only collect start collecting drag sources on touch and left mouse events.\n if (Array.isArray(this.moveStartSourceIds)) {\n this.moveStartSourceIds.unshift(sourceId);\n }\n }\n }, {\n key: 'getTopMoveStartHandler',\n value: function getTopMoveStartHandler() {\n if (!this.delayTouchStart && !this.delayMouseStart) {\n return this.handleTopMoveStart;\n }\n\n return this.handleTopMoveStartDelay;\n }\n }, {\n key: 'handleTopMoveStart',\n value: function handleTopMoveStart(e) {\n if (!eventShouldStartDrag(e)) {\n return;\n }\n\n // Don't prematurely preventDefault() here since it might:\n // 1. Mess up scrolling\n // 2. Mess up long tap (which brings up context menu)\n // 3. If there's an anchor link as a child, tap won't be triggered on link\n\n var clientOffset = getEventClientOffset(e);\n if (clientOffset) {\n this._mouseClientOffset = clientOffset;\n }\n this.waitingForDelay = false;\n }\n }, {\n key: 'handleTopMoveStartDelay',\n value: function handleTopMoveStartDelay(e) {\n if (!eventShouldStartDrag(e)) {\n return;\n }\n\n var delay = e.type === eventNames.touch.start ? this.delayTouchStart : this.delayMouseStart;\n this.timeout = setTimeout(this.handleTopMoveStart.bind(this, e), delay);\n this.waitingForDelay = true;\n }\n }, {\n key: 'handleTopMoveCapture',\n value: function handleTopMoveCapture(e) {\n this.dragOverTargetIds = [];\n }\n }, {\n key: 'handleMove',\n value: function handleMove(e, targetId) {\n this.dragOverTargetIds.unshift(targetId);\n }\n }, {\n key: 'handleTopMove',\n value: function handleTopMove(e) {\n var _this4 = this;\n\n clearTimeout(this.timeout);\n if (this.waitingForDelay) {\n return;\n }\n\n var moveStartSourceIds = this.moveStartSourceIds,\n dragOverTargetIds = this.dragOverTargetIds;\n\n var clientOffset = getEventClientOffset(e);\n\n if (!clientOffset) {\n return;\n }\n\n // If we're not dragging and we've moved a little, that counts as a drag start\n if (!this.monitor.isDragging() && this._mouseClientOffset.hasOwnProperty('x') && moveStartSourceIds && distance(this._mouseClientOffset.x, this._mouseClientOffset.y, clientOffset.x, clientOffset.y) > (this.touchSlop ? this.touchSlop : 0)) {\n this.moveStartSourceIds = null;\n this.actions.beginDrag(moveStartSourceIds, {\n clientOffset: this._mouseClientOffset,\n getSourceClientOffset: this.getSourceClientOffset,\n publishSource: false\n });\n }\n\n if (!this.monitor.isDragging()) {\n return;\n }\n\n var sourceNode = this.sourceNodes[this.monitor.getSourceId()];\n this.installSourceNodeRemovalObserver(sourceNode);\n this.actions.publishDragSource();\n\n e.preventDefault();\n\n // Get the node elements of the hovered DropTargets\n var dragOverTargetNodes = dragOverTargetIds.map(function (key) {\n return _this4.targetNodes[key];\n });\n // Get the a ordered list of nodes that are touched by\n var elementsAtPoint = elementsFromPoint(clientOffset.x, clientOffset.y);\n // Extend list with SVG parents that are not receiving elementsFromPoint events (svg groups)\n var elementsAtPointExtended = [];\n for (var nodeId in elementsAtPoint) {\n var currentNode = elementsAtPoint[nodeId];\n elementsAtPointExtended.push(currentNode);\n // Is currentNode an SVG element\n while (currentNode && currentNode.ownerSVGElement) {\n currentNode = currentNode.parentElement;\n if (!elementsAtPointExtended.includes(currentNode)) elementsAtPointExtended.push(currentNode);\n }\n }\n var orderedDragOverTargetIds = elementsAtPointExtended\n // Filter off nodes that arent a hovered DropTargets nodes\n .filter(function (node) {\n return dragOverTargetNodes.indexOf(node) > -1;\n })\n // Map back the nodes elements to targetIds\n .map(function (node) {\n for (var targetId in _this4.targetNodes) {\n if (node === _this4.targetNodes[targetId]) return targetId;\n }\n return null;\n })\n // Filter off possible null rows\n .filter(function (node) {\n return !!node;\n }).filter(function (id, index, ids) {\n return ids.indexOf(id) === index;\n });\n\n // Reverse order because dnd-core reverse it before calling the DropTarget drop methods\n orderedDragOverTargetIds.reverse();\n\n this.actions.hover(orderedDragOverTargetIds, {\n clientOffset: clientOffset\n });\n }\n }, {\n key: 'handleTopMoveEndCapture',\n value: function handleTopMoveEndCapture(e) {\n if (!eventShouldEndDrag(e)) {\n return;\n }\n\n if (!this.monitor.isDragging() || this.monitor.didDrop()) {\n this.moveStartSourceIds = null;\n return;\n }\n\n e.preventDefault();\n\n this._mouseClientOffset = {};\n\n this.uninstallSourceNodeRemovalObserver();\n this.actions.drop();\n this.actions.endDrag();\n }\n }, {\n key: 'handleCancelOnEscape',\n value: function handleCancelOnEscape(e) {\n if (e.key === 'Escape') {\n this._mouseClientOffset = {};\n\n this.uninstallSourceNodeRemovalObserver();\n this.actions.endDrag();\n }\n }\n }, {\n key: 'handleOnContextMenu',\n value: function handleOnContextMenu() {\n this.moveStartSourceIds = null;\n }\n }, {\n key: 'installSourceNodeRemovalObserver',\n value: function installSourceNodeRemovalObserver(node) {\n var _this5 = this;\n\n this.uninstallSourceNodeRemovalObserver();\n\n this.draggedSourceNode = node;\n this.draggedSourceNodeRemovalObserver = new window.MutationObserver(function () {\n if (!node.parentElement) {\n _this5.resurrectSourceNode();\n _this5.uninstallSourceNodeRemovalObserver();\n }\n });\n\n if (!node || !node.parentElement) {\n return;\n }\n\n this.draggedSourceNodeRemovalObserver.observe(node.parentElement, { childList: true });\n }\n }, {\n key: 'resurrectSourceNode',\n value: function resurrectSourceNode() {\n this.draggedSourceNode.style.display = 'none';\n this.draggedSourceNode.removeAttribute('data-reactid');\n document.body.appendChild(this.draggedSourceNode);\n }\n }, {\n key: 'uninstallSourceNodeRemovalObserver',\n value: function uninstallSourceNodeRemovalObserver() {\n if (this.draggedSourceNodeRemovalObserver) {\n this.draggedSourceNodeRemovalObserver.disconnect();\n }\n\n this.draggedSourceNodeRemovalObserver = null;\n this.draggedSourceNode = null;\n }\n }]);\n\n return TouchBackend;\n}();\n\nfunction createTouchBackend() {\n var optionsOrManager = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var touchBackendFactory = function touchBackendFactory(manager) {\n return new TouchBackend(manager, optionsOrManager);\n };\n\n if (optionsOrManager.getMonitor) {\n return touchBackendFactory(optionsOrManager);\n } else {\n return touchBackendFactory;\n }\n}\n\nfunction distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(Math.abs(x2 - x1), 2) + Math.pow(Math.abs(y2 - y1), 2));\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _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; }; }();\n\nvar _dec, _class, _class2, _temp;\n\nvar _react = require('react');\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactDnd = require('react-dnd');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Preview = (_dec = (0, _reactDnd.DragLayer)(function (monitor) {\n return {\n currentOffset: monitor.getSourceClientOffset(), isDragging: monitor.isDragging(), itemType: monitor.getItemType(), item: monitor.getItem()\n };\n}), _dec(_class = (_temp = _class2 = function (_PureComponent) {\n _inherits(Preview, _PureComponent);\n\n function Preview() {\n _classCallCheck(this, Preview);\n\n return _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).apply(this, arguments));\n }\n\n _createClass(Preview, [{\n key: 'getStyle',\n value: function getStyle() {\n var transform = 'translate(' + this.props.currentOffset.x + 'px, ' + this.props.currentOffset.y + 'px)';\n return { pointerEvents: 'none', position: 'fixed', top: 0, left: 0, transform: transform, WebkitTransform: transform };\n }\n }, {\n key: 'render',\n value: function render() {\n if (!this.props.isDragging || this.props.currentOffset === null) {\n return null;\n }\n return this.props.generator(this.props.itemType, this.props.item, this.getStyle());\n }\n }]);\n\n return Preview;\n}(_react.PureComponent), _class2.defaultProps = { currentOffset: { x: 0, y: 0 }, isDragging: false, itemType: '', item: {} }, _class2.propTypes = {\n currentOffset: _propTypes2.default.shape({ x: _propTypes2.default.number, y: _propTypes2.default.number }),\n isDragging: _propTypes2.default.bool, itemType: _propTypes2.default.string, item: _propTypes2.default.any, generator: _propTypes2.default.func.isRequired\n}, _class2.contextTypes = { dragDropManager: _propTypes2.default.object }, _temp)) || _class);\nexports.default = Preview;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _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; }; }();\n\nvar _dec, _class, _class2, _temp;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactDndPreview = require('react-dnd-preview');\n\nvar _reactDndPreview2 = _interopRequireDefault(_reactDndPreview);\n\nvar _reactDnd = require('react-dnd');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Preview = (_dec = (0, _reactDnd.DragLayer)(function (monitor) {\n return { isDragging: monitor.isDragging() };\n}), _dec(_class = (_temp = _class2 = function (_PureComponent) {\n _inherits(Preview, _PureComponent);\n\n function Preview() {\n _classCallCheck(this, Preview);\n\n return _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).apply(this, arguments));\n }\n\n _createClass(Preview, [{\n key: 'render',\n value: function render() {\n if (!this.context.dragDropManager.getBackend().previewEnabled()) {\n return null;\n }\n return _react2.default.createElement(_reactDndPreview2.default, this.props);\n }\n }]);\n\n return Preview;\n}(_react.PureComponent), _class2.propTypes = { generator: _propTypes2.default.func.isRequired }, _class2.contextTypes = { dragDropManager: _propTypes2.default.object }, _temp)) || _class);\nexports.default = Preview;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MouseTransition = exports.HTML5DragTransition = exports.TouchTransition = undefined;\n\nvar _createTransition = require('./createTransition');\n\nvar _createTransition2 = _interopRequireDefault(_createTransition);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar TouchTransition = exports.TouchTransition = (0, _createTransition2.default)('touchstart', function (event) {\n return event.touches != null; // eslint-disable-line no-eq-null, eqeqeq\n});\n\nvar HTML5DragTransition = exports.HTML5DragTransition = (0, _createTransition2.default)('dragstart', function (event) {\n if (event.type) {\n return event.type.indexOf('drag') !== -1 || event.type.indexOf('drop') !== -1;\n }\n return false;\n});\n\nvar MouseTransition = exports.MouseTransition = (0, _createTransition2.default)('mousedown', function (event) {\n return event.type && event.type.indexOf('touch') === -1 && event.type.indexOf('mouse') !== -1;\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (target) {\n for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n sources[_key - 1] = arguments[_key];\n }\n\n sources.forEach(function (source) {\n for (var name in source) {\n if (Object.prototype.hasOwnProperty.call(source, name)) {\n target[name] = source[name];\n }\n }\n });\n return target;\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _objectAssign = require('./objectAssign');\n\nvar _objectAssign2 = _interopRequireDefault(_objectAssign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _default = function _default(manager, sourceOptions) {\n var _this = this;\n\n _classCallCheck(this, _default);\n\n this.setup = function () {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (_this.constructor.isSetUp) {\n throw new Error('Cannot have two MultiBackends at the same time.');\n }\n _this.constructor.isSetUp = true;\n _this.addEventListeners(window);\n _this.backends[_this.current].instance.setup();\n };\n\n this.teardown = function () {\n if (typeof window === 'undefined') {\n return;\n }\n\n _this.constructor.isSetUp = false;\n _this.removeEventListeners(window);\n _this.backends[_this.current].instance.teardown();\n };\n\n this.connectDragSource = function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _this.connectBackend('connectDragSource', args);\n };\n\n this.connectDragPreview = function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _this.connectBackend('connectDragPreview', args);\n };\n\n this.connectDropTarget = function () {\n for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return _this.connectBackend('connectDropTarget', args);\n };\n\n this.previewEnabled = function () {\n return _this.backends[_this.current].preview;\n };\n\n this.addEventListeners = function (target) {\n _this.backends.forEach(function (backend) {\n if (backend.transition) {\n target.addEventListener(backend.transition.event, _this.backendSwitcher, true);\n }\n });\n };\n\n this.removeEventListeners = function (target) {\n _this.backends.forEach(function (backend) {\n if (backend.transition) {\n target.removeEventListener(backend.transition.event, _this.backendSwitcher, true);\n }\n });\n };\n\n this.backendSwitcher = function (event) {\n var oldBackend = _this.current;\n\n var i = 0;\n _this.backends.some(function (backend) {\n if (i !== _this.current && backend.transition && backend.transition.check(event)) {\n _this.current = i;\n return true;\n }\n i += 1;\n return false;\n });\n\n if (_this.current !== oldBackend) {\n _this.backends[oldBackend].instance.teardown();\n Object.keys(_this.nodes).forEach(function (id) {\n var node = _this.nodes[id];\n node.handler();\n node.handler = _this.callBackend(node.func, node.args);\n });\n _this.backends[_this.current].instance.setup();\n\n var newEvent = null;\n try {\n newEvent = new event.constructor(event.type, event);\n } catch (_e) {\n newEvent = document.createEvent('Event');\n newEvent.initEvent(event.type, event.bubbles, event.cancelable);\n }\n event.target.dispatchEvent(newEvent);\n }\n };\n\n this.callBackend = function (func, args) {\n var _backends$current$ins;\n\n return (_backends$current$ins = _this.backends[_this.current].instance)[func].apply(_backends$current$ins, _toConsumableArray(args));\n };\n\n this.connectBackend = function (func, args) {\n var nodeId = func + '_' + args[0];\n var handler = _this.callBackend(func, args);\n _this.nodes[nodeId] = { func: func, args: args, handler: handler };\n\n return function () {\n var _nodes$nodeId;\n\n var r = (_nodes$nodeId = _this.nodes[nodeId]).handler.apply(_nodes$nodeId, arguments);\n delete _this.nodes[nodeId];\n return r;\n };\n };\n\n var options = (0, _objectAssign2.default)({ backends: [] }, sourceOptions || {});\n\n if (options.backends.length < 1) {\n throw new Error('You must specify at least one Backend, if you are coming from 2.x.x (or don\\'t understand this error)\\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx');\n }\n\n this.current = 0;\n\n this.backends = [];\n options.backends.forEach(function (backend) {\n if (!backend.backend) {\n throw new Error('You must specify a \\'backend\\' property in your Backend entry: ' + backend);\n }\n var transition = backend.transition;\n if (transition && !transition._isMBTransition) {\n throw new Error('You must specify a valid \\'transition\\' property (either undefined or the return of \\'createTransition\\') in your Backend entry: ' + backend);\n }\n _this.backends.push({\n instance: new backend.backend(manager),\n preview: backend.preview || false,\n transition: transition\n });\n });\n\n this.nodes = {};\n}\n\n// DnD Backend API\n\n\n// Used by Preview component\n\n\n// Multi Backend Listeners\n\n\n// Switching logic\n;\n\nexports.default = _default;","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar emptyImage;\nfunction getEmptyImage() {\n if (!emptyImage) {\n emptyImage = new Image();\n emptyImage.src =\n 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n }\n return emptyImage;\n}\nexports.default = getEmptyImage;\n","module.exports = function shallowEqual(objA, objB, compare, compareContext) {\n\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if(ret !== void 0) {\n return !!ret;\n }\n\n if(objA === objB) {\n return true;\n }\n\n if(typeof objA !== 'object' || !objA ||\n typeof objB !== 'object' || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if(keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for(var idx = 0; idx < keysA.length; idx++) {\n\n var key = keysA[idx];\n\n if(!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if(ret === false ||\n ret === void 0 && valueA !== valueB) {\n return false;\n }\n\n }\n\n return true;\n\n};\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var baseRest = require('./_baseRest'),\n eq = require('./eq'),\n isIterateeCall = require('./_isIterateeCall'),\n keysIn = require('./keysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; };\n\nexports.default = autobind;\n/**\n * @copyright 2015, Andrey Popp <8mayday@gmail.com>\n *\n * The decorator may be used on classes or methods\n * ```\n * @autobind\n * class FullBound {}\n *\n * class PartBound {\n * @autobind\n * method () {}\n * }\n * ```\n */\nfunction autobind() {\n if (arguments.length === 1) {\n return boundClass.apply(undefined, arguments);\n } else {\n return boundMethod.apply(undefined, arguments);\n }\n}\n\n/**\n * Use boundMethod to bind all methods on the target.prototype\n */\nfunction boundClass(target) {\n // (Using reflect to get all keys including symbols)\n var keys = void 0;\n // Use Reflect if exists\n if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') {\n keys = Reflect.ownKeys(target.prototype);\n } else {\n keys = Object.getOwnPropertyNames(target.prototype);\n // use symbols if support is provided\n if (typeof Object.getOwnPropertySymbols === 'function') {\n keys = keys.concat(Object.getOwnPropertySymbols(target.prototype));\n }\n }\n\n keys.forEach(function (key) {\n // Ignore special case target method\n if (key === 'constructor') {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(target.prototype, key);\n\n // Only methods need binding\n if (typeof descriptor.value === 'function') {\n Object.defineProperty(target.prototype, key, boundMethod(target, key, descriptor));\n }\n });\n return target;\n}\n\n/**\n * Return a descriptor removing the value and returning a getter\n * The getter will return a .bind version of the function\n * and memoize the result against a symbol on the instance\n */\nfunction boundMethod(target, key, descriptor) {\n var fn = descriptor.value;\n\n if (typeof fn !== 'function') {\n throw new Error('@autobind decorator can only be applied to methods not: ' + (typeof fn === 'undefined' ? 'undefined' : _typeof(fn)));\n }\n\n // In IE11 calling Object.defineProperty has a side-effect of evaluating the\n // getter for the property which is being replaced. This causes infinite\n // recursion and an \"Out of stack space\" error.\n var definingProperty = false;\n\n return {\n configurable: true,\n get: function get() {\n if (definingProperty || this === target.prototype || this.hasOwnProperty(key) || typeof fn !== 'function') {\n return fn;\n }\n\n var boundFn = fn.bind(this);\n definingProperty = true;\n Object.defineProperty(this, key, {\n configurable: true,\n get: function get() {\n return boundFn;\n },\n set: function set(value) {\n fn = value;\n delete this[key];\n }\n });\n definingProperty = false;\n return boundFn;\n },\n set: function set(value) {\n fn = value;\n }\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a;\nvar NativeTypes = require(\"./NativeTypes\");\nfunction getDataFromDataTransfer(dataTransfer, typesToTry, defaultValue) {\n var result = typesToTry.reduce(function (resultSoFar, typeToTry) { return resultSoFar || dataTransfer.getData(typeToTry); }, null);\n return result != null ? result : defaultValue;\n}\nvar nativeTypesConfig = (_a = {},\n _a[NativeTypes.FILE] = {\n exposeProperty: 'files',\n matchesTypes: ['Files'],\n getData: function (dataTransfer) {\n return Array.prototype.slice.call(dataTransfer.files);\n },\n },\n _a[NativeTypes.URL] = {\n exposeProperty: 'urls',\n matchesTypes: ['Url', 'text/uri-list'],\n getData: function (dataTransfer, matchesTypes) {\n return getDataFromDataTransfer(dataTransfer, matchesTypes, '').split('\\n');\n },\n },\n _a[NativeTypes.TEXT] = {\n exposeProperty: 'text',\n matchesTypes: ['Text', 'text/plain'],\n getData: function (dataTransfer, matchesTypes) {\n return getDataFromDataTransfer(dataTransfer, matchesTypes, '');\n },\n },\n _a);\nfunction createNativeDragSource(type) {\n var _a = nativeTypesConfig[type], exposeProperty = _a.exposeProperty, matchesTypes = _a.matchesTypes, getData = _a.getData;\n return /** @class */ (function () {\n function NativeDragSource() {\n var _a;\n this.item = (_a = {},\n Object.defineProperty(_a, exposeProperty, {\n get: function () {\n // tslint:disable-next-line no-console\n console.warn(\"Browser doesn't allow reading \\\"\" + exposeProperty + \"\\\" until the drop event.\");\n return null;\n },\n enumerable: true,\n configurable: true\n }),\n _a);\n }\n NativeDragSource.prototype.mutateItemByReadingDataTransfer = function (dataTransfer) {\n delete this.item[exposeProperty];\n this.item[exposeProperty] = getData(dataTransfer, matchesTypes);\n };\n NativeDragSource.prototype.canDrag = function () {\n return true;\n };\n NativeDragSource.prototype.beginDrag = function () {\n return this.item;\n };\n NativeDragSource.prototype.isDragging = function (monitor, handle) {\n return handle === monitor.getSourceId();\n };\n NativeDragSource.prototype.endDrag = function () {\n // empty\n };\n return NativeDragSource;\n }());\n}\nexports.createNativeDragSource = createNativeDragSource;\nfunction matchNativeItemType(dataTransfer) {\n var dataTransferTypes = Array.prototype.slice.call(dataTransfer.types || []);\n return (Object.keys(nativeTypesConfig).filter(function (nativeItemType) {\n var matchesTypes = nativeTypesConfig[nativeItemType].matchesTypes;\n return matchesTypes.some(function (t) { return dataTransferTypes.indexOf(t) > -1; });\n })[0] || null);\n}\nexports.matchNativeItemType = matchNativeItemType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MonotonicInterpolant = /** @class */ (function () {\n function MonotonicInterpolant(xs, ys) {\n var length = xs.length;\n // Rearrange xs and ys so that xs is sorted\n var indexes = [];\n for (var i = 0; i < length; i++) {\n indexes.push(i);\n }\n indexes.sort(function (a, b) { return (xs[a] < xs[b] ? -1 : 1); });\n // Get consecutive differences and slopes\n var dys = [];\n var dxs = [];\n var ms = [];\n var dx;\n var dy;\n for (var i = 0; i < length - 1; i++) {\n dx = xs[i + 1] - xs[i];\n dy = ys[i + 1] - ys[i];\n dxs.push(dx);\n dys.push(dy);\n ms.push(dy / dx);\n }\n // Get degree-1 coefficients\n var c1s = [ms[0]];\n for (var i = 0; i < dxs.length - 1; i++) {\n var m2 = ms[i];\n var mNext = ms[i + 1];\n if (m2 * mNext <= 0) {\n c1s.push(0);\n }\n else {\n dx = dxs[i];\n var dxNext = dxs[i + 1];\n var common = dx + dxNext;\n c1s.push(3 * common / ((common + dxNext) / m2 + (common + dx) / mNext));\n }\n }\n c1s.push(ms[ms.length - 1]);\n // Get degree-2 and degree-3 coefficients\n var c2s = [];\n var c3s = [];\n var m;\n for (var i = 0; i < c1s.length - 1; i++) {\n m = ms[i];\n var c1 = c1s[i];\n var invDx = 1 / dxs[i];\n var common = c1 + c1s[i + 1] - m - m;\n c2s.push((m - c1 - common) * invDx);\n c3s.push(common * invDx * invDx);\n }\n this.xs = xs;\n this.ys = ys;\n this.c1s = c1s;\n this.c2s = c2s;\n this.c3s = c3s;\n }\n MonotonicInterpolant.prototype.interpolate = function (x) {\n var _a = this, xs = _a.xs, ys = _a.ys, c1s = _a.c1s, c2s = _a.c2s, c3s = _a.c3s;\n // The rightmost point in the dataset should give an exact result\n var i = xs.length - 1;\n if (x === xs[i]) {\n return ys[i];\n }\n // Search for the interval x is in, returning the corresponding y if x is one of the original xs\n var low = 0;\n var high = c3s.length - 1;\n var mid;\n while (low <= high) {\n mid = Math.floor(0.5 * (low + high));\n var xHere = xs[mid];\n if (xHere < x) {\n low = mid + 1;\n }\n else if (xHere > x) {\n high = mid - 1;\n }\n else {\n return ys[mid];\n }\n }\n i = Math.max(0, high);\n // Interpolate\n var diff = x - xs[i];\n var diffSq = diff * diff;\n return ys[i] + c1s[i] * diff + c2s[i] * diffSq + c3s[i] * diff * diffSq;\n };\n return MonotonicInterpolant;\n}());\nexports.default = MonotonicInterpolant;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BrowserDetector_1 = require(\"./BrowserDetector\");\nvar MonotonicInterpolant_1 = require(\"./MonotonicInterpolant\");\nvar ELEMENT_NODE = 1;\nfunction getNodeClientOffset(node) {\n var el = node.nodeType === ELEMENT_NODE ? node : node.parentElement;\n if (!el) {\n return null;\n }\n var _a = el.getBoundingClientRect(), top = _a.top, left = _a.left;\n return { x: left, y: top };\n}\nexports.getNodeClientOffset = getNodeClientOffset;\nfunction getEventClientOffset(e) {\n return {\n x: e.clientX,\n y: e.clientY,\n };\n}\nexports.getEventClientOffset = getEventClientOffset;\nfunction isImageNode(node) {\n return (node.nodeName === 'IMG' &&\n (BrowserDetector_1.isFirefox() || !document.documentElement.contains(node)));\n}\nfunction getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight) {\n var dragPreviewWidth = isImage ? dragPreview.width : sourceWidth;\n var dragPreviewHeight = isImage ? dragPreview.height : sourceHeight;\n // Work around @2x coordinate discrepancies in browsers\n if (BrowserDetector_1.isSafari() && isImage) {\n dragPreviewHeight /= window.devicePixelRatio;\n dragPreviewWidth /= window.devicePixelRatio;\n }\n return { dragPreviewWidth: dragPreviewWidth, dragPreviewHeight: dragPreviewHeight };\n}\nfunction getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint) {\n // The browsers will use the image intrinsic size under different conditions.\n // Firefox only cares if it's an image, but WebKit also wants it to be detached.\n var isImage = isImageNode(dragPreview);\n var dragPreviewNode = isImage ? sourceNode : dragPreview;\n var dragPreviewNodeOffsetFromClient = getNodeClientOffset(dragPreviewNode);\n var offsetFromDragPreview = {\n x: clientOffset.x - dragPreviewNodeOffsetFromClient.x,\n y: clientOffset.y - dragPreviewNodeOffsetFromClient.y,\n };\n var sourceWidth = sourceNode.offsetWidth, sourceHeight = sourceNode.offsetHeight;\n var anchorX = anchorPoint.anchorX, anchorY = anchorPoint.anchorY;\n var _a = getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight), dragPreviewWidth = _a.dragPreviewWidth, dragPreviewHeight = _a.dragPreviewHeight;\n var calculateYOffset = function () {\n var interpolantY = new MonotonicInterpolant_1.default([0, 0.5, 1], [\n // Dock to the top\n offsetFromDragPreview.y,\n // Align at the center\n offsetFromDragPreview.y / sourceHeight * dragPreviewHeight,\n // Dock to the bottom\n offsetFromDragPreview.y + dragPreviewHeight - sourceHeight,\n ]);\n var y = interpolantY.interpolate(anchorY);\n // Work around Safari 8 positioning bug\n if (BrowserDetector_1.isSafari() && isImage) {\n // We'll have to wait for @3x to see if this is entirely correct\n y += (window.devicePixelRatio - 1) * dragPreviewHeight;\n }\n return y;\n };\n var calculateXOffset = function () {\n // Interpolate coordinates depending on anchor point\n // If you know a simpler way to do this, let me know\n var interpolantX = new MonotonicInterpolant_1.default([0, 0.5, 1], [\n // Dock to the left\n offsetFromDragPreview.x,\n // Align at the center\n offsetFromDragPreview.x / sourceWidth * dragPreviewWidth,\n // Dock to the right\n offsetFromDragPreview.x + dragPreviewWidth - sourceWidth,\n ]);\n return interpolantX.interpolate(anchorX);\n };\n // Force offsets if specified in the options.\n var offsetX = offsetPoint.offsetX, offsetY = offsetPoint.offsetY;\n var isManualOffsetX = offsetX === 0 || offsetX;\n var isManualOffsetY = offsetY === 0 || offsetY;\n return {\n x: isManualOffsetX ? offsetX : calculateXOffset(),\n y: isManualOffsetY ? offsetY : calculateYOffset(),\n };\n}\nexports.getDragPreviewOffset = getDragPreviewOffset;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n baseUniq = require('./_baseUniq'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nmodule.exports = union;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar union = require('lodash/union');\nvar without = require('lodash/without');\nvar EnterLeaveCounter = /** @class */ (function () {\n function EnterLeaveCounter() {\n this.entered = [];\n }\n EnterLeaveCounter.prototype.enter = function (enteringNode) {\n var previousLength = this.entered.length;\n var isNodeEntered = function (node) {\n return document.documentElement.contains(node) &&\n (!node.contains || node.contains(enteringNode));\n };\n this.entered = union(this.entered.filter(isNodeEntered), [enteringNode]);\n return previousLength === 0 && this.entered.length > 0;\n };\n EnterLeaveCounter.prototype.leave = function (leavingNode) {\n var previousLength = this.entered.length;\n this.entered = without(this.entered.filter(function (node) { return document.documentElement.contains(node); }), leavingNode);\n return previousLength > 0 && this.entered.length === 0;\n };\n EnterLeaveCounter.prototype.reset = function () {\n this.entered = [];\n };\n return EnterLeaveCounter;\n}());\nexports.default = EnterLeaveCounter;\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EnterLeaveCounter_1 = require(\"./EnterLeaveCounter\");\nvar BrowserDetector_1 = require(\"./BrowserDetector\");\nvar OffsetUtils_1 = require(\"./OffsetUtils\");\nvar NativeDragSources_1 = require(\"./NativeDragSources\");\nvar NativeTypes = require(\"./NativeTypes\");\nvar autobind_decorator_1 = require(\"autobind-decorator\");\nvar defaults = require('lodash/defaults');\nvar shallowEqual = require('shallowequal');\nvar HTML5Backend = /** @class */ (function () {\n function HTML5Backend(manager) {\n this.sourcePreviewNodes = new Map();\n this.sourcePreviewNodeOptions = new Map();\n this.sourceNodes = new Map();\n this.sourceNodeOptions = new Map();\n this.enterLeaveCounter = new EnterLeaveCounter_1.default();\n this.dragStartSourceIds = null;\n this.dropTargetIds = [];\n this.dragEnterTargetIds = [];\n this.currentNativeSource = null;\n this.currentNativeHandle = null;\n this.currentDragSourceNode = null;\n this.currentDragSourceNodeOffset = null;\n this.currentDragSourceNodeOffsetChanged = false;\n this.altKeyPressed = false;\n this.mouseMoveTimeoutTimer = null;\n this.asyncEndDragFrameId = null;\n this.dragOverTargetIds = null;\n this.actions = manager.getActions();\n this.monitor = manager.getMonitor();\n this.registry = manager.getRegistry();\n this.context = manager.getContext();\n }\n Object.defineProperty(HTML5Backend.prototype, \"window\", {\n // public for test\n get: function () {\n if (this.context && this.context.window) {\n return this.context.window;\n }\n else if (typeof window !== 'undefined') {\n return window;\n }\n return undefined;\n },\n enumerable: true,\n configurable: true\n });\n HTML5Backend.prototype.setup = function () {\n if (this.window === undefined) {\n return;\n }\n if (this.window.__isReactDndBackendSetUp) {\n throw new Error('Cannot have two HTML5 backends at the same time.');\n }\n this.window.__isReactDndBackendSetUp = true;\n this.addEventListeners(this.window);\n };\n HTML5Backend.prototype.teardown = function () {\n if (this.window === undefined) {\n return;\n }\n this.window.__isReactDndBackendSetUp = false;\n this.removeEventListeners(this.window);\n this.clearCurrentDragSourceNode();\n if (this.asyncEndDragFrameId) {\n this.window.cancelAnimationFrame(this.asyncEndDragFrameId);\n }\n };\n HTML5Backend.prototype.connectDragPreview = function (sourceId, node, options) {\n var _this = this;\n this.sourcePreviewNodeOptions.set(sourceId, options);\n this.sourcePreviewNodes.set(sourceId, node);\n return function () {\n _this.sourcePreviewNodes.delete(sourceId);\n _this.sourcePreviewNodeOptions.delete(sourceId);\n };\n };\n HTML5Backend.prototype.connectDragSource = function (sourceId, node, options) {\n var _this = this;\n this.sourceNodes.set(sourceId, node);\n this.sourceNodeOptions.set(sourceId, options);\n var handleDragStart = function (e) { return _this.handleDragStart(e, sourceId); };\n var handleSelectStart = function (e) { return _this.handleSelectStart(e); };\n node.setAttribute('draggable', true);\n node.addEventListener('dragstart', handleDragStart);\n node.addEventListener('selectstart', handleSelectStart);\n return function () {\n _this.sourceNodes.delete(sourceId);\n _this.sourceNodeOptions.delete(sourceId);\n node.removeEventListener('dragstart', handleDragStart);\n node.removeEventListener('selectstart', handleSelectStart);\n node.setAttribute('draggable', false);\n };\n };\n HTML5Backend.prototype.connectDropTarget = function (targetId, node) {\n var _this = this;\n var handleDragEnter = function (e) { return _this.handleDragEnter(e, targetId); };\n var handleDragOver = function (e) { return _this.handleDragOver(e, targetId); };\n var handleDrop = function (e) { return _this.handleDrop(e, targetId); };\n node.addEventListener('dragenter', handleDragEnter);\n node.addEventListener('dragover', handleDragOver);\n node.addEventListener('drop', handleDrop);\n return function () {\n node.removeEventListener('dragenter', handleDragEnter);\n node.removeEventListener('dragover', handleDragOver);\n node.removeEventListener('drop', handleDrop);\n };\n };\n HTML5Backend.prototype.addEventListeners = function (target) {\n // SSR Fix (https://github.com/react-dnd/react-dnd/pull/813\n if (!target.addEventListener) {\n return;\n }\n target.addEventListener('dragstart', this.handleTopDragStart);\n target.addEventListener('dragstart', this.handleTopDragStartCapture, true);\n target.addEventListener('dragend', this.handleTopDragEndCapture, true);\n target.addEventListener('dragenter', this.handleTopDragEnter);\n target.addEventListener('dragenter', this.handleTopDragEnterCapture, true);\n target.addEventListener('dragleave', this.handleTopDragLeaveCapture, true);\n target.addEventListener('dragover', this.handleTopDragOver);\n target.addEventListener('dragover', this.handleTopDragOverCapture, true);\n target.addEventListener('drop', this.handleTopDrop);\n target.addEventListener('drop', this.handleTopDropCapture, true);\n };\n HTML5Backend.prototype.removeEventListeners = function (target) {\n // SSR Fix (https://github.com/react-dnd/react-dnd/pull/813\n if (!target.removeEventListener) {\n return;\n }\n target.removeEventListener('dragstart', this.handleTopDragStart);\n target.removeEventListener('dragstart', this.handleTopDragStartCapture, true);\n target.removeEventListener('dragend', this.handleTopDragEndCapture, true);\n target.removeEventListener('dragenter', this.handleTopDragEnter);\n target.removeEventListener('dragenter', this.handleTopDragEnterCapture, true);\n target.removeEventListener('dragleave', this.handleTopDragLeaveCapture, true);\n target.removeEventListener('dragover', this.handleTopDragOver);\n target.removeEventListener('dragover', this.handleTopDragOverCapture, true);\n target.removeEventListener('drop', this.handleTopDrop);\n target.removeEventListener('drop', this.handleTopDropCapture, true);\n };\n HTML5Backend.prototype.getCurrentSourceNodeOptions = function () {\n var sourceId = this.monitor.getSourceId();\n var sourceNodeOptions = this.sourceNodeOptions.get(sourceId);\n return defaults(sourceNodeOptions || {}, {\n dropEffect: this.altKeyPressed ? 'copy' : 'move',\n });\n };\n HTML5Backend.prototype.getCurrentDropEffect = function () {\n if (this.isDraggingNativeItem()) {\n // It makes more sense to default to 'copy' for native resources\n return 'copy';\n }\n return this.getCurrentSourceNodeOptions().dropEffect;\n };\n HTML5Backend.prototype.getCurrentSourcePreviewNodeOptions = function () {\n var sourceId = this.monitor.getSourceId();\n var sourcePreviewNodeOptions = this.sourcePreviewNodeOptions.get(sourceId);\n return defaults(sourcePreviewNodeOptions || {}, {\n anchorX: 0.5,\n anchorY: 0.5,\n captureDraggingState: false,\n });\n };\n HTML5Backend.prototype.getSourceClientOffset = function (sourceId) {\n return OffsetUtils_1.getNodeClientOffset(this.sourceNodes.get(sourceId));\n };\n HTML5Backend.prototype.isDraggingNativeItem = function () {\n var itemType = this.monitor.getItemType();\n return Object.keys(NativeTypes).some(function (key) { return NativeTypes[key] === itemType; });\n };\n HTML5Backend.prototype.beginDragNativeItem = function (type) {\n this.clearCurrentDragSourceNode();\n var SourceType = NativeDragSources_1.createNativeDragSource(type);\n this.currentNativeSource = new SourceType();\n this.currentNativeHandle = this.registry.addSource(type, this.currentNativeSource);\n this.actions.beginDrag([this.currentNativeHandle]);\n };\n HTML5Backend.prototype.endDragNativeItem = function () {\n if (!this.isDraggingNativeItem()) {\n return;\n }\n this.actions.endDrag();\n this.registry.removeSource(this.currentNativeHandle);\n this.currentNativeHandle = null;\n this.currentNativeSource = null;\n };\n HTML5Backend.prototype.isNodeInDocument = function (node) {\n // Check the node either in the main document or in the current context\n return ((!!document && document.body.contains(node)) ||\n (!!this.window && this.window.document.body.contains(node)));\n };\n HTML5Backend.prototype.endDragIfSourceWasRemovedFromDOM = function () {\n var node = this.currentDragSourceNode;\n if (this.isNodeInDocument(node)) {\n return;\n }\n if (this.clearCurrentDragSourceNode()) {\n this.actions.endDrag();\n }\n };\n HTML5Backend.prototype.setCurrentDragSourceNode = function (node) {\n var _this = this;\n this.clearCurrentDragSourceNode();\n this.currentDragSourceNode = node;\n this.currentDragSourceNodeOffset = OffsetUtils_1.getNodeClientOffset(node);\n this.currentDragSourceNodeOffsetChanged = false;\n // A timeout of > 0 is necessary to resolve Firefox issue referenced\n // See:\n // * https://github.com/react-dnd/react-dnd/pull/928\n // * https://github.com/react-dnd/react-dnd/issues/869\n var MOUSE_MOVE_TIMEOUT = 1000;\n // Receiving a mouse event in the middle of a dragging operation\n // means it has ended and the drag source node disappeared from DOM,\n // so the browser didn't dispatch the dragend event.\n //\n // We need to wait before we start listening for mousemove events.\n // This is needed because the drag preview needs to be drawn or else it fires an 'mousemove' event\n // immediately in some browsers.\n //\n // See:\n // * https://github.com/react-dnd/react-dnd/pull/928\n // * https://github.com/react-dnd/react-dnd/issues/869\n //\n this.mouseMoveTimeoutTimer = setTimeout(function () {\n return (_this.window &&\n _this.window.addEventListener('mousemove', _this.endDragIfSourceWasRemovedFromDOM, true));\n }, MOUSE_MOVE_TIMEOUT);\n };\n HTML5Backend.prototype.clearCurrentDragSourceNode = function () {\n if (this.currentDragSourceNode) {\n this.currentDragSourceNode = null;\n this.currentDragSourceNodeOffset = null;\n this.currentDragSourceNodeOffsetChanged = false;\n if (this.window) {\n this.window.clearTimeout(this.mouseMoveTimeoutTimer);\n this.window.removeEventListener('mousemove', this.endDragIfSourceWasRemovedFromDOM, true);\n }\n this.mouseMoveTimeoutTimer = null;\n return true;\n }\n return false;\n };\n HTML5Backend.prototype.checkIfCurrentDragSourceRectChanged = function () {\n var node = this.currentDragSourceNode;\n if (!node) {\n return false;\n }\n if (this.currentDragSourceNodeOffsetChanged) {\n return true;\n }\n this.currentDragSourceNodeOffsetChanged = !shallowEqual(OffsetUtils_1.getNodeClientOffset(node), this.currentDragSourceNodeOffset);\n return this.currentDragSourceNodeOffsetChanged;\n };\n HTML5Backend.prototype.handleTopDragStartCapture = function () {\n this.clearCurrentDragSourceNode();\n this.dragStartSourceIds = [];\n };\n HTML5Backend.prototype.handleDragStart = function (e, sourceId) {\n if (!this.dragStartSourceIds) {\n this.dragStartSourceIds = [];\n }\n this.dragStartSourceIds.unshift(sourceId);\n };\n HTML5Backend.prototype.handleTopDragStart = function (e) {\n var _this = this;\n var dragStartSourceIds = this.dragStartSourceIds;\n this.dragStartSourceIds = null;\n var clientOffset = OffsetUtils_1.getEventClientOffset(e);\n // Avoid crashing if we missed a drop event or our previous drag died\n if (this.monitor.isDragging()) {\n this.actions.endDrag();\n }\n // Don't publish the source just yet (see why below)\n this.actions.beginDrag(dragStartSourceIds || [], {\n publishSource: false,\n getSourceClientOffset: this.getSourceClientOffset,\n clientOffset: clientOffset,\n });\n var dataTransfer = e.dataTransfer;\n var nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer);\n if (this.monitor.isDragging()) {\n if (typeof dataTransfer.setDragImage === 'function') {\n // Use custom drag image if user specifies it.\n // If child drag source refuses drag but parent agrees,\n // use parent's node as drag image. Neither works in IE though.\n var sourceId = this.monitor.getSourceId();\n var sourceNode = this.sourceNodes.get(sourceId);\n var dragPreview = this.sourcePreviewNodes.get(sourceId) || sourceNode;\n var _a = this.getCurrentSourcePreviewNodeOptions(), anchorX = _a.anchorX, anchorY = _a.anchorY, offsetX = _a.offsetX, offsetY = _a.offsetY;\n var anchorPoint = { anchorX: anchorX, anchorY: anchorY };\n var offsetPoint = { offsetX: offsetX, offsetY: offsetY };\n var dragPreviewOffset = OffsetUtils_1.getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint);\n dataTransfer.setDragImage(dragPreview, dragPreviewOffset.x, dragPreviewOffset.y);\n }\n try {\n // Firefox won't drag without setting data\n dataTransfer.setData('application/json', {});\n }\n catch (err) {\n // IE doesn't support MIME types in setData\n }\n // Store drag source node so we can check whether\n // it is removed from DOM and trigger endDrag manually.\n this.setCurrentDragSourceNode(e.target);\n // Now we are ready to publish the drag source.. or are we not?\n var captureDraggingState = this.getCurrentSourcePreviewNodeOptions().captureDraggingState;\n if (!captureDraggingState) {\n // Usually we want to publish it in the next tick so that browser\n // is able to screenshot the current (not yet dragging) state.\n //\n // It also neatly avoids a situation where render() returns null\n // in the same tick for the source element, and browser freaks out.\n setTimeout(function () { return _this.actions.publishDragSource(); }, 0);\n }\n else {\n // In some cases the user may want to override this behavior, e.g.\n // to work around IE not supporting custom drag previews.\n //\n // When using a custom drag layer, the only way to prevent\n // the default drag preview from drawing in IE is to screenshot\n // the dragging state in which the node itself has zero opacity\n // and height. In this case, though, returning null from render()\n // will abruptly end the dragging, which is not obvious.\n //\n // This is the reason such behavior is strictly opt-in.\n this.actions.publishDragSource();\n }\n }\n else if (nativeType) {\n // A native item (such as URL) dragged from inside the document\n this.beginDragNativeItem(nativeType);\n }\n else if (!dataTransfer.types &&\n (!e.target.hasAttribute || !e.target.hasAttribute('draggable'))) {\n // Looks like a Safari bug: dataTransfer.types is null, but there was no draggable.\n // Just let it drag. It's a native type (URL or text) and will be picked up in\n // dragenter handler.\n return;\n }\n else {\n // If by this time no drag source reacted, tell browser not to drag.\n e.preventDefault();\n }\n };\n HTML5Backend.prototype.handleTopDragEndCapture = function () {\n if (this.clearCurrentDragSourceNode()) {\n // Firefox can dispatch this event in an infinite loop\n // if dragend handler does something like showing an alert.\n // Only proceed if we have not handled it already.\n this.actions.endDrag();\n }\n };\n HTML5Backend.prototype.handleTopDragEnterCapture = function (e) {\n this.dragEnterTargetIds = [];\n var isFirstEnter = this.enterLeaveCounter.enter(e.target);\n if (!isFirstEnter || this.monitor.isDragging()) {\n return;\n }\n var dataTransfer = e.dataTransfer;\n var nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer);\n if (nativeType) {\n // A native item (such as file or URL) dragged from outside the document\n this.beginDragNativeItem(nativeType);\n }\n };\n HTML5Backend.prototype.handleDragEnter = function (e, targetId) {\n this.dragEnterTargetIds.unshift(targetId);\n };\n HTML5Backend.prototype.handleTopDragEnter = function (e) {\n var _this = this;\n var dragEnterTargetIds = this.dragEnterTargetIds;\n this.dragEnterTargetIds = [];\n if (!this.monitor.isDragging()) {\n // This is probably a native item type we don't understand.\n return;\n }\n this.altKeyPressed = e.altKey;\n if (!BrowserDetector_1.isFirefox()) {\n // Don't emit hover in `dragenter` on Firefox due to an edge case.\n // If the target changes position as the result of `dragenter`, Firefox\n // will still happily dispatch `dragover` despite target being no longer\n // there. The easy solution is to only fire `hover` in `dragover` on FF.\n this.actions.hover(dragEnterTargetIds, {\n clientOffset: OffsetUtils_1.getEventClientOffset(e),\n });\n }\n var canDrop = dragEnterTargetIds.some(function (targetId) {\n return _this.monitor.canDropOnTarget(targetId);\n });\n if (canDrop) {\n // IE requires this to fire dragover events\n e.preventDefault();\n e.dataTransfer.dropEffect = this.getCurrentDropEffect();\n }\n };\n HTML5Backend.prototype.handleTopDragOverCapture = function () {\n this.dragOverTargetIds = [];\n };\n HTML5Backend.prototype.handleDragOver = function (e, targetId) {\n if (this.dragOverTargetIds === null) {\n this.dragOverTargetIds = [];\n }\n this.dragOverTargetIds.unshift(targetId);\n };\n HTML5Backend.prototype.handleTopDragOver = function (e) {\n var _this = this;\n var dragOverTargetIds = this.dragOverTargetIds;\n this.dragOverTargetIds = [];\n if (!this.monitor.isDragging()) {\n // This is probably a native item type we don't understand.\n // Prevent default \"drop and blow away the whole document\" action.\n e.preventDefault();\n e.dataTransfer.dropEffect = 'none';\n return;\n }\n this.altKeyPressed = e.altKey;\n this.actions.hover(dragOverTargetIds || [], {\n clientOffset: OffsetUtils_1.getEventClientOffset(e),\n });\n var canDrop = (dragOverTargetIds || []).some(function (targetId) {\n return _this.monitor.canDropOnTarget(targetId);\n });\n if (canDrop) {\n // Show user-specified drop effect.\n e.preventDefault();\n e.dataTransfer.dropEffect = this.getCurrentDropEffect();\n }\n else if (this.isDraggingNativeItem()) {\n // Don't show a nice cursor but still prevent default\n // \"drop and blow away the whole document\" action.\n e.preventDefault();\n e.dataTransfer.dropEffect = 'none';\n }\n else if (this.checkIfCurrentDragSourceRectChanged()) {\n // Prevent animating to incorrect position.\n // Drop effect must be other than 'none' to prevent animation.\n e.preventDefault();\n e.dataTransfer.dropEffect = 'move';\n }\n };\n HTML5Backend.prototype.handleTopDragLeaveCapture = function (e) {\n if (this.isDraggingNativeItem()) {\n e.preventDefault();\n }\n var isLastLeave = this.enterLeaveCounter.leave(e.target);\n if (!isLastLeave) {\n return;\n }\n if (this.isDraggingNativeItem()) {\n this.endDragNativeItem();\n }\n };\n HTML5Backend.prototype.handleTopDropCapture = function (e) {\n this.dropTargetIds = [];\n e.preventDefault();\n if (this.isDraggingNativeItem()) {\n this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer);\n }\n this.enterLeaveCounter.reset();\n };\n HTML5Backend.prototype.handleDrop = function (e, targetId) {\n this.dropTargetIds.unshift(targetId);\n };\n HTML5Backend.prototype.handleTopDrop = function (e) {\n var dropTargetIds = this.dropTargetIds;\n this.dropTargetIds = [];\n this.actions.hover(dropTargetIds, {\n clientOffset: OffsetUtils_1.getEventClientOffset(e),\n });\n this.actions.drop({ dropEffect: this.getCurrentDropEffect() });\n if (this.isDraggingNativeItem()) {\n this.endDragNativeItem();\n }\n else {\n this.endDragIfSourceWasRemovedFromDOM();\n }\n };\n HTML5Backend.prototype.handleSelectStart = function (e) {\n var target = e.target;\n // Only IE requires us to explicitly say\n // we want drag drop operation to start\n if (typeof target.dragDrop !== 'function') {\n return;\n }\n // Inputs and textareas should be selectable\n if (target.tagName === 'INPUT' ||\n target.tagName === 'SELECT' ||\n target.tagName === 'TEXTAREA' ||\n target.isContentEditable) {\n return;\n }\n // For other targets, ask IE\n // to enable drag and drop\n e.preventDefault();\n target.dragDrop();\n };\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"getSourceClientOffset\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"endDragNativeItem\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"isNodeInDocument\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"endDragIfSourceWasRemovedFromDOM\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDragStartCapture\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDragStart\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDragEndCapture\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDragEnterCapture\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDragEnter\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDragOverCapture\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDragOver\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDragLeaveCapture\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDropCapture\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleTopDrop\", null);\n __decorate([\n autobind_decorator_1.default\n ], HTML5Backend.prototype, \"handleSelectStart\", null);\n return HTML5Backend;\n}());\nexports.default = HTML5Backend;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = createTargetConnector;\n\nvar _wrapConnectorHooks = require('./wrapConnectorHooks');\n\nvar _wrapConnectorHooks2 = _interopRequireDefault(_wrapConnectorHooks);\n\nvar _areOptionsEqual = require('./areOptionsEqual');\n\nvar _areOptionsEqual2 = _interopRequireDefault(_areOptionsEqual);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createTargetConnector(backend) {\n\tvar currentHandlerId = void 0;\n\n\tvar currentDropTargetNode = void 0;\n\tvar currentDropTargetOptions = void 0;\n\tvar disconnectCurrentDropTarget = void 0;\n\n\tfunction reconnectDropTarget() {\n\t\tif (disconnectCurrentDropTarget) {\n\t\t\tdisconnectCurrentDropTarget();\n\t\t\tdisconnectCurrentDropTarget = null;\n\t\t}\n\n\t\tif (currentHandlerId && currentDropTargetNode) {\n\t\t\tdisconnectCurrentDropTarget = backend.connectDropTarget(currentHandlerId, currentDropTargetNode, currentDropTargetOptions);\n\t\t}\n\t}\n\n\tfunction receiveHandlerId(handlerId) {\n\t\tif (handlerId === currentHandlerId) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentHandlerId = handlerId;\n\t\treconnectDropTarget();\n\t}\n\n\tvar hooks = (0, _wrapConnectorHooks2.default)({\n\t\tdropTarget: function connectDropTarget(node, options) {\n\t\t\tif (node === currentDropTargetNode && (0, _areOptionsEqual2.default)(options, currentDropTargetOptions)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcurrentDropTargetNode = node;\n\t\t\tcurrentDropTargetOptions = options;\n\n\t\t\treconnectDropTarget();\n\t\t}\n\t});\n\n\treturn {\n\t\treceiveHandlerId: receiveHandlerId,\n\t\thooks: hooks\n\t};\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nexports.default = createTargetMonitor;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar isCallingCanDrop = false;\n\nvar TargetMonitor = function () {\n\tfunction TargetMonitor(manager) {\n\t\t_classCallCheck(this, TargetMonitor);\n\n\t\tthis.internalMonitor = manager.getMonitor();\n\t}\n\n\t_createClass(TargetMonitor, [{\n\t\tkey: 'receiveHandlerId',\n\t\tvalue: function receiveHandlerId(targetId) {\n\t\t\tthis.targetId = targetId;\n\t\t}\n\t}, {\n\t\tkey: 'canDrop',\n\t\tvalue: function canDrop() {\n\t\t\t(0, _invariant2.default)(!isCallingCanDrop, 'You may not call monitor.canDrop() inside your canDrop() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target-monitor.html');\n\n\t\t\ttry {\n\t\t\t\tisCallingCanDrop = true;\n\t\t\t\treturn this.internalMonitor.canDropOnTarget(this.targetId);\n\t\t\t} finally {\n\t\t\t\tisCallingCanDrop = false;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'isOver',\n\t\tvalue: function isOver(options) {\n\t\t\treturn this.internalMonitor.isOverTarget(this.targetId, options);\n\t\t}\n\t}, {\n\t\tkey: 'getItemType',\n\t\tvalue: function getItemType() {\n\t\t\treturn this.internalMonitor.getItemType();\n\t\t}\n\t}, {\n\t\tkey: 'getItem',\n\t\tvalue: function getItem() {\n\t\t\treturn this.internalMonitor.getItem();\n\t\t}\n\t}, {\n\t\tkey: 'getDropResult',\n\t\tvalue: function getDropResult() {\n\t\t\treturn this.internalMonitor.getDropResult();\n\t\t}\n\t}, {\n\t\tkey: 'didDrop',\n\t\tvalue: function didDrop() {\n\t\t\treturn this.internalMonitor.didDrop();\n\t\t}\n\t}, {\n\t\tkey: 'getInitialClientOffset',\n\t\tvalue: function getInitialClientOffset() {\n\t\t\treturn this.internalMonitor.getInitialClientOffset();\n\t\t}\n\t}, {\n\t\tkey: 'getInitialSourceClientOffset',\n\t\tvalue: function getInitialSourceClientOffset() {\n\t\t\treturn this.internalMonitor.getInitialSourceClientOffset();\n\t\t}\n\t}, {\n\t\tkey: 'getSourceClientOffset',\n\t\tvalue: function getSourceClientOffset() {\n\t\t\treturn this.internalMonitor.getSourceClientOffset();\n\t\t}\n\t}, {\n\t\tkey: 'getClientOffset',\n\t\tvalue: function getClientOffset() {\n\t\t\treturn this.internalMonitor.getClientOffset();\n\t\t}\n\t}, {\n\t\tkey: 'getDifferenceFromInitialOffset',\n\t\tvalue: function getDifferenceFromInitialOffset() {\n\t\t\treturn this.internalMonitor.getDifferenceFromInitialOffset();\n\t\t}\n\t}]);\n\n\treturn TargetMonitor;\n}();\n\nfunction createTargetMonitor(manager) {\n\treturn new TargetMonitor(manager);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nexports.default = createTargetFactory;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _isPlainObject = require('lodash/isPlainObject');\n\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ALLOWED_SPEC_METHODS = ['canDrop', 'hover', 'drop'];\n\nfunction createTargetFactory(spec) {\n\tObject.keys(spec).forEach(function (key) {\n\t\t(0, _invariant2.default)(ALLOWED_SPEC_METHODS.indexOf(key) > -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://react-dnd.github.io/react-dnd/docs-drop-target.html', ALLOWED_SPEC_METHODS.join(', '), key);\n\t\t(0, _invariant2.default)(typeof spec[key] === 'function', 'Expected %s in the drop target specification to be a function. ' + 'Instead received a specification with %s: %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html', key, key, spec[key]);\n\t});\n\n\tvar Target = function () {\n\t\tfunction Target(monitor) {\n\t\t\t_classCallCheck(this, Target);\n\n\t\t\tthis.monitor = monitor;\n\t\t\tthis.props = null;\n\t\t\tthis.component = null;\n\t\t}\n\n\t\t_createClass(Target, [{\n\t\t\tkey: 'receiveProps',\n\t\t\tvalue: function receiveProps(props) {\n\t\t\t\tthis.props = props;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'receiveMonitor',\n\t\t\tvalue: function receiveMonitor(monitor) {\n\t\t\t\tthis.monitor = monitor;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'receiveComponent',\n\t\t\tvalue: function receiveComponent(component) {\n\t\t\t\tthis.component = component;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'canDrop',\n\t\t\tvalue: function canDrop() {\n\t\t\t\tif (!spec.canDrop) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn spec.canDrop(this.props, this.monitor);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'hover',\n\t\t\tvalue: function hover() {\n\t\t\t\tif (!spec.hover) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tspec.hover(this.props, this.monitor, this.component);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'drop',\n\t\t\tvalue: function drop() {\n\t\t\t\tif (!spec.drop) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tvar dropResult = spec.drop(this.props, this.monitor, this.component);\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t(0, _invariant2.default)(typeof dropResult === 'undefined' || (0, _isPlainObject2.default)(dropResult), 'drop() must either return undefined, or an object that represents the drop result. ' + 'Instead received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html', dropResult);\n\t\t\t\t}\n\t\t\t\treturn dropResult;\n\t\t\t}\n\t\t}]);\n\n\t\treturn Target;\n\t}();\n\n\treturn function createTarget(monitor) {\n\t\treturn new Target(monitor);\n\t};\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = registerTarget;\nfunction registerTarget(type, target, manager) {\n\tvar registry = manager.getRegistry();\n\tvar targetId = registry.addTarget(type, target);\n\n\tfunction unregisterTarget() {\n\t\tregistry.removeTarget(targetId);\n\t}\n\n\treturn {\n\t\thandlerId: targetId,\n\t\tunregister: unregisterTarget\n\t};\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = DropTarget;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _isPlainObject = require('lodash/isPlainObject');\n\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\n\nvar _checkDecoratorArguments = require('./utils/checkDecoratorArguments');\n\nvar _checkDecoratorArguments2 = _interopRequireDefault(_checkDecoratorArguments);\n\nvar _decorateHandler = require('./decorateHandler');\n\nvar _decorateHandler2 = _interopRequireDefault(_decorateHandler);\n\nvar _registerTarget = require('./registerTarget');\n\nvar _registerTarget2 = _interopRequireDefault(_registerTarget);\n\nvar _createTargetFactory = require('./createTargetFactory');\n\nvar _createTargetFactory2 = _interopRequireDefault(_createTargetFactory);\n\nvar _createTargetMonitor = require('./createTargetMonitor');\n\nvar _createTargetMonitor2 = _interopRequireDefault(_createTargetMonitor);\n\nvar _createTargetConnector = require('./createTargetConnector');\n\nvar _createTargetConnector2 = _interopRequireDefault(_createTargetConnector);\n\nvar _isValidType = require('./utils/isValidType');\n\nvar _isValidType2 = _interopRequireDefault(_isValidType);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction DropTarget(type, spec, collect) {\n\tvar options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n\t_checkDecoratorArguments2.default.apply(undefined, ['DropTarget', 'type, spec, collect[, options]'].concat(Array.prototype.slice.call(arguments)));\n\tvar getType = type;\n\tif (typeof type !== 'function') {\n\t\t(0, _invariant2.default)((0, _isValidType2.default)(type, true), 'Expected \"type\" provided as the first argument to DropTarget to be ' + 'a string, an array of strings, or a function that returns either given ' + 'the current props. Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html', type);\n\t\tgetType = function getType() {\n\t\t\treturn type;\n\t\t};\n\t}\n\t(0, _invariant2.default)((0, _isPlainObject2.default)(spec), 'Expected \"spec\" provided as the second argument to DropTarget to be ' + 'a plain object. Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html', spec);\n\tvar createTarget = (0, _createTargetFactory2.default)(spec);\n\t(0, _invariant2.default)(typeof collect === 'function', 'Expected \"collect\" provided as the third argument to DropTarget to be ' + 'a function that returns a plain object of props to inject. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html', collect);\n\t(0, _invariant2.default)((0, _isPlainObject2.default)(options), 'Expected \"options\" provided as the fourth argument to DropTarget to be ' + 'a plain object when specified. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html', collect);\n\n\treturn function decorateTarget(DecoratedComponent) {\n\t\treturn (0, _decorateHandler2.default)({\n\t\t\tconnectBackend: function connectBackend(backend, targetId) {\n\t\t\t\treturn backend.connectDropTarget(targetId);\n\t\t\t},\n\t\t\tcontainerDisplayName: 'DropTarget',\n\t\t\tcreateHandler: createTarget,\n\t\t\tregisterHandler: _registerTarget2.default,\n\t\t\tcreateMonitor: _createTargetMonitor2.default,\n\t\t\tcreateConnector: _createTargetConnector2.default,\n\t\t\tDecoratedComponent: DecoratedComponent,\n\t\t\tgetType: getType,\n\t\t\tcollect: collect,\n\t\t\toptions: options\n\t\t});\n\t};\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = cloneWithRef;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _react = require('react');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction cloneWithRef(element, newRef) {\n\tvar previousRef = element.ref;\n\t(0, _invariant2.default)(typeof previousRef !== 'string', 'Cannot connect React DnD to an element with an existing string ref. ' + 'Please convert it to use a callback ref instead, or wrap it into a or
. ' + 'Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute');\n\n\tif (!previousRef) {\n\t\t// When there is no ref on the element, use the new ref directly\n\t\treturn (0, _react.cloneElement)(element, {\n\t\t\tref: newRef\n\t\t});\n\t}\n\n\treturn (0, _react.cloneElement)(element, {\n\t\tref: function ref(node) {\n\t\t\tnewRef(node);\n\n\t\t\tif (previousRef) {\n\t\t\t\tpreviousRef(node);\n\t\t\t}\n\t\t}\n\t});\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = createSourceConnector;\n\nvar _wrapConnectorHooks = require('./wrapConnectorHooks');\n\nvar _wrapConnectorHooks2 = _interopRequireDefault(_wrapConnectorHooks);\n\nvar _areOptionsEqual = require('./areOptionsEqual');\n\nvar _areOptionsEqual2 = _interopRequireDefault(_areOptionsEqual);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createSourceConnector(backend) {\n\tvar currentHandlerId = void 0;\n\n\tvar currentDragSourceNode = void 0;\n\tvar currentDragSourceOptions = void 0;\n\tvar disconnectCurrentDragSource = void 0;\n\n\tvar currentDragPreviewNode = void 0;\n\tvar currentDragPreviewOptions = void 0;\n\tvar disconnectCurrentDragPreview = void 0;\n\n\tfunction reconnectDragSource() {\n\t\tif (disconnectCurrentDragSource) {\n\t\t\tdisconnectCurrentDragSource();\n\t\t\tdisconnectCurrentDragSource = null;\n\t\t}\n\n\t\tif (currentHandlerId && currentDragSourceNode) {\n\t\t\tdisconnectCurrentDragSource = backend.connectDragSource(currentHandlerId, currentDragSourceNode, currentDragSourceOptions);\n\t\t}\n\t}\n\n\tfunction reconnectDragPreview() {\n\t\tif (disconnectCurrentDragPreview) {\n\t\t\tdisconnectCurrentDragPreview();\n\t\t\tdisconnectCurrentDragPreview = null;\n\t\t}\n\n\t\tif (currentHandlerId && currentDragPreviewNode) {\n\t\t\tdisconnectCurrentDragPreview = backend.connectDragPreview(currentHandlerId, currentDragPreviewNode, currentDragPreviewOptions);\n\t\t}\n\t}\n\n\tfunction receiveHandlerId(handlerId) {\n\t\tif (handlerId === currentHandlerId) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentHandlerId = handlerId;\n\t\treconnectDragSource();\n\t\treconnectDragPreview();\n\t}\n\n\tvar hooks = (0, _wrapConnectorHooks2.default)({\n\t\tdragSource: function connectDragSource(node, options) {\n\t\t\tif (node === currentDragSourceNode && (0, _areOptionsEqual2.default)(options, currentDragSourceOptions)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcurrentDragSourceNode = node;\n\t\t\tcurrentDragSourceOptions = options;\n\n\t\t\treconnectDragSource();\n\t\t},\n\n\t\tdragPreview: function connectDragPreview(node, options) {\n\t\t\tif (node === currentDragPreviewNode && (0, _areOptionsEqual2.default)(options, currentDragPreviewOptions)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcurrentDragPreviewNode = node;\n\t\t\tcurrentDragPreviewOptions = options;\n\n\t\t\treconnectDragPreview();\n\t\t}\n\t});\n\n\treturn {\n\t\treceiveHandlerId: receiveHandlerId,\n\t\thooks: hooks\n\t};\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nexports.default = createSourceMonitor;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar isCallingCanDrag = false;\nvar isCallingIsDragging = false;\n\nvar SourceMonitor = function () {\n\tfunction SourceMonitor(manager) {\n\t\t_classCallCheck(this, SourceMonitor);\n\n\t\tthis.internalMonitor = manager.getMonitor();\n\t}\n\n\t_createClass(SourceMonitor, [{\n\t\tkey: 'receiveHandlerId',\n\t\tvalue: function receiveHandlerId(sourceId) {\n\t\t\tthis.sourceId = sourceId;\n\t\t}\n\t}, {\n\t\tkey: 'canDrag',\n\t\tvalue: function canDrag() {\n\t\t\t(0, _invariant2.default)(!isCallingCanDrag, 'You may not call monitor.canDrag() inside your canDrag() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html');\n\n\t\t\ttry {\n\t\t\t\tisCallingCanDrag = true;\n\t\t\t\treturn this.internalMonitor.canDragSource(this.sourceId);\n\t\t\t} finally {\n\t\t\t\tisCallingCanDrag = false;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'isDragging',\n\t\tvalue: function isDragging() {\n\t\t\t(0, _invariant2.default)(!isCallingIsDragging, 'You may not call monitor.isDragging() inside your isDragging() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html');\n\n\t\t\ttry {\n\t\t\t\tisCallingIsDragging = true;\n\t\t\t\treturn this.internalMonitor.isDraggingSource(this.sourceId);\n\t\t\t} finally {\n\t\t\t\tisCallingIsDragging = false;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getItemType',\n\t\tvalue: function getItemType() {\n\t\t\treturn this.internalMonitor.getItemType();\n\t\t}\n\t}, {\n\t\tkey: 'getItem',\n\t\tvalue: function getItem() {\n\t\t\treturn this.internalMonitor.getItem();\n\t\t}\n\t}, {\n\t\tkey: 'getDropResult',\n\t\tvalue: function getDropResult() {\n\t\t\treturn this.internalMonitor.getDropResult();\n\t\t}\n\t}, {\n\t\tkey: 'didDrop',\n\t\tvalue: function didDrop() {\n\t\t\treturn this.internalMonitor.didDrop();\n\t\t}\n\t}, {\n\t\tkey: 'getInitialClientOffset',\n\t\tvalue: function getInitialClientOffset() {\n\t\t\treturn this.internalMonitor.getInitialClientOffset();\n\t\t}\n\t}, {\n\t\tkey: 'getInitialSourceClientOffset',\n\t\tvalue: function getInitialSourceClientOffset() {\n\t\t\treturn this.internalMonitor.getInitialSourceClientOffset();\n\t\t}\n\t}, {\n\t\tkey: 'getSourceClientOffset',\n\t\tvalue: function getSourceClientOffset() {\n\t\t\treturn this.internalMonitor.getSourceClientOffset();\n\t\t}\n\t}, {\n\t\tkey: 'getClientOffset',\n\t\tvalue: function getClientOffset() {\n\t\t\treturn this.internalMonitor.getClientOffset();\n\t\t}\n\t}, {\n\t\tkey: 'getDifferenceFromInitialOffset',\n\t\tvalue: function getDifferenceFromInitialOffset() {\n\t\t\treturn this.internalMonitor.getDifferenceFromInitialOffset();\n\t\t}\n\t}]);\n\n\treturn SourceMonitor;\n}();\n\nfunction createSourceMonitor(manager) {\n\treturn new SourceMonitor(manager);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nexports.default = createSourceFactory;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _isPlainObject = require('lodash/isPlainObject');\n\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ALLOWED_SPEC_METHODS = ['canDrag', 'beginDrag', 'isDragging', 'endDrag'];\nvar REQUIRED_SPEC_METHODS = ['beginDrag'];\n\nfunction createSourceFactory(spec) {\n\tObject.keys(spec).forEach(function (key) {\n\t\t(0, _invariant2.default)(ALLOWED_SPEC_METHODS.indexOf(key) > -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://react-dnd.github.io/react-dnd/docs-drag-source.html', ALLOWED_SPEC_METHODS.join(', '), key);\n\t\t(0, _invariant2.default)(typeof spec[key] === 'function', 'Expected %s in the drag source specification to be a function. ' + 'Instead received a specification with %s: %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html', key, key, spec[key]);\n\t});\n\tREQUIRED_SPEC_METHODS.forEach(function (key) {\n\t\t(0, _invariant2.default)(typeof spec[key] === 'function', 'Expected %s in the drag source specification to be a function. ' + 'Instead received a specification with %s: %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html', key, key, spec[key]);\n\t});\n\n\tvar Source = function () {\n\t\tfunction Source(monitor) {\n\t\t\t_classCallCheck(this, Source);\n\n\t\t\tthis.monitor = monitor;\n\t\t\tthis.props = null;\n\t\t\tthis.component = null;\n\t\t}\n\n\t\t_createClass(Source, [{\n\t\t\tkey: 'receiveProps',\n\t\t\tvalue: function receiveProps(props) {\n\t\t\t\tthis.props = props;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'receiveComponent',\n\t\t\tvalue: function receiveComponent(component) {\n\t\t\t\tthis.component = component;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'canDrag',\n\t\t\tvalue: function canDrag() {\n\t\t\t\tif (!spec.canDrag) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn spec.canDrag(this.props, this.monitor);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'isDragging',\n\t\t\tvalue: function isDragging(globalMonitor, sourceId) {\n\t\t\t\tif (!spec.isDragging) {\n\t\t\t\t\treturn sourceId === globalMonitor.getSourceId();\n\t\t\t\t}\n\n\t\t\t\treturn spec.isDragging(this.props, this.monitor);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'beginDrag',\n\t\t\tvalue: function beginDrag() {\n\t\t\t\tvar item = spec.beginDrag(this.props, this.monitor, this.component);\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t(0, _invariant2.default)((0, _isPlainObject2.default)(item), 'beginDrag() must return a plain object that represents the dragged item. ' + 'Instead received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html', item);\n\t\t\t\t}\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'endDrag',\n\t\t\tvalue: function endDrag() {\n\t\t\t\tif (!spec.endDrag) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tspec.endDrag(this.props, this.monitor, this.component);\n\t\t\t}\n\t\t}]);\n\n\t\treturn Source;\n\t}();\n\n\treturn function createSource(monitor) {\n\t\treturn new Source(monitor);\n\t};\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = registerSource;\nfunction registerSource(type, source, manager) {\n\tvar registry = manager.getRegistry();\n\tvar sourceId = registry.addSource(type, source);\n\n\tfunction unregisterSource() {\n\t\tregistry.removeSource(sourceId);\n\t}\n\n\treturn {\n\t\thandlerId: sourceId,\n\t\tunregister: unregisterSource\n\t};\n}","'use strict';\n\nexports.__esModule = true;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar _isDisposable = require('./isDisposable');\n\nvar _isDisposable2 = _interopRequireDefault(_isDisposable);\n\nvar SerialDisposable = (function () {\n function SerialDisposable() {\n _classCallCheck(this, SerialDisposable);\n\n this.isDisposed = false;\n this.current = null;\n }\n\n /**\n * Gets the underlying disposable.\n * @return The underlying disposable.\n */\n\n SerialDisposable.prototype.getDisposable = function getDisposable() {\n return this.current;\n };\n\n /**\n * Sets the underlying disposable.\n * @param {Disposable} value The new underlying disposable.\n */\n\n SerialDisposable.prototype.setDisposable = function setDisposable() {\n var value = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];\n\n if (value != null && !_isDisposable2['default'](value)) {\n throw new Error('Expected either an empty value or a valid disposable');\n }\n\n var isDisposed = this.isDisposed;\n var previous = undefined;\n\n if (!isDisposed) {\n previous = this.current;\n this.current = value;\n }\n\n if (previous) {\n previous.dispose();\n }\n\n if (isDisposed && value) {\n value.dispose();\n }\n };\n\n /**\n * Disposes the underlying disposable as well as all future replacements.\n */\n\n SerialDisposable.prototype.dispose = function dispose() {\n if (this.isDisposed) {\n return;\n }\n\n this.isDisposed = true;\n var previous = this.current;\n this.current = null;\n\n if (previous) {\n previous.dispose();\n }\n };\n\n return SerialDisposable;\n})();\n\nexports['default'] = SerialDisposable;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar _isDisposable = require('./isDisposable');\n\nvar _isDisposable2 = _interopRequireDefault(_isDisposable);\n\n/**\n * Represents a group of disposable resources that are disposed together.\n */\n\nvar CompositeDisposable = (function () {\n function CompositeDisposable() {\n for (var _len = arguments.length, disposables = Array(_len), _key = 0; _key < _len; _key++) {\n disposables[_key] = arguments[_key];\n }\n\n _classCallCheck(this, CompositeDisposable);\n\n if (Array.isArray(disposables[0]) && disposables.length === 1) {\n disposables = disposables[0];\n }\n\n for (var i = 0; i < disposables.length; i++) {\n if (!_isDisposable2['default'](disposables[i])) {\n throw new Error('Expected a disposable');\n }\n }\n\n this.disposables = disposables;\n this.isDisposed = false;\n }\n\n /**\n * Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed.\n * @param {Disposable} item Disposable to add.\n */\n\n CompositeDisposable.prototype.add = function add(item) {\n if (this.isDisposed) {\n item.dispose();\n } else {\n this.disposables.push(item);\n }\n };\n\n /**\n * Removes and disposes the first occurrence of a disposable from the CompositeDisposable.\n * @param {Disposable} item Disposable to remove.\n * @returns {Boolean} true if found; false otherwise.\n */\n\n CompositeDisposable.prototype.remove = function remove(item) {\n if (this.isDisposed) {\n return false;\n }\n\n var index = this.disposables.indexOf(item);\n if (index === -1) {\n return false;\n }\n\n this.disposables.splice(index, 1);\n item.dispose();\n return true;\n };\n\n /**\n * Disposes all disposables in the group and removes them from the group.\n */\n\n CompositeDisposable.prototype.dispose = function dispose() {\n if (this.isDisposed) {\n return;\n }\n\n var len = this.disposables.length;\n var currentDisposables = new Array(len);\n for (var i = 0; i < len; i++) {\n currentDisposables[i] = this.disposables[i];\n }\n\n this.isDisposed = true;\n this.disposables = [];\n this.length = 0;\n\n for (var i = 0; i < len; i++) {\n currentDisposables[i].dispose();\n }\n };\n\n return CompositeDisposable;\n})();\n\nexports['default'] = CompositeDisposable;\nmodule.exports = exports['default'];","\"use strict\";\n\nexports.__esModule = true;\n\nvar _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; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar noop = function noop() {};\n\n/**\n * The basic disposable.\n */\n\nvar Disposable = (function () {\n _createClass(Disposable, null, [{\n key: \"empty\",\n value: { dispose: noop },\n enumerable: true\n }]);\n\n function Disposable(action) {\n _classCallCheck(this, Disposable);\n\n this.isDisposed = false;\n this.action = action || noop;\n }\n\n Disposable.prototype.dispose = function dispose() {\n if (!this.isDisposed) {\n this.action.call(null);\n this.isDisposed = true;\n }\n };\n\n return Disposable;\n})();\n\nexports[\"default\"] = Disposable;\nmodule.exports = exports[\"default\"];","'use strict';\n\nexports.__esModule = true;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _isDisposable2 = require('./isDisposable');\n\nvar _isDisposable3 = _interopRequireDefault(_isDisposable2);\n\nexports.isDisposable = _isDisposable3['default'];\n\nvar _Disposable2 = require('./Disposable');\n\nvar _Disposable3 = _interopRequireDefault(_Disposable2);\n\nexports.Disposable = _Disposable3['default'];\n\nvar _CompositeDisposable2 = require('./CompositeDisposable');\n\nvar _CompositeDisposable3 = _interopRequireDefault(_CompositeDisposable2);\n\nexports.CompositeDisposable = _CompositeDisposable3['default'];\n\nvar _SerialDisposable2 = require('./SerialDisposable');\n\nvar _SerialDisposable3 = _interopRequireDefault(_SerialDisposable2);\n\nexports.SerialDisposable = _SerialDisposable3['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = DragSource;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _isPlainObject = require('lodash/isPlainObject');\n\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\n\nvar _checkDecoratorArguments = require('./utils/checkDecoratorArguments');\n\nvar _checkDecoratorArguments2 = _interopRequireDefault(_checkDecoratorArguments);\n\nvar _decorateHandler = require('./decorateHandler');\n\nvar _decorateHandler2 = _interopRequireDefault(_decorateHandler);\n\nvar _registerSource = require('./registerSource');\n\nvar _registerSource2 = _interopRequireDefault(_registerSource);\n\nvar _createSourceFactory = require('./createSourceFactory');\n\nvar _createSourceFactory2 = _interopRequireDefault(_createSourceFactory);\n\nvar _createSourceMonitor = require('./createSourceMonitor');\n\nvar _createSourceMonitor2 = _interopRequireDefault(_createSourceMonitor);\n\nvar _createSourceConnector = require('./createSourceConnector');\n\nvar _createSourceConnector2 = _interopRequireDefault(_createSourceConnector);\n\nvar _isValidType = require('./utils/isValidType');\n\nvar _isValidType2 = _interopRequireDefault(_isValidType);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction DragSource(type, spec, collect) {\n\tvar options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n\t_checkDecoratorArguments2.default.apply(undefined, ['DragSource', 'type, spec, collect[, options]'].concat(Array.prototype.slice.call(arguments)));\n\tvar getType = type;\n\tif (typeof type !== 'function') {\n\t\t(0, _invariant2.default)((0, _isValidType2.default)(type), 'Expected \"type\" provided as the first argument to DragSource to be ' + 'a string, or a function that returns a string given the current props. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html', type);\n\t\tgetType = function getType() {\n\t\t\treturn type;\n\t\t};\n\t}\n\t(0, _invariant2.default)((0, _isPlainObject2.default)(spec), 'Expected \"spec\" provided as the second argument to DragSource to be ' + 'a plain object. Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html', spec);\n\tvar createSource = (0, _createSourceFactory2.default)(spec);\n\t(0, _invariant2.default)(typeof collect === 'function', 'Expected \"collect\" provided as the third argument to DragSource to be ' + 'a function that returns a plain object of props to inject. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html', collect);\n\t(0, _invariant2.default)((0, _isPlainObject2.default)(options), 'Expected \"options\" provided as the fourth argument to DragSource to be ' + 'a plain object when specified. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html', collect);\n\n\treturn function decorateSource(DecoratedComponent) {\n\t\treturn (0, _decorateHandler2.default)({\n\t\t\tconnectBackend: function connectBackend(backend, sourceId) {\n\t\t\t\treturn backend.connectDragSource(sourceId);\n\t\t\t},\n\t\t\tcontainerDisplayName: 'DragSource',\n\t\t\tcreateHandler: createSource,\n\t\t\tregisterHandler: _registerSource2.default,\n\t\t\tcreateMonitor: _createSourceMonitor2.default,\n\t\t\tcreateConnector: _createSourceConnector2.default,\n\t\t\tDecoratedComponent: DecoratedComponent,\n\t\t\tgetType: getType,\n\t\t\tcollect: collect,\n\t\t\toptions: options\n\t\t});\n\t};\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; };\n\nvar _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; };\n\nvar _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; }; }();\n\nexports.default = DragLayer;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _hoistNonReactStatics = require('hoist-non-react-statics');\n\nvar _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);\n\nvar _isPlainObject = require('lodash/isPlainObject');\n\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _shallowEqual = require('./utils/shallowEqual');\n\nvar _shallowEqual2 = _interopRequireDefault(_shallowEqual);\n\nvar _shallowEqualScalar = require('./utils/shallowEqualScalar');\n\nvar _shallowEqualScalar2 = _interopRequireDefault(_shallowEqualScalar);\n\nvar _checkDecoratorArguments = require('./utils/checkDecoratorArguments');\n\nvar _checkDecoratorArguments2 = _interopRequireDefault(_checkDecoratorArguments);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction DragLayer(collect) {\n\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t_checkDecoratorArguments2.default.apply(undefined, ['DragLayer', 'collect[, options]'].concat(Array.prototype.slice.call(arguments))); // eslint-disable-line prefer-rest-params\n\t(0, _invariant2.default)(typeof collect === 'function', 'Expected \"collect\" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ', 'Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html', collect);\n\t(0, _invariant2.default)((0, _isPlainObject2.default)(options), 'Expected \"options\" provided as the second argument to DragLayer to be a plain object when specified. ' + 'Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html', options);\n\n\treturn function decorateLayer(DecoratedComponent) {\n\t\tvar _class, _temp;\n\n\t\tvar _options$arePropsEqua = options.arePropsEqual,\n\t\t arePropsEqual = _options$arePropsEqua === undefined ? _shallowEqualScalar2.default : _options$arePropsEqua;\n\n\t\tvar displayName = DecoratedComponent.displayName || DecoratedComponent.name || 'Component';\n\n\t\tvar DragLayerContainer = (_temp = _class = function (_Component) {\n\t\t\t_inherits(DragLayerContainer, _Component);\n\n\t\t\t_createClass(DragLayerContainer, [{\n\t\t\t\tkey: 'getDecoratedComponentInstance',\n\t\t\t\tvalue: function getDecoratedComponentInstance() {\n\t\t\t\t\t(0, _invariant2.default)(this.child, 'In order to access an instance of the decorated component it can not be a stateless component.');\n\t\t\t\t\treturn this.child;\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'shouldComponentUpdate',\n\t\t\t\tvalue: function shouldComponentUpdate(nextProps, nextState) {\n\t\t\t\t\treturn !arePropsEqual(nextProps, this.props) || !(0, _shallowEqual2.default)(nextState, this.state);\n\t\t\t\t}\n\t\t\t}]);\n\n\t\t\tfunction DragLayerContainer(props, context) {\n\t\t\t\t_classCallCheck(this, DragLayerContainer);\n\n\t\t\t\tvar _this = _possibleConstructorReturn(this, (DragLayerContainer.__proto__ || Object.getPrototypeOf(DragLayerContainer)).call(this, props));\n\n\t\t\t\t_this.handleChange = _this.handleChange.bind(_this);\n\n\t\t\t\t_this.manager = context.dragDropManager;\n\t\t\t\t(0, _invariant2.default)(_typeof(_this.manager) === 'object', '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://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context', displayName, displayName);\n\n\t\t\t\t_this.state = _this.getCurrentState();\n\t\t\t\treturn _this;\n\t\t\t}\n\n\t\t\t_createClass(DragLayerContainer, [{\n\t\t\t\tkey: 'componentDidMount',\n\t\t\t\tvalue: function componentDidMount() {\n\t\t\t\t\tthis.isCurrentlyMounted = true;\n\n\t\t\t\t\tvar monitor = this.manager.getMonitor();\n\t\t\t\t\tthis.unsubscribeFromOffsetChange = monitor.subscribeToOffsetChange(this.handleChange);\n\t\t\t\t\tthis.unsubscribeFromStateChange = monitor.subscribeToStateChange(this.handleChange);\n\n\t\t\t\t\tthis.handleChange();\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'componentWillUnmount',\n\t\t\t\tvalue: function componentWillUnmount() {\n\t\t\t\t\tthis.isCurrentlyMounted = false;\n\n\t\t\t\t\tthis.unsubscribeFromOffsetChange();\n\t\t\t\t\tthis.unsubscribeFromStateChange();\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'handleChange',\n\t\t\t\tvalue: function handleChange() {\n\t\t\t\t\tif (!this.isCurrentlyMounted) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar nextState = this.getCurrentState();\n\t\t\t\t\tif (!(0, _shallowEqual2.default)(nextState, this.state)) {\n\t\t\t\t\t\tthis.setState(nextState);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'getCurrentState',\n\t\t\t\tvalue: function getCurrentState() {\n\t\t\t\t\tvar monitor = this.manager.getMonitor();\n\t\t\t\t\treturn collect(monitor, this.props);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'render',\n\t\t\t\tvalue: function render() {\n\t\t\t\t\tvar _this2 = this;\n\n\t\t\t\t\treturn _react2.default.createElement(DecoratedComponent, _extends({}, this.props, this.state, {\n\t\t\t\t\t\tref: function ref(child) {\n\t\t\t\t\t\t\t_this2.child = child;\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t}]);\n\n\t\t\treturn DragLayerContainer;\n\t\t}(_react.Component), _class.DecoratedComponent = DecoratedComponent, _class.displayName = 'DragLayer(' + displayName + ')', _class.contextTypes = {\n\t\t\tdragDropManager: _propTypes2.default.object.isRequired\n\t\t}, _temp);\n\n\n\t\treturn (0, _hoistNonReactStatics2.default)(DragLayerContainer, DecoratedComponent);\n\t};\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = undefined;\n\nvar _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; }; }();\n\nvar _class, _temp;\n\nvar _react = require('react');\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _DragDropContext = require('./DragDropContext');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * This class is a React-Component based version of the DragDropContext.\n * This is an alternative to decorating an application component with an ES7 decorator.\n */\nvar DragDropContextProvider = (_temp = _class = function (_Component) {\n\t_inherits(DragDropContextProvider, _Component);\n\n\tfunction DragDropContextProvider(props, context) {\n\t\t_classCallCheck(this, DragDropContextProvider);\n\n\t\t/**\n * This property determines which window global to use for creating the DragDropManager.\n * If a window has been injected explicitly via props, that is used first. If it is available\n * as a context value, then use that, otherwise use the browser global.\n */\n\t\tvar _this = _possibleConstructorReturn(this, (DragDropContextProvider.__proto__ || Object.getPrototypeOf(DragDropContextProvider)).call(this, props, context));\n\n\t\tvar getWindow = function getWindow() {\n\t\t\tif (props && props.window) {\n\t\t\t\treturn props.window;\n\t\t\t} else if (context && context.window) {\n\t\t\t\treturn context.window;\n\t\t\t} else if (typeof window !== 'undefined') {\n\t\t\t\treturn window;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t};\n\n\t\t_this.backend = (0, _DragDropContext.unpackBackendForEs5Users)(props.backend);\n\t\t_this.childContext = (0, _DragDropContext.createChildContext)(_this.backend, {\n\t\t\twindow: getWindow()\n\t\t});\n\t\treturn _this;\n\t}\n\n\t_createClass(DragDropContextProvider, [{\n\t\tkey: 'componentWillReceiveProps',\n\t\tvalue: function componentWillReceiveProps(nextProps) {\n\t\t\tif (nextProps.backend !== this.props.backend || nextProps.window !== this.props.window) {\n\t\t\t\tthrow new Error('DragDropContextProvider backend and window props must not change.');\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getChildContext',\n\t\tvalue: function getChildContext() {\n\t\t\treturn this.childContext;\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\treturn _react.Children.only(this.props.children);\n\t\t}\n\t}]);\n\n\treturn DragDropContextProvider;\n}(_react.Component), _class.propTypes = {\n\tbackend: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object]).isRequired,\n\tchildren: _propTypes2.default.element.isRequired,\n\twindow: _propTypes2.default.object // eslint-disable-line react/forbid-prop-types\n}, _class.defaultProps = {\n\twindow: undefined\n}, _class.childContextTypes = _DragDropContext.CHILD_CONTEXT_TYPES, _class.displayName = 'DragDropContextProvider', _class.contextTypes = {\n\twindow: _propTypes2.default.object\n}, _temp);\nexports.default = DragDropContextProvider;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nexports.default = createBackend;\n\nvar _noop = require('lodash/noop');\n\nvar _noop2 = _interopRequireDefault(_noop);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar TestBackend = function () {\n\tfunction TestBackend(manager) {\n\t\t_classCallCheck(this, TestBackend);\n\n\t\tthis.actions = manager.getActions();\n\t}\n\n\t_createClass(TestBackend, [{\n\t\tkey: 'setup',\n\t\tvalue: function setup() {\n\t\t\tthis.didCallSetup = true;\n\t\t}\n\t}, {\n\t\tkey: 'teardown',\n\t\tvalue: function teardown() {\n\t\t\tthis.didCallTeardown = true;\n\t\t}\n\t}, {\n\t\tkey: 'connectDragSource',\n\t\tvalue: function connectDragSource() {\n\t\t\treturn _noop2.default;\n\t\t}\n\t}, {\n\t\tkey: 'connectDragPreview',\n\t\tvalue: function connectDragPreview() {\n\t\t\treturn _noop2.default;\n\t\t}\n\t}, {\n\t\tkey: 'connectDropTarget',\n\t\tvalue: function connectDropTarget() {\n\t\t\treturn _noop2.default;\n\t\t}\n\t}, {\n\t\tkey: 'simulateBeginDrag',\n\t\tvalue: function simulateBeginDrag(sourceIds, options) {\n\t\t\tthis.actions.beginDrag(sourceIds, options);\n\t\t}\n\t}, {\n\t\tkey: 'simulatePublishDragSource',\n\t\tvalue: function simulatePublishDragSource() {\n\t\t\tthis.actions.publishDragSource();\n\t\t}\n\t}, {\n\t\tkey: 'simulateHover',\n\t\tvalue: function simulateHover(targetIds, options) {\n\t\t\tthis.actions.hover(targetIds, options);\n\t\t}\n\t}, {\n\t\tkey: 'simulateDrop',\n\t\tvalue: function simulateDrop() {\n\t\t\tthis.actions.drop();\n\t\t}\n\t}, {\n\t\tkey: 'simulateEndDrag',\n\t\tvalue: function simulateEndDrag() {\n\t\t\tthis.actions.endDrag();\n\t\t}\n\t}]);\n\n\treturn TestBackend;\n}();\n\nfunction createBackend(manager) {\n\treturn new TestBackend(manager);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DropTarget = function () {\n\tfunction DropTarget() {\n\t\t_classCallCheck(this, DropTarget);\n\t}\n\n\t_createClass(DropTarget, [{\n\t\tkey: \"canDrop\",\n\t\tvalue: function canDrop() {\n\t\t\treturn true;\n\t\t}\n\t}, {\n\t\tkey: \"hover\",\n\t\tvalue: function hover() {}\n\t}, {\n\t\tkey: \"drop\",\n\t\tvalue: function drop() {}\n\t}]);\n\n\treturn DropTarget;\n}();\n\nexports.default = DropTarget;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DragSource = function () {\n\tfunction DragSource() {\n\t\t_classCallCheck(this, DragSource);\n\t}\n\n\t_createClass(DragSource, [{\n\t\tkey: \"canDrag\",\n\t\tvalue: function canDrag() {\n\t\t\treturn true;\n\t\t}\n\t}, {\n\t\tkey: \"isDragging\",\n\t\tvalue: function isDragging(monitor, handle) {\n\t\t\treturn handle === monitor.getSourceId();\n\t\t}\n\t}, {\n\t\tkey: \"endDrag\",\n\t\tvalue: function endDrag() {}\n\t}]);\n\n\treturn DragSource;\n}();\n\nexports.default = DragSource;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = getNextUniqueId;\nvar nextUniqueId = 0;\n\nfunction getNextUniqueId() {\n\treturn nextUniqueId++;\n}","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n","\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nvar _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; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _isArray = require('lodash/isArray');\n\nvar _isArray2 = _interopRequireDefault(_isArray);\n\nvar _asap = require('asap');\n\nvar _asap2 = _interopRequireDefault(_asap);\n\nvar _registry = require('./actions/registry');\n\nvar _getNextUniqueId = require('./utils/getNextUniqueId');\n\nvar _getNextUniqueId2 = _interopRequireDefault(_getNextUniqueId);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar HandlerRoles = {\n\tSOURCE: 'SOURCE',\n\tTARGET: 'TARGET'\n};\n\nfunction validateSourceContract(source) {\n\t(0, _invariant2.default)(typeof source.canDrag === 'function', 'Expected canDrag to be a function.');\n\t(0, _invariant2.default)(typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.');\n\t(0, _invariant2.default)(typeof source.endDrag === 'function', 'Expected endDrag to be a function.');\n}\n\nfunction validateTargetContract(target) {\n\t(0, _invariant2.default)(typeof target.canDrop === 'function', 'Expected canDrop to be a function.');\n\t(0, _invariant2.default)(typeof target.hover === 'function', 'Expected hover to be a function.');\n\t(0, _invariant2.default)(typeof target.drop === 'function', 'Expected beginDrag to be a function.');\n}\n\nfunction validateType(type, allowArray) {\n\tif (allowArray && (0, _isArray2.default)(type)) {\n\t\ttype.forEach(function (t) {\n\t\t\treturn validateType(t, false);\n\t\t});\n\t\treturn;\n\t}\n\n\t(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.');\n}\n\nfunction getNextHandlerId(role) {\n\tvar id = (0, _getNextUniqueId2.default)().toString();\n\tswitch (role) {\n\t\tcase HandlerRoles.SOURCE:\n\t\t\treturn 'S' + id;\n\t\tcase HandlerRoles.TARGET:\n\t\t\treturn 'T' + id;\n\t\tdefault:\n\t\t\t(0, _invariant2.default)(false, 'Unknown role: ' + role);\n\t}\n}\n\nfunction parseRoleFromHandlerId(handlerId) {\n\tswitch (handlerId[0]) {\n\t\tcase 'S':\n\t\t\treturn HandlerRoles.SOURCE;\n\t\tcase 'T':\n\t\t\treturn HandlerRoles.TARGET;\n\t\tdefault:\n\t\t\t(0, _invariant2.default)(false, 'Cannot parse handler ID: ' + handlerId);\n\t}\n}\n\nvar HandlerRegistry = function () {\n\tfunction HandlerRegistry(store) {\n\t\t_classCallCheck(this, HandlerRegistry);\n\n\t\tthis.store = store;\n\n\t\tthis.types = {};\n\t\tthis.handlers = {};\n\n\t\tthis.pinnedSourceId = null;\n\t\tthis.pinnedSource = null;\n\t}\n\n\t_createClass(HandlerRegistry, [{\n\t\tkey: 'addSource',\n\t\tvalue: function addSource(type, source) {\n\t\t\tvalidateType(type);\n\t\t\tvalidateSourceContract(source);\n\n\t\t\tvar sourceId = this.addHandler(HandlerRoles.SOURCE, type, source);\n\t\t\tthis.store.dispatch((0, _registry.addSource)(sourceId));\n\t\t\treturn sourceId;\n\t\t}\n\t}, {\n\t\tkey: 'addTarget',\n\t\tvalue: function addTarget(type, target) {\n\t\t\tvalidateType(type, true);\n\t\t\tvalidateTargetContract(target);\n\n\t\t\tvar targetId = this.addHandler(HandlerRoles.TARGET, type, target);\n\t\t\tthis.store.dispatch((0, _registry.addTarget)(targetId));\n\t\t\treturn targetId;\n\t\t}\n\t}, {\n\t\tkey: 'addHandler',\n\t\tvalue: function addHandler(role, type, handler) {\n\t\t\tvar id = getNextHandlerId(role);\n\t\t\tthis.types[id] = type;\n\t\t\tthis.handlers[id] = handler;\n\n\t\t\treturn id;\n\t\t}\n\t}, {\n\t\tkey: 'containsHandler',\n\t\tvalue: function containsHandler(handler) {\n\t\t\tvar _this = this;\n\n\t\t\treturn Object.keys(this.handlers).some(function (key) {\n\t\t\t\treturn _this.handlers[key] === handler;\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'getSource',\n\t\tvalue: function getSource(sourceId, includePinned) {\n\t\t\t(0, _invariant2.default)(this.isSourceId(sourceId), 'Expected a valid source ID.');\n\n\t\t\tvar isPinned = includePinned && sourceId === this.pinnedSourceId;\n\t\t\tvar source = isPinned ? this.pinnedSource : this.handlers[sourceId];\n\n\t\t\treturn source;\n\t\t}\n\t}, {\n\t\tkey: 'getTarget',\n\t\tvalue: function getTarget(targetId) {\n\t\t\t(0, _invariant2.default)(this.isTargetId(targetId), 'Expected a valid target ID.');\n\t\t\treturn this.handlers[targetId];\n\t\t}\n\t}, {\n\t\tkey: 'getSourceType',\n\t\tvalue: function getSourceType(sourceId) {\n\t\t\t(0, _invariant2.default)(this.isSourceId(sourceId), 'Expected a valid source ID.');\n\t\t\treturn this.types[sourceId];\n\t\t}\n\t}, {\n\t\tkey: 'getTargetType',\n\t\tvalue: function getTargetType(targetId) {\n\t\t\t(0, _invariant2.default)(this.isTargetId(targetId), 'Expected a valid target ID.');\n\t\t\treturn this.types[targetId];\n\t\t}\n\t}, {\n\t\tkey: 'isSourceId',\n\t\tvalue: function isSourceId(handlerId) {\n\t\t\tvar role = parseRoleFromHandlerId(handlerId);\n\t\t\treturn role === HandlerRoles.SOURCE;\n\t\t}\n\t}, {\n\t\tkey: 'isTargetId',\n\t\tvalue: function isTargetId(handlerId) {\n\t\t\tvar role = parseRoleFromHandlerId(handlerId);\n\t\t\treturn role === HandlerRoles.TARGET;\n\t\t}\n\t}, {\n\t\tkey: 'removeSource',\n\t\tvalue: function removeSource(sourceId) {\n\t\t\tvar _this2 = this;\n\n\t\t\t(0, _invariant2.default)(this.getSource(sourceId), 'Expected an existing source.');\n\t\t\tthis.store.dispatch((0, _registry.removeSource)(sourceId));\n\n\t\t\t(0, _asap2.default)(function () {\n\t\t\t\tdelete _this2.handlers[sourceId];\n\t\t\t\tdelete _this2.types[sourceId];\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'removeTarget',\n\t\tvalue: function removeTarget(targetId) {\n\t\t\tvar _this3 = this;\n\n\t\t\t(0, _invariant2.default)(this.getTarget(targetId), 'Expected an existing target.');\n\t\t\tthis.store.dispatch((0, _registry.removeTarget)(targetId));\n\n\t\t\t(0, _asap2.default)(function () {\n\t\t\t\tdelete _this3.handlers[targetId];\n\t\t\t\tdelete _this3.types[targetId];\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'pinSource',\n\t\tvalue: function pinSource(sourceId) {\n\t\t\tvar source = this.getSource(sourceId);\n\t\t\t(0, _invariant2.default)(source, 'Expected an existing source.');\n\n\t\t\tthis.pinnedSourceId = sourceId;\n\t\t\tthis.pinnedSource = source;\n\t\t}\n\t}, {\n\t\tkey: 'unpinSource',\n\t\tvalue: function unpinSource() {\n\t\t\t(0, _invariant2.default)(this.pinnedSource, 'No source is pinned at the time.');\n\n\t\t\tthis.pinnedSourceId = null;\n\t\t\tthis.pinnedSource = null;\n\t\t}\n\t}]);\n\n\treturn HandlerRegistry;\n}();\n\nexports.default = HandlerRegistry;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _isArray = require('lodash/isArray');\n\nvar _isArray2 = _interopRequireDefault(_isArray);\n\nvar _matchesType = require('./utils/matchesType');\n\nvar _matchesType2 = _interopRequireDefault(_matchesType);\n\nvar _HandlerRegistry = require('./HandlerRegistry');\n\nvar _HandlerRegistry2 = _interopRequireDefault(_HandlerRegistry);\n\nvar _dragOffset = require('./reducers/dragOffset');\n\nvar _dirtyHandlerIds = require('./reducers/dirtyHandlerIds');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DragDropMonitor = function () {\n\tfunction DragDropMonitor(store) {\n\t\t_classCallCheck(this, DragDropMonitor);\n\n\t\tthis.store = store;\n\t\tthis.registry = new _HandlerRegistry2.default(store);\n\t}\n\n\t_createClass(DragDropMonitor, [{\n\t\tkey: 'subscribeToStateChange',\n\t\tvalue: function subscribeToStateChange(listener) {\n\t\t\tvar _this = this;\n\n\t\t\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\t\tvar handlerIds = options.handlerIds;\n\n\t\t\t(0, _invariant2.default)(typeof listener === 'function', 'listener must be a function.');\n\t\t\t(0, _invariant2.default)(typeof handlerIds === 'undefined' || (0, _isArray2.default)(handlerIds), 'handlerIds, when specified, must be an array of strings.');\n\n\t\t\tvar prevStateId = this.store.getState().stateId;\n\t\t\tvar handleChange = function handleChange() {\n\t\t\t\tvar state = _this.store.getState();\n\t\t\t\tvar currentStateId = state.stateId;\n\t\t\t\ttry {\n\t\t\t\t\tvar canSkipListener = currentStateId === prevStateId || currentStateId === prevStateId + 1 && !(0, _dirtyHandlerIds.areDirty)(state.dirtyHandlerIds, handlerIds);\n\n\t\t\t\t\tif (!canSkipListener) {\n\t\t\t\t\t\tlistener();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tprevStateId = currentStateId;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treturn this.store.subscribe(handleChange);\n\t\t}\n\t}, {\n\t\tkey: 'subscribeToOffsetChange',\n\t\tvalue: function subscribeToOffsetChange(listener) {\n\t\t\tvar _this2 = this;\n\n\t\t\t(0, _invariant2.default)(typeof listener === 'function', 'listener must be a function.');\n\n\t\t\tvar previousState = this.store.getState().dragOffset;\n\t\t\tvar handleChange = function handleChange() {\n\t\t\t\tvar nextState = _this2.store.getState().dragOffset;\n\t\t\t\tif (nextState === previousState) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tpreviousState = nextState;\n\t\t\t\tlistener();\n\t\t\t};\n\n\t\t\treturn this.store.subscribe(handleChange);\n\t\t}\n\t}, {\n\t\tkey: 'canDragSource',\n\t\tvalue: function canDragSource(sourceId) {\n\t\t\tvar source = this.registry.getSource(sourceId);\n\t\t\t(0, _invariant2.default)(source, 'Expected to find a valid source.');\n\n\t\t\tif (this.isDragging()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn source.canDrag(this, sourceId);\n\t\t}\n\t}, {\n\t\tkey: 'canDropOnTarget',\n\t\tvalue: function canDropOnTarget(targetId) {\n\t\t\tvar target = this.registry.getTarget(targetId);\n\t\t\t(0, _invariant2.default)(target, 'Expected to find a valid target.');\n\n\t\t\tif (!this.isDragging() || this.didDrop()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar targetType = this.registry.getTargetType(targetId);\n\t\t\tvar draggedItemType = this.getItemType();\n\t\t\treturn (0, _matchesType2.default)(targetType, draggedItemType) && target.canDrop(this, targetId);\n\t\t}\n\t}, {\n\t\tkey: 'isDragging',\n\t\tvalue: function isDragging() {\n\t\t\treturn Boolean(this.getItemType());\n\t\t}\n\t}, {\n\t\tkey: 'isDraggingSource',\n\t\tvalue: function isDraggingSource(sourceId) {\n\t\t\tvar source = this.registry.getSource(sourceId, true);\n\t\t\t(0, _invariant2.default)(source, 'Expected to find a valid source.');\n\n\t\t\tif (!this.isDragging() || !this.isSourcePublic()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar sourceType = this.registry.getSourceType(sourceId);\n\t\t\tvar draggedItemType = this.getItemType();\n\t\t\tif (sourceType !== draggedItemType) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn source.isDragging(this, sourceId);\n\t\t}\n\t}, {\n\t\tkey: 'isOverTarget',\n\t\tvalue: function isOverTarget(targetId) {\n\t\t\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { shallow: false };\n\t\t\tvar shallow = options.shallow;\n\n\t\t\tif (!this.isDragging()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar targetType = this.registry.getTargetType(targetId);\n\t\t\tvar draggedItemType = this.getItemType();\n\t\t\tif (!(0, _matchesType2.default)(targetType, draggedItemType)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar targetIds = this.getTargetIds();\n\t\t\tif (!targetIds.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar index = targetIds.indexOf(targetId);\n\t\t\tif (shallow) {\n\t\t\t\treturn index === targetIds.length - 1;\n\t\t\t} else {\n\t\t\t\treturn index > -1;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getItemType',\n\t\tvalue: function getItemType() {\n\t\t\treturn this.store.getState().dragOperation.itemType;\n\t\t}\n\t}, {\n\t\tkey: 'getItem',\n\t\tvalue: function getItem() {\n\t\t\treturn this.store.getState().dragOperation.item;\n\t\t}\n\t}, {\n\t\tkey: 'getSourceId',\n\t\tvalue: function getSourceId() {\n\t\t\treturn this.store.getState().dragOperation.sourceId;\n\t\t}\n\t}, {\n\t\tkey: 'getTargetIds',\n\t\tvalue: function getTargetIds() {\n\t\t\treturn this.store.getState().dragOperation.targetIds;\n\t\t}\n\t}, {\n\t\tkey: 'getDropResult',\n\t\tvalue: function getDropResult() {\n\t\t\treturn this.store.getState().dragOperation.dropResult;\n\t\t}\n\t}, {\n\t\tkey: 'didDrop',\n\t\tvalue: function didDrop() {\n\t\t\treturn this.store.getState().dragOperation.didDrop;\n\t\t}\n\t}, {\n\t\tkey: 'isSourcePublic',\n\t\tvalue: function isSourcePublic() {\n\t\t\treturn this.store.getState().dragOperation.isSourcePublic;\n\t\t}\n\t}, {\n\t\tkey: 'getInitialClientOffset',\n\t\tvalue: function getInitialClientOffset() {\n\t\t\treturn this.store.getState().dragOffset.initialClientOffset;\n\t\t}\n\t}, {\n\t\tkey: 'getInitialSourceClientOffset',\n\t\tvalue: function getInitialSourceClientOffset() {\n\t\t\treturn this.store.getState().dragOffset.initialSourceClientOffset;\n\t\t}\n\t}, {\n\t\tkey: 'getClientOffset',\n\t\tvalue: function getClientOffset() {\n\t\t\treturn this.store.getState().dragOffset.clientOffset;\n\t\t}\n\t}, {\n\t\tkey: 'getSourceClientOffset',\n\t\tvalue: function getSourceClientOffset() {\n\t\t\treturn (0, _dragOffset.getSourceClientOffset)(this.store.getState().dragOffset);\n\t\t}\n\t}, {\n\t\tkey: 'getDifferenceFromInitialOffset',\n\t\tvalue: function getDifferenceFromInitialOffset() {\n\t\t\treturn (0, _dragOffset.getDifferenceFromInitialOffset)(this.store.getState().dragOffset);\n\t\t}\n\t}]);\n\n\treturn DragDropMonitor;\n}();\n\nexports.default = DragDropMonitor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = stateId;\nfunction stateId() {\n\tvar state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n\treturn state + 1;\n}","var isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nmodule.exports = castArrayLikeObject;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseIntersection;\n","var arrayMap = require('./_arrayMap'),\n baseIntersection = require('./_baseIntersection'),\n baseRest = require('./_baseRest'),\n castArrayLikeObject = require('./_castArrayLikeObject');\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nmodule.exports = intersection;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseUniq = require('./_baseUniq');\n\n/**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\nfunction baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n}\n\nmodule.exports = baseXor;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var arrayFilter = require('./_arrayFilter'),\n baseRest = require('./_baseRest'),\n baseXor = require('./_baseXor'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\nvar xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n});\n\nmodule.exports = xor;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = refCount;\n\nvar _registry = require('../actions/registry');\n\nfunction refCount() {\n\tvar state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\tvar action = arguments[1];\n\n\tswitch (action.type) {\n\t\tcase _registry.ADD_SOURCE:\n\t\tcase _registry.ADD_TARGET:\n\t\t\treturn state + 1;\n\t\tcase _registry.REMOVE_SOURCE:\n\t\tcase _registry.REMOVE_TARGET:\n\t\t\treturn state - 1;\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; };\n\nexports.default = dragOperation;\n\nvar _without = require('lodash/without');\n\nvar _without2 = _interopRequireDefault(_without);\n\nvar _dragDrop = require('../actions/dragDrop');\n\nvar _registry = require('../actions/registry');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar initialState = {\n\titemType: null,\n\titem: null,\n\tsourceId: null,\n\ttargetIds: [],\n\tdropResult: null,\n\tdidDrop: false,\n\tisSourcePublic: null\n};\n\nfunction dragOperation() {\n\tvar state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n\tvar action = arguments[1];\n\n\tswitch (action.type) {\n\t\tcase _dragDrop.BEGIN_DRAG:\n\t\t\treturn _extends({}, state, {\n\t\t\t\titemType: action.itemType,\n\t\t\t\titem: action.item,\n\t\t\t\tsourceId: action.sourceId,\n\t\t\t\tisSourcePublic: action.isSourcePublic,\n\t\t\t\tdropResult: null,\n\t\t\t\tdidDrop: false\n\t\t\t});\n\t\tcase _dragDrop.PUBLISH_DRAG_SOURCE:\n\t\t\treturn _extends({}, state, {\n\t\t\t\tisSourcePublic: true\n\t\t\t});\n\t\tcase _dragDrop.HOVER:\n\t\t\treturn _extends({}, state, {\n\t\t\t\ttargetIds: action.targetIds\n\t\t\t});\n\t\tcase _registry.REMOVE_TARGET:\n\t\t\tif (state.targetIds.indexOf(action.targetId) === -1) {\n\t\t\t\treturn state;\n\t\t\t}\n\t\t\treturn _extends({}, state, {\n\t\t\t\ttargetIds: (0, _without2.default)(state.targetIds, action.targetId)\n\t\t\t});\n\t\tcase _dragDrop.DROP:\n\t\t\treturn _extends({}, state, {\n\t\t\t\tdropResult: action.dropResult,\n\t\t\t\tdidDrop: true,\n\t\t\t\ttargetIds: []\n\t\t\t});\n\t\tcase _dragDrop.END_DRAG:\n\t\t\treturn _extends({}, state, {\n\t\t\t\titemType: null,\n\t\t\t\titem: null,\n\t\t\t\tsourceId: null,\n\t\t\t\tdropResult: null,\n\t\t\t\tdidDrop: false,\n\t\t\t\tisSourcePublic: null,\n\t\t\t\ttargetIds: []\n\t\t\t});\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = reduce;\n\nvar _dragOffset = require('./dragOffset');\n\nvar _dragOffset2 = _interopRequireDefault(_dragOffset);\n\nvar _dragOperation = require('./dragOperation');\n\nvar _dragOperation2 = _interopRequireDefault(_dragOperation);\n\nvar _refCount = require('./refCount');\n\nvar _refCount2 = _interopRequireDefault(_refCount);\n\nvar _dirtyHandlerIds = require('./dirtyHandlerIds');\n\nvar _dirtyHandlerIds2 = _interopRequireDefault(_dirtyHandlerIds);\n\nvar _stateId = require('./stateId');\n\nvar _stateId2 = _interopRequireDefault(_stateId);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction reduce() {\n\tvar state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\tvar action = arguments[1];\n\n\treturn {\n\t\tdirtyHandlerIds: (0, _dirtyHandlerIds2.default)(state.dirtyHandlerIds, action, state.dragOperation),\n\t\tdragOffset: (0, _dragOffset2.default)(state.dragOffset, action),\n\t\trefCount: (0, _refCount2.default)(state.refCount, action),\n\t\tdragOperation: (0, _dragOperation2.default)(state.dragOperation, action),\n\t\tstateId: (0, _stateId2.default)(state.stateId)\n\t};\n}","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","'use strict';\n\nexports.__esModule = true;\nexports.ActionTypes = undefined;\nexports['default'] = createStore;\n\nvar _isPlainObject = require('lodash/isPlainObject');\n\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\n\nvar _symbolObservable = require('symbol-observable');\n\nvar _symbolObservable2 = _interopRequireDefault(_symbolObservable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = exports.ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!(0, _isPlainObject2['default'])(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[_symbolObservable2['default']] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[_symbolObservable2['default']] = observable, _ref2;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; }; }();\n\nvar _createStore = require('redux/lib/createStore');\n\nvar _createStore2 = _interopRequireDefault(_createStore);\n\nvar _reducers = require('./reducers');\n\nvar _reducers2 = _interopRequireDefault(_reducers);\n\nvar _dragDrop = require('./actions/dragDrop');\n\nvar dragDropActions = _interopRequireWildcard(_dragDrop);\n\nvar _DragDropMonitor = require('./DragDropMonitor');\n\nvar _DragDropMonitor2 = _interopRequireDefault(_DragDropMonitor);\n\nfunction _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; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DragDropManager = function () {\n\tfunction DragDropManager(createBackend) {\n\t\tvar context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\t_classCallCheck(this, DragDropManager);\n\n\t\tvar store = (0, _createStore2.default)(_reducers2.default);\n\t\tthis.context = context;\n\t\tthis.store = store;\n\t\tthis.monitor = new _DragDropMonitor2.default(store);\n\t\tthis.registry = this.monitor.registry;\n\t\tthis.backend = createBackend(this);\n\n\t\tstore.subscribe(this.handleRefCountChange.bind(this));\n\t}\n\n\t_createClass(DragDropManager, [{\n\t\tkey: 'handleRefCountChange',\n\t\tvalue: function handleRefCountChange() {\n\t\t\tvar shouldSetUp = this.store.getState().refCount > 0;\n\t\t\tif (shouldSetUp && !this.isSetUp) {\n\t\t\t\tthis.backend.setup();\n\t\t\t\tthis.isSetUp = true;\n\t\t\t} else if (!shouldSetUp && this.isSetUp) {\n\t\t\t\tthis.backend.teardown();\n\t\t\t\tthis.isSetUp = false;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getContext',\n\t\tvalue: function getContext() {\n\t\t\treturn this.context;\n\t\t}\n\t}, {\n\t\tkey: 'getMonitor',\n\t\tvalue: function getMonitor() {\n\t\t\treturn this.monitor;\n\t\t}\n\t}, {\n\t\tkey: 'getBackend',\n\t\tvalue: function getBackend() {\n\t\t\treturn this.backend;\n\t\t}\n\t}, {\n\t\tkey: 'getRegistry',\n\t\tvalue: function getRegistry() {\n\t\t\treturn this.registry;\n\t\t}\n\t}, {\n\t\tkey: 'getActions',\n\t\tvalue: function getActions() {\n\t\t\tvar manager = this;\n\t\t\tvar dispatch = this.store.dispatch;\n\n\n\t\t\tfunction bindActionCreator(actionCreator) {\n\t\t\t\treturn function () {\n\t\t\t\t\tfor (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t\t\t\t\t\targs[_key] = arguments[_key];\n\t\t\t\t\t}\n\n\t\t\t\t\tvar action = actionCreator.apply(manager, args);\n\t\t\t\t\tif (typeof action !== 'undefined') {\n\t\t\t\t\t\tdispatch(action);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn Object.keys(dragDropActions).filter(function (key) {\n\t\t\t\treturn typeof dragDropActions[key] === 'function';\n\t\t\t}).reduce(function (boundActions, key) {\n\t\t\t\tvar action = dragDropActions[key];\n\t\t\t\tboundActions[key] = bindActionCreator(action); // eslint-disable-line no-param-reassign\n\t\t\t\treturn boundActions;\n\t\t\t}, {});\n\t\t}\n\t}]);\n\n\treturn DragDropManager;\n}();\n\nexports.default = DragDropManager;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _DragDropManager = require('./DragDropManager');\n\nObject.defineProperty(exports, 'DragDropManager', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_DragDropManager).default;\n }\n});\n\nvar _DragSource = require('./DragSource');\n\nObject.defineProperty(exports, 'DragSource', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_DragSource).default;\n }\n});\n\nvar _DropTarget = require('./DropTarget');\n\nObject.defineProperty(exports, 'DropTarget', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_DropTarget).default;\n }\n});\n\nvar _createTestBackend = require('./backends/createTestBackend');\n\nObject.defineProperty(exports, 'createTestBackend', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createTestBackend).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/** @license React v16.13.1\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var l=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cQ.length&&Q.push(a)}\nfunction T(a,b,c,e){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;kb}return!1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var C={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){C[a]=new v(a,0,!1,a,null,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];C[b]=new v(b,1,!1,a[1],null,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){C[a]=new v(a,2,!1,a.toLowerCase(),null,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){C[a]=new v(a,2,!1,a,null,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){C[a]=new v(a,3,!1,a.toLowerCase(),null,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){C[a]=new v(a,3,!0,a,null,!1)});[\"capture\",\"download\"].forEach(function(a){C[a]=new v(a,4,!1,a,null,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){C[a]=new v(a,6,!1,a,null,!1)});[\"rowSpan\",\"start\"].forEach(function(a){C[a]=new v(a,5,!1,a.toLowerCase(),null,!1)});var Ua=/[\\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ua,\nVa);C[b]=new v(b,1,!1,a,null,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!1)});\nC.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty(\"ReactCurrentDispatcher\")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty(\"ReactCurrentBatchConfig\")||(Wa.ReactCurrentBatchConfig={suspense:null});\nfunction Xa(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:rb(c)}}\nfunction Kb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var Mb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction Nb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ob(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?Nb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Pb,Qb=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Mb.svg||\"innerHTML\"in a)a.innerHTML=b;else{Pb=Pb||document.createElement(\"div\");Pb.innerHTML=\"\";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;return c}var Tb={animationend:Sb(\"Animation\",\"AnimationEnd\"),animationiteration:Sb(\"Animation\",\"AnimationIteration\"),animationstart:Sb(\"Animation\",\"AnimationStart\"),transitionend:Sb(\"Transition\",\"TransitionEnd\")},Ub={},Vb={};\nya&&(Vb=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),\"TransitionEvent\"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a}\nvar Xb=Wb(\"animationend\"),Yb=Wb(\"animationiteration\"),Zb=Wb(\"animationstart\"),$b=Wb(\"transitionend\"),ac=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),bc=new (\"function\"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b}\nfunction dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));}\nfunction gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===\nc){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}\nfunction ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var kc=null;\nfunction lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;dpc.length&&pc.push(a)}\nfunction rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}\nfunction sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d)}while(c);for(c=0;c=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ud(c)}}\nfunction wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=td(a.document)}return b}\nfunction yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}var zd=\"$\",Ad=\"/$\",Bd=\"$?\",Cd=\"$!\",Dd=null,Ed=null;function Fd(a,b){switch(a){case \"button\":case \"input\":case \"select\":case \"textarea\":return!!b.autoFocus}return!1}\nfunction Gd(a,b){return\"textarea\"===a||\"option\"===a||\"noscript\"===a||\"string\"===typeof b.children||\"number\"===typeof b.children||\"object\"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd=\"function\"===typeof setTimeout?setTimeout:void 0,Id=\"function\"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}\nfunction Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--}else c===Ad&&b++}a=a.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md=\"__reactInternalInstance$\"+Ld,Nd=\"__reactEventHandlers$\"+Ld,Od=\"__reactContainere$\"+Ld;\nfunction tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a)}return b}a=c;c=a.parentNode}return null}function Nc(a){a=a[Md]||a[Od];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null}\nfunction Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}\nfunction Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==typeof c)throw Error(u(231,\nb,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a)}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0this.eventPool.length&&this.eventPool.push(a)}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=ya&&\"CompositionEvent\"in window,ke=null;ya&&\"documentMode\"in document&&(ke=document.documentMode);\nvar le=ya&&\"TextEvent\"in window&&!ke,me=ya&&(!je||ke&&8=ke),ne=String.fromCharCode(32),oe={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},pe=!1;\nfunction qe(a,b){switch(a){case \"keyup\":return-1!==ie.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function re(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var se=!1;function te(a,b){switch(a){case \"compositionend\":return re(b);case \"keypress\":if(32!==b.which)return null;pe=!0;return ne;case \"textInput\":return a=b.data,a===ne&&pe?null:a;default:return null}}\nfunction ue(a,b){if(se)return\"compositionend\"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},ef=null,ff=null,gf=null,hf=!1;\nfunction jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;\"selectionStart\"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type=\"select\",a.target=ef,Xd(a),a)}\nvar kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;gzf||(a.current=yf[zf],yf[zf]=null,zf--)}\nfunction I(a,b){zf++;yf[zf]=a.current;a.current=b}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}\nfunction Df(){H(K);H(J)}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c)}function Ff(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||\"Unknown\",e));return n({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return!0}\nfunction Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}\nvar If=r.unstable_runWithPriority,Jf=r.unstable_scheduleCallback,Kf=r.unstable_cancelCallback,Lf=r.unstable_requestPaint,Mf=r.unstable_now,Nf=r.unstable_getCurrentPriorityLevel,Of=r.unstable_ImmediatePriority,Pf=r.unstable_UserBlockingPriority,Qf=r.unstable_NormalPriority,Rf=r.unstable_LowPriority,Sf=r.unstable_IdlePriority,Tf={},Uf=r.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf};\nfunction ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a)}fg()}\nfunction fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a=b&&(rg=!0),a.firstContext=null)}\nfunction sg(a,b){if(mg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null}}else lg=lg.next=b}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}\nfunction vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}\nfunction yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}\nfunction zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(gl&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if(\"function\"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g=\"function\"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:tg=!0}}null!==z.callback&&\n(a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z))}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k}}\nfunction Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;by?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&&\nm&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A}if(y===h.length)return c(e,m),l;if(null===m){for(;yy?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!==\nq.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,\nk.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ab?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h)}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=\nd.sibling}d=Vg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(nb(f))return D(a,d,f,h);l&&Qg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||\"Component\"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};\nfunction ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a)}H($g);I($g,b)}function eh(){H($g);H(ah);H(bh)}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c))}function gh(a){ah.current===a&&(H($g),H(ah))}var M={current:0};\nfunction hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ih(a,b){return{responder:a,props:b}}\nvar jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return!1;for(var c=0;cf))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e)}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a}\nfunction th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}\nfunction vh(a,b){return\"function\"===typeof b?b(a):b}\nfunction wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(lN.expirationTime&&\n(N.expirationTime=l,Bg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction yh(a){var b=th();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return[b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}\nfunction Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d)}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)}\nfunction Hh(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}\nfunction Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0)});cg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),\"select\"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case \"iframe\":case \"object\":case \"embed\":F(\"load\",\na);h=d;break;case \"video\":case \"audio\":for(h=0;hd.tailExpiration&&1b)&&tj.set(a,b)))}}\nfunction xj(a,b){a.expirationTimea?c:a;return 2>=a&&b!==a?0:a}\nfunction Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else{var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c)}a.callbackExpirationTime=\nb;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b}}}\nfunction Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h)}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=\nd;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10 component higher in the tree to provide a loading indicator or placeholder to display.\"+qb(g))}S!==\njj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=h;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&(\"function\"===typeof w.getDerivedStateFromError||null!==ub&&\"function\"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return}while(null!==p)}X=Pj(X)}catch(Xc){b=Xc;continue}break}while(1)}\nfunction Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}function Ag(a,b){awi&&(wi=a)}function Kj(){for(;null!==X;)X=Qj(X)}function Gj(){for(;null!==X&&!Uf();)X=Qj(X)}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b}\nfunction Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}X.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null}\nfunction Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=\nd-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft,\ntop:w.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;q=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null,\nb,d,a,e,c);b.effectTag|=1;if(\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=\nnull,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c);\ncase 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:\nnull,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,\nb,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==\nk){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;cb||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}\nfunction yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}\nfunction bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0===\nd?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;\nfunction V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}\nfunction X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}\nfunction Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};\nexports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if(\"object\"===typeof c&&null!==c){var e=c.delay;e=\"number\"===typeof e&&0d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};\nexports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime