(this.webpackJsonpstreamlit_force_graph_simulator=this.webpackJsonpstreamlit_force_graph_simulator||[]).push([[0],{51:function(e,t,n){e.exports=n(75)},75:function(e,t,n){"use strict";n.r(t);var r=n(7),a=n.n(r),i=n(37),u=n.n(i),c=n(11),l=n(6),o=n(10),s=n(12),d=n(31),f=n(44),p=n(32),m=n(84),g=n(85),v=n(86),b=Object(d.b)((function(e){var t=e.args,n=t.initial_graph,i=t.events,u=t.time_interval,b=t.graphprops,_=t.continuous_play,h=t.directed,k={nodes:n.nodes,links:n.links},E=Object(r.useState)({network:k,time:0,paused:!0}),w=Object(s.a)(E,2),j=w[0],y=w[1];Object(r.useEffect)((function(){return d.a.setFrameHeight()}));Object(r.useEffect)((function(){y({network:n,time:0,paused:!0})}),[n,i,u,b,_]),Object(r.useEffect)((function(){var e=setInterval((function(){y((function(e){if(!1===e.paused){var t,n=e.network,r=e.time;if(0===r)n=k;else if(r===i.length)return _?{network:k,time:0,paused:!1}:{network:n,time:r,paused:!0};t=i.length>0?i[r%i.length]:[];var a,u=n.nodes,s=n.links,d=Object(o.a)(t);try{for(d.s();!(a=d.n()).done;){var f=a.value;if("add_node"===f.event_type)u=[].concat(Object(l.a)(u),[f.node]);else if("remove_node"===f.event_type)u=u.filter((function(e){return e.id!==f.id})),s=s.filter((function(e){return e.source.id!==f.id&&e.target.id!==f.id}));else if("add_link"===f.event_type){var p=u.find((function(e){return e.id===f.source})),m=u.find((function(e){return e.id===f.target})),g=Object(c.a)(Object(c.a)({},f.attributes),{},{source:p,target:m});s=[].concat(Object(l.a)(s),[g])}else if("remove_link"===f.event_type)s=s.filter((function(e){return(e.source.id!==f.source||e.target.id!==f.target)&&(e.source.id!==f.target||e.target.id!==f.source)}));else if("node_attributes"===f.event_type){var v,b=Object(o.a)(u);try{for(b.s();!(v=b.n()).done;){var E=v.value;if(E.id===f.id)for(var w in f.attributes)E[w]=f.attributes[w]}}catch(y){b.e(y)}finally{b.f()}}else if("link_attributes"===f.event_type){var j=s.find((function(e){return e.source.id===f.source&&e.target.id===f.target||!(!h||e.source.id!==f.target||e.target.id!==f.source)}));for(var w in f.attributes)j[w]=f.attributes[w]}else"new_graph"===f.event_type&&(u=f.graph.nodes,s=f.graph.links)}}catch(y){d.e(y)}finally{d.f()}return{network:{nodes:u,links:s},time:++r,paused:e.paused}}return e}))}),u,[j,i,k]);return function(){clearInterval(e)}}),[j,i,u,k,_]);var O=a.a.createElement(a.a.Fragment,null,a.a.createElement(p.a,{onClick:function(){y((function(e){var t=e.network,n=e.time;return n===i.length&&e.paused&&(t=k,n=0),{network:t,time:n,paused:!e.paused}}))},variant:"light"},j.paused?a.a.createElement(m.a,null):a.a.createElement(g.a,null)),a.a.createElement(p.a,{onClick:function(){y((function(e){return{network:k,time:0,paused:!0}}))},variant:"light"},a.a.createElement(v.a,null)),a.a.createElement("p",null,j.time,"/",i.length));return a.a.createElement(a.a.Fragment,null,i.length>0?O:a.a.createElement(a.a.Fragment,null),a.a.createElement(f.a,Object.assign({graphData:j.network},b)))})),_=n(45),h=n(46),k=new _.a;u.a.render(a.a.createElement(a.a.StrictMode,null,a.a.createElement(h.a,{value:k},a.a.createElement(b,null))),document.getElementById("root"))}},[[51,1,2]]]);
//# sourceMappingURL=main.3cc30e2c.chunk.js.map