react-tag-input
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -7,3 +7,3 @@ Object.defineProperty(exports, "__esModule", { | ||
var _react = require("react"); | ||
var _react = require('react'); | ||
@@ -20,2 +20,14 @@ var _react2 = _interopRequireDefault(_react); | ||
var maybeScrollSuggestionIntoView = function maybeScrollSuggestionIntoView(suggestionEl, suggestionsContainer) { | ||
var containerHeight = suggestionsContainer.offsetHeight; | ||
var suggestionHeight = suggestionEl.offsetHeight; | ||
var relativeSuggestionTop = suggestionEl.offsetTop - suggestionsContainer.scrollTop; | ||
if (relativeSuggestionTop + suggestionHeight >= containerHeight) { | ||
suggestionsContainer.scrollTop += relativeSuggestionTop - containerHeight + suggestionHeight; | ||
} else if (relativeSuggestionTop < 0) { | ||
suggestionsContainer.scrollTop += relativeSuggestionTop; | ||
} | ||
}; | ||
var Suggestions = function (_Component) { | ||
@@ -35,3 +47,12 @@ _inherits(Suggestions, _Component); | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Suggestions)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.markIt = function (input, query) { | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Suggestions)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.componentDidUpdate = function (prevProps) { | ||
var suggestionsContainer = _this.refs.suggestionsContainer; | ||
if (suggestionsContainer && prevProps.selectedIndex !== _this.props.selectedIndex) { | ||
var activeSuggestion = suggestionsContainer.querySelector('.active'); | ||
if (activeSuggestion) { | ||
maybeScrollSuggestionIntoView(activeSuggestion, suggestionsContainer); | ||
} | ||
} | ||
}, _this.markIt = function (input, query) { | ||
var escapedRegex = query.trim().replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); | ||
@@ -53,3 +74,3 @@ return { | ||
return _react2.default.createElement( | ||
"li", | ||
'li', | ||
{ key: i, | ||
@@ -59,3 +80,3 @@ onMouseDown: props.handleClick.bind(null, i), | ||
className: i == props.selectedIndex ? "active" : "" }, | ||
_react2.default.createElement("span", { dangerouslySetInnerHTML: this.markIt(item, props.query) }) | ||
_react2.default.createElement('span', { dangerouslySetInnerHTML: this.markIt(item, props.query) }) | ||
); | ||
@@ -71,10 +92,10 @@ }.bind(_this)); | ||
return _react2.default.createElement( | ||
"div", | ||
{ className: _this.props.classNames.suggestions }, | ||
'div', | ||
{ ref: 'suggestionsContainer', className: _this.props.classNames.suggestions }, | ||
_react2.default.createElement( | ||
"ul", | ||
'ul', | ||
null, | ||
" ", | ||
' ', | ||
suggestions, | ||
" " | ||
' ' | ||
) | ||
@@ -81,0 +102,0 @@ ); |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDnD"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDnD","ReactDOM"],t):"object"==typeof exports?exports.ReactTags=t(require("React"),require("ReactDnD"),require("ReactDOM")):e.ReactTags=t(e.React,e.ReactDnD,e.ReactDOM)}(this,function(e,t,r){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=r(12),i=n(a),s=r(101),u=(n(s),r(27)),c=r(99),l=n(c),p=r(28),f=n(p),d=r(29),h=n(d),g={ENTER:13,TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,ESCAPE:27},v={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions"},y=i["default"].createClass({displayName:"ReactTags",propTypes:{tags:i["default"].PropTypes.array,placeholder:i["default"].PropTypes.string,labelField:i["default"].PropTypes.string,suggestions:i["default"].PropTypes.array,delimiters:i["default"].PropTypes.array,autofocus:i["default"].PropTypes.bool,inline:i["default"].PropTypes.bool,handleDelete:i["default"].PropTypes.func.isRequired,handleAddition:i["default"].PropTypes.func.isRequired,handleDrag:i["default"].PropTypes.func,handleFilterSuggestions:i["default"].PropTypes.func,allowDeleteFromEmptyInput:i["default"].PropTypes.bool,handleInputChange:i["default"].PropTypes.func,handleInputBlur:i["default"].PropTypes.func,minQueryLength:i["default"].PropTypes.number,shouldRenderSuggestions:i["default"].PropTypes.func,removeComponent:i["default"].PropTypes.func,autocomplete:i["default"].PropTypes.oneOfType([i["default"].PropTypes.bool,i["default"].PropTypes.number]),readOnly:i["default"].PropTypes.bool,classNames:i["default"].PropTypes.object},getDefaultProps:function(){return{placeholder:"Add new tag",tags:[],suggestions:[],delimiters:[g.ENTER,g.TAB],autofocus:!0,inline:!0,allowDeleteFromEmptyInput:!0,minQueryLength:2,autocomplete:!1,readOnly:!1}},componentWillMount:function(){this.setState({classNames:o({},v,this.props.classNames)})},componentDidMount:function(){this.props.autofocus&&!this.props.readOnly&&this.refs.input.focus()},getInitialState:function(){return{suggestions:this.props.suggestions,query:"",selectedIndex:-1,selectionMode:!1}},filteredSuggestions:function(e,t){return this.props.handleFilterSuggestions?this.props.handleFilterSuggestions(e,t):t.filter(function(t){return 0===t.toLowerCase().indexOf(e.toLowerCase())})},componentWillReceiveProps:function(e){var t=this.filteredSuggestions(this.state.query,e.suggestions);this.setState({suggestions:t,classNames:o({},v,e.classNames)})},handleDelete:function(e,t){this.props.handleDelete(e),this.setState({query:""})},handleChange:function(e){this.props.handleInputChange&&this.props.handleInputChange(e.target.value.trim());var t=e.target.value.trim(),r=this.filteredSuggestions(t,this.props.suggestions);this.setState({query:t,suggestions:r})},handleBlur:function(e){var t=e.target.value.trim();this.props.handleInputBlur&&t.length&&(this.props.handleInputBlur(t),this.refs.input.value="")},handleKeyDown:function(e){var t=this.state,r=t.query,n=t.selectedIndex,o=t.suggestions;if(e.keyCode===g.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.setState({selectedIndex:-1,selectionMode:!1,suggestions:[]})),this.props.delimiters.indexOf(e.keyCode)!==-1&&(e.keyCode===g.TAB&&""===r||e.preventDefault(),""!==r&&(this.state.selectionMode&&(r=this.state.suggestions[this.state.selectedIndex]),this.addTag(r))),e.keyCode===g.BACKSPACE&&""==r&&this.props.allowDeleteFromEmptyInput&&this.handleDelete(this.props.tags.length-1),e.keyCode===g.UP_ARROW){e.preventDefault();var n=this.state.selectedIndex;n<=0?this.setState({selectedIndex:this.state.suggestions.length-1,selectionMode:!0}):this.setState({selectedIndex:n-1,selectionMode:!0})}e.keyCode===g.DOWN_ARROW&&(e.preventDefault(),this.setState({selectedIndex:(this.state.selectedIndex+1)%o.length,selectionMode:!0}))},handlePaste:function(e){var t=this;e.preventDefault();var r=e.clipboardData||window.clipboardData,n=r.getData("text");n.split(/[ ,]+/).forEach(function(e){return t.props.handleAddition(e)})},addTag:function(e){var t=this.refs.input;if(this.props.autocomplete){var r=this.filteredSuggestions(e,this.props.suggestions);(1===this.props.autocomplete&&1===r.length||this.props.autocomplete===!0&&r.length)&&(e=r[0])}this.props.handleAddition(e),this.setState({query:"",selectionMode:!1,selectedIndex:-1}),t.value="",t.focus()},handleSuggestionClick:function(e,t){this.addTag(this.state.suggestions[e])},handleSuggestionHover:function(e,t){this.setState({selectedIndex:e,selectionMode:!0})},moveTag:function(e,t){var r=this.props.tags,n=r.filter(function(t){return t.id===e})[0],o=r.filter(function(e){return e.id===t})[0],a=r.indexOf(n),i=r.indexOf(o);this.props.handleDrag(n,a,i)},render:function(){var e=this.props.handleDrag?this.moveTag:null,t=this.props.tags.map(function(t,r){return i["default"].createElement(h["default"],{key:r,tag:t,labelField:this.props.labelField,onDelete:this.handleDelete.bind(this,r),moveTag:e,removeComponent:this.props.removeComponent,readOnly:this.props.readOnly,classNames:this.state.classNames})}.bind(this)),r=this.state.query.trim(),n=this.state.selectedIndex,o=this.state.suggestions,a=this.props.placeholder,s=this.props.readOnly?null:i["default"].createElement("div",{className:this.state.classNames.tagInput},i["default"].createElement("input",{ref:"input",type:"text",placeholder:a,"aria-label":a,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste}),i["default"].createElement(f["default"],{query:r,suggestions:o,selectedIndex:n,handleClick:this.handleSuggestionClick,handleHover:this.handleSuggestionHover,minQueryLength:this.props.minQueryLength,shouldRenderSuggestions:this.props.shouldRenderSuggestions,classNames:this.state.classNames}));return i["default"].createElement("div",{className:this.state.classNames.tags},i["default"].createElement("div",{className:this.state.classNames.selected},t,this.props.inline&&s),!this.props.inline&&s)}});e.exports={WithContext:(0,u.DragDropContext)(l["default"])(y),WithOutContext:y,Keys:g}},function(e,t,r){var n=r(56),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},function(e,t,r){function n(e,t){for(var r=e.length;r--;)if(o(e[r][0],t))return r;return-1}var o=r(6);e.exports=n},function(e,t,r){function n(e,t){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,n=-1,i=a(r.length-t,0),s=Array(i);++n<i;)s[n]=r[t+n];n=-1;for(var u=Array(t+1);++n<t;)u[n]=r[n];return u[t]=s,o(e,this,u)}}var o=r(15),a=Math.max;e.exports=n},function(e,t,r){function n(e,t){var r=e.__data__;return o(t)?r["string"==typeof t?"string":"hash"]:r.map}var o=r(68);e.exports=n},function(e,t,r){var n=r(7),o=n(Object,"create");e.exports=o},function(e,t){function r(e,t){return e===t||e!==e&&t!==t}e.exports=r},function(e,t,r){function n(e,t){var r=a(e,t);return o(r)?r:void 0}var o=r(46),a=r(58);e.exports=n},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){function n(e){return a(e)&&o(e)}var o=r(22),a=r(25);e.exports=n},function(e,t){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},function(e,t){"use strict";t.__esModule=!0;var r="__NATIVE_FILE__";t.FILE=r;var n="__NATIVE_URL__";t.URL=n;var o="__NATIVE_TEXT__";t.TEXT=o},function(t,r){t.exports=e},function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(77),a=r(78),i=r(79),s=r(80),u=r(81);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=i,n.prototype.has=s,n.prototype.set=u,e.exports=n},function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.__data__=new o;++t<r;)this.add(e[t])}var o=r(13),a=r(82),i=r(83);n.prototype.add=n.prototype.push=a,n.prototype.has=i,e.exports=n},function(e,t){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=r},function(e,t,r){function n(e,t){var r=e?e.length:0;return!!r&&o(e,t,0)>-1}var o=r(44);e.exports=n},function(e,t){function r(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}e.exports=r},function(e,t){function r(e,t){return e.has(t)}e.exports=r},function(e,t){function r(e,t){return t=null==t?n:t,!!t&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&e<t}var n=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=r},function(e,t){function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}e.exports=r},function(e,t,r){function n(e){return o(e)&&s.call(e,"callee")&&(!c.call(e,"callee")||u.call(e)==a)}var o=r(9),a="[object Arguments]",i=Object.prototype,s=i.hasOwnProperty,u=i.toString,c=i.propertyIsEnumerable;e.exports=n},function(e,t,r){function n(e){return null!=e&&i(o(e))&&!a(e)}var o=r(57),a=r(23),i=r(24);e.exports=n},function(e,t,r){function n(e){var t=o(e)?u.call(e):"";return t==a||t==i}var o=r(10),a="[object Function]",i="[object GeneratorFunction]",s=Object.prototype,u=s.toString;e.exports=n},function(e,t){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=r(89),a=n(o),i=a["default"](function(){return/firefox/i.test(navigator.userAgent)});t.isFirefox=i;var s=a["default"](function(){return Boolean(window.safari)});t.isSafari=s},function(e,r){e.exports=t},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(12),u=n(s),c=function(e){function t(){var e,r,n,i;o(this,t);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return r=n=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),n.markIt=function(e,t){var r=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&");return{__html:e.replace(RegExp(r,"gi"),"<mark>$&</mark>")}},n.shouldRenderSuggestions=function(e){var t=n,r=t.props,o=r.minQueryLength||2;return r.query.length>=o},n.render=function(){var e=n,t=e.props,r=t.suggestions.map(function(e,r){return u["default"].createElement("li",{key:r,onMouseDown:t.handleClick.bind(null,r),onMouseOver:t.handleHover.bind(null,r),className:r==t.selectedIndex?"active":""},u["default"].createElement("span",{dangerouslySetInnerHTML:this.markIt(e,t.query)}))}.bind(n)),o=t.shouldRenderSuggestions||n.shouldRenderSuggestions;return 0!==r.length&&o(t.query)?u["default"].createElement("div",{className:n.props.classNames.suggestions},u["default"].createElement("ul",null," ",r," ")):null},i=r,a(n,i)}return i(t,e),t}(s.Component);c.propTypes={query:u["default"].PropTypes.string.isRequired,selectedIndex:u["default"].PropTypes.number.isRequired,suggestions:u["default"].PropTypes.array.isRequired,handleClick:u["default"].PropTypes.func.isRequired,handleHover:u["default"].PropTypes.func.isRequired,minQueryLength:u["default"].PropTypes.number,shouldRenderSuggestions:u["default"].PropTypes.func,classNames:u["default"].PropTypes.object},t["default"]=c},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(12),u=n(s),c=r(27),l=r(30),p=n(l),f={TAG:"tag"},d={beginDrag:function(e){return{id:e.tag.id}},canDrag:function(e){return e.moveTag&&!e.readOnly}},h={hover:function(e,t){var r=t.getItem().id;r!==e.id&&e.moveTag(r,e.tag.id)},canDrop:function(e){return!e.readOnly}},g=function(e,t){return{connectDragSource:e.dragSource(),isDragging:t.isDragging()}},v=function(e,t){return{connectDropTarget:e.dropTarget()}},y=function(e){function t(){var e,r,n,i;o(this,t);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return r=n=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),n.render=function(){var e=n,t=e.props,r=t.tag[t.labelField],o=t.connectDragSource,a=t.isDragging,i=t.connectDropTarget,s=t.readOnly,c=t.removeComponent,l=u["default"].createClass({displayName:"RemoveComponent",render:function(){return s?u["default"].createElement("span",null):c?u["default"].createElement(c,this.props):u["default"].createElement("a",this.props,String.fromCharCode(215))}}),p=u["default"].createElement("span",{style:{opacity:a?0:1},className:t.classNames.tag},r,u["default"].createElement(l,{className:t.classNames.remove,onClick:t.onDelete}));return o(i(p))},i=r,a(n,i)}return i(t,e),t}(s.Component);y.propTypes={labelField:u["default"].PropTypes.string,onDelete:u["default"].PropTypes.func.isRequired,tag:u["default"].PropTypes.object.isRequired,moveTag:u["default"].PropTypes.func,removeComponent:u["default"].PropTypes.func,classNames:u["default"].PropTypes.object,readOnly:u["default"].PropTypes.bool,connectDragSource:u["default"].PropTypes.func.isRequired,isDragging:u["default"].PropTypes.bool.isRequired,connectDropTarget:u["default"].PropTypes.func.isRequired},y.defaultProps={labelField:"text",readOnly:!1},t["default"]=(0,p["default"])((0,c.DragSource)(f.TAG,d,g),(0,c.DropTarget)(f.TAG,h,v))(y)},function(e,t){(function(t){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function n(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,r,o,i){var s=-1,c=e.length;for(r||(r=u),i||(i=[]);++s<c;){var l=e[s];t>0&&r(l)?t>1?a(l,t-1,r,o,i):n(i,l):o||(i[i.length]=l)}return i}function i(e,t){return t=P(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=P(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=i,r(e,this,s)}}function s(e){return i(function(t){t=a(t,1);var r=t.length,n=r;for(e&&t.reverse();n--;)if("function"!=typeof t[n])throw new TypeError(v);return function(){for(var e=0,n=r?t[e].apply(this,arguments):arguments[0];++e<r;)n=t[e].call(this,n);return n}})}function u(e){return R(e)||c(e)||!!(N&&e&&e[N])}function c(e){return p(e)&&S.call(e,"callee")&&(!w.call(e,"callee")||E.call(e)==m)}function l(e){return null!=e&&d(I(e))&&!f(e)}function p(e){return g(e)&&l(e)}function f(e){var t=h(e)?E.call(e):"";return t==D||t==T}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=y}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){return!!e&&"object"==typeof e}var v="Expected a function",y=9007199254740991,m="[object Arguments]",D="[object Function]",T="[object GeneratorFunction]",_="object"==typeof t&&t&&t.Object===Object&&t,x="object"==typeof self&&self&&self.Object===Object&&self,O=_||x||Function("return this")(),b=Object.prototype,S=b.hasOwnProperty,E=b.toString,C=O.Symbol,w=b.propertyIsEnumerable,N=C?C.isConcatSpreadable:void 0,P=Math.max,I=o("length"),R=Array.isArray,A=s();e.exports=A}).call(t,function(){return this}())},function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(59),a=r(60),i=r(61),s=r(62),u=r(63);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=i,n.prototype.has=s,n.prototype.set=u,e.exports=n},function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(72),a=r(73),i=r(74),s=r(75),u=r(76);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=i,n.prototype.has=s,n.prototype.set=u,e.exports=n},function(e,t,r){var n=r(7),o=r(1),a=n(o,"Map");e.exports=a},function(e,t,r){var n=r(1),o=n.Reflect;e.exports=o},function(e,t,r){var n=r(7),o=r(1),a=n(o,"Set");e.exports=a},function(e,t,r){var n=r(1),o=n.Symbol;e.exports=o},function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}e.exports=r},function(e,t){function r(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}e.exports=r},function(e,t,r){function n(e,t,r,n){return void 0===e||o(e,a[r])&&!i.call(n,r)?t:e}var o=r(6),a=Object.prototype,i=a.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t,r){var n=e[t];i.call(e,t)&&o(n,r)&&(void 0!==r||t in e)||(e[t]=r)}var o=r(6),a=Object.prototype,i=a.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t,r,n){var p=-1,f=a,d=!0,h=e.length,g=[],v=t.length;if(!h)return g;r&&(t=s(t,u(r))),n?(f=i,d=!1):t.length>=l&&(f=c,d=!1,t=new o(t));e:for(;++p<h;){var y=e[p],m=r?r(y):y;if(y=n||0!==y?y:0,d&&m===m){for(var D=v;D--;)if(t[D]===m)continue e;g.push(y)}else f(t,m,n)||g.push(y)}return g}var o=r(14),a=r(16),i=r(17),s=r(37),u=r(50),c=r(18),l=200;e.exports=n},function(e,t){function r(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}e.exports=r},function(e,t,r){function n(e,t,r,i,s){var u=-1,c=e.length;for(r||(r=a),s||(s=[]);++u<c;){var l=e[u];t>0&&r(l)?t>1?n(l,t-1,r,i,s):o(s,l):i||(s[s.length]=l)}return s}var o=r(38),a=r(65);e.exports=n},function(e,t,r){function n(e,t,r){if(t!==t)return o(e,a,r);for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var o=r(42),a=r(45);e.exports=n},function(e,t){function r(e){return e!==e}e.exports=r},function(e,t,r){function n(e){if(!s(e)||i(e))return!1;var t=o(e)||a(e)?h:l;return t.test(u(e))}var o=r(23),a=r(66),i=r(69),s=r(10),u=r(84),c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,p=Object.prototype,f=Function.prototype.toString,d=p.hasOwnProperty,h=RegExp("^"+f.call(d).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},function(e,t,r){function n(e){e=null==e?e:Object(e);var t=[];for(var r in e)t.push(r);return t}var o=r(34),a=r(71),i=Object.prototype,s=o?o.enumerate:void 0,u=i.propertyIsEnumerable;s&&!u.call({valueOf:1},"valueOf")&&(n=function(e){return a(s(e))}),e.exports=n},function(e,t){function r(e){return function(t){return null==t?void 0:t[e]}}e.exports=r},function(e,t){function r(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}e.exports=r},function(e,t){function r(e){return function(t){return e(t)}}e.exports=r},function(e,t,r){function n(e,t,r){var n=-1,p=a,f=e.length,d=!0,h=[],g=h;if(r)d=!1,p=i;else if(f>=l){var v=t?null:u(e);if(v)return c(v);d=!1,p=s,g=new o}else g=t?[]:h;e:for(;++n<f;){var y=e[n],m=t?t(y):y;if(y=r||0!==y?y:0,d&&m===m){for(var D=g.length;D--;)if(g[D]===m)continue e;t&&g.push(m),h.push(y)}else p(g,m,r)||(g!==h&&g.push(m),h.push(y))}return h}var o=r(14),a=r(16),i=r(17),s=r(18),u=r(55),c=r(20),l=200;e.exports=n},function(e,t,r){function n(e,t,r,n){r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;o(r,s,void 0===u?e[s]:u)}return r}var o=r(40);e.exports=n},function(e,t,r){var n=r(1),o=n["__core-js_shared__"];e.exports=o},function(e,t,r){function n(e){return o(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&a(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var u=r[n];u&&e(t,u,n,i)}return t})}var o=r(3),a=r(67);e.exports=n},function(e,t,r){var n=r(35),o=r(90),a=r(20),i=1/0,s=n&&1/a(new n([,-0]))[1]==i?function(e){return new n(e)}:o;e.exports=s},function(e,t){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(t,function(){return this}())},function(e,t,r){var n=r(48),o=n("length");e.exports=o},function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},function(e,t,r){function n(){this.__data__=o?o(null):{}}var o=r(5);e.exports=n},function(e,t){function r(e){return this.has(e)&&delete this.__data__[e]}e.exports=r},function(e,t,r){function n(e){var t=this.__data__;if(o){var r=t[e];return r===a?void 0:r}return s.call(t,e)?t[e]:void 0}var o=r(5),a="__lodash_hash_undefined__",i=Object.prototype,s=i.hasOwnProperty;e.exports=n},function(e,t,r){function n(e){var t=this.__data__;return o?void 0!==t[e]:i.call(t,e)}var o=r(5),a=Object.prototype,i=a.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t){var r=this.__data__;return r[e]=o&&void 0===t?a:t,this}var o=r(5),a="__lodash_hash_undefined__";e.exports=n},function(e,t,r){function n(e){var t=e?e.length:void 0;return s(t)&&(i(e)||u(e)||a(e))?o(t,String):null}var o=r(49),a=r(21),i=r(8),s=r(24),u=r(87);e.exports=n},function(e,t,r){function n(e){return i(e)||a(e)||!!(s&&e&&e[s])}var o=r(36),a=r(21),i=r(8),s=o?o.isConcatSpreadable:void 0;e.exports=n},function(e,t){function r(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}e.exports=r},function(e,t,r){function n(e,t,r){if(!s(r))return!1;var n=typeof t;return!!("number"==n?a(r)&&i(t,r.length):"string"==n&&t in r)&&o(r[t],e)}var o=r(6),a=r(22),i=r(19),s=r(10);e.exports=n},function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},function(e,t,r){function n(e){return!!a&&a in e}var o=r(53),a=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t){function r(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}var n=Object.prototype;e.exports=r},function(e,t){function r(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}e.exports=r},function(e,t){function r(){this.__data__=[]}e.exports=r},function(e,t,r){function n(e){var t=this.__data__,r=o(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():i.call(t,r,1),!0}var o=r(2),a=Array.prototype,i=a.splice;e.exports=n},function(e,t,r){function n(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]}var o=r(2);e.exports=n},function(e,t,r){function n(e){return o(this.__data__,e)>-1}var o=r(2);e.exports=n},function(e,t,r){function n(e,t){var r=this.__data__,n=o(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}var o=r(2);e.exports=n},function(e,t,r){function n(){this.__data__={hash:new o,map:new(i||a),string:new o}}var o=r(31),a=r(32),i=r(33);e.exports=n},function(e,t,r){function n(e){return o(this,e)["delete"](e)}var o=r(4);e.exports=n},function(e,t,r){function n(e){return o(this,e).get(e)}var o=r(4);e.exports=n},function(e,t,r){function n(e){return o(this,e).has(e)}var o=r(4);e.exports=n},function(e,t,r){function n(e,t){return o(this,e).set(e,t),this}var o=r(4);e.exports=n},function(e,t){function r(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=r},function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},function(e,t){function r(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var n=Function.prototype.toString;e.exports=r},function(e,t,r){var n=r(52),o=r(54),a=r(88),i=o(function(e,t,r,o){n(t,a(t),e,o)});e.exports=i},function(e,t,r){var n=r(15),o=r(39),a=r(85),i=r(3),s=i(function(e){return e.push(void 0,o),n(a,void 0,e)});e.exports=s},function(e,t,r){function n(e){return"string"==typeof e||!o(e)&&a(e)&&u.call(e)==i}var o=r(8),a=r(25),i="[object String]",s=Object.prototype,u=s.toString;e.exports=n},function(e,t,r){function n(e){for(var t=-1,r=s(e),n=o(e),u=n.length,l=a(e),p=!!l,f=l||[],d=f.length;++t<u;){var h=n[t];p&&("length"==h||i(h,d))||"constructor"==h&&(r||!c.call(e,h))||f.push(h)}return f}var o=r(47),a=r(64),i=r(19),s=r(70),u=Object.prototype,c=u.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i),i};return r.cache=new(n.Cache||o),r}var o=r(13),a="Expected a function";n.Cache=o,e.exports=n},function(e,t){function r(){}e.exports=r},function(e,t,r){var n=r(43),o=r(3),a=r(51),i=r(9),s=o(function(e){return a(n(e,1,i,!0))});e.exports=s},function(e,t,r){var n=r(41),o=r(3),a=r(9),i=o(function(e,t){return a(e)?n(e,t):[]});e.exports=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=r(91),i=n(a),s=r(92),u=n(s),c=function(){function e(){o(this,e),this.entered=[]}return e.prototype.enter=function(e){var t=this.entered.length;return this.entered=i["default"](this.entered.filter(function(t){return document.documentElement.contains(t)&&(!t.contains||t.contains(e))}),[e]),0===t&&this.entered.length>0},e.prototype.leave=function(e){var t=this.entered.length;return this.entered=u["default"](this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();t["default"]=c,e.exports=t["default"]},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=r(86),s=o(i),u=r(100),c=o(u),l=r(93),p=o(l),f=r(26),d=r(97),h=r(96),g=r(11),v=n(g),y=function(){function e(t){a(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new p["default"],this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),this.endDragNativeItem=this.endDragNativeItem.bind(this)}return e.prototype.setup=function(){if("undefined"!=typeof window){if(this.constructor.isSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.constructor.isSetUp=!0,this.addEventListeners(window)}},e.prototype.teardown=function(){"undefined"!=typeof window&&(this.constructor.isSetUp=!1,this.removeEventListeners(window),this.clearCurrentDragSourceNode())},e.prototype.addEventListeners=function(e){e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.removeEventListeners=function(e){e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.connectDragPreview=function(e,t,r){var n=this;return this.sourcePreviewNodeOptions[e]=r,this.sourcePreviewNodes[e]=t,function(){delete n.sourcePreviewNodes[e],delete n.sourcePreviewNodeOptions[e]}},e.prototype.connectDragSource=function(e,t,r){var n=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=r;var o=function(t){return n.handleDragStart(t,e)},a=function(t){return n.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",o),t.addEventListener("selectstart",a),function(){delete n.sourceNodes[e],delete n.sourceNodeOptions[e],t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",a),t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){var r=this,n=function(t){return r.handleDragEnter(t,e)},o=function(t){return r.handleDragOver(t,e)},a=function(t){return r.handleDrop(t,e)};return t.addEventListener("dragenter",n),t.addEventListener("dragover",o),t.addEventListener("drop",a),function(){t.removeEventListener("dragenter",n),t.removeEventListener("dragover",o),t.removeEventListener("drop",a)}},e.prototype.getCurrentSourceNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return s["default"](t||{},{dropEffect:"move"})},e.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},e.prototype.getCurrentSourcePreviewNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return s["default"](t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},e.prototype.getSourceClientOffset=function(e){return d.getNodeClientOffset(this.sourceNodes[e])},e.prototype.isDraggingNativeItem=function(){var e=this.monitor.getItemType();return Object.keys(v).some(function(t){return v[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=h.createNativeDragSource(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]),f.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(f.isFirefox()&&window.removeEventListener("mousemove",this.endDragNativeItem,!0),this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle), | ||
this.currentNativeHandle=null,this.currentNativeSource=null)},e.prototype.endDragIfSourceWasRemovedFromDOM=function(){var e=this.currentDragSourceNode;document.body.contains(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.setCurrentDragSourceNode=function(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=d.getNodeClientOffset(e),this.currentDragSourceNodeOffsetChanged=!1,window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},e.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),!0)},e.prototype.checkIfCurrentDragSourceRectChanged=function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!c["default"](d.getNodeClientOffset(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))},e.prototype.handleTopDragStartCapture=function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},e.prototype.handleDragStart=function(e,t){this.dragStartSourceIds.unshift(t)},e.prototype.handleTopDragStart=function(e){var t=this,r=this.dragStartSourceIds;this.dragStartSourceIds=null;var n=d.getEventClientOffset(e);this.actions.beginDrag(r,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});var o=e.dataTransfer,a=h.matchNativeItemType(o);if(this.monitor.isDragging()){if("function"==typeof o.setDragImage){var i=this.monitor.getSourceId(),s=this.sourceNodes[i],u=this.sourcePreviewNodes[i]||s,c=this.getCurrentSourcePreviewNodeOptions(),l=c.anchorX,p=c.anchorY,f={anchorX:l,anchorY:p},g=d.getDragPreviewOffset(s,u,n,f);o.setDragImage(u,g.x,g.y)}try{o.setData("application/json",{})}catch(v){}this.setCurrentDragSourceNode(e.target);var y=this.getCurrentSourcePreviewNodeOptions(),m=y.captureDraggingState;m?this.actions.publishDragSource():setTimeout(function(){return t.actions.publishDragSource()})}else if(a)this.beginDragNativeItem(a);else{if(!(o.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}},e.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.handleTopDragEnterCapture=function(e){this.dragEnterTargetIds=[];var t=this.enterLeaveCounter.enter(e.target);if(t&&!this.monitor.isDragging()){var r=e.dataTransfer,n=h.matchNativeItemType(r);n&&this.beginDragNativeItem(n)}},e.prototype.handleDragEnter=function(e,t){this.dragEnterTargetIds.unshift(t)},e.prototype.handleTopDragEnter=function(e){var t=this,r=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){f.isFirefox()||this.actions.hover(r,{clientOffset:d.getEventClientOffset(e)});var n=r.some(function(e){return t.monitor.canDropOnTarget(e)});n&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}},e.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[]},e.prototype.handleDragOver=function(e,t){this.dragOverTargetIds.unshift(t)},e.prototype.handleTopDragOver=function(e){var t=this,r=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.actions.hover(r,{clientOffset:d.getEventClientOffset(e)});var n=r.some(function(e){return t.monitor.canDropOnTarget(e)});n?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),e.dataTransfer.dropEffect="move")},e.prototype.handleTopDragLeaveCapture=function(e){this.isDraggingNativeItem()&&e.preventDefault();var t=this.enterLeaveCounter.leave(e.target);t&&this.isDraggingNativeItem()&&this.endDragNativeItem()},e.prototype.handleTopDropCapture=function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()},e.prototype.handleDrop=function(e,t){this.dropTargetIds.unshift(t)},e.prototype.handleTopDrop=function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:d.getEventClientOffset(e)}),this.actions.drop(),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},e.prototype.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},e}();t["default"]=y,e.exports=t["default"]},function(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,n){r(this,e);for(var o=t.length,a=[],i=0;i<o;i++)a.push(i);a.sort(function(e,r){return t[e]<t[r]?-1:1});for(var s=[],u=[],c=[],l=void 0,p=void 0,i=0;i<o-1;i++)l=t[i+1]-t[i],p=n[i+1]-n[i],u.push(l),s.push(p),c.push(p/l);for(var f=[c[0]],i=0;i<u.length-1;i++){var d=c[i],h=c[i+1];if(d*h<=0)f.push(0);else{l=u[i];var g=u[i+1],v=l+g;f.push(3*v/((v+g)/d+(v+l)/h))}}f.push(c[c.length-1]);for(var y=[],m=[],D=void 0,i=0;i<f.length-1;i++){D=c[i];var T=f[i],_=1/u[i],v=T+f[i+1]-D-D;y.push((D-T-v)*_),m.push(v*_*_)}this.xs=t,this.ys=n,this.c1s=f,this.c2s=y,this.c3s=m}return e.prototype.interpolate=function(e){var t=this.xs,r=this.ys,n=this.c1s,o=this.c2s,a=this.c3s,i=t.length-1;if(e===t[i])return r[i];for(var s=0,u=a.length-1,c=void 0;s<=u;){c=Math.floor(.5*(s+u));var l=t[c];if(l<e)s=c+1;else{if(!(l>e))return r[c];u=c-1}}i=Math.max(0,u);var p=e-t[i],f=p*p;return r[i]+n[i]*p+o[i]*f+a[i]*p*f},e}();t["default"]=n,e.exports=t["default"]},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t,r){var n=t.reduce(function(t,r){return t||e.getData(r)},null);return null!=n?n:r}function s(e){var t=f[e],r=t.exposeProperty,n=t.matchesTypes,i=t.getData;return function(){function e(){o(this,e),this.item=Object.defineProperties({},a({},r,{get:function(){return console.warn("Browser doesn't allow reading \""+r+'" until the drop event.'),null},configurable:!0,enumerable:!0}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){delete this.item[r],this.item[r]=i(e,n)},e.prototype.canDrag=function(){return!0},e.prototype.beginDrag=function(){return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}()}function u(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(f).filter(function(e){var r=f[e].matchesTypes;return r.some(function(e){return t.indexOf(e)>-1})})[0]||null}t.__esModule=!0;var c;t.createNativeDragSource=s,t.matchNativeItemType=u;var l=r(11),p=n(l),f=(c={},a(c,p.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),a(c,p.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return i(e,t,"").split("\n")}}),a(c,p.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return i(e,t,"")}}),c)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.nodeType===l?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top,o=r.left;return{x:o,y:n}}function a(e){return{x:e.clientX,y:e.clientY}}function i(e,t,r,n){var a="IMG"===t.nodeName&&(s.isFirefox()||!document.documentElement.contains(t)),i=a?e:t,u=o(i),l={x:r.x-u.x,y:r.y-u.y},p=e.offsetWidth,f=e.offsetHeight,d=n.anchorX,h=n.anchorY,g=a?t.width:p,v=a?t.height:f;s.isSafari()&&a?(v/=window.devicePixelRatio,g/=window.devicePixelRatio):s.isFirefox()&&!a&&(v*=window.devicePixelRatio,g*=window.devicePixelRatio);var y=new c["default"]([0,.5,1],[l.x,l.x/p*g,l.x+g-p]),m=new c["default"]([0,.5,1],[l.y,l.y/f*v,l.y+v-f]),D=y.interpolate(d),T=m.interpolate(h);return s.isSafari()&&a&&(T+=(window.devicePixelRatio-1)*v),{x:D,y:T}}t.__esModule=!0,t.getNodeClientOffset=o,t.getEventClientOffset=a,t.getDragPreviewOffset=i;var s=r(26),u=r(95),c=n(u),l=1},function(e,t){"use strict";function r(){return n||(n=new Image,n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),n}t.__esModule=!0,t["default"]=r;var n=void 0;e.exports=t["default"]},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return new s["default"](e)}t.__esModule=!0,t["default"]=a;var i=r(94),s=o(i),u=r(98),c=o(u),l=r(11),p=n(l);t.NativeTypes=p,t.getEmptyImage=c["default"]},function(e,t){"use strict";function r(e,t){if(e===t)return!0;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a<r.length;a++){if(!o.call(t,r[a])||e[r[a]]!==t[r[a]])return!1;var i=e[r[a]],s=t[r[a]];if(i!==s)return!1}return!0}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t){e.exports=r}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDnD"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDnD","ReactDOM"],t):"object"==typeof exports?exports.ReactTags=t(require("React"),require("ReactDnD"),require("ReactDOM")):e.ReactTags=t(e.React,e.ReactDnD,e.ReactDOM)}(this,function(e,t,r){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=r(12),i=n(a),s=r(101),u=(n(s),r(27)),c=r(99),l=n(c),f=r(28),p=n(f),d=r(29),h=n(d),g={ENTER:13,TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,ESCAPE:27},v={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions"},y=i["default"].createClass({displayName:"ReactTags",propTypes:{tags:i["default"].PropTypes.array,placeholder:i["default"].PropTypes.string,labelField:i["default"].PropTypes.string,suggestions:i["default"].PropTypes.array,delimiters:i["default"].PropTypes.array,autofocus:i["default"].PropTypes.bool,inline:i["default"].PropTypes.bool,handleDelete:i["default"].PropTypes.func.isRequired,handleAddition:i["default"].PropTypes.func.isRequired,handleDrag:i["default"].PropTypes.func,handleFilterSuggestions:i["default"].PropTypes.func,allowDeleteFromEmptyInput:i["default"].PropTypes.bool,handleInputChange:i["default"].PropTypes.func,handleInputBlur:i["default"].PropTypes.func,minQueryLength:i["default"].PropTypes.number,shouldRenderSuggestions:i["default"].PropTypes.func,removeComponent:i["default"].PropTypes.func,autocomplete:i["default"].PropTypes.oneOfType([i["default"].PropTypes.bool,i["default"].PropTypes.number]),readOnly:i["default"].PropTypes.bool,classNames:i["default"].PropTypes.object},getDefaultProps:function(){return{placeholder:"Add new tag",tags:[],suggestions:[],delimiters:[g.ENTER,g.TAB],autofocus:!0,inline:!0,allowDeleteFromEmptyInput:!0,minQueryLength:2,autocomplete:!1,readOnly:!1}},componentWillMount:function(){this.setState({classNames:o({},v,this.props.classNames)})},componentDidMount:function(){this.props.autofocus&&!this.props.readOnly&&this.refs.input.focus()},getInitialState:function(){return{suggestions:this.props.suggestions,query:"",selectedIndex:-1,selectionMode:!1}},filteredSuggestions:function(e,t){return this.props.handleFilterSuggestions?this.props.handleFilterSuggestions(e,t):t.filter(function(t){return 0===t.toLowerCase().indexOf(e.toLowerCase())})},componentWillReceiveProps:function(e){var t=this.filteredSuggestions(this.state.query,e.suggestions);this.setState({suggestions:t,classNames:o({},v,e.classNames)})},handleDelete:function(e,t){this.props.handleDelete(e),this.setState({query:""})},handleChange:function(e){this.props.handleInputChange&&this.props.handleInputChange(e.target.value.trim());var t=e.target.value.trim(),r=this.filteredSuggestions(t,this.props.suggestions);this.setState({query:t,suggestions:r})},handleBlur:function(e){var t=e.target.value.trim();this.props.handleInputBlur&&t.length&&(this.props.handleInputBlur(t),this.refs.input.value="")},handleKeyDown:function(e){var t=this.state,r=t.query,n=t.selectedIndex,o=t.suggestions;if(e.keyCode===g.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.setState({selectedIndex:-1,selectionMode:!1,suggestions:[]})),this.props.delimiters.indexOf(e.keyCode)!==-1&&(e.keyCode===g.TAB&&""===r||e.preventDefault(),""!==r&&(this.state.selectionMode&&(r=this.state.suggestions[this.state.selectedIndex]),this.addTag(r))),e.keyCode===g.BACKSPACE&&""==r&&this.props.allowDeleteFromEmptyInput&&this.handleDelete(this.props.tags.length-1),e.keyCode===g.UP_ARROW){e.preventDefault();var n=this.state.selectedIndex;n<=0?this.setState({selectedIndex:this.state.suggestions.length-1,selectionMode:!0}):this.setState({selectedIndex:n-1,selectionMode:!0})}e.keyCode===g.DOWN_ARROW&&(e.preventDefault(),this.setState({selectedIndex:(this.state.selectedIndex+1)%o.length,selectionMode:!0}))},handlePaste:function(e){var t=this;e.preventDefault();var r=e.clipboardData||window.clipboardData,n=r.getData("text");n.split(/[ ,]+/).forEach(function(e){return t.props.handleAddition(e)})},addTag:function(e){var t=this.refs.input;if(this.props.autocomplete){var r=this.filteredSuggestions(e,this.props.suggestions);(1===this.props.autocomplete&&1===r.length||this.props.autocomplete===!0&&r.length)&&(e=r[0])}this.props.handleAddition(e),this.setState({query:"",selectionMode:!1,selectedIndex:-1}),t.value="",t.focus()},handleSuggestionClick:function(e,t){this.addTag(this.state.suggestions[e])},handleSuggestionHover:function(e,t){this.setState({selectedIndex:e,selectionMode:!0})},moveTag:function(e,t){var r=this.props.tags,n=r.filter(function(t){return t.id===e})[0],o=r.filter(function(e){return e.id===t})[0],a=r.indexOf(n),i=r.indexOf(o);this.props.handleDrag(n,a,i)},render:function(){var e=this.props.handleDrag?this.moveTag:null,t=this.props.tags.map(function(t,r){return i["default"].createElement(h["default"],{key:r,tag:t,labelField:this.props.labelField,onDelete:this.handleDelete.bind(this,r),moveTag:e,removeComponent:this.props.removeComponent,readOnly:this.props.readOnly,classNames:this.state.classNames})}.bind(this)),r=this.state.query.trim(),n=this.state.selectedIndex,o=this.state.suggestions,a=this.props.placeholder,s=this.props.readOnly?null:i["default"].createElement("div",{className:this.state.classNames.tagInput},i["default"].createElement("input",{ref:"input",type:"text",placeholder:a,"aria-label":a,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste}),i["default"].createElement(p["default"],{query:r,suggestions:o,selectedIndex:n,handleClick:this.handleSuggestionClick,handleHover:this.handleSuggestionHover,minQueryLength:this.props.minQueryLength,shouldRenderSuggestions:this.props.shouldRenderSuggestions,classNames:this.state.classNames}));return i["default"].createElement("div",{className:this.state.classNames.tags},i["default"].createElement("div",{className:this.state.classNames.selected},t,this.props.inline&&s),!this.props.inline&&s)}});e.exports={WithContext:(0,u.DragDropContext)(l["default"])(y),WithOutContext:y,Keys:g}},function(e,t,r){var n=r(56),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},function(e,t,r){function n(e,t){for(var r=e.length;r--;)if(o(e[r][0],t))return r;return-1}var o=r(6);e.exports=n},function(e,t,r){function n(e,t){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,n=-1,i=a(r.length-t,0),s=Array(i);++n<i;)s[n]=r[t+n];n=-1;for(var u=Array(t+1);++n<t;)u[n]=r[n];return u[t]=s,o(e,this,u)}}var o=r(15),a=Math.max;e.exports=n},function(e,t,r){function n(e,t){var r=e.__data__;return o(t)?r["string"==typeof t?"string":"hash"]:r.map}var o=r(68);e.exports=n},function(e,t,r){var n=r(7),o=n(Object,"create");e.exports=o},function(e,t){function r(e,t){return e===t||e!==e&&t!==t}e.exports=r},function(e,t,r){function n(e,t){var r=a(e,t);return o(r)?r:void 0}var o=r(46),a=r(58);e.exports=n},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){function n(e){return a(e)&&o(e)}var o=r(22),a=r(25);e.exports=n},function(e,t){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},function(e,t){"use strict";t.__esModule=!0;var r="__NATIVE_FILE__";t.FILE=r;var n="__NATIVE_URL__";t.URL=n;var o="__NATIVE_TEXT__";t.TEXT=o},function(t,r){t.exports=e},function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(77),a=r(78),i=r(79),s=r(80),u=r(81);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=i,n.prototype.has=s,n.prototype.set=u,e.exports=n},function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.__data__=new o;++t<r;)this.add(e[t])}var o=r(13),a=r(82),i=r(83);n.prototype.add=n.prototype.push=a,n.prototype.has=i,e.exports=n},function(e,t){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=r},function(e,t,r){function n(e,t){var r=e?e.length:0;return!!r&&o(e,t,0)>-1}var o=r(44);e.exports=n},function(e,t){function r(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}e.exports=r},function(e,t){function r(e,t){return e.has(t)}e.exports=r},function(e,t){function r(e,t){return t=null==t?n:t,!!t&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&e<t}var n=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=r},function(e,t){function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}e.exports=r},function(e,t,r){function n(e){return o(e)&&s.call(e,"callee")&&(!c.call(e,"callee")||u.call(e)==a)}var o=r(9),a="[object Arguments]",i=Object.prototype,s=i.hasOwnProperty,u=i.toString,c=i.propertyIsEnumerable;e.exports=n},function(e,t,r){function n(e){return null!=e&&i(o(e))&&!a(e)}var o=r(57),a=r(23),i=r(24);e.exports=n},function(e,t,r){function n(e){var t=o(e)?u.call(e):"";return t==a||t==i}var o=r(10),a="[object Function]",i="[object GeneratorFunction]",s=Object.prototype,u=s.toString;e.exports=n},function(e,t){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=r(89),a=n(o),i=a["default"](function(){return/firefox/i.test(navigator.userAgent)});t.isFirefox=i;var s=a["default"](function(){return Boolean(window.safari)});t.isSafari=s},function(e,r){e.exports=t},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(12),u=n(s),c=function(e,t){var r=t.offsetHeight,n=e.offsetHeight,o=e.offsetTop-t.scrollTop;o+n>=r?t.scrollTop+=o-r+n:o<0&&(t.scrollTop+=o)},l=function(e){function t(){var e,r,n,i;o(this,t);for(var s=arguments.length,l=Array(s),f=0;f<s;f++)l[f]=arguments[f];return r=n=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),n.componentDidUpdate=function(e){var t=n.refs.suggestionsContainer;if(t&&e.selectedIndex!==n.props.selectedIndex){var r=t.querySelector(".active");r&&c(r,t)}},n.markIt=function(e,t){var r=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&");return{__html:e.replace(RegExp(r,"gi"),"<mark>$&</mark>")}},n.shouldRenderSuggestions=function(e){var t=n,r=t.props,o=r.minQueryLength||2;return r.query.length>=o},n.render=function(){var e=n,t=e.props,r=t.suggestions.map(function(e,r){return u["default"].createElement("li",{key:r,onMouseDown:t.handleClick.bind(null,r),onMouseOver:t.handleHover.bind(null,r),className:r==t.selectedIndex?"active":""},u["default"].createElement("span",{dangerouslySetInnerHTML:this.markIt(e,t.query)}))}.bind(n)),o=t.shouldRenderSuggestions||n.shouldRenderSuggestions;return 0!==r.length&&o(t.query)?u["default"].createElement("div",{ref:"suggestionsContainer",className:n.props.classNames.suggestions},u["default"].createElement("ul",null," ",r," ")):null},i=r,a(n,i)}return i(t,e),t}(s.Component);l.propTypes={query:u["default"].PropTypes.string.isRequired,selectedIndex:u["default"].PropTypes.number.isRequired,suggestions:u["default"].PropTypes.array.isRequired,handleClick:u["default"].PropTypes.func.isRequired,handleHover:u["default"].PropTypes.func.isRequired,minQueryLength:u["default"].PropTypes.number,shouldRenderSuggestions:u["default"].PropTypes.func,classNames:u["default"].PropTypes.object},t["default"]=l},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(12),u=n(s),c=r(27),l=r(30),f=n(l),p={TAG:"tag"},d={beginDrag:function(e){return{id:e.tag.id}},canDrag:function(e){return e.moveTag&&!e.readOnly}},h={hover:function(e,t){var r=t.getItem().id;r!==e.id&&e.moveTag(r,e.tag.id)},canDrop:function(e){return!e.readOnly}},g=function(e,t){return{connectDragSource:e.dragSource(),isDragging:t.isDragging()}},v=function(e,t){return{connectDropTarget:e.dropTarget()}},y=function(e){function t(){var e,r,n,i;o(this,t);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return r=n=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),n.render=function(){var e=n,t=e.props,r=t.tag[t.labelField],o=t.connectDragSource,a=t.isDragging,i=t.connectDropTarget,s=t.readOnly,c=t.removeComponent,l=u["default"].createClass({displayName:"RemoveComponent",render:function(){return s?u["default"].createElement("span",null):c?u["default"].createElement(c,this.props):u["default"].createElement("a",this.props,String.fromCharCode(215))}}),f=u["default"].createElement("span",{style:{opacity:a?0:1},className:t.classNames.tag},r,u["default"].createElement(l,{className:t.classNames.remove,onClick:t.onDelete}));return o(i(f))},i=r,a(n,i)}return i(t,e),t}(s.Component);y.propTypes={labelField:u["default"].PropTypes.string,onDelete:u["default"].PropTypes.func.isRequired,tag:u["default"].PropTypes.object.isRequired,moveTag:u["default"].PropTypes.func,removeComponent:u["default"].PropTypes.func,classNames:u["default"].PropTypes.object,readOnly:u["default"].PropTypes.bool,connectDragSource:u["default"].PropTypes.func.isRequired,isDragging:u["default"].PropTypes.bool.isRequired,connectDropTarget:u["default"].PropTypes.func.isRequired},y.defaultProps={labelField:"text",readOnly:!1},t["default"]=(0,f["default"])((0,c.DragSource)(p.TAG,d,g),(0,c.DropTarget)(p.TAG,h,v))(y)},function(e,t){(function(t){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function n(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,r,o,i){var s=-1,c=e.length;for(r||(r=u),i||(i=[]);++s<c;){var l=e[s];t>0&&r(l)?t>1?a(l,t-1,r,o,i):n(i,l):o||(i[i.length]=l)}return i}function i(e,t){return t=I(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=I(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=i,r(e,this,s)}}function s(e){return i(function(t){t=a(t,1);var r=t.length,n=r;for(e&&t.reverse();n--;)if("function"!=typeof t[n])throw new TypeError(v);return function(){for(var e=0,n=r?t[e].apply(this,arguments):arguments[0];++e<r;)n=t[e].call(this,n);return n}})}function u(e){return R(e)||c(e)||!!(N&&e&&e[N])}function c(e){return f(e)&&S.call(e,"callee")&&(!w.call(e,"callee")||E.call(e)==m)}function l(e){return null!=e&&d(P(e))&&!p(e)}function f(e){return g(e)&&l(e)}function p(e){var t=h(e)?E.call(e):"";return t==D||t==T}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=y}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){return!!e&&"object"==typeof e}var v="Expected a function",y=9007199254740991,m="[object Arguments]",D="[object Function]",T="[object GeneratorFunction]",_="object"==typeof t&&t&&t.Object===Object&&t,x="object"==typeof self&&self&&self.Object===Object&&self,O=_||x||Function("return this")(),b=Object.prototype,S=b.hasOwnProperty,E=b.toString,C=O.Symbol,w=b.propertyIsEnumerable,N=C?C.isConcatSpreadable:void 0,I=Math.max,P=o("length"),R=Array.isArray,A=s();e.exports=A}).call(t,function(){return this}())},function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(59),a=r(60),i=r(61),s=r(62),u=r(63);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=i,n.prototype.has=s,n.prototype.set=u,e.exports=n},function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(72),a=r(73),i=r(74),s=r(75),u=r(76);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=i,n.prototype.has=s,n.prototype.set=u,e.exports=n},function(e,t,r){var n=r(7),o=r(1),a=n(o,"Map");e.exports=a},function(e,t,r){var n=r(1),o=n.Reflect;e.exports=o},function(e,t,r){var n=r(7),o=r(1),a=n(o,"Set");e.exports=a},function(e,t,r){var n=r(1),o=n.Symbol;e.exports=o},function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}e.exports=r},function(e,t){function r(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}e.exports=r},function(e,t,r){function n(e,t,r,n){return void 0===e||o(e,a[r])&&!i.call(n,r)?t:e}var o=r(6),a=Object.prototype,i=a.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t,r){var n=e[t];i.call(e,t)&&o(n,r)&&(void 0!==r||t in e)||(e[t]=r)}var o=r(6),a=Object.prototype,i=a.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t,r,n){var f=-1,p=a,d=!0,h=e.length,g=[],v=t.length;if(!h)return g;r&&(t=s(t,u(r))),n?(p=i,d=!1):t.length>=l&&(p=c,d=!1,t=new o(t));e:for(;++f<h;){var y=e[f],m=r?r(y):y;if(y=n||0!==y?y:0,d&&m===m){for(var D=v;D--;)if(t[D]===m)continue e;g.push(y)}else p(t,m,n)||g.push(y)}return g}var o=r(14),a=r(16),i=r(17),s=r(37),u=r(50),c=r(18),l=200;e.exports=n},function(e,t){function r(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}e.exports=r},function(e,t,r){function n(e,t,r,i,s){var u=-1,c=e.length;for(r||(r=a),s||(s=[]);++u<c;){var l=e[u];t>0&&r(l)?t>1?n(l,t-1,r,i,s):o(s,l):i||(s[s.length]=l)}return s}var o=r(38),a=r(65);e.exports=n},function(e,t,r){function n(e,t,r){if(t!==t)return o(e,a,r);for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var o=r(42),a=r(45);e.exports=n},function(e,t){function r(e){return e!==e}e.exports=r},function(e,t,r){function n(e){if(!s(e)||i(e))return!1;var t=o(e)||a(e)?h:l;return t.test(u(e))}var o=r(23),a=r(66),i=r(69),s=r(10),u=r(84),c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,f=Object.prototype,p=Function.prototype.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},function(e,t,r){function n(e){e=null==e?e:Object(e);var t=[];for(var r in e)t.push(r);return t}var o=r(34),a=r(71),i=Object.prototype,s=o?o.enumerate:void 0,u=i.propertyIsEnumerable;s&&!u.call({valueOf:1},"valueOf")&&(n=function(e){return a(s(e))}),e.exports=n},function(e,t){function r(e){return function(t){return null==t?void 0:t[e]}}e.exports=r},function(e,t){function r(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}e.exports=r},function(e,t){function r(e){return function(t){return e(t)}}e.exports=r},function(e,t,r){function n(e,t,r){var n=-1,f=a,p=e.length,d=!0,h=[],g=h;if(r)d=!1,f=i;else if(p>=l){var v=t?null:u(e);if(v)return c(v);d=!1,f=s,g=new o}else g=t?[]:h;e:for(;++n<p;){var y=e[n],m=t?t(y):y;if(y=r||0!==y?y:0,d&&m===m){for(var D=g.length;D--;)if(g[D]===m)continue e;t&&g.push(m),h.push(y)}else f(g,m,r)||(g!==h&&g.push(m),h.push(y))}return h}var o=r(14),a=r(16),i=r(17),s=r(18),u=r(55),c=r(20),l=200;e.exports=n},function(e,t,r){function n(e,t,r,n){r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;o(r,s,void 0===u?e[s]:u)}return r}var o=r(40);e.exports=n},function(e,t,r){var n=r(1),o=n["__core-js_shared__"];e.exports=o},function(e,t,r){function n(e){return o(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&a(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var u=r[n];u&&e(t,u,n,i)}return t})}var o=r(3),a=r(67);e.exports=n},function(e,t,r){var n=r(35),o=r(90),a=r(20),i=1/0,s=n&&1/a(new n([,-0]))[1]==i?function(e){return new n(e)}:o;e.exports=s},function(e,t){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(t,function(){return this}())},function(e,t,r){var n=r(48),o=n("length");e.exports=o},function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},function(e,t,r){function n(){this.__data__=o?o(null):{}}var o=r(5);e.exports=n},function(e,t){function r(e){return this.has(e)&&delete this.__data__[e]}e.exports=r},function(e,t,r){function n(e){var t=this.__data__;if(o){var r=t[e];return r===a?void 0:r}return s.call(t,e)?t[e]:void 0}var o=r(5),a="__lodash_hash_undefined__",i=Object.prototype,s=i.hasOwnProperty;e.exports=n},function(e,t,r){function n(e){var t=this.__data__;return o?void 0!==t[e]:i.call(t,e)}var o=r(5),a=Object.prototype,i=a.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t){var r=this.__data__;return r[e]=o&&void 0===t?a:t,this}var o=r(5),a="__lodash_hash_undefined__";e.exports=n},function(e,t,r){function n(e){var t=e?e.length:void 0;return s(t)&&(i(e)||u(e)||a(e))?o(t,String):null}var o=r(49),a=r(21),i=r(8),s=r(24),u=r(87);e.exports=n},function(e,t,r){function n(e){return i(e)||a(e)||!!(s&&e&&e[s])}var o=r(36),a=r(21),i=r(8),s=o?o.isConcatSpreadable:void 0;e.exports=n},function(e,t){function r(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}e.exports=r},function(e,t,r){function n(e,t,r){if(!s(r))return!1;var n=typeof t;return!!("number"==n?a(r)&&i(t,r.length):"string"==n&&t in r)&&o(r[t],e)}var o=r(6),a=r(22),i=r(19),s=r(10);e.exports=n},function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},function(e,t,r){function n(e){return!!a&&a in e}var o=r(53),a=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t){function r(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}var n=Object.prototype;e.exports=r},function(e,t){function r(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}e.exports=r},function(e,t){function r(){this.__data__=[]}e.exports=r},function(e,t,r){function n(e){var t=this.__data__,r=o(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():i.call(t,r,1),!0}var o=r(2),a=Array.prototype,i=a.splice;e.exports=n},function(e,t,r){function n(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]}var o=r(2);e.exports=n},function(e,t,r){function n(e){return o(this.__data__,e)>-1}var o=r(2);e.exports=n},function(e,t,r){function n(e,t){var r=this.__data__,n=o(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}var o=r(2);e.exports=n},function(e,t,r){function n(){this.__data__={hash:new o,map:new(i||a),string:new o}}var o=r(31),a=r(32),i=r(33);e.exports=n},function(e,t,r){function n(e){return o(this,e)["delete"](e)}var o=r(4);e.exports=n},function(e,t,r){function n(e){return o(this,e).get(e)}var o=r(4);e.exports=n},function(e,t,r){function n(e){return o(this,e).has(e)}var o=r(4);e.exports=n},function(e,t,r){function n(e,t){return o(this,e).set(e,t),this}var o=r(4);e.exports=n},function(e,t){function r(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=r},function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},function(e,t){function r(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var n=Function.prototype.toString;e.exports=r},function(e,t,r){var n=r(52),o=r(54),a=r(88),i=o(function(e,t,r,o){n(t,a(t),e,o)});e.exports=i},function(e,t,r){var n=r(15),o=r(39),a=r(85),i=r(3),s=i(function(e){return e.push(void 0,o),n(a,void 0,e)});e.exports=s},function(e,t,r){function n(e){return"string"==typeof e||!o(e)&&a(e)&&u.call(e)==i}var o=r(8),a=r(25),i="[object String]",s=Object.prototype,u=s.toString;e.exports=n},function(e,t,r){function n(e){for(var t=-1,r=s(e),n=o(e),u=n.length,l=a(e),f=!!l,p=l||[],d=p.length;++t<u;){var h=n[t];f&&("length"==h||i(h,d))||"constructor"==h&&(r||!c.call(e,h))||p.push(h)}return p}var o=r(47),a=r(64),i=r(19),s=r(70),u=Object.prototype,c=u.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i),i};return r.cache=new(n.Cache||o),r}var o=r(13),a="Expected a function";n.Cache=o,e.exports=n},function(e,t){function r(){}e.exports=r},function(e,t,r){var n=r(43),o=r(3),a=r(51),i=r(9),s=o(function(e){return a(n(e,1,i,!0))});e.exports=s},function(e,t,r){var n=r(41),o=r(3),a=r(9),i=o(function(e,t){return a(e)?n(e,t):[]});e.exports=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=r(91),i=n(a),s=r(92),u=n(s),c=function(){function e(){o(this,e),this.entered=[]}return e.prototype.enter=function(e){var t=this.entered.length;return this.entered=i["default"](this.entered.filter(function(t){return document.documentElement.contains(t)&&(!t.contains||t.contains(e))}),[e]),0===t&&this.entered.length>0},e.prototype.leave=function(e){var t=this.entered.length;return this.entered=u["default"](this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();t["default"]=c,e.exports=t["default"]},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=r(86),s=o(i),u=r(100),c=o(u),l=r(93),f=o(l),p=r(26),d=r(97),h=r(96),g=r(11),v=n(g),y=function(){function e(t){a(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new f["default"],this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),this.endDragNativeItem=this.endDragNativeItem.bind(this)}return e.prototype.setup=function(){if("undefined"!=typeof window){if(this.constructor.isSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.constructor.isSetUp=!0,this.addEventListeners(window)}},e.prototype.teardown=function(){"undefined"!=typeof window&&(this.constructor.isSetUp=!1,this.removeEventListeners(window),this.clearCurrentDragSourceNode())},e.prototype.addEventListeners=function(e){e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.removeEventListeners=function(e){e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.connectDragPreview=function(e,t,r){var n=this;return this.sourcePreviewNodeOptions[e]=r,this.sourcePreviewNodes[e]=t,function(){delete n.sourcePreviewNodes[e],delete n.sourcePreviewNodeOptions[e]}},e.prototype.connectDragSource=function(e,t,r){var n=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=r;var o=function(t){return n.handleDragStart(t,e)},a=function(t){return n.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",o),t.addEventListener("selectstart",a),function(){delete n.sourceNodes[e],delete n.sourceNodeOptions[e],t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",a),t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){var r=this,n=function(t){return r.handleDragEnter(t,e)},o=function(t){return r.handleDragOver(t,e)},a=function(t){return r.handleDrop(t,e)};return t.addEventListener("dragenter",n),t.addEventListener("dragover",o),t.addEventListener("drop",a),function(){t.removeEventListener("dragenter",n),t.removeEventListener("dragover",o),t.removeEventListener("drop",a)}},e.prototype.getCurrentSourceNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return s["default"](t||{},{dropEffect:"move"})},e.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},e.prototype.getCurrentSourcePreviewNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return s["default"](t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},e.prototype.getSourceClientOffset=function(e){return d.getNodeClientOffset(this.sourceNodes[e])},e.prototype.isDraggingNativeItem=function(){var e=this.monitor.getItemType();return Object.keys(v).some(function(t){return v[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=h.createNativeDragSource(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]), | ||
p.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(p.isFirefox()&&window.removeEventListener("mousemove",this.endDragNativeItem,!0),this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},e.prototype.endDragIfSourceWasRemovedFromDOM=function(){var e=this.currentDragSourceNode;document.body.contains(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.setCurrentDragSourceNode=function(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=d.getNodeClientOffset(e),this.currentDragSourceNodeOffsetChanged=!1,window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},e.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),!0)},e.prototype.checkIfCurrentDragSourceRectChanged=function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!c["default"](d.getNodeClientOffset(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))},e.prototype.handleTopDragStartCapture=function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},e.prototype.handleDragStart=function(e,t){this.dragStartSourceIds.unshift(t)},e.prototype.handleTopDragStart=function(e){var t=this,r=this.dragStartSourceIds;this.dragStartSourceIds=null;var n=d.getEventClientOffset(e);this.actions.beginDrag(r,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});var o=e.dataTransfer,a=h.matchNativeItemType(o);if(this.monitor.isDragging()){if("function"==typeof o.setDragImage){var i=this.monitor.getSourceId(),s=this.sourceNodes[i],u=this.sourcePreviewNodes[i]||s,c=this.getCurrentSourcePreviewNodeOptions(),l=c.anchorX,f=c.anchorY,p={anchorX:l,anchorY:f},g=d.getDragPreviewOffset(s,u,n,p);o.setDragImage(u,g.x,g.y)}try{o.setData("application/json",{})}catch(v){}this.setCurrentDragSourceNode(e.target);var y=this.getCurrentSourcePreviewNodeOptions(),m=y.captureDraggingState;m?this.actions.publishDragSource():setTimeout(function(){return t.actions.publishDragSource()})}else if(a)this.beginDragNativeItem(a);else{if(!(o.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}},e.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.handleTopDragEnterCapture=function(e){this.dragEnterTargetIds=[];var t=this.enterLeaveCounter.enter(e.target);if(t&&!this.monitor.isDragging()){var r=e.dataTransfer,n=h.matchNativeItemType(r);n&&this.beginDragNativeItem(n)}},e.prototype.handleDragEnter=function(e,t){this.dragEnterTargetIds.unshift(t)},e.prototype.handleTopDragEnter=function(e){var t=this,r=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){p.isFirefox()||this.actions.hover(r,{clientOffset:d.getEventClientOffset(e)});var n=r.some(function(e){return t.monitor.canDropOnTarget(e)});n&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}},e.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[]},e.prototype.handleDragOver=function(e,t){this.dragOverTargetIds.unshift(t)},e.prototype.handleTopDragOver=function(e){var t=this,r=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.actions.hover(r,{clientOffset:d.getEventClientOffset(e)});var n=r.some(function(e){return t.monitor.canDropOnTarget(e)});n?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),e.dataTransfer.dropEffect="move")},e.prototype.handleTopDragLeaveCapture=function(e){this.isDraggingNativeItem()&&e.preventDefault();var t=this.enterLeaveCounter.leave(e.target);t&&this.isDraggingNativeItem()&&this.endDragNativeItem()},e.prototype.handleTopDropCapture=function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()},e.prototype.handleDrop=function(e,t){this.dropTargetIds.unshift(t)},e.prototype.handleTopDrop=function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:d.getEventClientOffset(e)}),this.actions.drop(),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},e.prototype.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},e}();t["default"]=y,e.exports=t["default"]},function(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,n){r(this,e);for(var o=t.length,a=[],i=0;i<o;i++)a.push(i);a.sort(function(e,r){return t[e]<t[r]?-1:1});for(var s=[],u=[],c=[],l=void 0,f=void 0,i=0;i<o-1;i++)l=t[i+1]-t[i],f=n[i+1]-n[i],u.push(l),s.push(f),c.push(f/l);for(var p=[c[0]],i=0;i<u.length-1;i++){var d=c[i],h=c[i+1];if(d*h<=0)p.push(0);else{l=u[i];var g=u[i+1],v=l+g;p.push(3*v/((v+g)/d+(v+l)/h))}}p.push(c[c.length-1]);for(var y=[],m=[],D=void 0,i=0;i<p.length-1;i++){D=c[i];var T=p[i],_=1/u[i],v=T+p[i+1]-D-D;y.push((D-T-v)*_),m.push(v*_*_)}this.xs=t,this.ys=n,this.c1s=p,this.c2s=y,this.c3s=m}return e.prototype.interpolate=function(e){var t=this.xs,r=this.ys,n=this.c1s,o=this.c2s,a=this.c3s,i=t.length-1;if(e===t[i])return r[i];for(var s=0,u=a.length-1,c=void 0;s<=u;){c=Math.floor(.5*(s+u));var l=t[c];if(l<e)s=c+1;else{if(!(l>e))return r[c];u=c-1}}i=Math.max(0,u);var f=e-t[i],p=f*f;return r[i]+n[i]*f+o[i]*p+a[i]*f*p},e}();t["default"]=n,e.exports=t["default"]},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t,r){var n=t.reduce(function(t,r){return t||e.getData(r)},null);return null!=n?n:r}function s(e){var t=p[e],r=t.exposeProperty,n=t.matchesTypes,i=t.getData;return function(){function e(){o(this,e),this.item=Object.defineProperties({},a({},r,{get:function(){return console.warn("Browser doesn't allow reading \""+r+'" until the drop event.'),null},configurable:!0,enumerable:!0}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){delete this.item[r],this.item[r]=i(e,n)},e.prototype.canDrag=function(){return!0},e.prototype.beginDrag=function(){return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}()}function u(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(p).filter(function(e){var r=p[e].matchesTypes;return r.some(function(e){return t.indexOf(e)>-1})})[0]||null}t.__esModule=!0;var c;t.createNativeDragSource=s,t.matchNativeItemType=u;var l=r(11),f=n(l),p=(c={},a(c,f.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),a(c,f.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return i(e,t,"").split("\n")}}),a(c,f.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return i(e,t,"")}}),c)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.nodeType===l?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top,o=r.left;return{x:o,y:n}}function a(e){return{x:e.clientX,y:e.clientY}}function i(e,t,r,n){var a="IMG"===t.nodeName&&(s.isFirefox()||!document.documentElement.contains(t)),i=a?e:t,u=o(i),l={x:r.x-u.x,y:r.y-u.y},f=e.offsetWidth,p=e.offsetHeight,d=n.anchorX,h=n.anchorY,g=a?t.width:f,v=a?t.height:p;s.isSafari()&&a?(v/=window.devicePixelRatio,g/=window.devicePixelRatio):s.isFirefox()&&!a&&(v*=window.devicePixelRatio,g*=window.devicePixelRatio);var y=new c["default"]([0,.5,1],[l.x,l.x/f*g,l.x+g-f]),m=new c["default"]([0,.5,1],[l.y,l.y/p*v,l.y+v-p]),D=y.interpolate(d),T=m.interpolate(h);return s.isSafari()&&a&&(T+=(window.devicePixelRatio-1)*v),{x:D,y:T}}t.__esModule=!0,t.getNodeClientOffset=o,t.getEventClientOffset=a,t.getDragPreviewOffset=i;var s=r(26),u=r(95),c=n(u),l=1},function(e,t){"use strict";function r(){return n||(n=new Image,n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),n}t.__esModule=!0,t["default"]=r;var n=void 0;e.exports=t["default"]},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return new s["default"](e)}t.__esModule=!0,t["default"]=a;var i=r(94),s=o(i),u=r(98),c=o(u),l=r(11),f=n(l);t.NativeTypes=f,t.getEmptyImage=c["default"]},function(e,t){"use strict";function r(e,t){if(e===t)return!0;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a<r.length;a++){if(!o.call(t,r[a])||e[r[a]]!==t[r[a]])return!1;var i=e[r[a]],s=t[r[a]];if(i!==s)return!1}return!0}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t){e.exports=r}])}); |
import React, { Component } from 'react'; | ||
const maybeScrollSuggestionIntoView = (suggestionEl, suggestionsContainer) => { | ||
const containerHeight = suggestionsContainer.offsetHeight | ||
const suggestionHeight = suggestionEl.offsetHeight | ||
const relativeSuggestionTop = suggestionEl.offsetTop - suggestionsContainer.scrollTop | ||
if (relativeSuggestionTop + suggestionHeight >= containerHeight) { | ||
suggestionsContainer.scrollTop += (relativeSuggestionTop - containerHeight) + suggestionHeight | ||
} | ||
else if (relativeSuggestionTop < 0) { | ||
suggestionsContainer.scrollTop += relativeSuggestionTop | ||
} | ||
} | ||
class Suggestions extends Component { | ||
@@ -15,2 +28,13 @@ static propTypes = { | ||
componentDidUpdate = prevProps => { | ||
const suggestionsContainer = this.refs.suggestionsContainer | ||
if (suggestionsContainer && prevProps.selectedIndex !== this.props.selectedIndex) { | ||
const activeSuggestion = suggestionsContainer.querySelector('.active') | ||
if (activeSuggestion) { | ||
maybeScrollSuggestionIntoView(activeSuggestion, suggestionsContainer) | ||
} | ||
} | ||
} | ||
markIt = (input, query) => { | ||
@@ -33,8 +57,8 @@ const escapedRegex = query.trim().replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); | ||
return ( | ||
<li key={i} | ||
onMouseDown={props.handleClick.bind(null, i) } | ||
onMouseOver={props.handleHover.bind(null, i) } | ||
className={i == props.selectedIndex ? "active" : ""}> | ||
<span dangerouslySetInnerHTML={this.markIt(item, props.query) } /> | ||
</li> | ||
<li key={i} | ||
onMouseDown={props.handleClick.bind(null, i) } | ||
onMouseOver={props.handleHover.bind(null, i) } | ||
className={i == props.selectedIndex ? "active" : ""}> | ||
<span dangerouslySetInnerHTML={this.markIt(item, props.query) } /> | ||
</li> | ||
) | ||
@@ -50,5 +74,5 @@ }.bind(this)); | ||
return ( | ||
<div className={this.props.classNames.suggestions}> | ||
<ul> { suggestions } </ul> | ||
</div> | ||
<div ref="suggestionsContainer" className={this.props.classNames.suggestions}> | ||
<ul> { suggestions } </ul> | ||
</div> | ||
) | ||
@@ -55,0 +79,0 @@ } |
{ | ||
"name": "react-tag-input", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "React tags is a fantastically simple tagging component for your React projects", | ||
@@ -5,0 +5,0 @@ "main": "dist-modules/reactTags.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1043192
15324