Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-vis-force

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-vis-force - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

dist/react-vis-force.min.js

@@ -21,4 +21,4 @@ // Copyright (c) 2016 Uber Technologies, Inc.

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var n=t("object"==typeof exports?require("react"):e.react);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/react-vis-force/",t(0)}([function(e,t,n){n(9),e.exports=n(13)},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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 a(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=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),c=n(29),l=r(c),f=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,l.default)(this,e,t)}}]),t}(s.Component);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(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 u(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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),f=r(l),h=n(2),p=r(h),d=n(14),y=r(d),v=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.link,n=e.strokeWidth,r=e.className,i=o(e,["link","strokeWidth","className"]);return f.default.createElement("line",s({className:"rv-force__link "+r,strokeWidth:n||Math.sqrt(t.value)},i))}}],[{key:"propTypes",get:function(){return{link:y.default.isRequired}}},{key:"defaultProps",get:function(){return{className:"",opacity:.6,stroke:"#999"}}}]),t}(p.default);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(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 u(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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),f=r(l),h=n(2),p=r(h),d=n(15),y=r(d),v=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.node,n=e.className,r=e.r,i=(e.labelStyle,e.labelClass,e.showLabel,o(e,["node","className","r","labelStyle","labelClass","showLabel"])),a=t.radius,u=void 0===a?5:a;return f.default.createElement("circle",s({className:"rv-force__node "+n,r:r||u},i))}}],[{key:"propTypes",get:function(){return{node:y.default.isRequired,cx:l.PropTypes.number,cy:l.PropTypes.number,labelStyle:l.PropTypes.object,labelClass:l.PropTypes.string,showLabel:l.PropTypes.bool}}},{key:"defaultProps",get:function(){return{className:"",fill:"#333",opacity:1,stroke:"#FFF",strokeWidth:1.5}}}]),t}(p.default);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(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,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.map(function(e){return n.reduce(function(t,n){return Object.assign(t,i({},n,e[n]))},{})})}function u(e){switch("undefined"==typeof e?"undefined":g(e)){case"function":return e;default:return function(){return e}}}function s(e,t){return P.forEach(function(n){({}).hasOwnProperty.call(t,n)&&e[n](t[n])}),e}function c(e,t){var n=t.height,r=t.width;e.force("center")||e.force("center",(0,_.forceCenter)());var o=r?r/2:0;r>0&&e.force("center").x()!==o&&(e.shouldRun=!0,e.force("center").x(o));var i=n?n/2:0;return n>0&&e.force("center").y()!==i&&(e.shouldRun=!0,e.force("center").y(i)),e}function l(e,t){var n=t.strength,r=void 0===n?{}:n;e.force("charge")||e.force("charge",(0,_.forceManyBody)()),r.charge!==e.strength.charge&&(e.strength.charge=r.charge,e.shouldRun=!0,e.force("charge").strength(u(r.charge)))}function f(e,t){var n=t.radiusMargin,r=void 0===n?3:n,o=t.strength,i=void 0===o?{}:o;e.force("collide")||e.force("collide",(0,_.forceCollide)()),e.radiusMargin!==r&&(e.radiusMargin=r,e.shouldRun=!0,e.force("collide").radius(function(e){var t=e.radius;return t+r})),i.collide!==e.strength.collide&&(e.strength.collide=i.collide,e.shouldRun=!0,e.force("collide").strength(u(i.collide)()))}function h(e,t){var n=t.data,r=n.nodes,i=n.links,u=t.linkAttrs,s=void 0===u?[]:u,c=t.nodeAttrs,l=void 0===c?[]:c;e.force("link")||e.force("link",(0,_.forceLink)().id(d));var f=new Set(e.nodes().map(d)),h=new Set(r.map(d));(0,x.default)(f,h)||(e.shouldRun=!0,e.nodes(a.apply(void 0,[r,"id","radius","fx","fy"].concat(o(l)))));var p=new Set(e.force("link").links().map(y)),v=new Set(i.map(y));(0,x.default)(p,v)||(e.shouldRun=!0,e.force("link").links(a.apply(void 0,[i,"source","target","value"].concat(o(s)))))}function p(e,t){var n=t.strength,r=void 0===n?{}:n;e.force("x")||e.force("x",(0,_.forceX)()),e.force("y")||e.force("y",(0,_.forceY)()),r.x!==e.strength.x&&(e.strength.x=r.x,e.shouldRun=!0,e.force("x").strength(u(r.x))),r.y!==e.strength.y&&(e.strength.y=r.y,e.shouldRun=!0,e.force("y").strength(u(r.y)))}function d(e){return e.id}function y(e){return(e.source.id||e.source)+"=>"+(e.target.id||e.target)}function v(e){for(e.restart();e.alpha()>e.alphaMin();)e.tick();return e.stop(),e}function m(e){var t=(0,_.forceSimulation)();return t.strength={},b(t,e)}function b(e,t){return s(e,t),c(e,t),l(e,t),f(e,t),h(e,t),p(e,t),!t.animate&&e.shouldRun&&v(e),e.shouldRun=null,e}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.asStrengthFn=u,t.nodeId=d,t.linkId=y,t.runSimulation=v,t.createSimulation=m,t.updateSimulation=b;var _=n(21),w=n(18),x=r(w),P=["alpha","alphaDecay","alphaMin","alphaTarget","velocityDecay"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(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 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 l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),p=o(h);n(24);var d=n(2),y=o(d),v=n(5),m=r(v),b=n(17),g=r(b),_=n(4),w=o(_),x=n(3),P=o(x),O=n(12),T=o(O),k=n(16),S=o(k),j=function(e){function t(e){u(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=e.createSimulation,o=e.simulationOptions,i=n.getDataFromChildren();return n.simulation=r(l({},k.DEFAULT_SIMULATION_PROPS,o,{data:i})),n.state={linkPositions:{},nodePositions:{},scale:1},n.bindSimulationTick(),n}return c(t,e),f(t,null,[{key:"getDataFromChildren",value:function(e){var t={nodes:[],links:[]};return h.Children.forEach(e,function(e){switch(e.type){case w.default:t.nodes.push(e.props.node);break;case P.default:t.links.push(e.props.link)}}),t}},{key:"getNodePositions",value:function(e){return e.nodes().reduce(function(e,t){return Object.assign(e,a({},m.nodeId(t),{cx:t.fx||t.x,cy:t.fy||t.y}))},{})}},{key:"getLinkPositions",value:function(e){return e.force("link").links().reduce(function(e,t){return Object.assign(e,a({},m.linkId(t),{x1:t.source.x,y1:t.source.y,x2:t.target.x,y2:t.target.y}))},{})}},{key:"propTypes",get:function(){return{children:h.PropTypes.any,zoom:h.PropTypes.bool,minScale:h.PropTypes.number,maxScale:h.PropTypes.number,onZoom:h.PropTypes.func,onPan:h.PropTypes.func,createSimulation:h.PropTypes.func,updateSimulation:h.PropTypes.func,simulationOptions:S.default,labelAttr:h.PropTypes.string,labelOffset:h.PropTypes.objectOf(h.PropTypes.func),showLabels:h.PropTypes.bool}}},{key:"defaultProps",get:function(){return{createSimulation:m.createSimulation,updateSimulation:m.updateSimulation,zoom:!1,labelAttr:"id",simulationOptions:k.DEFAULT_SIMULATION_PROPS,labelOffset:{x:function(e){var t=e.radius,n=void 0===t?5:t;return n/2},y:function(e){var t=e.radius,n=void 0===t?5:t;return-n/4}},showLabels:!1,onZoom:function(){},onPan:function(){}}}}]),f(t,[{key:"componentDidMount",value:function(){this.updateSimulation()}},{key:"componentWillReceiveProps",value:function(e){this.lastUpdated=new Date,this.updateSimulation(e)}},{key:"componentWillUnmount",value:function(){this.unbindSimulationTick()}},{key:"onSimulationTick",value:function(){this.frame=g.requestAnimationFrame(this.updatePositions.bind(this))}},{key:"onZoom",value:function(e,t){for(var n,r=arguments.length,o=Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];(n=this.props).onZoom.apply(n,[e,t].concat(o)),this.setState({scale:t})}},{key:"onPan",value:function(){var e;(e=this.props).onPan.apply(e,arguments)}},{key:"getDataFromChildren",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!n&&this.cachedData&&new Date>this.lastUpdated)return this.cachedData;var r=t.getDataFromChildren(e.children);return Object.assign(this,{cachedData:r,lastUpdated:new Date}),r}},{key:"bindSimulationTick",value:function(){this.simulation.on("tick",this.updateSimulation.bind(this))}},{key:"unbindSimulationTick",value:function(){this.simulation.on(".tick",null),this.frame=this.frame&&g.cancelAnimationFrame(this.frame)}},{key:"updateSimulation",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=this.simulation,e=t.updateSimulation,r=t.simulationOptions;this.simulation=e(n,l({},k.DEFAULT_SIMULATION_PROPS,r,{data:this.getDataFromChildren(t,!0)})),this.onSimulationTick()}},{key:"updatePositions",value:function(){this.setState({linkPositions:t.getLinkPositions(this.simulation),nodePositions:t.getNodePositions(this.simulation)})}},{key:"scale",value:function(e){return"number"==typeof e?e/this.state.scale:e}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,o=t.labelAttr,a=t.labelOffset,u=t.showLabels,s=t.simulationOptions,c=t.zoom,f=t.minScale,d=t.maxScale,y=this.state,v=y.linkPositions,b=y.nodePositions,g=s.height,_=void 0===g?k.DEFAULT_SIMULATION_PROPS.height:g,x=s.width,O=void 0===x?k.DEFAULT_SIMULATION_PROPS.width:x,S=[],j=[],E=[],N=[],M=[];return h.Children.forEach(n,function(t,n){var r=t.type;switch(r){case w.default:var s=t.props,f=s.node,d=s.showLabel,y=s.labelClass,g=s.labelStyle,_=void 0===g?{}:g,x=s.strokeWidth,O=b[m.nodeId(f)];if(S.push((0,h.cloneElement)(t,l({},O,{strokeWidth:e.scale(x)}))),(u||d)&&O){var T=_.fontSize,k=i(_,["fontSize"]);j.push(p.default.createElement("text",{className:"rv-force__label "+y,key:m.nodeId(f)+"-label",x:O.cx+a.x(f),y:O.cy+a.y(f),fontSize:e.scale(T),style:k},f[o]))}break;case P.default:var A=t.props.link,R=A.strokeWidth,I=v[m.linkId(A)];E.push((0,h.cloneElement)(t,l({},I,{strokeWidth:e.scale(R)})));break;default:var D=t.props.zoomable;c&&D?N.push((0,h.cloneElement)(t,{key:t.key||"zoomable-"+n})):M.push((0,h.cloneElement)(t,{key:t.key||"static-"+n}))}}),p.default.createElement("svg",{className:"rv-force__svg "+r,width:O,height:_},p.default.createElement("g",{className:"rv-force__static-elements"},M),p.default.createElement(T.default,{disabled:!c,height:_,width:O,minScale:f,maxScale:d,onZoom:function(){return e.onZoom.apply(e,arguments)},onPan:function(){return e.onPan.apply(e,arguments)}},p.default.createElement("g",{className:"rv-force__zoomable-elements"},N),p.default.createElement("g",{className:"rv-force__links"},E),p.default.createElement("g",{className:"rv-force__nodes"},S),p.default.createElement("g",{className:"rv-force__labels"},j)))}}]),t}(y.default);t.default=j},function(e,t){(function(t){"undefined"!=typeof window?e.exports=window:"undefined"!=typeof t?e.exports=t:"undefined"!=typeof self?e.exports=self:e.exports={}}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(){}function o(e){try{return e.then}catch(t){return m=t,b}}function i(e,t){try{return e(t)}catch(n){return m=n,b}}function a(e,t,n){try{e(t,n)}catch(r){return m=r,b}}function u(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,e!==r&&y(e,this)}function s(e,t,n){return new e.constructor(function(o,i){var a=new u(r);a.then(o,i),c(e,new d(t,n,a))})}function c(e,t){for(;3===e._81;)e=e._65;return u._10&&u._10(e),0===e._81?0===e._45?(e._45=1,void(e._54=t)):1===e._45?(e._45=2,void(e._54=[e._54,t])):void e._54.push(t):void l(e,t)}function l(e,t){v(function(){var n=1===e._81?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._81?f(t.promise,e._65):h(t.promise,e._65));var r=i(n,e._65);r===b?h(t.promise,m):f(t.promise,r)})}function f(e,t){if(t===e)return h(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"==typeof t||"function"==typeof t)){var n=o(t);if(n===b)return h(e,m);if(n===e.then&&t instanceof u)return e._81=3,e._65=t,void p(e);if("function"==typeof n)return void y(n.bind(t),e)}e._81=1,e._65=t,p(e)}function h(e,t){e._81=2,e._65=t,u._97&&u._97(e,t),p(e)}function p(e){if(1===e._45&&(c(e,e._54),e._54=null),2===e._45){for(var t=0;t<e._54.length;t++)c(e,e._54[t]);e._54=null}}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function y(e,t){var n=!1,r=a(e,function(e){n||(n=!0,f(t,e))},function(e){n||(n=!0,h(t,e))});n||r!==b||(n=!0,h(t,m))}var v=n(10),m=null,b={};e.exports=u,u._10=null,u._97=null,u._61=r,u.prototype.then=function(e,t){if(this.constructor!==u)return s(this,e,t);var n=new u(r);return c(this,new d(e,t,n)),n}},function(e,t,n){!function(){"undefined"==typeof Promise&&(n(28).enable(),window.Promise=n(27)),n(31),Object.assign=n(26)}()},function(e,t){(function(t){"use strict";function n(e){u.length||(a(),s=!0),u[u.length]=e}function r(){for(;c<u.length;){var e=c;if(c+=1,u[e].call(),c>l){for(var t=0,n=u.length-c;t<n;t++)u[t]=u[t+c];u.length-=c,c=0}}u.length=0,c=0,s=!1}function o(e){var t=1,n=new h(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}function i(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var a,u=[],s=!1,c=0,l=1024,f="undefined"!=typeof t?t:self,h=f.MutationObserver||f.WebKitMutationObserver;a="function"==typeof h?o(r):i(r),n.requestFlush=a,n.makeRequestCallFromTimer=i}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(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 u(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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),f=r(l),h=n(7),p=n(2),d=r(p),y=n(6),v=r(y),m=n(4),b=r(m),g=n(3),_=r(g),w=n(5),x="ontouchstart"in h.window,P=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={hoveredNode:null,selectedNode:e.defaultSelectedNode},n}return u(t,e),c(t,null,[{key:"propTypes",get:function(){return Object.assign({defaultSelectedNode:l.PropTypes.shape({id:l.PropTypes.string}),highlightDependencies:l.PropTypes.bool,opacityFactor:l.PropTypes.number,onSelectNode:l.PropTypes.func,onDeselectNode:l.PropTypes.func},v.default.propTypes)}},{key:"defaultProps",get:function(){return{className:"",defaultSelectedNode:null,opacityFactor:4,onSelectNode:function(){},onDeselectNode:function(){}}}}]),c(t,[{key:"onHoverNode",value:function(e,t){x||this.setState({hoveredNode:t})}},{key:"onBlurNode",value:function(){this.setState({hoveredNode:null})}},{key:"onClickNode",value:function(e,t){var n=this.props,r=n.onDeselectNode,o=n.onSelectNode,i=this.state.selectedNode;i&&(0,w.nodeId)(i)===(0,w.nodeId)(t)?(this.setState({selectedNode:null}),r(e,t)):(this.setState({selectedNode:t}),o(e,t))}},{key:"render",value:function(){var e=this,t=this.props,n=t.highlightDependencies,r=t.opacityFactor,i=t.children,a=t.className,u=o(t,["highlightDependencies","opacityFactor","children","className"]),c=this.state,h=c.hoveredNode,p=c.selectedNode,d=v.default.getDataFromChildren(i),y=d.links,m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e/r},g=function(t,n,r){return function(o){e[t](o,n),r&&r(o)}},x=function(e,t){return e&&t&&y.findIndex(function(n){return n.value>0&&(n.source===(0,w.nodeId)(e)&&n.target===(0,w.nodeId)(t)||n.source===(0,w.nodeId)(t)&&n.target===(0,w.nodeId)(e))})>-1},P=function(e,t){return e&&((0,w.nodeId)(e)===(0,w.nodeId)(t)||n&&x(t,e))},O=function(e,t){return e&&n&&t.value>0&&((0,w.nodeId)(e)===t.source||(0,w.nodeId)(e)===t.target)},T=function(e){return p&&(0,w.nodeId)(e)===(0,w.nodeId)(p)?14:10},k=function(e){return p&&(0,w.nodeId)(e)===(0,w.nodeId)(p)?700:null},S=function(e){return P(p,e)||P(h,e)},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return n&&p&&!P(p,e)&&!P(h,e)?m(t/4):p&&!P(p,e)&&!P(h,e)||h&&!P(h,e)?m(t):t},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(n?h&&!O(h,e)||p&&!O(p,e):h||p)?m(t/4):h&&!O(h,e)&&p&&!O(p,e)?m(t):t};return f.default.createElement(v.default,s({className:"rv-force__interactive "+a},u),l.Children.map(i,function(e){switch(e.type){case b.default:var t=e.props,n=t.node,r=t.labelStyle,o=t.fontSize,i=void 0===o?T(n):o,a=t.fontWeight,u=void 0===a?k(n):a,c=t.showLabel,f=void 0===c?S(n):c,h=t.onMouseEnter,p=t.onMouseLeave,d=t.onClick,y=e.props.opacity;return y=j(n,y),(0,l.cloneElement)(e,{showLabel:f,opacity:y,labelStyle:s({fontSize:i,fontWeight:u,opacity:y},r),onMouseEnter:g("onHoverNode",n,h),onMouseLeave:g("onBlurNode",n,p),onClick:g("onClickNode",n,d)});case _.default:var v=e.props.link,m=e.props.opacity;return m=E(v,m),(0,l.cloneElement)(e,{opacity:m});default:return e}}))}}]),t}(d.default);t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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}),t.ZOOMABLE_SVG_GROUP_EVENT_NAMES=void 0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),h=r(f),p=n(2),d=r(p),y=t.ZOOMABLE_SVG_GROUP_EVENT_NAMES=["onMouseDown","onMouseMove","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onWheel"],v=function(e){function t(e){a(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={matrix:[1,0,0,1,0,0],scale:1},n}return s(t,e),l(t,null,[{key:"isValidMatrix",value:function(e){return 6===e.length&&e.findIndex(function(e){return"number"!=typeof e})===-1}},{key:"getPinchZoomLength",value:function(e,t){return(e.clientX-t.clientX)*(e.clientX-t.clientX)+(e.clientY-t.clientY)*(e.clientY-t.clientY)}},{key:"getTouchClientValues",value:function(e){return e.touches.length>=2?{clientX:(e.touches[0].clientX+e.touches[1].clientX)/2,clientY:(e.touches[0].clientY+e.touches[1].clientY)/2}:e.touches[0]}},{key:"propTypes",get:function(){return c({width:f.PropTypes.number.isRequired,height:f.PropTypes.number.isRequired,disabled:f.PropTypes.bool,zoomSpeed:f.PropTypes.number,minScale:f.PropTypes.number,maxScale:f.PropTypes.number,panLimit:f.PropTypes.number,onZoom:f.PropTypes.func,onPan:f.PropTypes.func},y.reduce(function(e,t){return c({},e,i({},t,f.PropTypes.func))},{}))}},{key:"defaultProps",get:function(){return c({disabled:!1,zoomSpeed:.065,panLimit:.75,minScale:0,maxScale:1/0,onZoom:function(){},onPan:function(){}},y.reduce(function(e,t){return c({},e,i({},t,function(){}))},{}))}}]),l(t,[{key:"componentDidMount",value:function(){this.setInitialMatrix()}},{key:"setInitialMatrix",value:function(){var e=this.el.ownerSVGElement,t=e.createSVGTransform();this.setState({scale:1,matrix:[t.matrix.a,t.matrix.b,t.matrix.c,t.matrix.d,t.matrix.e,t.matrix.f]})}},{key:"getScaleMultiplier",value:function(e){var t=this.props.zoomSpeed;return e>0?1-t:e<0?1+t:1}},{key:"zoomTo",value:function(e,t,n,r){var o=this,i=this.state.matrix,a=this.state.scale,u=a*n,s=this.el.ownerSVGElement.getScreenCTM(),c=e*s.a-s.e,l=t*s.d-s.f;u>this.props.maxScale||u<this.props.minScale||this.setState({scale:u,matrix:[u,i[1],i[2],u,c-n*(c-i[4]),l-n*(l-i[5])]},function(){return o.props.onZoom(r,u)})}},{key:"panBy",value:function(e,t,n){var r=this,o=this.props,i=o.width,a=o.height,u=o.panLimit,s=this.state,c=s.matrix,l=s.dragX,f=s.dragY,h=s.scale,p=e-l,d=t-f,y=c[4]+p,v=c[5]+d;Math.abs(y/h)>i*u||Math.abs(v/h)>a*u||this.setState({dragX:e,dragY:t,matrix:[c[0],c[1],c[2],c[3],y,v]},function(){return r.props.onPan(n,y,v)})}},{key:"onMouseDown",value:function(e){return this.state.touching?(e.stopPropagation(),null):0!==e.button?null:this.setState({dragging:!0,dragX:e.clientX,dragY:e.clientY})}},{key:"onMouseMove",value:function(e){return this.state.touching?(e.stopPropagation(),null):this.state.dragging?this.panBy(e.clientX,e.clientY):e}},{key:"onMouseUp",value:function(e){return this.state.touching?(e.stopPropagation(),null):this.setState({dragging:!1,dragX:null,dragY:null})}},{key:"onTouchCancel",value:function(){this.setState({touching:!1,dragging:!1,pinchLength:null,dragX:null,dragY:null})}},{key:"onTouchEnd",value:function(){this.onTouchCancel()}},{key:"onTouchMove",value:function(e){if(e.preventDefault(),e.touches.length>=2){var n=e.touches[0],r=e.touches[1],o=t.getPinchZoomLength(n,r),i=this.state.pinchLength,a=0;o<i?a=1:o>i&&(a=-1);var u=t.getTouchClientValues(e),s=u.clientX,c=u.clientY,l=this.getScaleMultiplier(a);this.zoomTo(s,c,l,e),this.setState({pinchLength:o})}else this.panBy(e.touches[0].clientX,e.touches[0].clientY)}},{key:"onTouchStart",value:function(e){var n=t.getTouchClientValues(e),r=n.clientX,o=n.clientY;this.setState({touching:!0,pinchLength:0,dragX:r,dragY:o})}},{key:"onWheel",value:function(e){var t=e.clientX,n=e.clientY,r=e.deltaY,o=this.getScaleMultiplier(r);1!==o&&(e.preventDefault(),this.zoomTo(t,n,o,e))}},{key:"render",value:function(){var e=this,n=this.props,r=n.width,a=n.height,u=n.children,s=n.disabled,l=n.style,f=void 0===l?{}:l,p=n.transform,d=void 0===p?"":p,v=(n.canvasHeight,n.canvasWidth,n.minScale,n.maxScale,n.panLimit,n.onZoom,n.onPan,n.zoomSpeed,o(n,["width","height","children","disabled","style","transform","canvasHeight","canvasWidth","minScale","maxScale","panLimit","onZoom","onPan","zoomSpeed"])),m=this.state,b=m.matrix,g=m.scale,_=function(t){return function(){var n;e[t].apply(e,arguments),(n=e.props)[t].apply(n,arguments)}},w={transform:d};return!s&&t.isValidMatrix(b)&&Object.assign(w,c({},y.reduce(function(e,t){return c({},e,i({},t,_(t)))},{}),{style:Object.assign({},f,{transformOrigin:"0 0 0",cursor:"default",pointerEvents:"all"}),transform:"matrix("+b.join(" ")+") "+d})),h.default.createElement("g",c({ref:function(t){e.el=t}},v,w),h.default.createElement("rect",{x:-1*b[4],y:-1*b[5],transform:"scale("+1/g+")",fillOpacity:0,height:a,width:r}),u)}}]),t}(d.default);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5);Object.defineProperty(t,"createSimulation",{enumerable:!0,get:function(){return o.createSimulation}}),Object.defineProperty(t,"updateSimulation",{enumerable:!0,get:function(){return o.updateSimulation}});var i=n(6);Object.defineProperty(t,"ForceGraph",{enumerable:!0,get:function(){return r(i).default}});var a=n(3);Object.defineProperty(t,"ForceGraphLink",{enumerable:!0,get:function(){return r(a).default}});var u=n(4);Object.defineProperty(t,"ForceGraphNode",{enumerable:!0,get:function(){return r(u).default}});var s=n(11);Object.defineProperty(t,"InteractiveForceGraph",{enumerable:!0,get:function(){return r(s).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=r.PropTypes.shape({source:r.PropTypes.string.isRequired,target:r.PropTypes.string.isRequired,value:r.PropTypes.number})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=r.PropTypes.shape({id:r.PropTypes.string.isRequired,radius:r.PropTypes.number})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SIMULATION_PROPS=void 0;var r=n(1);t.DEFAULT_SIMULATION_PROPS={animate:!1,width:900,height:600,strength:{}};t.default=r.PropTypes.shape({data:r.PropTypes.object,animate:r.PropTypes.bool,alpha:r.PropTypes.number,alphaDecay:r.PropTypes.number,alphaMin:r.PropTypes.number,alphaTarget:r.PropTypes.number,velocityDecay:r.PropTypes.number,radiusMargin:r.PropTypes.number,linkAttrs:r.PropTypes.array,nodeAttrs:r.PropTypes.array,strength:r.PropTypes.objectOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.number]))})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelAnimationFrame=t.requestAnimationFrame=void 0;var r=n(7);t.requestAnimationFrame=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r.window&&{}.hasOwnProperty.call(r.window,"cancelAnimationFrame")?r.window.requestAnimationFrame.apply(r.window,[e].concat(n)):e.apply(void 0,n)},t.cancelAnimationFrame=function(){r.window&&{}.hasOwnProperty.call(r.window,"cancelAnimationFrame")&&r.window.cancelAnimationFrame.apply(r.window,arguments)}},function(e,t){"use strict";function n(e,t){if(e.size!==t.size)return!1;var n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value;if(!t.has(u))return!1}}catch(s){r=!0,o=s}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(){}function n(e,n){var r=new t;if(e instanceof t)e.each(function(e,t){
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var n=t("object"==typeof exports?require("react"):e.react);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/react-vis-force/",t(0)}([function(e,t,n){n(9),e.exports=n(13)},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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 a(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=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),c=n(29),l=r(c),f=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,l.default)(this,e,t)}}]),t}(s.Component);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(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 u(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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),f=r(l),h=n(2),p=r(h),d=n(14),y=r(d),v=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.link,n=e.strokeWidth,r=e.className,i=o(e,["link","strokeWidth","className"]);return f.default.createElement("line",s({className:"rv-force__link "+r,strokeWidth:n||Math.sqrt(t.value)},i))}}],[{key:"propTypes",get:function(){return{link:y.default.isRequired}}},{key:"defaultProps",get:function(){return{className:"",opacity:.6,stroke:"#999"}}}]),t}(p.default);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(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 u(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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),f=r(l),h=n(2),p=r(h),d=n(15),y=r(d),v=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.node,n=e.className,r=e.r,i=(e.labelStyle,e.labelClass,e.showLabel,o(e,["node","className","r","labelStyle","labelClass","showLabel"])),a=t.radius,u=void 0===a?5:a;return f.default.createElement("circle",s({className:"rv-force__node "+n,r:r||u},i))}}],[{key:"propTypes",get:function(){return{node:y.default.isRequired,cx:l.PropTypes.number,cy:l.PropTypes.number,labelStyle:l.PropTypes.object,labelClass:l.PropTypes.string,showLabel:l.PropTypes.bool}}},{key:"defaultProps",get:function(){return{className:"",fill:"#333",opacity:1,stroke:"#FFF",strokeWidth:1.5}}}]),t}(p.default);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(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,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.map(function(e){return n.reduce(function(t,n){return Object.assign(t,i({},n,e[n]))},{})})}function u(e){switch("undefined"==typeof e?"undefined":g(e)){case"function":return e;default:return function(){return e}}}function s(e,t){return P.forEach(function(n){({}).hasOwnProperty.call(t,n)&&e[n](t[n])}),e}function c(e,t){var n=t.height,r=t.width;e.force("center")||e.force("center",(0,_.forceCenter)());var o=r?r/2:0;r>0&&e.force("center").x()!==o&&(e.shouldRun=!0,e.force("center").x(o));var i=n?n/2:0;return n>0&&e.force("center").y()!==i&&(e.shouldRun=!0,e.force("center").y(i)),e}function l(e,t){var n=t.strength,r=void 0===n?{}:n;e.force("charge")||e.force("charge",(0,_.forceManyBody)()),r.charge!==e.strength.charge&&(e.strength.charge=r.charge,e.shouldRun=!0,e.force("charge").strength(u(r.charge)))}function f(e,t){var n=t.radiusMargin,r=void 0===n?3:n,o=t.strength,i=void 0===o?{}:o;e.force("collide")||e.force("collide",(0,_.forceCollide)()),e.radiusMargin!==r&&(e.radiusMargin=r,e.shouldRun=!0,e.force("collide").radius(function(e){var t=e.radius;return t+r})),i.collide!==e.strength.collide&&(e.strength.collide=i.collide,e.shouldRun=!0,e.force("collide").strength(u(i.collide)()))}function h(e,t){var n=t.data,r=n.nodes,i=n.links,u=t.linkAttrs,s=void 0===u?[]:u,c=t.nodeAttrs,l=void 0===c?[]:c;e.force("link")||e.force("link",(0,_.forceLink)().id(d));var f=new Set(e.nodes().map(d)),h=new Set(r.map(d));(0,x.default)(f,h)||(e.shouldRun=!0,e.nodes(a.apply(void 0,[r,"id","radius","fx","fy"].concat(o(l)))));var p=new Set(e.force("link").links().map(y)),v=new Set(i.map(y));(0,x.default)(p,v)||(e.shouldRun=!0,e.force("link").links(a.apply(void 0,[i,"source","target","value"].concat(o(s)))))}function p(e,t){var n=t.strength,r=void 0===n?{}:n;e.force("x")||e.force("x",(0,_.forceX)()),e.force("y")||e.force("y",(0,_.forceY)()),r.x!==e.strength.x&&(e.strength.x=r.x,e.shouldRun=!0,e.force("x").strength(u(r.x))),r.y!==e.strength.y&&(e.strength.y=r.y,e.shouldRun=!0,e.force("y").strength(u(r.y)))}function d(e){return e.id}function y(e){return(e.source.id||e.source)+"=>"+(e.target.id||e.target)}function v(e){for(e.restart();e.alpha()>e.alphaMin();)e.tick();return e.stop(),e}function m(e){var t=(0,_.forceSimulation)();return t.strength={},b(t,e)}function b(e,t){return s(e,t),c(e,t),l(e,t),f(e,t),h(e,t),p(e,t),!t.animate&&e.shouldRun&&v(e),e.shouldRun=null,e}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.asStrengthFn=u,t.nodeId=d,t.linkId=y,t.runSimulation=v,t.createSimulation=m,t.updateSimulation=b;var _=n(21),w=n(18),x=r(w),P=["alpha","alphaDecay","alphaMin","alphaTarget","velocityDecay"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(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 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 l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),p=o(h);n(24);var d=n(2),y=o(d),v=n(5),m=r(v),b=n(17),g=r(b),_=n(4),w=o(_),x=n(3),P=o(x),O=n(12),T=o(O),k=n(16),S=o(k),j=function(e){function t(e){u(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=e.createSimulation,o=e.simulationOptions,i=n.getDataFromChildren();return n.simulation=r(l({},k.DEFAULT_SIMULATION_PROPS,o,{data:i})),n.state={linkPositions:{},nodePositions:{},scale:1},n.bindSimulationTick(),n}return c(t,e),f(t,null,[{key:"getDataFromChildren",value:function(e){var t={nodes:[],links:[]};return h.Children.forEach(e,function(e){switch(e.type){case w.default:t.nodes.push(e.props.node);break;case P.default:t.links.push(e.props.link)}}),t}},{key:"getNodePositions",value:function(e){return e.nodes().reduce(function(e,t){return Object.assign(e,a({},m.nodeId(t),{cx:t.fx||t.x,cy:t.fy||t.y}))},{})}},{key:"getLinkPositions",value:function(e){return e.force("link").links().reduce(function(e,t){return Object.assign(e,a({},m.linkId(t),{x1:t.source.x,y1:t.source.y,x2:t.target.x,y2:t.target.y}))},{})}},{key:"propTypes",get:function(){return{children:h.PropTypes.any,zoom:h.PropTypes.bool,minScale:h.PropTypes.number,maxScale:h.PropTypes.number,onZoom:h.PropTypes.func,onPan:h.PropTypes.func,createSimulation:h.PropTypes.func,updateSimulation:h.PropTypes.func,simulationOptions:S.default,labelAttr:h.PropTypes.string,labelOffset:h.PropTypes.objectOf(h.PropTypes.func),showLabels:h.PropTypes.bool}}},{key:"defaultProps",get:function(){return{createSimulation:m.createSimulation,updateSimulation:m.updateSimulation,zoom:!1,labelAttr:"id",simulationOptions:k.DEFAULT_SIMULATION_PROPS,labelOffset:{x:function(e){var t=e.radius,n=void 0===t?5:t;return n/2},y:function(e){var t=e.radius,n=void 0===t?5:t;return-n/4}},showLabels:!1,onZoom:function(){},onPan:function(){}}}}]),f(t,[{key:"componentDidMount",value:function(){this.updateSimulation()}},{key:"componentWillReceiveProps",value:function(e){this.lastUpdated=new Date,this.updateSimulation(e)}},{key:"componentWillUnmount",value:function(){this.unbindSimulationTick()}},{key:"onSimulationTick",value:function(){this.frame=g.requestAnimationFrame(this.updatePositions.bind(this))}},{key:"onZoom",value:function(e,t){for(var n,r=arguments.length,o=Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];(n=this.props).onZoom.apply(n,[e,t].concat(o)),this.setState({scale:t})}},{key:"onPan",value:function(){var e;(e=this.props).onPan.apply(e,arguments)}},{key:"getDataFromChildren",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!n&&this.cachedData&&new Date>this.lastUpdated)return this.cachedData;var r=t.getDataFromChildren(e.children);return Object.assign(this,{cachedData:r,lastUpdated:new Date}),r}},{key:"bindSimulationTick",value:function(){this.simulation.on("tick",this.updateSimulation.bind(this))}},{key:"unbindSimulationTick",value:function(){this.simulation.on("tick",null),this.frame=this.frame&&g.cancelAnimationFrame(this.frame)}},{key:"updateSimulation",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=this.simulation,e=t.updateSimulation,r=t.simulationOptions;this.simulation=e(n,l({},k.DEFAULT_SIMULATION_PROPS,r,{data:this.getDataFromChildren(t,!0)})),this.onSimulationTick()}},{key:"updatePositions",value:function(){this.setState({linkPositions:t.getLinkPositions(this.simulation),nodePositions:t.getNodePositions(this.simulation)})}},{key:"scale",value:function(e){return"number"==typeof e?e/this.state.scale:e}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,o=t.labelAttr,a=t.labelOffset,u=t.showLabels,s=t.simulationOptions,c=t.zoom,f=t.minScale,d=t.maxScale,y=this.state,v=y.linkPositions,b=y.nodePositions,g=s.height,_=void 0===g?k.DEFAULT_SIMULATION_PROPS.height:g,x=s.width,O=void 0===x?k.DEFAULT_SIMULATION_PROPS.width:x,S=[],j=[],E=[],N=[],M=[];return h.Children.forEach(n,function(t,n){var r=t.type;switch(r){case w.default:var s=t.props,f=s.node,d=s.showLabel,y=s.labelClass,g=s.labelStyle,_=void 0===g?{}:g,x=s.strokeWidth,O=b[m.nodeId(f)];if(S.push((0,h.cloneElement)(t,l({},O,{strokeWidth:e.scale(x)}))),(u||d)&&O){var T=_.fontSize,k=i(_,["fontSize"]);j.push(p.default.createElement("text",{className:"rv-force__label "+y,key:m.nodeId(f)+"-label",x:O.cx+a.x(f),y:O.cy+a.y(f),fontSize:e.scale(T),style:k},f[o]))}break;case P.default:var A=t.props.link,R=A.strokeWidth,I=v[m.linkId(A)];E.push((0,h.cloneElement)(t,l({},I,{strokeWidth:e.scale(R)})));break;default:var D=t.props.zoomable;c&&D?N.push((0,h.cloneElement)(t,{key:t.key||"zoomable-"+n})):M.push((0,h.cloneElement)(t,{key:t.key||"static-"+n}))}}),p.default.createElement("svg",{className:"rv-force__svg "+r,width:O,height:_},p.default.createElement("g",{className:"rv-force__static-elements"},M),p.default.createElement(T.default,{disabled:!c,height:_,width:O,minScale:f,maxScale:d,onZoom:function(){return e.onZoom.apply(e,arguments)},onPan:function(){return e.onPan.apply(e,arguments)}},p.default.createElement("g",{className:"rv-force__zoomable-elements"},N),p.default.createElement("g",{className:"rv-force__links"},E),p.default.createElement("g",{className:"rv-force__nodes"},S),p.default.createElement("g",{className:"rv-force__labels"},j)))}}]),t}(y.default);t.default=j},function(e,t){(function(t){"undefined"!=typeof window?e.exports=window:"undefined"!=typeof t?e.exports=t:"undefined"!=typeof self?e.exports=self:e.exports={}}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(){}function o(e){try{return e.then}catch(t){return m=t,b}}function i(e,t){try{return e(t)}catch(n){return m=n,b}}function a(e,t,n){try{e(t,n)}catch(r){return m=r,b}}function u(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,e!==r&&y(e,this)}function s(e,t,n){return new e.constructor(function(o,i){var a=new u(r);a.then(o,i),c(e,new d(t,n,a))})}function c(e,t){for(;3===e._81;)e=e._65;return u._10&&u._10(e),0===e._81?0===e._45?(e._45=1,void(e._54=t)):1===e._45?(e._45=2,void(e._54=[e._54,t])):void e._54.push(t):void l(e,t)}function l(e,t){v(function(){var n=1===e._81?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._81?f(t.promise,e._65):h(t.promise,e._65));var r=i(n,e._65);r===b?h(t.promise,m):f(t.promise,r)})}function f(e,t){if(t===e)return h(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"==typeof t||"function"==typeof t)){var n=o(t);if(n===b)return h(e,m);if(n===e.then&&t instanceof u)return e._81=3,e._65=t,void p(e);if("function"==typeof n)return void y(n.bind(t),e)}e._81=1,e._65=t,p(e)}function h(e,t){e._81=2,e._65=t,u._97&&u._97(e,t),p(e)}function p(e){if(1===e._45&&(c(e,e._54),e._54=null),2===e._45){for(var t=0;t<e._54.length;t++)c(e,e._54[t]);e._54=null}}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function y(e,t){var n=!1,r=a(e,function(e){n||(n=!0,f(t,e))},function(e){n||(n=!0,h(t,e))});n||r!==b||(n=!0,h(t,m))}var v=n(10),m=null,b={};e.exports=u,u._10=null,u._97=null,u._61=r,u.prototype.then=function(e,t){if(this.constructor!==u)return s(this,e,t);var n=new u(r);return c(this,new d(e,t,n)),n}},function(e,t,n){!function(){"undefined"==typeof Promise&&(n(28).enable(),window.Promise=n(27)),n(31),Object.assign=n(26)}()},function(e,t){(function(t){"use strict";function n(e){u.length||(a(),s=!0),u[u.length]=e}function r(){for(;c<u.length;){var e=c;if(c+=1,u[e].call(),c>l){for(var t=0,n=u.length-c;t<n;t++)u[t]=u[t+c];u.length-=c,c=0}}u.length=0,c=0,s=!1}function o(e){var t=1,n=new h(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}function i(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var a,u=[],s=!1,c=0,l=1024,f="undefined"!=typeof t?t:self,h=f.MutationObserver||f.WebKitMutationObserver;a="function"==typeof h?o(r):i(r),n.requestFlush=a,n.makeRequestCallFromTimer=i}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(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 u(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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),f=r(l),h=n(7),p=n(2),d=r(p),y=n(6),v=r(y),m=n(4),b=r(m),g=n(3),_=r(g),w=n(5),x=h.window&&"ontouchstart"in h.window,P=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={hoveredNode:null,selectedNode:e.defaultSelectedNode},n}return u(t,e),c(t,null,[{key:"propTypes",get:function(){return Object.assign({defaultSelectedNode:l.PropTypes.shape({id:l.PropTypes.string}),highlightDependencies:l.PropTypes.bool,opacityFactor:l.PropTypes.number,onSelectNode:l.PropTypes.func,onDeselectNode:l.PropTypes.func},v.default.propTypes)}},{key:"defaultProps",get:function(){return{className:"",defaultSelectedNode:null,opacityFactor:4,onSelectNode:function(){},onDeselectNode:function(){}}}}]),c(t,[{key:"onHoverNode",value:function(e,t){x||this.setState({hoveredNode:t})}},{key:"onBlurNode",value:function(){this.setState({hoveredNode:null})}},{key:"onClickNode",value:function(e,t){var n=this.props,r=n.onDeselectNode,o=n.onSelectNode,i=this.state.selectedNode;i&&(0,w.nodeId)(i)===(0,w.nodeId)(t)?(this.setState({selectedNode:null}),r(e,t)):(this.setState({selectedNode:t}),o(e,t))}},{key:"render",value:function(){var e=this,t=this.props,n=t.highlightDependencies,r=t.opacityFactor,i=t.children,a=t.className,u=o(t,["highlightDependencies","opacityFactor","children","className"]),c=this.state,h=c.hoveredNode,p=c.selectedNode,d=v.default.getDataFromChildren(i),y=d.links,m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e/r},g=function(t,n,r){return function(o){e[t](o,n),r&&r(o)}},x=function(e,t){return e&&t&&y.findIndex(function(n){return n.value>0&&(n.source===(0,w.nodeId)(e)&&n.target===(0,w.nodeId)(t)||n.source===(0,w.nodeId)(t)&&n.target===(0,w.nodeId)(e))})>-1},P=function(e,t){return e&&((0,w.nodeId)(e)===(0,w.nodeId)(t)||n&&x(t,e))},O=function(e,t){return e&&n&&t.value>0&&((0,w.nodeId)(e)===t.source||(0,w.nodeId)(e)===t.target)},T=function(e){return p&&(0,w.nodeId)(e)===(0,w.nodeId)(p)?14:10},k=function(e){return p&&(0,w.nodeId)(e)===(0,w.nodeId)(p)?700:null},S=function(e){return P(p,e)||P(h,e)},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return n&&p&&!P(p,e)&&!P(h,e)?m(t/4):p&&!P(p,e)&&!P(h,e)||h&&!P(h,e)?m(t):t},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(n?h&&!O(h,e)||p&&!O(p,e):h||p)?m(t/4):h&&!O(h,e)&&p&&!O(p,e)?m(t):t};return f.default.createElement(v.default,s({className:"rv-force__interactive "+a},u),l.Children.map(i,function(e){switch(e.type){case b.default:var t=e.props,n=t.node,r=t.labelStyle,o=t.fontSize,i=void 0===o?T(n):o,a=t.fontWeight,u=void 0===a?k(n):a,c=t.showLabel,f=void 0===c?S(n):c,h=t.onMouseEnter,p=t.onMouseLeave,d=t.onClick,y=e.props.opacity;return y=j(n,y),(0,l.cloneElement)(e,{showLabel:f,opacity:y,labelStyle:s({fontSize:i,fontWeight:u,opacity:y},r),onMouseEnter:g("onHoverNode",n,h),onMouseLeave:g("onBlurNode",n,p),onClick:g("onClickNode",n,d)});case _.default:var v=e.props.link,m=e.props.opacity;return m=E(v,m),(0,l.cloneElement)(e,{opacity:m});default:return e}}))}}]),t}(d.default);t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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}),t.ZOOMABLE_SVG_GROUP_EVENT_NAMES=void 0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),h=r(f),p=n(2),d=r(p),y=t.ZOOMABLE_SVG_GROUP_EVENT_NAMES=["onMouseDown","onMouseMove","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onWheel"],v=function(e){function t(e){a(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={matrix:[1,0,0,1,0,0],scale:1},n}return s(t,e),l(t,null,[{key:"isValidMatrix",value:function(e){return 6===e.length&&e.findIndex(function(e){return"number"!=typeof e})===-1}},{key:"getPinchZoomLength",value:function(e,t){return(e.clientX-t.clientX)*(e.clientX-t.clientX)+(e.clientY-t.clientY)*(e.clientY-t.clientY)}},{key:"getTouchClientValues",value:function(e){return e.touches.length>=2?{clientX:(e.touches[0].clientX+e.touches[1].clientX)/2,clientY:(e.touches[0].clientY+e.touches[1].clientY)/2}:e.touches[0]}},{key:"propTypes",get:function(){return c({width:f.PropTypes.number.isRequired,height:f.PropTypes.number.isRequired,disabled:f.PropTypes.bool,zoomSpeed:f.PropTypes.number,minScale:f.PropTypes.number,maxScale:f.PropTypes.number,panLimit:f.PropTypes.number,onZoom:f.PropTypes.func,onPan:f.PropTypes.func},y.reduce(function(e,t){return c({},e,i({},t,f.PropTypes.func))},{}))}},{key:"defaultProps",get:function(){return c({disabled:!1,zoomSpeed:.065,panLimit:.75,minScale:0,maxScale:1/0,onZoom:function(){},onPan:function(){}},y.reduce(function(e,t){return c({},e,i({},t,function(){}))},{}))}}]),l(t,[{key:"componentDidMount",value:function(){this.setInitialMatrix()}},{key:"setInitialMatrix",value:function(){var e=this.el.ownerSVGElement,t=e.createSVGTransform();this.setState({scale:1,matrix:[t.matrix.a,t.matrix.b,t.matrix.c,t.matrix.d,t.matrix.e,t.matrix.f]})}},{key:"getScaleMultiplier",value:function(e){var t=this.props.zoomSpeed;return e>0?1-t:e<0?1+t:1}},{key:"zoomTo",value:function(e,t,n,r){var o=this,i=this.state.matrix,a=this.state.scale,u=a*n,s=this.el.ownerSVGElement.getScreenCTM(),c=e*s.a-s.e,l=t*s.d-s.f;u>this.props.maxScale||u<this.props.minScale||this.setState({scale:u,matrix:[u,i[1],i[2],u,c-n*(c-i[4]),l-n*(l-i[5])]},function(){return o.props.onZoom(r,u)})}},{key:"panBy",value:function(e,t,n){var r=this,o=this.props,i=o.width,a=o.height,u=o.panLimit,s=this.state,c=s.matrix,l=s.dragX,f=s.dragY,h=s.scale,p=e-l,d=t-f,y=c[4]+p,v=c[5]+d;Math.abs(y/h)>i*u||Math.abs(v/h)>a*u||this.setState({dragX:e,dragY:t,matrix:[c[0],c[1],c[2],c[3],y,v]},function(){return r.props.onPan(n,y,v)})}},{key:"onMouseDown",value:function(e){return this.state.touching?(e.stopPropagation(),null):0!==e.button?null:this.setState({dragging:!0,dragX:e.clientX,dragY:e.clientY})}},{key:"onMouseMove",value:function(e){return this.state.touching?(e.stopPropagation(),null):this.state.dragging?this.panBy(e.clientX,e.clientY):e}},{key:"onMouseUp",value:function(e){return this.state.touching?(e.stopPropagation(),null):this.setState({dragging:!1,dragX:null,dragY:null})}},{key:"onTouchCancel",value:function(){this.setState({touching:!1,dragging:!1,pinchLength:null,dragX:null,dragY:null})}},{key:"onTouchEnd",value:function(){this.onTouchCancel()}},{key:"onTouchMove",value:function(e){if(e.preventDefault(),e.touches.length>=2){var n=e.touches[0],r=e.touches[1],o=t.getPinchZoomLength(n,r),i=this.state.pinchLength,a=0;o<i?a=1:o>i&&(a=-1);var u=t.getTouchClientValues(e),s=u.clientX,c=u.clientY,l=this.getScaleMultiplier(a);this.zoomTo(s,c,l,e),this.setState({pinchLength:o})}else this.panBy(e.touches[0].clientX,e.touches[0].clientY)}},{key:"onTouchStart",value:function(e){var n=t.getTouchClientValues(e),r=n.clientX,o=n.clientY;this.setState({touching:!0,pinchLength:0,dragX:r,dragY:o})}},{key:"onWheel",value:function(e){var t=e.clientX,n=e.clientY,r=e.deltaY,o=this.getScaleMultiplier(r);1!==o&&(e.preventDefault(),this.zoomTo(t,n,o,e))}},{key:"render",value:function(){var e=this,n=this.props,r=n.width,a=n.height,u=n.children,s=n.disabled,l=n.style,f=void 0===l?{}:l,p=n.transform,d=void 0===p?"":p,v=(n.canvasHeight,n.canvasWidth,n.minScale,n.maxScale,n.panLimit,n.onZoom,n.onPan,n.zoomSpeed,o(n,["width","height","children","disabled","style","transform","canvasHeight","canvasWidth","minScale","maxScale","panLimit","onZoom","onPan","zoomSpeed"])),m=this.state,b=m.matrix,g=m.scale,_=function(t){return function(){var n;e[t].apply(e,arguments),(n=e.props)[t].apply(n,arguments)}},w={transform:d};return!s&&t.isValidMatrix(b)&&Object.assign(w,c({},y.reduce(function(e,t){return c({},e,i({},t,_(t)))},{}),{style:Object.assign({},f,{transformOrigin:"0 0 0",cursor:"default",pointerEvents:"all"}),transform:"matrix("+b.join(" ")+") "+d})),h.default.createElement("g",c({ref:function(t){e.el=t}},v,w),h.default.createElement("rect",{x:-1*b[4],y:-1*b[5],transform:"scale("+1/g+")",fillOpacity:0,height:a,width:r}),u)}}]),t}(d.default);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5);Object.defineProperty(t,"createSimulation",{enumerable:!0,get:function(){return o.createSimulation}}),Object.defineProperty(t,"updateSimulation",{enumerable:!0,get:function(){return o.updateSimulation}});var i=n(6);Object.defineProperty(t,"ForceGraph",{enumerable:!0,get:function(){return r(i).default}});var a=n(3);Object.defineProperty(t,"ForceGraphLink",{enumerable:!0,get:function(){return r(a).default}});var u=n(4);Object.defineProperty(t,"ForceGraphNode",{enumerable:!0,get:function(){return r(u).default}});var s=n(11);Object.defineProperty(t,"InteractiveForceGraph",{enumerable:!0,get:function(){return r(s).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=r.PropTypes.shape({source:r.PropTypes.string.isRequired,target:r.PropTypes.string.isRequired,value:r.PropTypes.number})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=r.PropTypes.shape({id:r.PropTypes.string.isRequired,radius:r.PropTypes.number})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SIMULATION_PROPS=void 0;var r=n(1);t.DEFAULT_SIMULATION_PROPS={animate:!1,width:900,height:600,strength:{}};t.default=r.PropTypes.shape({data:r.PropTypes.object,animate:r.PropTypes.bool,alpha:r.PropTypes.number,alphaDecay:r.PropTypes.number,alphaMin:r.PropTypes.number,alphaTarget:r.PropTypes.number,velocityDecay:r.PropTypes.number,radiusMargin:r.PropTypes.number,linkAttrs:r.PropTypes.array,nodeAttrs:r.PropTypes.array,strength:r.PropTypes.objectOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.number]))})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelAnimationFrame=t.requestAnimationFrame=void 0;var r=n(7);t.requestAnimationFrame=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r.window&&{}.hasOwnProperty.call(r.window,"cancelAnimationFrame")?r.window.requestAnimationFrame.apply(r.window,[e].concat(n)):e.apply(void 0,n)},t.cancelAnimationFrame=function(){r.window&&{}.hasOwnProperty.call(r.window,"cancelAnimationFrame")&&r.window.cancelAnimationFrame.apply(r.window,arguments)}},function(e,t){"use strict";function n(e,t){if(e.size!==t.size)return!1;var n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value;if(!t.has(u))return!1}}catch(s){r=!0,o=s}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(){}function n(e,n){var r=new t;if(e instanceof t)e.each(function(e,t){
r.set(t,e)});else if(Array.isArray(e)){var o,i=-1,a=e.length;if(null==n)for(;++i<a;)r.set(i,e[i]);else for(;++i<a;)r.set(n(o=e[i],i,e),o)}else if(e)for(var u in e)r.set(u,e[u]);return r}function r(){function e(t,o,i,a){if(o>=l.length)return null!=s?s(t):null!=r?t.sort(r):t;for(var u,c,f,h=-1,p=t.length,d=l[o++],y=n(),v=i();++h<p;)(f=y.get(u=d(c=t[h])+""))?f.push(c):y.set(u,[c]);return y.each(function(t,n){a(v,n,e(t,o,i,a))}),v}function t(e,n){if(++n>l.length)return e;var r,o=f[n-1];return null!=s&&n>=l.length?r=e.entries():(r=[],e.each(function(e,o){r.push({key:o,values:t(e,n)})})),null!=o?r.sort(function(e,t){return o(e.key,t.key)}):r}var r,s,c,l=[],f=[];return c={object:function(t){return e(t,0,o,i)},map:function(t){return e(t,0,a,u)},entries:function(n){return t(e(n,0,a,u),0)},key:function(e){return l.push(e),c},sortKeys:function(e){return f[l.length-1]=e,c},sortValues:function(e){return r=e,c},rollup:function(e){return s=e,c}}}function o(){return{}}function i(e,t,n){e[t]=n}function a(){return n()}function u(e,t,n){e.set(t,n)}function s(){}function c(e,t){var n=new s;if(e instanceof s)e.each(function(e){n.add(e)});else if(e){var r=-1,o=e.length;if(null==t)for(;++r<o;)n.add(e[r]);else for(;++r<o;)n.add(t(e[r],r,e))}return n}function l(e){var t=[];for(var n in e)t.push(n);return t}function f(e){var t=[];for(var n in e)t.push(e[n]);return t}function h(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t}var p="$";t.prototype=n.prototype={constructor:t,has:function(e){return p+e in this},get:function(e){return this[p+e]},set:function(e,t){return this[p+e]=t,this},remove:function(e){var t=p+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===p&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===p&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===p&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===p&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===p&&++e;return e},empty:function(){for(var e in this)if(e[0]===p)return!1;return!0},each:function(e){for(var t in this)t[0]===p&&e(this[t],t.slice(1),this)}};var d=n.prototype;s.prototype=c.prototype={constructor:s,has:d.has,add:function(e){return e+="",this[p+e]=e,this},remove:d.remove,clear:d.clear,values:d.keys,size:d.size,empty:d.empty,each:d.each},e.nest=r,e.set=c,e.map=n,e.keys=l,e.values=f,e.entries=h,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(){for(var e,t=0,r=arguments.length,o={};t<r;++t){if(!(e=arguments[t]+"")||e in o)throw new Error("illegal type: "+e);o[e]=[]}return new n(o)}function n(e){this._=e}function r(e,t){return e.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}function o(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function i(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=a,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}var a={value:function(){}};n.prototype=t.prototype={constructor:n,on:function(e,t){var n,a=this._,u=r(e+"",a),s=-1,c=u.length;{if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++s<c;)if(n=(e=u[s]).type)a[n]=i(a[n],e.name,t);else if(null==t)for(n in a)a[n]=i(a[n],e.name,null);return this}for(;++s<c;)if((n=(e=u[s]).type)&&(n=o(a[n],e.name)))return n}},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new n(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,n=r.length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}},e.dispatch=t,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){!function(e,r){r(t,n(22),n(19),n(20),n(23))}(this,function(e,t,n,r,o){"use strict";function i(e,t){function n(){var n,o,i=r.length,a=0,u=0;for(n=0;n<i;++n)o=r[n],a+=o.x,u+=o.y;for(a=a/i-e,u=u/i-t,n=0;n<i;++n)o=r[n],o.x-=a,o.y-=u}var r;return null==e&&(e=0),null==t&&(t=0),n.initialize=function(e){r=e},n.x=function(t){return arguments.length?(e=+t,n):e},n.y=function(e){return arguments.length?(t=+e,n):t},n}function a(e){return function(){return e}}function u(){return 1e-6*(Math.random()-.5)}function s(e){return e.x+e.vx}function c(e){return e.y+e.vy}function l(e){function n(){function e(e,t,r,o,i){var a=e.data,s=e.r,c=y+s;{if(!a)return t>p+c||o<p-c||r>d+c||i<d-c;if(a.index>n){var f=p-a.x-a.vx,m=d-a.y-a.vy,b=f*f+m*m;b<c*c&&(0===f&&(f=u(),b+=f*f),0===m&&(m=u(),b+=m*m),b=(c-(b=Math.sqrt(b)))/b*l,h.vx+=(f*=b)*(c=(s*=s)/(v+s)),h.vy+=(m*=b)*c,a.vx-=f*(c=1-c),a.vy-=m*c)}}}for(var n,a,h,p,d,y,v,m=o.length,b=0;b<f;++b)for(a=t.quadtree(o,s,c).visitAfter(r),n=0;n<m;++n)h=o[n],y=i[n],v=y*y,p=h.x+h.vx,d=h.y+h.vy,a.visit(e)}function r(e){if(e.data)return e.r=i[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}var o,i,l=1,f=1;return"function"!=typeof e&&(e=a(null==e?1:+e)),n.initialize=function(t){var n,r=(o=t).length;for(i=new Array(r),n=0;n<r;++n)i[n]=+e(o[n],n,o)},n.iterations=function(e){return arguments.length?(f=+e,n):f},n.strength=function(e){return arguments.length?(l=+e,n):l},n.radius=function(t){return arguments.length?(e="function"==typeof t?t:a(+t),n):e},n}function f(e,t){return t}function h(e){function t(e){return 1/Math.min(p[e.source.index],p[e.target.index])}function r(t){for(var n=0,r=e.length;n<b;++n)for(var o,i,a,s,f,h,p,y=0;y<r;++y)o=e[y],i=o.source,a=o.target,s=a.x+a.vx-i.x-i.vx||u(),f=a.y+a.vy-i.y-i.vy||u(),h=Math.sqrt(s*s+f*f),h=(h-l[y])/h*t*c[y],s*=h,f*=h,a.vx-=s*(p=d[y]),a.vy-=f*p,i.vx+=s*(p=1-p),i.vy+=f*p}function o(){if(h){var t,r,o=h.length,a=e.length,u=n.map(h,y);for(t=0,p=new Array(o);t<o;++t)p[t]=0;for(t=0;t<a;++t)r=e[t],r.index=t,"object"!=typeof r.source&&(r.source=u.get(r.source)),"object"!=typeof r.target&&(r.target=u.get(r.target)),++p[r.source.index],++p[r.target.index];for(t=0,d=new Array(a);t<a;++t)r=e[t],d[t]=p[r.source.index]/(p[r.source.index]+p[r.target.index]);c=new Array(a),i(),l=new Array(a),s()}}function i(){if(h)for(var t=0,n=e.length;t<n;++t)c[t]=+v(e[t],t,e)}function s(){if(h)for(var t=0,n=e.length;t<n;++t)l[t]=+m(e[t],t,e)}var c,l,h,p,d,y=f,v=t,m=a(30),b=1;return null==e&&(e=[]),r.initialize=function(e){h=e,o()},r.links=function(t){return arguments.length?(e=t,o(),r):e},r.id=function(e){return arguments.length?(y=e,r):y},r.iterations=function(e){return arguments.length?(b=+e,r):b},r.strength=function(e){return arguments.length?(v="function"==typeof e?e:a(+e),i(),r):v},r.distance=function(e){return arguments.length?(m="function"==typeof e?e:a(+e),s(),r):m},r}function p(e){return e.x}function d(e){return e.y}function y(e){function t(){i(),v.call("tick",s),c<l&&(y.stop(),v.call("end",s))}function i(){var t,n,r=e.length;for(c+=(h-c)*f,d.each(function(e){e(c)}),t=0;t<r;++t)n=e[t],null==n.fx?n.x+=n.vx*=p:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=p:(n.y=n.fy,n.vy=0)}function a(){for(var t,n=0,r=e.length;n<r;++n){if(t=e[n],t.index=n,isNaN(t.x)||isNaN(t.y)){var o=g*Math.sqrt(n),i=n*_;t.x=o*Math.cos(i),t.y=o*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function u(t){return t.initialize&&t.initialize(e),t}var s,c=1,l=.001,f=1-Math.pow(l,1/300),h=0,p=.6,d=n.map(),y=o.timer(t),v=r.dispatch("tick","end");return null==e&&(e=[]),a(),s={tick:i,restart:function(){return y.restart(t),s},stop:function(){return y.stop(),s},nodes:function(t){return arguments.length?(e=t,a(),d.each(u),s):e},alpha:function(e){return arguments.length?(c=+e,s):c},alphaMin:function(e){return arguments.length?(l=+e,s):l},alphaDecay:function(e){return arguments.length?(f=+e,s):+f},alphaTarget:function(e){return arguments.length?(h=+e,s):h},velocityDecay:function(e){return arguments.length?(p=1-e,s):1-p},force:function(e,t){return arguments.length>1?(null==t?d.remove(e):d.set(e,u(t)),s):d.get(e)},find:function(t,n,r){var o,i,a,u,s,c=0,l=e.length;for(null==r?r=1/0:r*=r,c=0;c<l;++c)u=e[c],o=t-u.x,i=n-u.y,a=o*o+i*i,a<r&&(s=u,r=a);return s},on:function(e,t){return arguments.length>1?(v.on(e,t),s):v.on(e)}}}function v(){function e(e){var n,a=i.length,u=t.quadtree(i,p,d).visitAfter(r);for(c=e,n=0;n<a;++n)s=i[n],u.visit(o)}function n(){if(i){var e,t=i.length;for(l=new Array(t),e=0;e<t;++e)l[e]=+f(i[e],e,i)}}function r(e){var t,n,r,o,i,a=0;if(e.length){for(r=o=i=0;i<4;++i)(t=e[i])&&(n=t.value)&&(a+=n,r+=n*t.x,o+=n*t.y);e.x=r/a,e.y=o/a}else{t=e,t.x=t.data.x,t.y=t.data.y;do a+=l[t.data.index];while(t=t.next)}e.value=a}function o(e,t,n,r){if(!e.value)return!0;var o=e.x-s.x,i=e.y-s.y,a=r-t,f=o*o+i*i;if(a*a/v<f)return f<y&&(0===o&&(o=u(),f+=o*o),0===i&&(i=u(),f+=i*i),f<h&&(f=Math.sqrt(h*f)),s.vx+=o*e.value*c/f,s.vy+=i*e.value*c/f),!0;if(!(e.length||f>=y)){(e.data!==s||e.next)&&(0===o&&(o=u(),f+=o*o),0===i&&(i=u(),f+=i*i),f<h&&(f=Math.sqrt(h*f)));do e.data!==s&&(a=l[e.data.index]*c/f,s.vx+=o*a,s.vy+=i*a);while(e=e.next)}}var i,s,c,l,f=a(-30),h=1,y=1/0,v=.81;return e.initialize=function(e){i=e,n()},e.strength=function(t){return arguments.length?(f="function"==typeof t?t:a(+t),n(),e):f},e.distanceMin=function(t){return arguments.length?(h=t*t,e):Math.sqrt(h)},e.distanceMax=function(t){return arguments.length?(y=t*t,e):Math.sqrt(y)},e.theta=function(t){return arguments.length?(v=t*t,e):Math.sqrt(v)},e}function m(e){function t(e){for(var t,n=0,a=r.length;n<a;++n)t=r[n],t.vx+=(i[n]-t.x)*o[n]*e}function n(){if(r){var t,n=r.length;for(o=new Array(n),i=new Array(n),t=0;t<n;++t)o[t]=isNaN(i[t]=+e(r[t],t,r))?0:+u(r[t],t,r)}}var r,o,i,u=a(.1);return"function"!=typeof e&&(e=a(null==e?0:+e)),t.initialize=function(e){r=e,n()},t.strength=function(e){return arguments.length?(u="function"==typeof e?e:a(+e),n(),t):u},t.x=function(r){return arguments.length?(e="function"==typeof r?r:a(+r),n(),t):e},t}function b(e){function t(e){for(var t,n=0,a=r.length;n<a;++n)t=r[n],t.vy+=(i[n]-t.y)*o[n]*e}function n(){if(r){var t,n=r.length;for(o=new Array(n),i=new Array(n),t=0;t<n;++t)o[t]=isNaN(i[t]=+e(r[t],t,r))?0:+u(r[t],t,r)}}var r,o,i,u=a(.1);return"function"!=typeof e&&(e=a(null==e?0:+e)),t.initialize=function(e){r=e,n()},t.strength=function(e){return arguments.length?(u="function"==typeof e?e:a(+e),n(),t):u},t.y=function(r){return arguments.length?(e="function"==typeof r?r:a(+r),n(),t):e},t}var g=10,_=Math.PI*(3-Math.sqrt(5));e.forceCenter=i,e.forceCollide=l,e.forceLink=h,e.forceManyBody=v,e.forceSimulation=y,e.forceX=m,e.forceY=b,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return n(this.cover(t,r),t,r,e)}function n(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i,a,u,s,c,l,f,h,p=e._root,d={data:r},y=e._x0,v=e._y0,m=e._x1,b=e._y1;if(!p)return e._root=d,e;for(;p.length;)if((c=t>=(i=(y+m)/2))?y=i:m=i,(l=n>=(a=(v+b)/2))?v=a:b=a,o=p,!(p=p[f=l<<1|c]))return o[f]=d,e;if(u=+e._x.call(null,p.data),s=+e._y.call(null,p.data),t===u&&n===s)return d.next=p,o?o[f]=d:e._root=d,e;do o=o?o[f]=new Array(4):e._root=new Array(4),(c=t>=(i=(y+m)/2))?y=i:m=i,(l=n>=(a=(v+b)/2))?v=a:b=a;while((f=l<<1|c)===(h=(s>=a)<<1|u>=i));return o[h]=p,o[f]=d,e}function r(e){var t,r,o,i,a=e.length,u=new Array(a),s=new Array(a),c=1/0,l=1/0,f=-(1/0),h=-(1/0);for(r=0;r<a;++r)isNaN(o=+this._x.call(null,t=e[r]))||isNaN(i=+this._y.call(null,t))||(u[r]=o,s[r]=i,o<c&&(c=o),o>f&&(f=o),i<l&&(l=i),i>h&&(h=i));for(f<c&&(c=this._x0,f=this._x1),h<l&&(l=this._y0,h=this._y1),this.cover(c,l).cover(f,h),r=0;r<a;++r)n(this,u[r],s[r],e[r]);return this}function o(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(e))+1,i=(r=Math.floor(t))+1;else{if(!(n>e||e>o||r>t||t>i))return this;var a,u,s=o-n,c=this._root;switch(u=(t<(r+i)/2)<<1|e<(n+o)/2){case 0:do a=new Array(4),a[u]=c,c=a;while(s*=2,o=n+s,i=r+s,e>o||t>i);break;case 1:do a=new Array(4),a[u]=c,c=a;while(s*=2,n=o-s,i=r+s,n>e||t>i);break;case 2:do a=new Array(4),a[u]=c,c=a;while(s*=2,o=n+s,r=i-s,e>o||r>t);break;case 3:do a=new Array(4),a[u]=c,c=a;while(s*=2,n=o-s,r=i-s,n>e||r>t)}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this}function i(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function a(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function u(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function s(e,t,n){var r,o,i,a,s,c,l,f=this._x0,h=this._y0,p=this._x1,d=this._y1,y=[],v=this._root;for(v&&y.push(new u(v,f,h,p,d)),null==n?n=1/0:(f=e-n,h=t-n,p=e+n,d=t+n,n*=n);c=y.pop();)if(!(!(v=c.node)||(o=c.x0)>p||(i=c.y0)>d||(a=c.x1)<f||(s=c.y1)<h))if(v.length){var m=(o+a)/2,b=(i+s)/2;y.push(new u(v[3],m,b,a,s),new u(v[2],o,b,m,s),new u(v[1],m,i,a,b),new u(v[0],o,i,m,b)),(l=(t>=b)<<1|e>=m)&&(c=y[y.length-1],y[y.length-1]=y[y.length-1-l],y[y.length-1-l]=c)}else{var g=e-+this._x.call(null,v.data),_=t-+this._y.call(null,v.data),w=g*g+_*_;if(w<n){var x=Math.sqrt(n=w);f=e-x,h=t-x,p=e+x,d=t+x,r=v.data}}return r}function c(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,o,i,a,u,s,c,l,f,h,p=this._root,d=this._x0,y=this._y0,v=this._x1,m=this._y1;if(!p)return this;if(p.length)for(;;){if((c=i>=(u=(d+v)/2))?d=u:v=u,(l=a>=(s=(y+m)/2))?y=s:m=s,t=p,!(p=p[f=l<<1|c]))return this;if(!p.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,h=f)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(o=p.next)&&delete p.next,r?(o?r.next=o:delete r.next,this):t?(o?t[f]=o:delete t[f],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=o,this)}function l(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function f(){return this._root}function h(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function p(e){var t,n,r,o,i,a,s=[],c=this._root;for(c&&s.push(new u(c,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(c=t.node,r=t.x0,o=t.y0,i=t.x1,a=t.y1)&&c.length){var l=(r+i)/2,f=(o+a)/2;(n=c[3])&&s.push(new u(n,l,f,i,a)),(n=c[2])&&s.push(new u(n,r,f,l,a)),(n=c[1])&&s.push(new u(n,l,o,i,f)),(n=c[0])&&s.push(new u(n,r,o,l,f))}return this}function d(e){var t,n=[],r=[];for(this._root&&n.push(new u(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,c=t.x1,l=t.y1,f=(a+c)/2,h=(s+l)/2;(i=o[0])&&n.push(new u(i,a,s,f,h)),(i=o[1])&&n.push(new u(i,f,s,c,h)),(i=o[2])&&n.push(new u(i,a,h,f,l)),(i=o[3])&&n.push(new u(i,f,h,c,l))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function y(e){return e[0]}function v(e){return arguments.length?(this._x=e,this):this._x}function m(e){return e[1]}function b(e){return arguments.length?(this._y=e,this):this._y}function g(e,t,n){var r=new _(null==t?y:t,null==n?m:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function _(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function w(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var x=g.prototype=_.prototype;x.copy=function(){var e,t,n=new _(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=w(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var o=0;o<4;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(4)}):r.target[o]=w(t));return n},x.add=t,x.addAll=r,x.cover=o,x.data=i,x.extent=a,x.find=s,x.remove=c,x.removeAll=l,x.root=f,x.size=h,x.visit=p,x.visitAfter=d,x.x=v,x.y=b,e.quadtree=g,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(){return g||(x(n),g=w.now()+_)}function n(){g=0}function r(){this._call=this._time=this._next=null}function o(e,t,n){var o=new r;return o.restart(e,t,n),o}function i(){t(),++d;for(var e,n=h;n;)(e=g-n._time)>=0&&n._call.call(null,e),n=n._next;--d}function a(){g=(b=w.now())+_,d=y=0;try{i()}finally{d=0,s(),g=0}}function u(){var e=w.now(),t=e-b;t>m&&(_-=t,b=e)}function s(){for(var e,t,n=h,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:h=t);p=e,c(r)}function c(e){if(!d){y&&(y=clearTimeout(y));var t=e-g;t>24?(e<1/0&&(y=setTimeout(a,t)),v&&(v=clearInterval(v))):(v||(v=setInterval(u,m)),d=1,x(a))}}function l(e,t,n){var o=new r;return t=null==t?0:+t,o.restart(function(n){o.stop(),e(n+t)},t,n),o}function f(e,n,o){var i=new r,a=n;return null==n?(i.restart(e,n,o),i):(n=+n,o=null==o?t():+o,i.restart(function t(r){r+=a,i.restart(t,a+=n,o),e(r)},n,o),i)}var h,p,d=0,y=0,v=0,m=1e3,b=0,g=0,_=0,w="object"==typeof performance&&performance.now?performance:Date,x="function"==typeof requestAnimationFrame?requestAnimationFrame:function(e){setTimeout(e,17)};r.prototype=o.prototype={constructor:r,restart:function(e,n,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?t():+r)+(null==n?0:+n),this._next||p===this||(p?p._next=this:h=this,p=this),this._call=e,this._time=r,c()},stop:function(){this._call&&(this._call=null,this._time=1/0,c())}},e.now=t,e.timer=o,e.timerFlush=i,e.timeout=l,e.interval=f,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t){},function(e,t){"use strict";function n(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(!o.call(t,r[a])||!n(e[r[a]],t[r[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=r},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var c in r)o.call(r,c)&&(u[c]=r[c]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var l=0;l<a.length;l++)i.call(r,a[l])&&(u[a[l]]=r[a[l]])}}return u}},function(e,t,n){"use strict";function r(e){var t=new o(o._61);return t._81=1,t._65=e,t}var o=n(8);e.exports=o;var i=r(!0),a=r(!1),u=r(null),s=r(void 0),c=r(0),l=r("");o.resolve=function(e){if(e instanceof o)return e;if(null===e)return u;if(void 0===e)return s;if(e===!0)return i;if(e===!1)return a;if(0===e)return c;if(""===e)return l;if("object"==typeof e||"function"==typeof e)try{var t=e.then;if("function"==typeof t)return new o(t.bind(e))}catch(n){return new o(function(e,t){t(n)})}return r(e)},o.all=function(e){var t=Array.prototype.slice.call(e);return new o(function(e,n){function r(a,u){if(u&&("object"==typeof u||"function"==typeof u)){if(u instanceof o&&u.then===o.prototype.then){for(;3===u._81;)u=u._65;return 1===u._81?r(a,u._65):(2===u._81&&n(u._65),void u.then(function(e){r(a,e)},n))}var s=u.then;if("function"==typeof s){var c=new o(s.bind(u));return void c.then(function(e){r(a,e)},n)}}t[a]=u,0===--i&&e(t)}if(0===t.length)return e([]);for(var i=t.length,a=0;a<t.length;a++)r(a,t[a])})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){e.forEach(function(e){o.resolve(e).then(t,n)})})},o.prototype.catch=function(e){return this.then(null,e)}},function(e,t,n){"use strict";function r(){c=!1,u._10=null,u._97=null}function o(e){function t(t){(e.allRejections||a(f[t].error,e.whitelist||s))&&(f[t].displayId=l++,e.onUnhandled?(f[t].logged=!0,e.onUnhandled(f[t].displayId,f[t].error)):(f[t].logged=!0,i(f[t].displayId,f[t].error)))}function n(t){f[t].logged&&(e.onHandled?e.onHandled(f[t].displayId,f[t].error):f[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+f[t].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+f[t].displayId+".")))}e=e||{},c&&r(),c=!0;var o=0,l=0,f={};u._10=function(e){2===e._81&&f[e._72]&&(f[e._72].logged?n(e._72):clearTimeout(f[e._72].timeout),delete f[e._72])},u._97=function(e,n){0===e._45&&(e._72=o++,f[e._72]={displayId:null,error:n,timeout:setTimeout(t.bind(null,e._72),a(n,s)?100:2e3),logged:!1})}}function i(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):");var n=(t&&(t.stack||t))+"";n.split("\n").forEach(function(e){console.warn(" "+e)})}function a(e,t){return t.some(function(t){return e instanceof t})}var u=n(8),s=[ReferenceError,TypeError,RangeError],c=!1;t.disable=r,t.enable=o},function(e,t,n){e.exports=n(30)},function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=n(25);e.exports=r},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return y.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function u(e){var t=new FileReader;return t.readAsArrayBuffer(e),a(t)}function s(e){var t=new FileReader;return t.readAsText(e),a(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(y.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(y.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!y.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},y.blob?(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(u)},this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=i(this);return e?e:Promise.resolve(this._bodyText)},y.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function l(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function f(e,t){t=t||{};var n=t.body;if(f.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=l(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function p(e){var t=new o,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),o=n.join(":").trim();t.append(r,o)}),t}function d(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(r)},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},o.prototype.getAll=function(e){return this.map[t(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},y.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this)},c.call(f.prototype),c.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},d.error=function(){var e=new d(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];d.redirect=function(e,t){if(m.indexOf(t)===-1)throw new RangeError("Invalid status code");return new d(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=f,e.Response=d,e.fetch=function(e,t){return new Promise(function(n,r){function o(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=f.prototype.isPrototypeOf(e)&&!t?e:new f(e,t);var a=new XMLHttpRequest;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:p(a),url:o()},t="response"in a?a.response:a.responseText;n(new d(t,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&y.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)}])});
//# sourceMappingURL=react-vis-force.min.js.map
{
"name": "react-vis-force",
"version": "0.1.2",
"version": "0.1.3",
"main": "./dist/react-vis-force.js",

@@ -74,3 +74,3 @@ "homepage": "http://uber.github.io/react-vis-force",

"scripts": {
"start": "npm run start-storybook",
"start": "npm run storybook",
"build": "node scripts/build.js",

@@ -77,0 +77,0 @@ "build:docs": "npm run build-storybook",

@@ -551,3 +551,3 @@ // Copyright (c) 2016 Uber Technologies, Inc.

expect(wrapper.instance().simulation.__events['.tick']).toBe(null);
expect(wrapper.instance().simulation.__events.tick).toBe(null);
});

@@ -554,0 +554,0 @@

@@ -197,3 +197,3 @@ // Copyright (c) 2016 Uber Technologies, Inc.

unbindSimulationTick() {
this.simulation.on('.tick', null);
this.simulation.on('tick', null);
this.frame = this.frame && rafUtils.cancelAnimationFrame(this.frame);

@@ -200,0 +200,0 @@ }

@@ -30,3 +30,3 @@ // Copyright (c) 2016 Uber Technologies, Inc.

const isTouch = 'ontouchstart' in window;
const isTouch = window && 'ontouchstart' in window;

@@ -33,0 +33,0 @@ export default class InteractiveForceGraph extends PureRenderComponent {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc