react-selectable-fast
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports["React-Selectable-Fast"]=t(require("react")):e["React-Selectable-Fast"]=t(e.React)}(this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=59)}([function(e,t,n){var o=n(48)("wks"),r=n(18),i=n(1).Symbol,c="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=c&&i[e]||(c?i:r)("Symbol."+e))}).store=o},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(1),r=n(2),i=n(9),c=n(10),s=n(11),u=function(e,t,n){var a,l,f,p,d=e&u.F,h=e&u.G,v=e&u.S,y=e&u.P,g=e&u.B,m=h?o:v?o[t]||(o[t]={}):(o[t]||{}).prototype,b=h?r:r[t]||(r[t]={}),S=b.prototype||(b.prototype={});h&&(n=t);for(a in n)l=!d&&m&&void 0!==m[a],f=(l?m:n)[a],p=g&&l?s(f,o):y&&"function"==typeof f?s(Function.call,f):f,m&&c(m,a,f,e&u.U),b[a]!=f&&i(b,a,p),y&&S[a]!=f&&(S[a]=f)};o.core=r,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var o=n(8),r=n(37),i=n(49),c=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var o=n(6);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var o=n(7),r=n(16);e.exports=n(3)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(1),r=n(9),i=n(5),c=n(18)("src"),s=Function.toString,u=(""+s).split("toString");n(2).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var a="function"==typeof n;a&&(i(n,"name")||r(n,"name",t)),e[t]!==n&&(a&&(i(n,c)||r(n,c,e[t]?""+e[t]:u.join(String(t)))),e===o?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[c]||s.call(this)})},function(e,t,n){var o=n(66);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(t,n){t.exports=e},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var o=n(38),r=n(15);e.exports=function(e){return o(r(e))}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t,n){e.exports=n(96)()},function(e,t,n){"use strict";function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scrollTop:0,scrollLeft:0},n=t.scrollTop,o=t.scrollLeft,r=e.getBoundingClientRect();return{top:r.top+document.body.scrollTop+n,left:r.left+document.body.scrollLeft+o,offsetWidth:e.offsetWidth,offsetHeight:e.offsetHeight}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},function(e,t,n){var o=n(22),r=n(0)("toStringTag"),i="Arguments"==o(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=c(t=Object(e),r))?n:i?o(t):"Object"==(s=o(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var o=n(11),r=n(40),i=n(39),c=n(8),s=n(28),u=n(50),a={},l={},t=e.exports=function(e,t,n,f,p){var d,h,v,y,g=p?function(){return e}:u(e),m=o(n,f,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(d=s(e.length);d>b;b++)if((y=t?m(c(h=e[b])[0],h[1]):m(e[b]))===a||y===l)return y}else for(v=g.call(e);!(h=v.next()).done;)if((y=r(v,m,h.value,t))===a||y===l)return y};t.BREAK=a,t.RETURN=l},function(e,t,n){"use strict";var o=n(75),r=n(4),i=n(10),c=n(9),s=n(5),u=n(13),a=n(74),l=n(25),f=n(80),p=n(0)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,v,y,g,m){a(n,t,v);var b,S,x,_=function(e){if(!d&&e in j)return j[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",O="values"==y,E=!1,j=e.prototype,k=j[p]||j["@@iterator"]||y&&j[y],T=k||_(y),C=y?O?_("entries"):T:void 0,P="Array"==t?j.entries||k:k;if(P&&(x=f(P.call(new e)))!==Object.prototype&&(l(x,w,!0),o||s(x,p)||c(x,p,h)),O&&k&&"values"!==k.name&&(E=!0,T=function(){return k.call(this)}),o&&!m||!d&&!E&&j[p]||c(j,p,T),u[t]=T,u[w]=h,y)if(b={values:O?T:_("values"),keys:g?T:_("keys"),entries:C},m)for(S in b)S in j||i(j,S,b[S]);else r(r.P+r.F*(d||E),t,b);return b}},function(e,t,n){var o=n(7).f,r=n(5),i=n(0)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){var o=n(48)("keys"),r=n(18);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(27),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){var o=n(15);e.exports=function(e){return Object(o(e))}},function(e,t,n){"use strict";var o=n(84)(!0);n(24)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){e.exports=function(e,t,n,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){"use strict";var o=n(7).f,r=n(44),i=n(47),c=n(11),s=n(31),u=n(15),a=n(23),l=n(24),f=n(42),p=n(83),d=n(3),h=n(43).fastKey,v=d?"_s":"size",y=function(e,t){var n,o=h(t);if("F"!==o)return e._i[o];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var f=e(function(e,o){s(e,f,t,"_i"),e._i=r(null),e._f=void 0,e._l=void 0,e[v]=0,void 0!=o&&a(o,n,e[l],e)});return i(f.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var t=this,n=y(t,e);if(n){var o=n.n,r=n.p;delete t._i[n.i],n.r=!0,r&&(r.n=o),o&&(o.p=r),t._f==n&&(t._f=o),t._l==n&&(t._l=r),t[v]--}return!!n},forEach:function(e){s(this,f,"forEach");for(var t,n=c(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),d&&o(f.prototype,"size",{get:function(){return u(this[v])}}),f},def:function(e,t,n){var o,r,i=y(e,t);return i?i.v=n:(e._l=i={i:r=h(t,!0),k:t,v:n,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[v]++,"F"!==r&&(e._i[r]=i)),e},getEntry:y,setStrong:function(e,t,n){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?f(0,n.k):"values"==t?f(0,n.v):f(0,[n.k,n.v]):(e._t=void 0,f(1))},n?"entries":"values",!n,!0),p(t)}}},function(e,t,n){var o=n(21),r=n(68);e.exports=function(e){return function(){if(o(this)!=e)throw TypeError(e+"#toJSON isn't generic");return r(this)}}},function(e,t,n){"use strict";var o=n(1),r=n(4),i=n(10),c=n(47),s=n(43),u=n(23),a=n(31),l=n(6),f=n(12),p=n(41),d=n(25),h=n(72);e.exports=function(e,t,n,v,y,g){var m=o[e],b=m,S=y?"set":"add",x=b&&b.prototype,_={},w=function(e){var t=x[e];i(x,e,"delete"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(g||x.forEach&&!f(function(){(new b).entries().next()}))){var O=new b,E=O[S](g?{}:-0,1)!=O,j=f(function(){O.has(1)}),k=p(function(e){new b(e)}),T=!g&&f(function(){for(var e=new b,t=5;t--;)e[S](t,t);return!e.has(-0)});k||(b=t(function(t,n){a(t,b,e);var o=h(new m,t,b);return void 0!=n&&u(n,y,o[S],o),o}),b.prototype=x,x.constructor=b),(j||T)&&(w("delete"),w("has"),y&&w("get")),(T||E)&&w(S),g&&x.clear&&delete x.clear}else b=v.getConstructor(t,e,y,S),c(b.prototype,n),s.NEED=!0;return d(b,e),_[e]=b,r(r.G+r.W+r.F*(b!=m),_),g||v.setStrong(b,e,y),b}},function(e,t,n){var o=n(6),r=n(1).document,i=o(r)&&o(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){e.exports=!n(3)&&!n(12)(function(){return 7!=Object.defineProperty(n(35)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t,n){var o=n(13),r=n(0)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[r]===e)}},function(e,t,n){var o=n(8);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&o(i.call(e)),t}}},function(e,t,n){var o=n(0)("iterator"),r=!1;try{var i=[7][o]();i.return=function(){r=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i=[7],c=i[o]();c.next=function(){return{done:n=!0}},i[o]=function(){return c},e(i)}catch(e){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var o=n(18)("meta"),r=n(6),i=n(5),c=n(7).f,s=0,u=Object.isExtensible||function(){return!0},a=!n(12)(function(){return u(Object.preventExtensions({}))}),l=function(e){c(e,o,{value:{i:"O"+ ++s,w:{}}})},f=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,o)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[o].i},p=function(e,t){if(!i(e,o)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[o].w},d=function(e){return a&&h.NEED&&u(e)&&!i(e,o)&&l(e),e},h=e.exports={KEY:o,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(e,t,n){var o=n(8),r=n(77),i=n(36),c=n(26)("IE_PROTO"),s=function(){},u=function(){var e,t=n(35)("iframe"),o=i.length;for(t.style.display="none",n(71).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;o--;)delete u.prototype[i[o]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=o(e),n=new s,s.prototype=null,n[c]=e):n=u(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(81),r=n(36);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var o=n(10);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){var o=n(1),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});e.exports=function(e){return r[e]||(r[e]={})}},function(e,t,n){var o=n(6);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var o=n(21),r=n(0)("iterator"),i=n(13);e.exports=n(2).getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||i[o(e)]}},function(e,t,n){"use strict";var o=n(21),r={};r[n(0)("toStringTag")]="z",r+""!="[object z]"&&n(10)(Object.prototype,"toString",function(){return"[object "+o(this)+"]"},!0)},function(e,t,n){for(var o=n(88),r=n(10),i=n(1),c=n(9),s=n(13),u=n(0),a=u("iterator"),l=u("toStringTag"),f=s.Array,p=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;d<5;d++){var h,v=p[d],y=i[v],g=y&&y.prototype;if(g){g[a]||c(g,a,f),g[l]||c(g,l,v),s[v]=f;for(h in o)g[h]||r(g,h,o[h],!0)}}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 c(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=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(14),l=o(a),f=n(19),p=n(20),d=o(p),h=function(e){var t,n;return n=t=function(t){function n(){var e,t,o,c;r(this,n);for(var s=arguments.length,u=Array(s),a=0;a<s;a++)u[a]=arguments[a];return t=o=i(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(u))),o.state={selected:o.props.selected,selecting:!1},o.registerSelectable=function(e){o.bounds=(0,d.default)(o.node,e),o.context.selectable.register(o)},o.selectableRef=function(e){return o.node=e},c=t,i(o,c)}return c(n,t),u(n,[{key:"componentDidMount",value:function(){this.registerSelectable()}},{key:"componentWillUnmount",value:function(){this.context.selectable.unregister(this)}},{key:"render",value:function(){return l.default.createElement(e,s({},this.props,{selected:this.state.selected,selecting:this.state.selecting,selectableRef:this.selectableRef}))}}]),n}(a.Component),t.defaultProps={selected:!1},t.contextTypes={selectable:f.object},n};t.default=h},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(14),u=function(e){return e&&e.__esModule?e:{default:e}}(s),a=n(19),l=function(e){function t(){var e,n,i,c;o(this,t);for(var s=arguments.length,u=Array(s),a=0;a<s;a++)u[a]=arguments[a];return n=i=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),i.getRootRef=function(e){return i.root=e},c=n,r(i,c)}return i(t,e),c(t,[{key:"componentDidMount",value:function(){this.root.addEventListener("mousedown",function(e){return e.stopPropagation()})}},{key:"render",value:function(){return u.default.createElement(this.props.component,{ref:this.getRootRef,onClick:this.context.selectable.clearSelection,className:"selectable-deselect-all "+this.props.className},this.props.children)}}]),t}(s.Component);l.defaultProps={component:"div"},l.contextTypes={selectable:a.object},t.default=l},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(14),u=function(e){return e&&e.__esModule?e:{default:e}}(s),a=n(19),l=function(e){function t(){var e,n,i,c;o(this,t);for(var s=arguments.length,u=Array(s),a=0;a<s;a++)u[a]=arguments[a];return n=i=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),i.getRootRef=function(e){return i.root=e},c=n,r(i,c)}return i(t,e),c(t,[{key:"componentDidMount",value:function(){this.root.addEventListener("mousedown",function(e){return e.stopPropagation()})}},{key:"render",value:function(){return u.default.createElement(this.props.component,{ref:this.getRootRef,className:"selectable-select-all "+this.props.className,onClick:this.context.selectable.selectAll},this.props.children)}}]),t}(s.Component);l.defaultProps={component:"div"},l.contextTypes={selectable:a.object},t.default=l},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 s(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 u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();n(64),n(61),n(62),n(63),n(65);var l=n(14),f=o(l),p=n(19),d=n(60),h=o(d),v=n(20),y=o(v),g=n(58),m=o(g),b=n(57),S=o(b),x=function(){},_=function(e){function t(e){i(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.applyScale=function(e,t){return{scaledTop:e/n.props.scale,scaledLeft:t/n.props.scale}},n.setScollTop=function(e){var t=n.scrollContainer.scrollTop;n.checkScrollUp(e,t),n.checkScrollDown(e,t)},n.checkScrollUp=function(e,t){var o=n.props,r=o.minimumSpeedFactor,i=o.scrollSpeed,c=n.scrollBounds.top-e.clientY;if(c>0||e.clientY<0){var s=t-Math.max(c,r)*i;n.scrollContainer.scrollTop=s}},n.checkScrollDown=function(e,t){var o=n.props,r=o.minimumSpeedFactor,i=o.scrollSpeed,c=e.clientY-n.scrollBounds.bottom;if(c>0||e.clientY>window.innerHeight){var s=t+Math.max(c,r)*i;n.scrollContainer.scrollTop=Math.min(s,n.maxScroll)}},n.updateRegistry=function(){var e={scrollTop:n.scrollContainer.scrollTop,scrollLeft:n.scrollContainer.scrollLeft},t=!0,o=!1,r=void 0;try{for(var i,c=n.registry.values()[Symbol.iterator]();!(t=(i=c.next()).done);t=!0){i.value.registerSelectable(e)}}catch(e){o=!0,r=e}finally{try{!t&&c.return&&c.return()}finally{if(o)throw r}}},n.registerSelectable=function(e){n.registry.add(e),e.props.selected&&n.selectedItems.add(e)},n.unregisterSelectable=function(e){n.registry.delete(e)},n.applyContainerScroll=function(e,t){return e+t/n.props.scale},n.getWindowScroll=function(){return n.supportPageOffset?{windowTopScroll:window.pageYOffset,windowLeftScroll:window.pageXOffset}:{windowTopScroll:n.isCSS1Compat?document.documentElement.scrollTop:document.body.scrollTop,windowLeftScroll:n.isCSS1Compat?document.documentElement.scrollLeft:document.body.scrollLeft}},n.openSelectbox=function(e){var t=n.desktopEventCoords(e);if(n.setScollTop(t),!n.mouseMoveStarted){n.mouseMoveStarted=!0,n.mouseMoved=!0;var o=n.scrollContainer.scrollTop,i=n.applyScale(t.pageY,t.pageX),c=i.scaledTop,s=i.scaledLeft,u=n.getWindowScroll(),a=u.windowTopScroll,l=u.windowLeftScroll,f=n.applyContainerScroll(c-n.scrollBounds.top,o-a),p=n.applyContainerScroll(n.mouseDownData.boxTop-n.scrollBounds.top,n.mouseDownData.scrollTop-a),d=p-f;p=Math.min(p-d,p);var h=n.mouseDownData.boxLeft-s,v=n.mouseDownData.boxLeft-n.scrollBounds.left,y=n.applyContainerScroll(Math.min(v-h/n.props.scale,v/n.props.scale),-l);n.selectbox.setState({isBoxSelecting:!0,boxWidth:Math.abs(h),boxHeight:Math.abs(d),boxLeft:y,boxTop:p},function(){n.updateSelecting(),n.props.duringSelection([].concat(r(n.selectingItems))),n.mouseMoveStarted=!1})}},n.updateSelecting=function(){var e=n.selectbox.getRef();if(e){var t=(0,y.default)(e);n.selectItems(u({},t,{offsetWidth:t.offsetWidth||1,offsetHeight:t.offsetHeight||1}))}},n.selectItems=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.click,r=n.props,i=r.tolerance,c=r.enableDeselect,s=r.mixedDeselect;e.top+=n.scrollContainer.scrollTop,e.left+=n.scrollContainer.scrollLeft;var u=!0,a=!1,l=void 0;try{for(var f,p=n.registry.values()[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var d=f.value;n.processItem(d,i,e,o,c,s)}}catch(e){a=!0,l=e}finally{try{!u&&p.return&&p.return()}finally{if(a)throw l}}},n.clearSelection=function(){var e=!0,t=!1,o=void 0;try{for(var i,c=n.selectedItems.values()[Symbol.iterator]();!(e=(i=c.next()).done);e=!0){var s=i.value;s.setState({selected:!1}),n.selectedItems.delete(s)}}catch(e){t=!0,o=e}finally{try{!e&&c.return&&c.return()}finally{if(t)throw o}}n.setState({selectionMode:!1}),n.props.onSelectionFinish([].concat(r(n.selectedItems))),n.props.onSelectionClear()},n.selectAll=function(){n.updateWhiteListNodes();var e=!0,t=!1,o=void 0;try{for(var i,c=n.registry.values()[Symbol.iterator]();!(e=(i=c.next()).done);e=!0){var s=i.value;n.inIgnoreList(s.node)||s.state.selected||(s.setState({selected:!0}),n.selectedItems.add(s))}}catch(e){t=!0,o=e}finally{try{!e&&c.return&&c.return()}finally{if(t)throw o}}n.setState({selectionMode:!0}),n.props.onSelectionFinish([].concat(r(n.selectedItems)))},n.mouseDown=function(e){if(!n.mouseDownStarted){if(n.mouseDownStarted=!0,n.mouseUpStarted=!1,e=n.desktopEventCoords(e),n.updateWhiteListNodes(),n.inIgnoreList(e.target))return void(n.mouseDownStarted=!1);if(!n.props.globalMouse&&!(0,h.default)(e.target,n.selectableGroup)){var t=(0,y.default)(n.selectableGroup);if(!(0,m.default)({top:t.top,left:t.left,bottom:t.offsetHeight,right:t.offsetWidth},{top:e.pageY,left:e.pageX,offsetWidth:0,offsetHeight:0}))return}n.updateRootBounds(),n.updateRegistry();var o=n.applyScale(e.pageY,e.pageX),r=o.scaledTop,i=o.scaledLeft;n.mouseDownData={boxLeft:i,boxTop:r,scrollTop:n.scrollContainer.scrollTop,scrollLeft:n.scrollContainer.scrollLeft,target:e.target},e.preventDefault(),document.addEventListener("mousemove",n.openSelectbox),document.addEventListener("touchmove",n.openSelectbox),document.addEventListener("mouseup",n.mouseUp),document.addEventListener("touchend",n.mouseUp)}},n.mouseUp=function(e){if(!n.mouseUpStarted&&(n.mouseUpStarted=!0,n.mouseDownStarted=!1,n.removeTempEventListeners(),n.mouseDownData)){var t=n.desktopEventCoords(e),o=n.applyScale(t.pageY,t.pageX),i=o.scaledTop,c=o.scaledLeft;if(!n.mouseMoved&&(0,h.default)(t.target,n.rootNode))n.handleClick(t,i,c);else{var s=!0,u=!1,a=void 0;try{for(var l,f=n.selectingItems.values()[Symbol.iterator]();!(s=(l=f.next()).done);s=!0){l.value.setState({selected:!0,selecting:!1})}}catch(e){u=!0,a=e}finally{try{!s&&f.return&&f.return()}finally{if(u)throw a}}n.selectedItems=new Set([].concat(r(n.selectedItems),r(n.selectingItems))),n.selectingItems.clear(),1===t.which&&n.mouseDownData.target===t.target&&n.preventEvent(t.target,"click"),n.selectbox.setState({isBoxSelecting:!1,boxWidth:0,boxHeight:0}),n.props.onSelectionFinish([].concat(r(n.selectedItems)))}n.toggleSelectionMode(),n.cleanUp(),n.mouseMoved=!1}},n.keyListener=function(e){n.ctrlPressed=e.ctrlKey||e.metaKey,n.ctrlPressed||27===e.keyCode&&n.clearSelection()},n.getGroupRef=function(e){return n.selectableGroup=e},n.getSelectboxRef=function(e){return n.selectbox=e},n.state={selectionMode:!1},n.mouseDownStarted=!1,n.mouseMoveStarted=!1,n.mouseUpStarted=!1,n.mouseDownData=null,n.registry=new Set,n.selectedItems=new Set,n.selectingItems=new Set,n.ignoreCheckCache=new Map,n.ignoreList=n.props.ignoreList.concat([".selectable-select-all",".selectable-deselect-all"]),n}return s(t,e),a(t,[{key:"getChildContext",value:function(){var e=this;return{selectable:{register:this.registerSelectable,unregister:this.unregisterSelectable,selectAll:this.selectAll,clearSelection:this.clearSelection,getScrolledContainer:function(){return e.scrollContainer}}}}},{key:"componentDidMount",value:function(){this.resizeInProgress=!1,this.rootNode=this.selectableGroup,this.scrollContainer=document.querySelector(this.props.scrollContainer)||this.rootNode,this.initialRootBounds=this.rootNode.getBoundingClientRect(),this.rootNode.addEventListener("mousedown",this.mouseDown),this.rootNode.addEventListener("touchstart",this.mouseDown),document.addEventListener("keydown",this.keyListener),document.addEventListener("keyup",this.keyListener),this.isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),this.supportPageOffset=void 0!==window.pageXOffset,this.isCSS1Compat="CSS1Compat"===(document.compatMode||"")}},{key:"componentWillUnmount",value:function(){this.rootNode.removeEventListener("mousedown",this.mouseDown),this.rootNode.removeEventListener("touchstart",this.mouseDown),document.removeEventListener("keydown",this.keyListener),document.removeEventListener("keyup",this.keyListener),this.removeTempEventListeners()}},{key:"removeTempEventListeners",value:function(){document.removeEventListener("mousemove",this.openSelectbox),document.removeEventListener("touchmove",this.openSelectbox),document.removeEventListener("mouseup",this.mouseUp),document.removeEventListener("touchend",this.mouseUp)}},{key:"updateRootBounds",value:function(){this.scrollBounds&&(this.oldScrollBounds=this.scrollBounds),this.scrollBounds=this.scrollContainer.getBoundingClientRect(),this.maxScroll=this.scrollContainer.scrollHeight-this.scrollContainer.clientHeight}},{key:"toggleSelectionMode",value:function(){var e=this.selectedItems,t=this.state.selectionMode;e.size&&!t&&this.setState({selectionMode:!0}),!e.size&&t&&this.setState({selectionMode:!1})}},{key:"processItem",value:function(e,t,n,o,r,i){if(this.inIgnoreList(e.node))return null;var c=(0,m.default)(n,e.bounds,t),s=e.state,u=s.selecting,a=s.selected;if(o&&c)return a?this.selectedItems.delete(e):this.selectedItems.add(e),e.setState({selected:!a}),this.clickedItem=e;if(!o&&c){if(a&&r&&(!this.selectionStarted||i))return e.setState({selected:!1}),e.deselected=!0,this.deselectionStarted=!0,this.selectedItems.delete(e);var l=i?!e.deselected:!this.deselectionStarted;if(!u&&!a&&l)return e.setState({selecting:!0}),this.selectionStarted=!0,this.selectingItems.add(e)}return!o&&!c&&u&&this.selectingItems.has(e)?(e.setState({selecting:!1}),this.selectingItems.delete(e)):null}},{key:"inIgnoreList",value:function(e){if(void 0!==this.ignoreCheckCache.get(e))return this.ignoreCheckCache.get(e);var t=this.ignoreListNodes.some(function(t){return e===t||t.contains(e)});return this.ignoreCheckCache.set(e,t),t}},{key:"updateWhiteListNodes",value:function(){this.ignoreListNodes=[].concat(r(document.querySelectorAll(this.ignoreList.join(", "))))}},{key:"preventEvent",value:function(e,t){var n=function n(o){e.removeEventListener(t,n,!0),o.preventDefault(),o.stopPropagation()};e.addEventListener(t,n,!0)}},{key:"handleClick",value:function(e,t,n){var o=[].concat(r(e.target.classList||[])).indexOf(this.props.clickClassName)>-1;(this.props.allowClickWithoutSelected||this.selectedItems.size||o||this.ctrlPressed)&&(this.selectItems({top:t,left:n,offsetWidth:0,offsetHeight:0},{click:!0}),this.props.onSelectionFinish([].concat(r(this.selectedItems)),this.clickedItem),1===e.which&&this.preventEvent(e.target,"click"),2!==e.which&&3!==e.which||this.preventEvent(e.target,"contextmenu"))}},{key:"cleanUp",value:function(){if(this.deselectionStarted=!1,this.selectionStarted=!1,this.props.mixedDeselect){var e=!0,t=!1,n=void 0;try{for(var o,r=this.registry.values()[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){o.value.deselected=!1}}catch(e){t=!0,n=e}finally{try{!e&&r.return&&r.return()}finally{if(t)throw n}}}}},{key:"desktopEventCoords",value:function(e){return void 0!==e.pageX&&void 0!==e.pageY||(void 0!==e.targetTouches[0]&&void 0!==e.targetTouches[0].pageX?(e.pageX=e.targetTouches[0].pageX,e.pageY=e.targetTouches[0].pageY):void 0!==e.changedTouches[0]&&void 0!==e.changedTouches[0].pageX&&(e.pageX=e.changedTouches[0].pageX,e.pageY=e.changedTouches[0].pageY)),e}},{key:"render",value:function(){return f.default.createElement(this.props.component,{ref:this.getGroupRef,style:this.props.style,className:this.props.className+" "+(this.state.selectionMode?this.props.selectionModeClass:"")},f.default.createElement(S.default,{ref:this.getSelectboxRef,fixedPosition:this.props.fixedPosition}),this.props.children)}}]),t}(l.Component);_.defaultProps={component:"div",tolerance:0,globalMouse:!1,ignoreList:[],scale:1,scrollSpeed:.25,minimumSpeedFactor:60,duringSelection:x,onSelectionFinish:x,onSelectionClear:x,allowClickWithoutSelected:!0,selectionModeClass:"in-selection-mode"},_.childContextTypes={selectable:p.object},t.default=_},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(14),u=function(e){return e&&e.__esModule?e:{default:e}}(s),a=function(e){function t(){var e,n,i,c;o(this,t);for(var s=arguments.length,u=Array(s),a=0;a<s;a++)u[a]=arguments[a];return n=i=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),i.state={top:0,left:0,boxWidth:0,boxHeight:0,isBoxSelecting:!1},i.getRef=function(){return i.selectbox},i.getSelectboxRef=function(e){return i.selectbox=e},c=n,r(i,c)}return i(t,e),c(t,[{key:"render",value:function(){var e={left:this.state.boxLeft,top:this.state.boxTop,width:this.state.boxWidth,height:this.state.boxHeight,zIndex:9e3,position:this.props.fixedPosition?"fixed":"absolute",cursor:"default"};return u.default.createElement("div",null,this.state.isBoxSelecting&&u.default.createElement("div",{ref:this.getSelectboxRef,style:e,className:this.props.className}))}}]),t}(s.Component);a.defaultProps={className:"selectable-selectbox"},t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(20),r=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e,t,n,o,r,i,c,s,u){return void 0===u&&(u=0),!(e+i-u<n||e+u>n+s||t+r-u<o||t+u>o+c)};t.default=function(e,t,n){var o=e instanceof HTMLElement?(0,r.default)(e):e,c=t instanceof HTMLElement?(0,r.default)(t):t;return i(o.top,o.left,c.top,c.left,o.offsetWidth,o.offsetHeight,c.offsetWidth,c.offsetHeight,n)}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.DeselectAll=t.SelectAll=t.createSelectable=t.SelectableGroup=void 0;var r=n(56),i=o(r),c=n(53),s=o(c),u=n(55),a=o(u),l=n(54),f=o(l);t.SelectableGroup=i.default,t.createSelectable=s.default,t.SelectAll=a.default,t.DeselectAll=f.default},function(e,t,n){"use strict";function o(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},function(e,t,n){n(30),n(86),e.exports=n(2).Array.from},function(e,t,n){n(87),e.exports=n(2).Array.isArray},function(e,t,n){n(51),n(30),n(52),n(89),n(92),e.exports=n(2).Map},function(e,t,n){n(90),e.exports=n(2).Object.assign},function(e,t,n){n(51),n(30),n(52),n(91),n(93),e.exports=n(2).Set},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var o=n(0)("unscopables"),r=Array.prototype;void 0==r[o]&&n(9)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t,n){var o=n(23);e.exports=function(e,t){var n=[];return o(e,!1,n.push,n,t),n}},function(e,t,n){var o=n(17),r=n(28),i=n(85);e.exports=function(e){return function(t,n,c){var s,u=o(t),a=r(u.length),l=i(c,a);if(e&&n!=n){for(;a>l;)if((s=u[l++])!=s)return!0}else for(;a>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){"use strict";var o=n(7),r=n(16);e.exports=function(e,t,n){t in e?o.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){e.exports=n(1).document&&document.documentElement},function(e,t,n){var o=n(6),r=n(82).set;e.exports=function(e,t,n){var i,c=t.constructor;return c!==n&&"function"==typeof c&&(i=c.prototype)!==n.prototype&&o(i)&&r&&r(e,i),e}},function(e,t,n){var o=n(22);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(44),r=n(16),i=n(25),c={};n(9)(c,n(0)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=o(c,{next:r(1,n)}),i(e,t+" Iterator")}},function(e,t){e.exports=!1},function(e,t,n){"use strict";var o=n(45),r=n(79),i=n(46),c=n(29),s=n(38),u=Object.assign;e.exports=!u||n(12)(function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=o})?function(e,t){for(var n=c(e),u=arguments.length,a=1,l=r.f,f=i.f;u>a;)for(var p,d=s(arguments[a++]),h=l?o(d).concat(l(d)):o(d),v=h.length,y=0;v>y;)f.call(d,p=h[y++])&&(n[p]=d[p]);return n}:u},function(e,t,n){var o=n(7),r=n(8),i=n(45);e.exports=n(3)?Object.defineProperties:function(e,t){r(e);for(var n,c=i(t),s=c.length,u=0;s>u;)o.f(e,n=c[u++],t[n]);return e}},function(e,t,n){var o=n(46),r=n(16),i=n(17),c=n(49),s=n(5),u=n(37),a=Object.getOwnPropertyDescriptor;t.f=n(3)?a:function(e,t){if(e=i(e),t=c(t,!0),u)try{return a(e,t)}catch(e){}if(s(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var o=n(5),r=n(29),i=n(26)("IE_PROTO"),c=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},function(e,t,n){var o=n(5),r=n(17),i=n(69)(!1),c=n(26)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),u=0,a=[];for(n in s)n!=c&&o(s,n)&&a.push(n);for(;t.length>u;)o(s,n=t[u++])&&(~i(a,n)||a.push(n));return a}},function(e,t,n){var o=n(6),r=n(8),i=function(e,t){if(r(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=n(11)(Function.call,n(78).f(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){"use strict";var o=n(1),r=n(7),i=n(3),c=n(0)("species");e.exports=function(e){var t=o[e];i&&t&&!t[c]&&r.f(t,c,{configurable:!0,get:function(){return this}})}},function(e,t,n){var o=n(27),r=n(15);e.exports=function(e){return function(t,n){var i,c,s=String(r(t)),u=o(n),a=s.length;return u<0||u>=a?e?"":void 0:(i=s.charCodeAt(u),i<55296||i>56319||u+1===a||(c=s.charCodeAt(u+1))<56320||c>57343?e?s.charAt(u):i:e?s.slice(u,u+2):c-56320+(i-55296<<10)+65536)}}},function(e,t,n){var o=n(27),r=Math.max,i=Math.min;e.exports=function(e,t){return e=o(e),e<0?r(e+t,0):i(e,t)}},function(e,t,n){"use strict";var o=n(11),r=n(4),i=n(29),c=n(40),s=n(39),u=n(28),a=n(70),l=n(50);r(r.S+r.F*!n(41)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,f,p=i(e),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,g=0,m=l(p);if(y&&(v=o(v,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&s(m))for(t=u(p.length),n=new d(t);t>g;g++)a(n,g,y?v(p[g],g):p[g]);else for(f=m.call(p),n=new d;!(r=f.next()).done;g++)a(n,g,y?c(f,v,[r.value,g],!0):r.value);return n.length=g,n}})},function(e,t,n){var o=n(4);o(o.S,"Array",{isArray:n(73)})},function(e,t,n){"use strict";var o=n(67),r=n(42),i=n(13),c=n(17);e.exports=n(24)(Array,"Array",function(e,t){this._t=c(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):"keys"==t?r(0,n):"values"==t?r(0,e[n]):r(0,[n,e[n]])},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var o=n(32);e.exports=n(34)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=o.getEntry(this,e);return t&&t.v},set:function(e,t){return o.def(this,0===e?0:e,t)}},o,!0)},function(e,t,n){var o=n(4);o(o.S+o.F,"Object",{assign:n(76)})},function(e,t,n){"use strict";var o=n(32);e.exports=n(34)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return o.def(this,e=0===e?0:e,e)}},o)},function(e,t,n){var o=n(4);o(o.P+o.R,"Map",{toJSON:n(33)("Map")})},function(e,t,n){var o=n(4);o(o.P+o.R,"Set",{toJSON:n(33)("Set")})},function(e,t,n){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function o(e,t,n,o,i,c,s,u){if(r(t),!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,o,i,c,s,u],f=0;a=new Error(t.replace(/%s/g,function(){return l[f++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}}var r=function(e){};e.exports=o},function(e,t,n){"use strict";var o=n(94),r=n(95),i=n(97);e.exports=function(){function e(e,t,n,o,c,s){s!==i&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports["React-Selectable-Fast"]=t(require("react")):e["React-Selectable-Fast"]=t(e.React)}(this,function(e){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(t,o){t.exports=e},function(e,t,o){e.exports=o(13)()},function(e,t,o){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scrollTop:0,scrollLeft:0},o=t.scrollTop,n=t.scrollLeft,r=e.getBoundingClientRect();return{top:r.top+document.body.scrollTop+o,left:r.left+document.body.scrollLeft+n,offsetWidth:e.offsetWidth,offsetHeight:e.offsetHeight}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o(0),u=n(a),f=o(1),p=o(2),d=n(p),h=function(e){var t,o;return o=t=function(t){function o(){var e,t,n,i;r(this,o);for(var l=arguments.length,c=Array(l),a=0;a<l;a++)c[a]=arguments[a];return t=n=s(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(c))),n.state={selected:n.props.selected,selecting:!1},n.registerSelectable=function(e){n.bounds=(0,d.default)(n.node,e),n.context.selectable.register(n)},n.selectableRef=function(e){return n.node=e},i=t,s(n,i)}return i(o,t),c(o,[{key:"componentDidMount",value:function(){this.registerSelectable()}},{key:"componentWillUnmount",value:function(){this.context.selectable.unregister(this)}},{key:"render",value:function(){return u.default.createElement(e,l({},this.props,{selected:this.state.selected,selecting:this.state.selecting,selectableRef:this.selectableRef}))}}]),o}(a.Component),t.defaultProps={selected:!1},t.contextTypes={selectable:f.object},o};t.default=h},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 s(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 i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),l=o(0),c=function(e){return e&&e.__esModule?e:{default:e}}(l),a=o(1),u=function(e){function t(){var e,o,s,i;n(this,t);for(var l=arguments.length,c=Array(l),a=0;a<l;a++)c[a]=arguments[a];return o=s=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),s.getRootRef=function(e){return s.root=e},i=o,r(s,i)}return s(t,e),i(t,[{key:"componentDidMount",value:function(){this.root.addEventListener("mousedown",function(e){return e.stopPropagation()})}},{key:"render",value:function(){return c.default.createElement(this.props.component,{ref:this.getRootRef,onClick:this.context.selectable.clearSelection,className:"selectable-deselect-all "+this.props.className},this.props.children)}}]),t}(l.Component);u.defaultProps={component:"div"},u.contextTypes={selectable:a.object},t.default=u},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 s(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 i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),l=o(0),c=function(e){return e&&e.__esModule?e:{default:e}}(l),a=o(1),u=function(e){function t(){var e,o,s,i;n(this,t);for(var l=arguments.length,c=Array(l),a=0;a<l;a++)c[a]=arguments[a];return o=s=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),s.getRootRef=function(e){return s.root=e},i=o,r(s,i)}return s(t,e),i(t,[{key:"componentDidMount",value:function(){this.root.addEventListener("mousedown",function(e){return e.stopPropagation()})}},{key:"render",value:function(){return c.default.createElement(this.props.component,{ref:this.getRootRef,className:"selectable-select-all "+this.props.className,onClick:this.context.selectable.selectAll},this.props.children)}}]),t}(l.Component);u.defaultProps={component:"div"},u.contextTypes={selectable:a.object},t.default=u},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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 c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),u=o(0),f=n(u),p=o(1),d=o(10),h=n(d),m=o(2),v=n(m),y=o(8),b=n(y),g=o(7),S=n(g),w=function(){},x=function(e){function t(e){s(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.applyScale=function(e,t){return{scaledTop:e/o.props.scale,scaledLeft:t/o.props.scale}},o.setScollTop=function(e){var t=o.scrollContainer.scrollTop;o.checkScrollUp(e,t),o.checkScrollDown(e,t)},o.checkScrollUp=function(e,t){var n=o.props,r=n.minimumSpeedFactor,s=n.scrollSpeed,i=o.scrollBounds.top-e.clientY;if(i>0||e.clientY<0){var l=t-Math.max(i,r)*s;o.scrollContainer.scrollTop=l}},o.checkScrollDown=function(e,t){var n=o.props,r=n.minimumSpeedFactor,s=n.scrollSpeed,i=e.clientY-o.scrollBounds.bottom;if(i>0||e.clientY>window.innerHeight){var l=t+Math.max(i,r)*s;o.scrollContainer.scrollTop=Math.min(l,o.maxScroll)}},o.updateRegistry=function(){var e={scrollTop:o.scrollContainer.scrollTop,scrollLeft:o.scrollContainer.scrollLeft},t=!0,n=!1,r=void 0;try{for(var s,i=o.registry.values()[Symbol.iterator]();!(t=(s=i.next()).done);t=!0){s.value.registerSelectable(e)}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},o.registerSelectable=function(e){o.registry.add(e),e.props.selected&&o.selectedItems.add(e)},o.unregisterSelectable=function(e){o.registry.delete(e)},o.applyContainerScroll=function(e,t){return e+t/o.props.scale},o.getWindowScroll=function(){return o.supportPageOffset?{windowTopScroll:window.pageYOffset,windowLeftScroll:window.pageXOffset}:{windowTopScroll:o.isCSS1Compat?document.documentElement.scrollTop:document.body.scrollTop,windowLeftScroll:o.isCSS1Compat?document.documentElement.scrollLeft:document.body.scrollLeft}},o.openSelectbox=function(e){var t=o.desktopEventCoords(e);if(o.setScollTop(t),!o.mouseMoveStarted){o.mouseMoveStarted=!0,o.mouseMoved=!0;var n=o.scrollContainer.scrollTop,s=o.applyScale(t.pageY,t.pageX),i=s.scaledTop,l=s.scaledLeft,c=o.getWindowScroll(),a=c.windowTopScroll,u=c.windowLeftScroll,f=o.applyContainerScroll(i-o.scrollBounds.top,n-a),p=o.applyContainerScroll(o.mouseDownData.boxTop-o.scrollBounds.top,o.mouseDownData.scrollTop-a),d=p-f;p=Math.min(p-d,p);var h=o.mouseDownData.boxLeft-l,m=o.mouseDownData.boxLeft-o.scrollBounds.left,v=o.applyContainerScroll(Math.min(m-h/o.props.scale,m/o.props.scale),-u);o.selectbox.setState({isBoxSelecting:!0,boxWidth:Math.abs(h),boxHeight:Math.abs(d),boxLeft:v,boxTop:p},function(){o.updateSelecting(),o.props.duringSelection([].concat(r(o.selectingItems))),o.mouseMoveStarted=!1})}},o.updateSelecting=function(){var e=o.selectbox.getRef();if(e){var t=(0,v.default)(e);o.selectItems(c({},t,{offsetWidth:t.offsetWidth||1,offsetHeight:t.offsetHeight||1}))}},o.selectItems=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.click,r=o.props,s=r.tolerance,i=r.enableDeselect,l=r.mixedDeselect;e.top+=o.scrollContainer.scrollTop,e.left+=o.scrollContainer.scrollLeft;var c=!0,a=!1,u=void 0;try{for(var f,p=o.registry.values()[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;o.processItem(d,s,e,n,i,l)}}catch(e){a=!0,u=e}finally{try{!c&&p.return&&p.return()}finally{if(a)throw u}}},o.clearSelection=function(){var e=!0,t=!1,n=void 0;try{for(var s,i=o.selectedItems.values()[Symbol.iterator]();!(e=(s=i.next()).done);e=!0){var l=s.value;l.setState({selected:!1}),o.selectedItems.delete(l)}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}o.setState({selectionMode:!1}),o.props.onSelectionFinish([].concat(r(o.selectedItems))),o.props.onSelectionClear()},o.selectAll=function(){o.updateWhiteListNodes();var e=!0,t=!1,n=void 0;try{for(var s,i=o.registry.values()[Symbol.iterator]();!(e=(s=i.next()).done);e=!0){var l=s.value;o.inIgnoreList(l.node)||l.state.selected||(l.setState({selected:!0}),o.selectedItems.add(l))}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}o.setState({selectionMode:!0}),o.props.onSelectionFinish([].concat(r(o.selectedItems)))},o.mouseDown=function(e){if(!o.mouseDownStarted){if(o.mouseDownStarted=!0,o.mouseUpStarted=!1,e=o.desktopEventCoords(e),o.updateWhiteListNodes(),o.inIgnoreList(e.target))return void(o.mouseDownStarted=!1);if(!o.props.globalMouse&&!(0,h.default)(e.target,o.selectableGroup)){var t=(0,v.default)(o.selectableGroup);if(!(0,b.default)({top:t.top,left:t.left,bottom:t.offsetHeight,right:t.offsetWidth},{top:e.pageY,left:e.pageX,offsetWidth:0,offsetHeight:0}))return}o.updateRootBounds(),o.updateRegistry();var n=o.applyScale(e.pageY,e.pageX),r=n.scaledTop,s=n.scaledLeft;o.mouseDownData={boxLeft:s,boxTop:r,scrollTop:o.scrollContainer.scrollTop,scrollLeft:o.scrollContainer.scrollLeft,target:e.target},e.preventDefault(),document.addEventListener("mousemove",o.openSelectbox),document.addEventListener("touchmove",o.openSelectbox),document.addEventListener("mouseup",o.mouseUp),document.addEventListener("touchend",o.mouseUp)}},o.mouseUp=function(e){if(!o.mouseUpStarted&&(o.mouseUpStarted=!0,o.mouseDownStarted=!1,o.removeTempEventListeners(),o.mouseDownData)){var t=o.desktopEventCoords(e),n=o.applyScale(t.pageY,t.pageX),s=n.scaledTop,i=n.scaledLeft;if(!o.mouseMoved&&(0,h.default)(t.target,o.rootNode))o.handleClick(t,s,i);else{var l=!0,c=!1,a=void 0;try{for(var u,f=o.selectingItems.values()[Symbol.iterator]();!(l=(u=f.next()).done);l=!0){u.value.setState({selected:!0,selecting:!1})}}catch(e){c=!0,a=e}finally{try{!l&&f.return&&f.return()}finally{if(c)throw a}}o.selectedItems=new Set([].concat(r(o.selectedItems),r(o.selectingItems))),o.selectingItems.clear(),1===t.which&&o.mouseDownData.target===t.target&&o.preventEvent(t.target,"click"),o.selectbox.setState({isBoxSelecting:!1,boxWidth:0,boxHeight:0}),o.props.onSelectionFinish([].concat(r(o.selectedItems)))}o.toggleSelectionMode(),o.cleanUp(),o.mouseMoved=!1}},o.keyListener=function(e){o.ctrlPressed=e.ctrlKey||e.metaKey,o.ctrlPressed||27===e.keyCode&&o.clearSelection()},o.getGroupRef=function(e){return o.selectableGroup=e},o.getSelectboxRef=function(e){return o.selectbox=e},o.state={selectionMode:!1},o.mouseDownStarted=!1,o.mouseMoveStarted=!1,o.mouseUpStarted=!1,o.mouseDownData=null,o.registry=new Set,o.selectedItems=new Set,o.selectingItems=new Set,o.ignoreCheckCache=new Map,o.ignoreList=o.props.ignoreList.concat([".selectable-select-all",".selectable-deselect-all"]),o}return l(t,e),a(t,[{key:"getChildContext",value:function(){var e=this;return{selectable:{register:this.registerSelectable,unregister:this.unregisterSelectable,selectAll:this.selectAll,clearSelection:this.clearSelection,getScrolledContainer:function(){return e.scrollContainer}}}}},{key:"componentDidMount",value:function(){this.resizeInProgress=!1,this.rootNode=this.selectableGroup,this.scrollContainer=document.querySelector(this.props.scrollContainer)||this.rootNode,this.initialRootBounds=this.rootNode.getBoundingClientRect(),this.rootNode.addEventListener("mousedown",this.mouseDown),this.rootNode.addEventListener("touchstart",this.mouseDown),document.addEventListener("keydown",this.keyListener),document.addEventListener("keyup",this.keyListener),this.isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),this.supportPageOffset=void 0!==window.pageXOffset,this.isCSS1Compat="CSS1Compat"===(document.compatMode||"")}},{key:"componentWillUnmount",value:function(){this.rootNode.removeEventListener("mousedown",this.mouseDown),this.rootNode.removeEventListener("touchstart",this.mouseDown),document.removeEventListener("keydown",this.keyListener),document.removeEventListener("keyup",this.keyListener),this.removeTempEventListeners()}},{key:"removeTempEventListeners",value:function(){document.removeEventListener("mousemove",this.openSelectbox),document.removeEventListener("touchmove",this.openSelectbox),document.removeEventListener("mouseup",this.mouseUp),document.removeEventListener("touchend",this.mouseUp)}},{key:"updateRootBounds",value:function(){this.scrollBounds&&(this.oldScrollBounds=this.scrollBounds),this.scrollBounds=this.scrollContainer.getBoundingClientRect(),this.maxScroll=this.scrollContainer.scrollHeight-this.scrollContainer.clientHeight}},{key:"toggleSelectionMode",value:function(){var e=this.selectedItems,t=this.state.selectionMode;e.size&&!t&&this.setState({selectionMode:!0}),!e.size&&t&&this.setState({selectionMode:!1})}},{key:"processItem",value:function(e,t,o,n,r,s){if(this.inIgnoreList(e.node))return null;var i=(0,b.default)(o,e.bounds,t),l=e.state,c=l.selecting,a=l.selected;if(n&&i)return a?this.selectedItems.delete(e):this.selectedItems.add(e),e.setState({selected:!a}),this.clickedItem=e;if(!n&&i){if(a&&r&&(!this.selectionStarted||s))return e.setState({selected:!1}),e.deselected=!0,this.deselectionStarted=!0,this.selectedItems.delete(e);var u=s?!e.deselected:!this.deselectionStarted;if(!c&&!a&&u)return e.setState({selecting:!0}),this.selectionStarted=!0,this.selectingItems.add(e)}return!n&&!i&&c&&this.selectingItems.has(e)?(e.setState({selecting:!1}),this.selectingItems.delete(e)):null}},{key:"inIgnoreList",value:function(e){if(void 0!==this.ignoreCheckCache.get(e))return this.ignoreCheckCache.get(e);var t=this.ignoreListNodes.some(function(t){return e===t||t.contains(e)});return this.ignoreCheckCache.set(e,t),t}},{key:"updateWhiteListNodes",value:function(){this.ignoreListNodes=[].concat(r(document.querySelectorAll(this.ignoreList.join(", "))))}},{key:"preventEvent",value:function(e,t){var o=function o(n){e.removeEventListener(t,o,!0),n.preventDefault(),n.stopPropagation()};e.addEventListener(t,o,!0)}},{key:"handleClick",value:function(e,t,o){var n=[].concat(r(e.target.classList||[])).indexOf(this.props.clickClassName)>-1;(this.props.allowClickWithoutSelected||this.selectedItems.size||n||this.ctrlPressed)&&(this.selectItems({top:t,left:o,offsetWidth:0,offsetHeight:0},{click:!0}),this.props.onSelectionFinish([].concat(r(this.selectedItems)),this.clickedItem),1===e.which&&this.preventEvent(e.target,"click"),2!==e.which&&3!==e.which||this.preventEvent(e.target,"contextmenu"))}},{key:"cleanUp",value:function(){if(this.deselectionStarted=!1,this.selectionStarted=!1,this.props.mixedDeselect){var e=!0,t=!1,o=void 0;try{for(var n,r=this.registry.values()[Symbol.iterator]();!(e=(n=r.next()).done);e=!0){n.value.deselected=!1}}catch(e){t=!0,o=e}finally{try{!e&&r.return&&r.return()}finally{if(t)throw o}}}}},{key:"desktopEventCoords",value:function(e){return void 0!==e.pageX&&void 0!==e.pageY||(void 0!==e.targetTouches[0]&&void 0!==e.targetTouches[0].pageX?(e.pageX=e.targetTouches[0].pageX,e.pageY=e.targetTouches[0].pageY):void 0!==e.changedTouches[0]&&void 0!==e.changedTouches[0].pageX&&(e.pageX=e.changedTouches[0].pageX,e.pageY=e.changedTouches[0].pageY)),e}},{key:"render",value:function(){return f.default.createElement(this.props.component,{ref:this.getGroupRef,style:this.props.style,className:this.props.className+" "+(this.state.selectionMode?this.props.selectionModeClass:"")},f.default.createElement(S.default,{ref:this.getSelectboxRef,fixedPosition:this.props.fixedPosition}),this.props.children)}}]),t}(u.Component);x.defaultProps={component:"div",tolerance:0,globalMouse:!1,ignoreList:[],scale:1,scrollSpeed:.25,minimumSpeedFactor:60,duringSelection:w,onSelectionFinish:w,onSelectionClear:w,allowClickWithoutSelected:!0,selectionModeClass:"in-selection-mode"},x.childContextTypes={selectable:p.object},t.default=x},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 s(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 i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),l=o(0),c=function(e){return e&&e.__esModule?e:{default:e}}(l),a=function(e){function t(){var e,o,s,i;n(this,t);for(var l=arguments.length,c=Array(l),a=0;a<l;a++)c[a]=arguments[a];return o=s=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),s.state={top:0,left:0,boxWidth:0,boxHeight:0,isBoxSelecting:!1},s.getRef=function(){return s.selectbox},s.getSelectboxRef=function(e){return s.selectbox=e},i=o,r(s,i)}return s(t,e),i(t,[{key:"render",value:function(){var e={left:this.state.boxLeft,top:this.state.boxTop,width:this.state.boxWidth,height:this.state.boxHeight,zIndex:9e3,position:this.props.fixedPosition?"fixed":"absolute",cursor:"default"};return c.default.createElement("div",null,this.state.isBoxSelecting&&c.default.createElement("div",{ref:this.getSelectboxRef,style:e,className:this.props.className}))}}]),t}(l.Component);a.defaultProps={className:"selectable-selectbox"},t.default=a},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function(e,t,o,n,r,s,i,l,c){return void 0===c&&(c=0),!(e+s-c<o||e+c>o+l||t+r-c<n||t+c>n+i)};t.default=function(e,t,o){var n=e instanceof HTMLElement?(0,r.default)(e):e,i=t instanceof HTMLElement?(0,r.default)(t):t;return s(n.top,n.left,i.top,i.left,n.offsetWidth,n.offsetHeight,i.offsetWidth,i.offsetHeight,o)}},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.DeselectAll=t.SelectAll=t.createSelectable=t.SelectableGroup=void 0;var r=o(6),s=n(r),i=o(3),l=n(i),c=o(5),a=n(c),u=o(4),f=n(u);t.SelectableGroup=s.default,t.createSelectable=l.default,t.SelectAll=a.default,t.DeselectAll=f.default},function(e,t,o){"use strict";function n(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,o){"use strict";function n(e,t,o,n,s,i,l,c){if(r(t),!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[o,n,s,i,l,c],f=0;a=new Error(t.replace(/%s/g,function(){return u[f++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}}var r=function(e){};e.exports=n},function(e,t,o){"use strict";var n=o(11),r=o(12),s=o(14);e.exports=function(){function e(e,t,o,n,i,l){l!==s&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return o.checkPropTypes=n,o.PropTypes=o,o}},function(e,t,o){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])}); | ||
//# sourceMappingURL=react-selectable-fast.js.map |
@@ -8,3 +8,3 @@ 'use strict'; | ||
var _SelectableGroup = require('./Selectable-group'); | ||
var _SelectableGroup = require('./SelectableGroup'); | ||
@@ -27,2 +27,10 @@ var _SelectableGroup2 = _interopRequireDefault(_SelectableGroup); | ||
// As early as possible, check for the existence of the JavaScript globals which | ||
// Relay Runtime relies upon, and produce a clear message if they do not exist. | ||
if (process.env.NODE_ENV === 'development') { | ||
if (typeof Map !== 'function' || typeof Set !== 'function' || typeof Array.from !== 'function' || typeof Array.isArray !== 'function' || typeof Object.assign !== 'function') { | ||
throw new Error('React-Selectable-Fast requires Map, Set, Array.from, Array.isArray, and Object.assign to exist. ' + 'Use a polyfill to provide these for older browsers.'); | ||
} | ||
} | ||
exports.SelectableGroup = _SelectableGroup2.default; | ||
@@ -29,0 +37,0 @@ exports.createSelectable = _CreateSelectable2.default; |
{ | ||
"name": "react-selectable-fast", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Enable other React components to be selectable by drawing a box with your mouse/touch", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -88,2 +88,26 @@ # React-selectable-fast ![npm](https://img.shields.io/npm/v/react-selectable-fast.svg) ![license](https://img.shields.io/npm/l/react-selectable-fast.svg) ![github-issues](https://img.shields.io/github/issues/valerybugakov/react-selectable-fast.svg) | ||
``` | ||
## JavaScript environment requirements | ||
The React-Selectable-Fast package distributed on NPM use the widely-supported ES5 | ||
version of JavaScript to support as many browser environments as possible. | ||
However, this package expects modern JavaScript globals (`Map`, `Set`, | ||
`Array.from`, `Array.isArray` `Object.assign`) to be defined. If you support older browsers and | ||
devices which may not yet provide these natively, consider including a global | ||
polyfill in your bundled application, such as [core-js](https://github.com/zloirock/core-js) or | ||
[babel-polyfill](https://babeljs.io/docs/usage/polyfill/). | ||
A polyfilled environment for React-Selectable-Fast using [core-js](https://github.com/zloirock/core-js) to support older browsers | ||
might look like: | ||
```js | ||
import 'core-js/fn/object/assign' | ||
import 'core-js/fn/array/from' | ||
import 'core-js/fn/array/is-array' | ||
import 'core-js/fn/map' | ||
import 'core-js/fn/set' | ||
import App from './myApp'; | ||
``` | ||
## Configuration | ||
@@ -90,0 +114,0 @@ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
129
198223
1093
1