react-tag-input
Advanced tools
Comparing version 4.0.1 to 4.1.0
@@ -62,2 +62,3 @@ 'use strict'; | ||
handleDrag: _react2.default.PropTypes.func, | ||
handleFilterSuggestions: _react2.default.PropTypes.func, | ||
allowDeleteFromEmptyInput: _react2.default.PropTypes.bool, | ||
@@ -106,2 +107,6 @@ handleInputChange: _react2.default.PropTypes.func, | ||
filteredSuggestions: function filteredSuggestions(query, suggestions) { | ||
if (this.props.handleFilterSuggestions) { | ||
return this.props.handleFilterSuggestions(query, suggestions); | ||
} | ||
return suggestions.filter(function (item) { | ||
@@ -108,0 +113,0 @@ return item.toLowerCase().indexOf(query.toLowerCase()) === 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(14),i=n(a),s=r(105),u=(n(s),r(27)),c=r(103),f=n(c),l=r(28),p=n(l),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,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 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)(f["default"])(y),WithOutContext:y,Keys:g}},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(5);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(8),o=n(Object,"create");e.exports=o},function(e,t,r){(function(t){var n=r(51),o=n("object"==typeof t&&t),a=n("object"==typeof self&&self),i=n("object"==typeof this&&this),s=o||a||i||Function("return this")();e.exports=s}).call(t,function(){return this}())},function(e,t){function r(e,t){return e===t||e!==e&&t!==t}e.exports=r},function(e,t){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},function(e,t,r){function n(e,t){if("function"!=typeof e)throw new TypeError(i);return t=s(void 0===t?e.length-1:a(t),0),function(){for(var r=arguments,n=-1,a=s(r.length-t,0),i=Array(a);++n<a;)i[n]=r[t+n];switch(t){case 0:return e.call(this,i);case 1:return e.call(this,r[0],i);case 2:return e.call(this,r[0],r[1],i)}var u=Array(t+1);for(n=-1;++n<t;)u[n]=r[n];return u[t]=i,o(e,this,u)}}var o=r(17),a=r(93),i="Expected a function",s=Math.max;e.exports=n},function(e,t,r){function n(e,t){var r=a(e,t);return o(r)?r:void 0}var o=r(45),a=r(57);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(24),a=r(12);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(6),a="[object Function]",i="[object GeneratorFunction]",s=Object.prototype,u=s.toString;e.exports=n},function(e,t){function r(e){return!!e&&"object"==typeof e}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(15),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){var n=r.length;switch(n){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(10),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(56),a=r(11),i=r(25);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,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=r(90),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(14),u=n(s),c=function(e){function t(){var e,r,n,i;o(this,t);for(var s=arguments.length,c=Array(s),f=0;f<s;f++)c[f]=arguments[f];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(14),u=n(s),c=r(27),f=r(31),l=n(f),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),f=0;f<s;f++)c[f]=arguments[f];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,f=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))}}),l=u["default"].createElement("span",{style:{opacity:a?0:1},className:t.classNames.tag},r,u["default"].createElement(f,{className:t.classNames.remove,onClick:t.onDelete}));return o(i(l))},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,l["default"])((0,c.DragSource)(p.TAG,d,g),(0,c.DropTarget)(p.TAG,h,v))(y)},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}function n(e,t,o,i,s){var u=-1,c=e.length;for(o||(o=a),s||(s=[]);++u<c;){var f=e[u];t>0&&o(f)?t>1?n(f,t-1,o,i,s):r(s,f):i||(s[s.length]=f)}return s}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e){return _(e)||i(e)}function i(e){return u(e)&&m.call(e,"callee")&&(!T.call(e,"callee")||D.call(e)==h)}function s(e){return null!=e&&f(x(e))&&!c(e)}function u(e){return p(e)&&s(e)}function c(e){var t=l(e)?D.call(e):"";return t==g||t==v}function f(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function l(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(e){return!!e&&"object"==typeof e}var d=9007199254740991,h="[object Arguments]",g="[object Function]",v="[object GeneratorFunction]",y=Object.prototype,m=y.hasOwnProperty,D=y.toString,T=y.propertyIsEnumerable,x=o("length"),_=Array.isArray;e.exports=n},function(e,t,r){function n(e){return a(function(t){t=o(t,1);var r=t.length,n=r;for(e&&t.reverse();n--;)if("function"!=typeof t[n])throw new TypeError(i);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}})}var o=r(30),a=r(32),i="Expected a function",s=n();e.exports=s},function(e,t){function r(e,t,r){var n=r.length;switch(n){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){if("function"!=typeof e)throw new TypeError(l);return t=E(void 0===t?e.length-1:c(t),0),function(){for(var n=arguments,o=-1,a=E(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];switch(t){case 0:return e.call(this,i);case 1:return e.call(this,n[0],i);case 2:return e.call(this,n[0],n[1],i)}var s=Array(t+1);for(o=-1;++o<t;)s[o]=n[o];return s[t]=i,r(e,this,s)}}function o(e){var t=a(e)?O.call(e):"";return t==g||t==v}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==typeof e}function s(e){return"symbol"==typeof e||i(e)&&O.call(e)==y}function u(e){if(!e)return 0===e?e:0;if(e=f(e),e===p||e===-p){var t=e<0?-1:1;return t*d}return e===e?e:0}function c(e){var t=u(e),r=t%1;return t===t?r?t-r:t:0}function f(e){if("number"==typeof e)return e;if(s(e))return h;if(a(e)){var t=o(e.valueOf)?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(m,"");var r=T.test(e);return r||x.test(e)?_(e.slice(2),r?2:8):D.test(e)?h:+e}var l="Expected a function",p=1/0,d=1.7976931348623157e308,h=NaN,g="[object Function]",v="[object GeneratorFunction]",y="[object Symbol]",m=/^\s+|\s+$/g,D=/^[-+]0x[0-9a-f]+$/i,T=/^0b[01]+$/i,x=/^0o[0-7]+$/i,_=parseInt,b=Object.prototype,O=b.toString,E=Math.max;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(58),a=r(59),i=r(60),s=r(61),u=r(62);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(8),o=r(4),a=n(o,"Map");e.exports=a},function(e,t,r){var n=r(4),o=n.Reflect;e.exports=o},function(e,t,r){var n=r(8),o=r(4),a=n(o,"Set");e.exports=a},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(5),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(5),a=Object.prototype,i=a.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t,r,n){var l=-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>=f&&(p=c,d=!1,t=new o(t));e:for(;++l<h;){var y=e[l],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(16),a=r(18),i=r(19),s=r(38),u=r(49),c=r(20),f=200;e.exports=n},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 f=e[u];t>0&&r(f)?t>1?n(f,t-1,r,i,s):o(s,f):i||(s[s.length]=f)}return s}var o=r(39),a=r(65);e.exports=n},function(e,t,r){function n(e,t,r){if(t!==t)return o(e,r);for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var o=r(64);e.exports=n},function(e,t,r){function n(e){if(!s(e)||i(e))return!1;var t=o(e)||a(e)?h:f;return t.test(u(e))}var o=r(11),a=r(66),i=r(69),s=r(6),u=r(84),c=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,l=Object.prototype,p=Function.prototype.toString,d=l.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(36),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,l=a,p=e.length,d=!0,h=[],g=h;if(r)d=!1,l=i;else if(p>=f){var v=t?null:u(e);if(v)return c(v);d=!1,l=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 l(g,m,r)||(g!==h&&g.push(m),h.push(y))}return h}var o=r(16),a=r(18),i=r(19),s=r(20),u=r(55),c=r(22),f=200;e.exports=n},function(e,t){function r(e){return e&&e.Object===Object?e:null}e.exports=r},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):e[s];o(r,s,u)}return r}var o=r(41);e.exports=n},function(e,t,r){var n=r(4),o=n["__core-js_shared__"];e.exports=o},function(e,t,r){function n(e){return a(function(t,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,s&&o(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++n<a;){var u=r[n];u&&e(t,u,n,i)}return t})}var o=r(67),a=r(7);e.exports=n},function(e,t,r){var n=r(37),o=r(91),a=r(22),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,r){var n=r(47),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(3);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(3),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(3),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(3),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(48),a=r(23),i=r(9),s=r(25),u=r(87);e.exports=n},function(e,t){function r(e,t,r){for(var n=e.length,o=t+(r?1:-1);r?o--:++o<n;){var a=e[o];if(a!==a)return o}return-1}e.exports=r},function(e,t,r){function n(e){return a(e)||o(e)}var o=r(23),a=r(9);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(5),a=r(24),i=r(21),s=r(6);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(1),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(1);e.exports=n},function(e,t,r){function n(e){return o(this.__data__,e)>-1}var o=r(1);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(1);e.exports=n},function(e,t,r){function n(){this.__data__={hash:new o,map:new(i||a),string:new o}}var o=r(33),a=r(34),i=r(35);e.exports=n},function(e,t,r){function n(e){return o(this,e)["delete"](e)}var o=r(2);e.exports=n},function(e,t,r){function n(e){return o(this,e).get(e)}var o=r(2);e.exports=n},function(e,t,r){function n(e){return o(this,e).has(e)}var o=r(2);e.exports=n},function(e,t,r){function n(e,t){return o(this,e).set(e,t),this}var o=r(2);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(89),i=o(function(e,t,r,o){n(t,a(t),e,o)});e.exports=i},function(e,t,r){var n=r(17),o=r(40),a=r(85),i=r(7),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(9),a=r(12),i="[object String]",s=Object.prototype,u=s.toString;e.exports=n},function(e,t,r){function n(e){return"symbol"==typeof e||o(e)&&s.call(e)==a}var o=r(12),a="[object Symbol]",i=Object.prototype,s=i.toString;e.exports=n},function(e,t,r){function n(e){for(var t=-1,r=s(e),n=o(e),u=n.length,f=a(e),l=!!f,p=f||[],d=p.length;++t<u;){var h=n[t];l&&("length"==h||i(h,d))||"constructor"==h&&(r||!c.call(e,h))||p.push(h)}return p}var o=r(46),a=r(63),i=r(21),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(15),a="Expected a function";n.Cache=o,e.exports=n},function(e,t){function r(){}e.exports=r},function(e,t,r){function n(e){if(!e)return 0===e?e:0;if(e=o(e),e===a||e===-a){var t=e<0?-1:1;return t*i}return e===e?e:0}var o=r(94),a=1/0,i=1.7976931348623157e308;e.exports=n},function(e,t,r){function n(e){var t=o(e),r=t%1;return t===t?r?t-r:t:0}var o=r(92);e.exports=n},function(e,t,r){function n(e){if("number"==typeof e)return e;if(i(e))return s;if(a(e)){var t=o(e.valueOf)?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(u,"");var r=f.test(e);return r||l.test(e)?p(e.slice(2),r?2:8):c.test(e)?s:+e}var o=r(11),a=r(6),i=r(88),s=NaN,u=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,l=/^0o[0-7]+$/i,p=parseInt;e.exports=n},function(e,t,r){var n=r(43),o=r(50),a=r(10),i=r(7),s=i(function(e){return o(n(e,1,a,!0))});e.exports=s},function(e,t,r){var n=r(42),o=r(10),a=r(7),i=a(function(e,t){return o(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(95),i=n(a),s=r(96),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(104),c=o(u),f=r(97),l=o(f),p=r(26),d=r(101),h=r(100),g=r(13),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 l["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(),f=c.anchorX,l=c.anchorY,p={anchorX:f,anchorY:l},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=[],f=void 0,l=void 0,i=0;i<o-1;i++)f=t[i+1]-t[i],l=n[i+1]-n[i],u.push(f),s.push(l),c.push(l/f);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{f=u[i];var g=u[i+1],v=f+g;p.push(3*v/((v+g)/d+(v+f)/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],x=1/u[i],v=T+p[i+1]-D-D;y.push((D-T-v)*x),m.push(v*x*x)}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 f=t[c];if(f<e)s=c+1;else{if(!(f>e))return r[c];u=c-1}}i=Math.max(0,u);var l=e-t[i],p=l*l;return r[i]+n[i]*l+o[i]*p+a[i]*l*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 f=r(13),l=n(f),p=(c={},a(c,l.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),a(c,l.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return i(e,t,"").split("\n")}}),a(c,l.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===f?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),f={x:r.x-u.x,y:r.y-u.y},l=e.offsetWidth,p=e.offsetHeight,d=n.anchorX,h=n.anchorY,g=a?t.width:l,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],[f.x,f.x/l*g,f.x+g-l]),m=new c["default"]([0,.5,1],[f.y,f.y/p*v,f.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(99),c=n(u),f=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(98),s=o(i),u=r(102),c=o(u),f=r(13),l=n(f);t.NativeTypes=l,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),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}])}); |
@@ -39,2 +39,3 @@ import React from 'react'; | ||
handleDrag: React.PropTypes.func, | ||
handleFilterSuggestions: React.PropTypes.func, | ||
allowDeleteFromEmptyInput: React.PropTypes.bool, | ||
@@ -83,2 +84,6 @@ handleInputChange: React.PropTypes.func, | ||
filteredSuggestions(query, suggestions) { | ||
if (this.props.handleFilterSuggestions) { | ||
return this.props.handleFilterSuggestions(query, suggestions) | ||
} | ||
return suggestions.filter(function(item) { | ||
@@ -85,0 +90,0 @@ return item.toLowerCase().indexOf(query.toLowerCase()) === 0; |
{ | ||
"name": "react-tag-input", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "React tags is a fantastically simple tagging component for your React projects", | ||
@@ -29,4 +29,4 @@ "main": "dist-modules/reactTags.js", | ||
"peerDependencies": { | ||
"react": "^15.1.0", | ||
"react-dom": "^15.1.0" | ||
"react": "^0.14.0 || ^15.0.0-rc", | ||
"react-dom": "^0.14.0 || ^15.0.0-rc" | ||
}, | ||
@@ -47,2 +47,3 @@ "devDependencies": { | ||
"jsdom": "^9.4.0", | ||
"lodash": "4.14.1", | ||
"mocha": "^2.5.3", | ||
@@ -54,3 +55,6 @@ "react-addons-test-utils": "^15.1.0", | ||
"webpack-dev-server": "^1.14.1" | ||
}, | ||
"engines": { | ||
"node": ">=5.0.0" | ||
} | ||
} |
@@ -92,3 +92,3 @@ React-Tags | ||
**A note about `Contexts`** | ||
One of the dependancies of this component is the [react-dnd](https://github.com/gaearon/react-dnd) library. Since the 1.0 version, the original author has changed the API and requires the application using any draggable components to have a top-level [backend](http://gaearon.github.io/react-dnd/docs-html5-backend.html) context. So if you're using this component in an existing Application that uses React-DND you will already have a backend defined, in which case, you should `require` the component *without* the context. | ||
One of the dependencies of this component is the [react-dnd](https://github.com/gaearon/react-dnd) library. Since the 1.0 version, the original author has changed the API and requires the application using any draggable components to have a top-level [backend](http://gaearon.github.io/react-dnd/docs-html5-backend.html) context. So if you're using this component in an existing Application that uses React-DND you will already have a backend defined, in which case, you should `require` the component *without* the context. | ||
@@ -111,2 +111,3 @@ ```javascript | ||
- [`handleDrag`](#handleDragOption) | ||
- [`handleFilterSuggestions`](#handleFilterSuggestions) | ||
- [`autofocus`](#autofocus) | ||
@@ -193,2 +194,28 @@ - [`allowDeleteFromEmptyInput`](#allowDeleteFromEmptyInput) | ||
``` | ||
<a name="handleFilterSuggestions"></a> | ||
##### handleFilterSuggestions (optional) | ||
To assert control over the suggestions filter, you may contribute a function that is executed whenever a filtered set | ||
of suggestions is expected. By default, the text input value will be matched against each suggestion, and [those that | ||
**start with** the entered text][default-suggestions-filter-logic] will be included in the filters suggestions list. If you do contribute a custom filter | ||
function, you must return an array of suggestions. Please do not mutate the passed suggestions array. | ||
For example, if you prefer to override the default filter behavior and instead match any suggestions that contain | ||
the entered text _anywhere_ in the suggestion, your `handleFilterSuggestions` property may look like this: | ||
```js | ||
function(textInputValue, possibleSuggestionsArray) { | ||
var lowerCaseQuery = textInputValue.toLowerCase() | ||
return possibleSuggestionsArray.filter(function(suggestion) { | ||
return suggestion.toLowerCase().includes(lowerCaseQuery) | ||
}) | ||
} | ||
``` | ||
Note: The above custom filter uses `String.prototype.includes`, which was added to JavaScript as part of the ECMAScript 7 | ||
specification. If you need to support a browser that does not yet include support for this method, you will need to | ||
either refactor the above filter based on the capabilities of your supported browsers, or import a [polyfill for | ||
`String.prototype.includes`][includes-polyfill]. | ||
<a name="autofocus"></a> | ||
@@ -270,3 +297,3 @@ ##### autofocus (optional) | ||
- `1` - when delimeter key (such as enter) is pressed, matching suggestion is used only if there is a single matching suggestion | ||
- `false` (default) - tags are not autocompleted on enter/delimeter | ||
- `false` (default) - tags are not autocompleted on enter/delimiter | ||
@@ -323,1 +350,5 @@ This option has no effect if there are no [`suggestions`](#suggestionsOption). | ||
Also thanks to the awesome contributors who've made the library far better! | ||
[default-suggestions-filter-logic]: https://github.com/prakhar1989/react-tags/blob/v4.0.1/lib/ReactTags.js#L83 | ||
[includes-polyfill]: https://github.com/mathiasbynens/String.prototype.includes |
@@ -8,10 +8,11 @@ import React from 'react'; | ||
const defaults = { | ||
tags: [{ id: 1, text: "Apple" }], | ||
suggestions: ["Banana", "Apple", "Apricot", "Pear", "Peach"], | ||
handleAddition: noop, | ||
handleDelete: noop, | ||
handleDrag: noop | ||
} | ||
function mockItem(overrides) { | ||
const defaults = { | ||
tags: [{ id: 1, text: "Apple" }], | ||
suggestions: ["Banana", "Apple", "Apricot", "Pear", "Peach"], | ||
handleAddition: noop, | ||
handleDelete: noop, | ||
handleDrag: noop | ||
} | ||
const props = Object.assign({}, defaults, overrides); | ||
@@ -56,2 +57,40 @@ return <ReactTags {...props} /> | ||
}); | ||
}); | ||
describe('autocomplete/suggestions filtering', () => { | ||
it('updates suggestions state as expected based on default filter logic', () => { | ||
const $el = mount(mockItem()) | ||
const ReactTagsInstance = $el.instance().refs.child | ||
const $input = $el.find('.ReactTags__tagInput input') | ||
expect(ReactTagsInstance.state.suggestions).to.have.members(defaults.suggestions) | ||
$input.simulate('change', {target: {value: 'ea'}}) | ||
expect(ReactTagsInstance.state.suggestions).to.have.members([]) | ||
$input.simulate('change', {target: {value: 'ap'}}) | ||
expect(ReactTagsInstance.state.suggestions).to.have.members(['Apple', 'Apricot']) | ||
}) | ||
it('updates suggestions state as expected based on custom filter logic', () => { | ||
const $el = mount( | ||
mockItem({ | ||
handleFilterSuggestions: (query, suggestions) => { | ||
return suggestions.filter(suggestion => { | ||
return suggestion.toLowerCase().indexOf(query.toLowerCase()) >= 0 | ||
}) | ||
} | ||
}) | ||
) | ||
const ReactTagsInstance = $el.instance().refs.child | ||
const $input = $el.find('.ReactTags__tagInput input') | ||
expect(ReactTagsInstance.state.suggestions).to.have.members(defaults.suggestions) | ||
$input.simulate('change', {target: {value: 'Ea'}}) | ||
expect(ReactTagsInstance.state.suggestions).to.have.members(['Pear', 'Peach']) | ||
$input.simulate('change', {target: {value: 'ap'}}) | ||
expect(ReactTagsInstance.state.suggestions).to.have.members(['Apple', 'Apricot']) | ||
}) | ||
}) | ||
}) |
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
1040815
15286
349
20
3