-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.f6cb1104cb6e009e012e.js
2 lines (2 loc) · 174 KB
/
main.f6cb1104cb6e009e012e.js
1
2
!function(e){function t(t){for(var i,o,c=t[0],s=t[1],l=t[2],d=0,m=[];d<c.length;d++)o=c[d],a[o]&&m.push(a[o][0]),a[o]=0;for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i]);for(u&&u(t);m.length;)m.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],i=!0,c=1;c<n.length;c++){var s=n[c];0!==a[s]&&(i=!1)}i&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var i={},a={0:0},r=[];function o(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=s;r.push([464,1]),n()}({464:function(e,t,n){n(465),e.exports=n(836)},836:function(e,t,n){"use strict";n.r(t);var i=n(0),a=n.n(i),r=n(50),o=n.n(r),c=(n(37),n(38),n(39),n(197),n(85),n(78),n(129),n(29),n(60),n(200),n(111),n(86),n(47),n(40),n(48),n(87),n(49),n(30),n(112),n(272),n(653),n(33),n(654),n(656),n(79),n(34),n(256),n(4)),s=n.n(c),l=n(52),u=n(175),d=n.n(u),m=n(228),p=n.n(m),h=n(227),f=n.n(h),y=n(229),g=n.n(y),_=n(12),b=n.n(_),v=n(140),w=n.n(v),k=n(174),S=n.n(k),E=n(99),C=n.n(E),O=n(297),I=n(403),q=n.n(I),P=n(404),T=n.n(P),M=n(405),x=n.n(M),A=n(406),N=n.n(A),j=n(402),R=n.n(j),L=n(23),G=n.n(L),B=n(3);function F(e){return(F="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})(e)}function D(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function z(e,t){return!t||"object"!==F(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Q=["Loading...","Burning Coal...","Deleting Steam Keys...","Exploiting Resources...","Petting Lizard Doggo...","Adding Pipes...","Adding Mana...","Spilling Coffee...","Becoming A Goat...","Charging Batteries...","Reticulating Splines"],K=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=z(this,H(t).call(this,e));var i="light";return i!==window.localStorage.getItem("nightMode")&&(i="dark"),n.state={night:i},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(t,a.a.Component),n=t,(i=[{key:"componentDidUpdate",value:function(e,t){!0!==this.props.ready||e.ready||this.props.parentState.setState({isReady:!0},function(){console.info('App set as "Ready"')})}},{key:"render",value:function(){var e=this.props;e.ready,e.parentState,e.classes;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"loader-spinner"}),a.a.createElement("div",{className:"align-loading"},a.a.createElement("div",{className:"'loading-text align-loading-text' ".concat("dark"===this.state.night?"dark-text":"")},Q[Math.floor(Math.random()*Q.length)])))}}])&&D(n.prototype,i),r&&D(n,r),t}(),U=Object(l.withStyles)(function(e){return{root:{}}})(K),V=(n(163),n(134),n(715),n(135),{lineObjectClass:"line-object",lineParentObjectClass:"lineParentObjectClass",lineHitboxObjectClass:"line-object-hitbox",lineStylingPathClass:"line-object-path-styled",lineStylingArrowClass:"line-object-arrow-styled",lineStylingFullClass:"line-object-combined-styled",overclockedTextClass:"overclockedTextClass",nodeVersionTextClass:"nodeVersionTextClass",nodeRequirementsIconClass:"nodeRequirementsIconClass",nodeSurplusIconClass:"nodeSurplusIconClass",nodeRequirementsSubIconClass:"nodeRequirementsSubIconClass",nodeProducesClass:"nodeProducesClass",nodeSurplusClass:"nodeSurplusClass",nodeProducesPerMinText:"nodeProducesPerMinText",nodeLimitingThroughputText:"nodeLimitingThroughputText",nodeLimitingThroughputClass:"nodeLimitingThroughputClass",lineLimitedThroughputText:"lineLimitedThroughputText",lineLimitedThroughputClass:"lineLimitedThroughputClass",selectedClass:"selected",selectedNodeClass:"selected-node",selectedLineClass:"selected-line",connectableClass:"potential-connectable-node",graphNodeClass:"graphMachineNode",graphNodeHoverClass:"graphNodeHoverClass",overclockedArcClass:"overclockedArcClass",graphNodeGrabbedClass:"graphNodeGrabbedClass",graphNodeIdBase:"graph-svg-node-",svgGraphClass:"graph-svg",activeEditId:"active-editing",BACKSPACE_KEY:8,DELETE_KEY:46,ENTER_KEY:13,nodeRadius:50}),J=(n(716),n(136),n(718),n(164),n(209),n(210),n(211),n(723),n(725),function(e,t){return Math.round(e/t)*t});var X=function(e){var t=["0"],n=[],i={},a={},r=[];return Object.keys(e).forEach(function(o){Object.keys(a).includes(o)||function o(c){if(a[c]=t[0],i[c]=t[0],t[0]=(parseInt(t[0],10)+1).toString(),n.push(c),(e[c]||[]).forEach(function(e){if(Object.keys(a).includes(e)){if(n.includes(e)){if(void 0===i[c]||void 0===i[e])throw new Error("Not defined: "+c+" "+e+" "+JSON.stringify(i)+" "+JSON.stringify(a));i[c]=Math.min(parseInt(i[c],10),parseInt(a[e],10)).toString()}}else{if(o(e),void 0===i[c]||void 0===i[e])throw new Error("Not defined: "+c+" "+e+" "+JSON.stringify(i));i[c]=Math.min(parseInt(i[c],10),parseInt(i[e],10)).toString()}}),i[c]===a[c]){for(var s=[];;){var l=n.pop();if(s.push(l),l===c)break}r.push(s.slice())}}(o)}),r},Y=(n(728),n(729),n(730),n(731),n(176)),Z=n(177),$=n.n(Z),ee=n(116),te=n.n(ee),ne=function(e,t){-1!==e.indexOf(t)&&e.splice(e.indexOf(t),1)},ie=function(e){return Object(Y.a)($.a.inflate(te.a.atob(e),{to:"string"}))},ae="eJzVXFtz27gV/isZPqcKDq5k3rrbdurpepNudrYPHo+HKzEOJ7KoUlTSTGb/e4EDXgAQpES51ky9a5sXATj4vnMF4Nx9Tw55Ux4e63z/qanqb8nbBJLXCd7/JW9yfU/1/X6bfyvq9gHTDw7Fui4afcOTP15/T74U9aGsdslbsiJgHuyqTXHQr4X+7LbcfTbX0nwU/79LlH6e6u9MfwMxP8ywYMYC0z9w88O0Bml+mM+DaQCmBSXJve6EmjbUtKGmDTVtqGlDTRtq2lDThpo2zIzCTAtmWjDTgpkWzLRgpgVTutvvyaadpmn6lK8/lbvC3JpO8u22+lpsbnZm5mR48O6IWJjey92hyXdr04SbgY57Deam+PXbHgHhZtxyo5F6nfwneQuc6AsNO/6uNI7rbbX+nLxVK+J9gX67L3YP5e7hsK2aA3aAT6pjg490Z2b0TfEffPflm/2l7/4kSd8boylkVL5OPvajf+yG11Pdbt7X1ZfSkscNPJ/yw4fqWK/tE4PVuto1uQZlc9MUT/jUgFfqmxv96qeq+nzcm6cG/2rflE/Hp3fOxOxHf/1UV8fHT+8tcAbq4uPHcl0Wu7URfJVllEjG25+Q2VaH90V9W+6ODcKboe61dAni0SUgoEvQkC7BfLoEH9MlREsXWLpoSxcEdFFBziCI9ASBRxBp6aAdHRCjQ8iQDqFidIh0AR0o+IgQkQWEQAR/SVz8JcybixzhLwP8ZQR/2eFPffxVgD+oRfBT3z7YYB8gOckkCwlRMULkiBAZJUQuIQRiBiJDPrSBpIRlFIRMJVVcRPhRHj8K5u1DjfhRZ9iH4i0/wucndGeULeKHheYRQq9ECL2SMeiVAdmnEkU72zxYhA0VcVdSQsqE4qnKKJUxd6U8d5WecFcphHSk1KcjZWM60o4OiXRkU9bC+CI6+Ck60hEdaZSOtKMj8wzrbNswco/oSGPRQxCquRCSQpqRmHWkHh2ZT0cW0pGNrCMLrCOLWEfWeS+FdLApOsiy4CFiwYPNuqps5KqyqKvKpl3VqXCQZUmEHD03F2cgvhsCQgOkgbAQaiDcxxqIGIMNRLZop9YXTbiipWhLD+3JUDGbSQFRIf5A0hgBQLJJBiLuaSVOEwOYYI+Z0Sm3ywwm3w4zwEJmMCn3mcEU3WUG0/WQGUzfDTOZZwfPZUZ5zEwluWyeGawqfGawxhgzQ8nFtgFYqowp0MWLSwGWMTNBAeiYARowEAsLQDvTAPACw4iBhYEhPRUYgI4Vn8YVH6s0LzYsitTx2ABY9i0ODsB822AnbYONvRYLvVbUNlhfYVCPmrDCWGoc2axxsADqaMEBbBQ1gEXDBrDL4waweODgfuDgQeDgo8DBxxTwkAIeCxy8tw7u+aeQArmsyAAyG6fjkPOxvfC4vfAlgULGqgoQlxmH8I1D0FPMiDEz4ixmhvLb1hdqIoNayky0/FazGRSMy2+I19+wqACfYCZS8J3BjF+SgzxpM+OqHMKyPM6M7CoNsKWGmIgoS5mhMWbEfAiXo+oDZLT8AKzPn8eMvKjaAOmVG6D8eiMSUNSoAAQVVICgYrG+L8lBeTbz3IACbH5RkQVWFPdv48Id4pU7qGmuToYU1Vmgz11bgh9wbFOy6E81ef2IK9kqABcr9BDc1C7xdous+6rcYc+2OI8KOxYDUzT9dH9jO9JPuC9YulwwMQgGrmDTa7MRwdRIsNQXDEuJXrLsLMmyQTLqSJZNp9NjybAg9yTLaCAZzEmWxSwl44NkzJVMLJFMjiRTgWTMlQzCwIcl90g0BzQ+iEbJAtAoCUGjJASNe6KF/iXGJyVsEE24ovEloomRaDIQTXiiwVmiqUE06Yo2HZAjomWhaEAC0aQrWnqOZOD4DeVIBgv8BoXQb1Dgc5KNivO4aI7nSF3RFngOCqHn0JFwVjRylmiOFWSOaDOV+Fg0OrICGlqB527pWaJRxwqAuLItMQM6MgMamkF2gWyOGQC4si2xAzqyAxbagVouG3MMAZxwQNkSS2AjS2CBJVAvUFldPuF0KXNjKHNlW2IKbGQKLDQF6sl2lgNhjimAGxH4ElvgI1vg8xHhnAhPuWsLbkjgS2yBj2yBh7bgy3ZOXkS5awtuTOBLbIGPbEFYW6iLdblHfWuL4l3+ZG/tsYljnW/xFiFamyMS+gb31cvNptC3H/PtobAJO/3j9Z22CXWvf7F7tzMRtj7si2LT5tjlbt+m6wfMsHTy7jyA6FDam5ojGg/Nt1Z6o+FtPfLQn+bQz5XzfL3NDwZUZtLoO3u8QdeBWtx7PNVhRCbYCk9q4BUe1zBXEs9f4JVRQo5XpgeBVwYfiVdmegqvzKxTvDLSZXiFB0FwECzEAEfB7VHAYbCwAhwHKyjAgbByAhwJaybAobBSAhwLyxLAwbAcARwNSxCKo2FFQXE0hXPC0VDlKI6GlQHF0VJrU9gx5vpWtDbJN8KRle7b+2K+Nul03tUmzOIHbcI8vdMH3P6KUEw0I1xzo1xNssm423JSk+A8TVLP0SQ0mju7s6yR8jQJocxIByVTK+FjlGFj+To19kLdWeJu3aS9dJNo6mNxhvVgKU3OnGXGIrOcsxdURCxEUPkyy7tRGLJKmf8VTN94R2RY3s9jaOsRPRJbzfdo4pTRl7vUQ3NKZ+gJNGMa1O7PXQ7mnMoYi2PthqOGU8dGb4KMeD6aEc9HM+L4aEYmfLQ0Pvoev4OOWlAy/Ao6usSwzlW5qGFZ2zCb0kY3mC63LEr6UuIhNzCLaX/YC/3QqohzfAdLJjM+3hgNcGA07/bHumzMeUHWlkcdGFjqDKiCY4sMK5jIXAEJ9EGF0G731deixprT687DlpyHLXsOtoBV9F27C81A+EoIeNikhxaknyhA+6CfpvLhSl24sjhcKqaEmPFOKGGbx80pIYsTcx5QjEIMKM0PAgVyRg1dsNrKLIiDXRibcXKMsi5QBEZv8b7jr/V/98PvQSgs2BhWYozKXkAsooaf7UCtsHbI1BeW0cxjFrceB2Zt5dMSgtVOTDFbZrnLLGNhy2c6YPkcBwzcqj/D/U2zOxCqv35lwxgfsWEx6qZ4ohP5v+hETXRiFs/HeuGAnk6bExuZEzvP79AzzYmTOXNS7Jmay/04yB2Vklqj6nz3GV1pPCrF/SRKhvmwLa7tkivj9idKylvzt/mNvpdDsrOoOcZ5rjqLX9ZYYuO0y4mIh0TmGJfqoaBTZEaow8JwgTgpNoIuZ/HEEQ4xmr9OnLhuwZQJL2MGx7XOFJZCaxvzyxojqUJcRiqqtegdxiWN1XMap89pnD2jcbvje2FjeE5jelljVBL5HA2TF2qYbSycxoOpSdm5dKzYcJ2hKc07u6KFqae5/Pcx3zWY+U6YoYoWgHZVCbs2upL8+XAonn7f6l6d64NJCppmf3j75k2df109ls2n4+/HQ1Gb7dFi16zW1dOb+lO11kGk+91+alVWb57yQ1PUb8qnxzeHvKmq7eFjvjZ/1vNgItfhTT/Qar97dAd+dft5pdMTB46JzNPDDNda+mBRF/u6OGgh86Z1hbgAE8/2X3SaP1b7fVE/vKuLdp4vOdhNXe2uNNRPWh8PTbW7xlg/Vvn2Wujd7B6r5ipzQr241nA4t/fbvLmaGv5Sba4w1Id1XXy9wjj/Kq9iVT/m2gNeRft25m8mrzHUL0W5+1jV62LzcFUlvK02x21eP/yt1hHiGvOs9M1VVES/Lo9PV/Lz/XDX8lT/PJbrz1+vY24fmqLYXm1mdrQfivzpaoO9L/fXwPGvu3V+MAa+2xwPTV3mV5xmfh2z+3uRf/n2cG2ncjs4FbMibvaNVzL1/hhbV/66ydGs63XbUvhBskp5+Ffb3Qfj2zl9Kk298gM3KW35wfvqg58uPnh0v2SoPZSpnBIdibTGHM2kE+/upesPZ6iWSOdJX4MglAbXATzu1x3CB0sOtRpdVqvRE7WaUl6tZkSkbpmEu8L9okykApooo2ivMmzlawzhjm7FtuuwFSVBM0cjqQ9WSjywcJv6As1iJzSr3fNG6TgE0skpJlPmC8dPCSenTjPMCycCte+JtPKSFQ0ljIwiottsZoGuLneP3ZouS2U7GJ5nbi3MXr+0fX3Q1/lj8dAP+HD7D+hcWQcG7t71Z2pYqry14NTZf7KnN+IFfA9dCBzuC5aF5XOq/UANcVfA3R22Ea5ZsM1o9NrRWhpfr9aWlrw/1oX+8G1Lx+01qLj14beDjpZZMndPKAt3doYNz5k9ntiOZxsKnrHHQxxzRmg7knEbIfmpeiwPTblOhssX1+39tmyafumqu/XQZL03ljFvnE3sPquZqc64iE6F8aDkYFCZXZ2ceitm3/p7w5l7zkdObBnyWen9rnpPi4ul1tPSJWGAxPcDB3umGDE/PBVbJKe7enHtsMN0ymHvRuE6c7Z37IEnd1P1kkMa4lkHCbgbNCMatvRFclvUjwj7i7o2HKQLKy22nAyLwSpifPZ9BMF0zs+YPwZ69YMmU1P5CrzhYKCSi35rLH6KgcU44a2P63tkQ49Skr5LfirTdrvkfpdi6DIbehRTqhTrUQ4qIsmpcmL0Ma888V6Mc0sfbeahrRJnLzRC7sQZRCdjVSRIUf3hhmxs0gfLUa7x//H4hSaUtIXxKyyME3PAEM9pcSCJe5DB7my1QWRyS8bwf2vV79XP5tiXvsVkJbkx33W1e/VLtcFRALz+lXvY0v4pZjTEJsOq5CvsD1clbY8U5WZ+v+6hZzXhPcDkd9bNJze9pE7P3OvTFkOdrNNH/BJc47Y9CL8H9yC3/QegJnyadzhwYhcMD7ChyO/qVmCJUODhDU2nOzRMcIe60KWX9Ep5Le1CbeL+A35pNx1c37MTSvUk3IhsPnebBObPXW+Dp9V6fz72NnRCGXjoVITbKx5R6116pNcJnkTYq/R6HXJOEe11Rsk0GMi/UdzvTurFggWI734B7C3mfPdTNi8Nc9/xUak+vKPuSxF2Smd6hZE0PS7CK8/YxGkir4n0msh4E5iUAEOlAdVAfvOb9WBGjPbSdP8b+oinva0If67qJ+1O7/8L8fAWAA==",re=["stg","opt"],oe=function(e){var t={};return window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(e,n,i){t[n]=i}),t.useExperimentalFeatures=t.useExperimentalFeatures||"",(t.useExperimentalFeatures||"").split(",").includes(e)||"all"===t.useExperimentalFeatures||re.includes(e)};function ce(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var se=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.length=this.data.length,this.compare=n,this.reheapify()}var t,n,i;return t=e,(n=[{key:"reheapify",value:function(){if(this.length>0)for(var e=(this.length>>1)-1;e>=0;e--)this._down(e)}},{key:"size",value:function(){return this.data.length}},{key:"remove",value:function(e){ne(this.data,e),this.length=this.data.length}},{key:"push",value:function(e){this.data.push(e),this.length++,this._up(this.length-1)}},{key:"pop",value:function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}}},{key:"peek",value:function(){return this.data[0]}},{key:"_up",value:function(e){for(var t=this.data,n=this.compare,i=t[e];e>0;){var a=e-1>>1,r=t[a];if(n(i,r)>=0)break;t[e]=r,e=a}t[e]=i}},{key:"_down",value:function(e){for(var t=this.data,n=this.compare,i=this.length>>1,a=t[e];e<i;){var r=1+(e<<1),o=t[r],c=r+1;if(c<this.length&&n(t[c],o)<0&&(r=c,o=t[c]),n(o,a)>=0)break;t[e]=o,e=r}t[e]=a}}])&&ce(t.prototype,n),i&&ce(t,i),e}();function le(e,t){return e<t?-1:e>t?1:0}var ue=n(31),de=n.n(ue),me=n(392),pe=n.n(me),he=n(296),fe=n.n(he),ye=n(393),ge=n.n(ye),_e=n(90),be=n.n(_e),ve=n(89),we=n.n(ve);function ke(e){return(ke="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})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qe=function(e){function t(e){var n,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=Ee(t).call(this,e),n=!a||"object"!==ke(a)&&"function"!=typeof a?Ce(i):a,Ie(Ce(n),"handleChangeMultiple",function(e){for(var t=e.currentTarget.parentElement.children,i=[],a=0,r=t.length;a<r;a+=1)t[a].getAttribute("value")===e.currentTarget.getAttribute("value")?-1===n.state.selectedDrives.indexOf(t[a].getAttribute("value"))&&i.push(t[a].getAttribute("value")):t[a].querySelector("input").checked&&i.push(t[a].getAttribute("value"));n.setState({selectedDrives:i})}),Ie(Ce(n),"handleCheckboxChange",function(){n.props.parentState.graphSvg.setState({snapToGrid:!n.props.parentState.graphSvg.state.snapToGrid},function(){n.setState({checked:n.props.parentState.graphSvg&&n.props.parentState.graphSvg.state.snapToGrid})})}),Ie(Ce(n),"showHideLines",function(){n.setState({showAllLines:!n.state.showAllLines},function(){n.state.showAllLines?B.m(".link-has-no-problems").classed("hiddenGraphElement",!1):B.m(".link-has-no-problems").classed("hiddenGraphElement",!0),B.m(".link-has-problems").classed("hiddenGraphElement",!1)})}),n.state={playerUnlock:n.props.playerUnlock.player_unlock,recipe:n.props.playerUnlock.recipe,selectedDrives:[],checked:!0,showAllLines:!0},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oe(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.parentState;e.playerUnlock;return a.a.createElement(de.a,{className:t.paper},a.a.createElement(b.a,{variant:"h5"},"Settings"),a.a.createElement(we.a,{control:a.a.createElement(be.a,{checked:this.state.checked,onChange:this.handleCheckboxChange,value:"snapToGrid",className:t.checkbox}),label:"Snap To Grid",className:t.checkboxLabel}),a.a.createElement(we.a,{control:a.a.createElement(be.a,{checked:this.state.showAllLines,onChange:this.showHideLines,value:"snapToGrid",className:t.checkbox}),label:"Show All Belts",className:t.checkboxLabel}),oe("nodePhysics")?a.a.createElement(G.a,{className:t.button,fullWidth:!0,onClick:function(){n.graphSvg.jiggle()}},a.a.createElement(pe.a,null),a.a.createElement("div",{className:t.label},"Rejiggle Graph")):null,a.a.createElement(G.a,{className:t.button,fullWidth:!0,onClick:function(){n.graphSvg.resetCamera()}},a.a.createElement(fe.a,null),a.a.createElement("div",{className:t.label},"Reset Camera")),oe("nodePhysics")?a.a.createElement(a.a.Fragment,null,a.a.createElement(G.a,{className:t.button,fullWidth:!0,onClick:function(){n.graphSvg.fixNodes()}},a.a.createElement(fe.a,null),a.a.createElement("div",{className:t.label},"Fix Nodes")),a.a.createElement(G.a,{className:t.button,fullWidth:!0,onClick:function(){n.graphSvg.unfixNodes()}},a.a.createElement(ge.a,null),a.a.createElement("div",{className:t.label},"Unfix Nodes"))):null)}}])&&Se(n.prototype,i),r&&Se(n,r),t}(),Pe=Object(l.withStyles)(function(e){return{root:{},paper:{margin:16,padding:12,display:"flex",flexDirection:"column",flexShrink:0},textField:{paddingBottom:10},button:{flex:1,marginTop:10,textAlign:"left",justifyContent:"left"},label:{paddingLeft:10},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:e.spacing.unit/4},tooltip:{},tooltipIcon:{height:40,display:"inline-block",paddingLeft:10},tooltipIconFirst:{height:40,display:"inline-block"},tooltipText:{fontSize:18,display:"inline-block"},checkbox:{paddingLeft:22},checkboxLabel:{height:30,paddingTop:30,paddingBottom:16,fontFamily:"Roboto sans-serif",fontWeight:"bold"}}})(qe);function Te(e){return(Te="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})(e)}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Ae=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=new Set(Object.keys(this.nodeIn));Object.keys(this.nodeOut).forEach(function(e){return n.add(e)});var i=Array.from(n),a={};i.forEach(function(t,n){i[n]=e.graphData.nodes.filter(function(e){return e.id.toString()===t})[0],a[i[n].id]=i[n],i[n].childProvides=[],i[n].hasSources=new Set,i[n].infiniteSource||(i[n].containedItems=[]),"Container"!==i[n].machine.name&&"Logistic"!==i[n].machine.name||(i[n].allowedIn=[],i[n].infiniteSource||(i[n].allowedOut=[]))});var r={};Object.keys(this.nodeOut).forEach(function(t){var n=e.nodeOut[t];r[t]=new Set(n.map(function(e){return e.id.toString()}))});var o=X(r),c={};this.singleToGroupNodeLookup={};var s={},l={};o.forEach(function(t,n){c[n]=t,(t||[]).forEach(function(t){e.singleToGroupNodeLookup[t]=n}),s[n]=t.map(function(e){return a[e]}),t.forEach(function(e){l[e]=n})});var u={};Object.keys(this.nodeOut).forEach(function(t){var n=e.nodeOut[t].map(function(e){return e.id}),i=l[t];u[i]=u[i]||new Set;var a=u[i];n.forEach(function(e){var t=l[e];t!==i&&a.add(t)})});var d={},m={};Object.keys(this.nodeOut).forEach(function(t){var n=e.nodeOut[t].map(function(e){return e.id}),i=l[t];d[i]=d[i]||new Set,m[i]=m[i]||new Set,n.forEach(function(e){var t=l[e];t!==i&&(d[t]||(d[t]=new Set,m[t]=new Set),d[t].add(i),m[t].add(i))})});var p=new se(Array.from(new Set([].concat(xe(Object.keys(u)),xe(Object.keys(d))))),function(e,t){return(d[e]||[]).size-(d[t]||[]).size}),h={},f={};this.props.parentAccessor.state.recipe.item.forEach(function(e){f[e.id]=e.icon}),this.graphData.nodes.forEach(function(t){if(delete t.efficiency,delete t.itemThroughPut,delete t.itemsPerMinute,delete t.internalError,t.data&&t.data.recipe&&!t.data.node&&e.props.parentAccessor.state&&e.props.parentAccessor.state.recipe&&e.props.parentAccessor.state.recipe.recipe&&oe("forceRecalculate")){var n=e.props.parentAccessor.state.recipe.recipe.filter(function(e){return e.id===t.data.recipe.id}),i=e.props.parentAccessor.state.machine_node.machine_node.filter(function(e){return e.id===t.instance.id});n.length>0&&(t.data.recipe=n[0],console.log("Replaced recipe",n[0])),i.length>0&&(t.instance=i[0],console.log("Replaced node",i[0]))}t.itemIconLookup=f}),this.graphData.links.forEach(function(e){delete e.itemThroughPut,delete e.tempIndex,delete e.forceOverwritable,e.itemIconLookup=f});for(var y=function(){var n=p.pop(),i=s[n],a=Array.from(u[n]||new Set);!function(n,i,a,r){var o=[];if(1===n.length){var c=n[0],l=null,d=null,m=c.instance.speed/100,p=c.overclock/100,f=h[c.id]||[];if(c.data.node){var y=c.data.recipe,g=c.data.purity,_=y.purities.filter(function(e){return e.name===g});if(1!==_.length)throw new Error("Trying to get purity",g,"wtf?");var b=_[0];l={speed:m,overclock:p,quantity:b.quantity,item:y.item.id,time:60,power:c.instance.power,inputs:[]},d=1;var v=l.quantity/l.time*60*c.instance.speed/100*l.overclock;o.push({throughput:l,efficiency:d,source:a}),n.forEach(function(e){e.efficiency=d,e.itemsPerMinute=Me({},l.item,v),e.optimumOverclock=2.5,e.itemThroughPut=Me({},l.item,{max:v,actual:v})})}else if("Logistic"===c.machine.name&&"Splitter"===c.instance.name){var w={},k=new Set;f.forEach(function(t){var i=JSON.parse(JSON.stringify(t));i.maxItemsPerSecLimiter=i.calculatedItemPerSecond,i.reconstructionMultiplier=(e.nodeOut[n[0].id]||[]).length||1;var a=i.throughput.item;k.add(a);var r=i.calculatedItemPerSecond;w[a]=w[a]||0,w[a]+=60*r,o.push(i)}),n.forEach(function(e){e.efficiency=1,e.itemsPerMinute={},e.itemThroughPut={},k.forEach(function(t){var n=w[t];e.itemsPerMinute[t]=n,e.itemThroughPut[t]={max:n,actual:n}})})}else if("Logistic"===c.machine.name&&"Merger"===c.instance.name){var S={},E=new Set;f.forEach(function(e){var t=JSON.parse(JSON.stringify(e)),n=t.throughput.item;E.add(n);var i=t.calculatedItemPerSecond;S[n]=S[n]||0,S[n]+=60*i,o.push(t)}),n.forEach(function(e){e.efficiency=1,e.itemsPerMinute={},e.itemThroughPut={},E.forEach(function(t){var n=S[t];e.itemsPerMinute[t]=n,e.itemThroughPut[t]={max:n,actual:n}})})}else if("Container"===c.machine.name)if(c.infiniteSource){var C=0;(c.allowedOut||[]).forEach(function(e){l={speed:1,overclock:1,quantity:c.quantityPerInfinite||0,item:e,time:c.timePerInfinite||1,power:0,inputs:[]},d=1,C=l.quantity/l.time*60,o.push({throughput:l,efficiency:d,source:a})});var O={},I={};o.forEach(function(e){I[e.throughput.item]={max:C,actual:C},O[e.throughput.item]=C}),n.forEach(function(e){e.efficiency=d,e.itemsPerMinute=O,e.optimumOverclock=1,e.itemThroughPut=I})}else{var q={},P=new Set;f.forEach(function(e){var t=e.throughput.item;P.add(t);var n=e.calculatedItemPerSecond;q[t]=q[t]||0,q[t]+=60*n,o.push(e)}),n.forEach(function(e){e.efficiency=1,e.itemsPerMinute={},P.forEach(function(t){var n=q[t];e.itemsPerMinute[t]=n,e.itemThroughPut=Me({},t,{max:n,actual:n})})})}else{l={speed:m,overclock:p,quantity:c.data.recipe.quantity,item:c.data.recipe.item.id,time:c.data.recipe.time,power:c.data.recipe.power,inputs:c.data.recipe.inputs.map(function(e){return{item:e.item.id,quantity:e.quantity}})};var T={},M=new Set;f.forEach(function(e){var t=e.throughput.item;M.add(t);var n=e.calculatedItemPerSecond;T[t]=T[t]||0,T[t]+=60*n});var x=new Set,A=[1/0],N=[2.5],j=l.quantity/l.time*60*c.instance.speed/100;l.inputs.forEach(function(e){var t=e.item,n=e.quantity,i=T[t]||0,a=Math.min(i/(j||1)*(l.quantity/(n||1)),2.5);N.push(a)});var R=Math.round(Math.ceil(100*Math.min.apply(Math,N)));t&&(l.overclock=R/100);var L=l.quantity/l.time*60*c.instance.speed/100*l.overclock;l.inputs.forEach(function(e){var t=e.item,n=e.quantity,i=T[t]||0;M.has(t)||x.add(t);var a=L*(n/l.quantity),r=L*(Math.min(a,i)/a),o=a;c.itemThroughPut=c.itemThroughPut||{},c.itemThroughPut[t]=c.itemThroughPut[t]||{max:0,actual:0},c.itemThroughPut[t].max+=o,c.itemThroughPut[t].actual+=i;var s=r/L;A.push(Math.min(1,s))}),d=x.size>0?0:Math.min.apply(Math,A),o.push({throughput:l,efficiency:d,source:a}),n.forEach(function(e){e.efficiency=d,e.overclock=100*l.overclock,e.optimumOverclock=R,e.itemsPerMinute=Me({},l.item,L*d)})}var G=0,B=0,F={},D=[];(u[a]||[]).forEach(function(t){var i=n.map(function(e){return e.id}),a=s[t].map(function(e){return e.id});i.forEach(function(t){a.forEach(function(n){var i=e.graphData.links.filter(function(e){return e.source.id===t&&e.target.id===n}),a=null;if(i&&1===i.length)a=i[0],D.push({source:t,target:n,speed:a.instance.speed,link:a}),B+=a.instance.speed;else if(i&&i.length>1)throw new Error("Too many links found!!!")})})});var z=o.map(function(e){var t=e.throughput.quantity,n=e.throughput.time,i=e.efficiency,a=e.throughput.overclock,r=e.throughput.speed,o=e.throughput.item,c=void 0===e.maxItemsPerSecLimiter?1/0:e.maxItemsPerSecLimiter,s=Math.min(t/n*i*a*r||0,c);return F[o]=F[o]||0,F[o]+=s,s}).reduce(function(e){return e+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)},0);G+=z,D.sort(function(e,t){return e.speed-t.speed});var H=1;60*G>B||(H=0);var W=60*G,Q=D.length;D.forEach(function(e){var t=e.target,n=e.speed;if(h[t]=h[t]||[],1===H){var i=n/B;e.fraction=i}else if(W/Q>n){W-=n;var a=n/(60*G);e.fraction=a}else{var r=W/Q;W-=r;var o=r/(60*G);e.fraction=o}Q-=1}),D.forEach(function(e){e.source;var t=e.target,n=e.speed,i=e.link,a=e.fraction||1,r=n;h[t]=h[t]||[],o.forEach(function(e){var n=JSON.parse(JSON.stringify(e)),o=n.throughput.quantity,c=n.throughput.time,s=n.efficiency,l=n.throughput.overclock,u=n.throughput.speed,d=n.throughput.item,m=void 0===n.maxItemsPerSecLimiter?1/0:n.maxItemsPerSecLimiter,p=Math.min(o/c*s*l*u||0,m),f=r/60,y=60*f;n.maxItemsPerSecLimiter=Math.min(f*(m/G),y*(m/G),f,m,p*a),n.calculatedItemPerSecond=n.maxItemsPerSecLimiter,i.itemThroughPut=i.itemThroughPut||{},i.itemThroughPut[d]=i.itemThroughPut[d]||{max:0,actual:0},i.itemThroughPut[d].max+=p/(G||1)*y,i.itemThroughPut[d].actual+=60*p*a,h[t].push(n)})})}else{var K=new Set;n.forEach(function(e){K.add(e.id),(h[e.id]||[]).forEach(function(e){var t=JSON.parse(JSON.stringify(e));o.push(t)})});var U={};n.forEach(function(t){JSON.parse(JSON.stringify(h[t.id]||[])).forEach(function(n){var a=function(t,n,a){for(var r=0,o=n.calculatedItemPerSecond,c=Me({},t.id,60*o),s=t.id,l=Me({},t.id,60*o),u=Me({},t.id,60*o),d=function(){var n=new Set,o=[t];n.add(t.id);for(var d=function(){var t=o.pop(),i=c[t.id];"Logistic"===t.machine.name&&"Splitter"===t.instance.name?i/=(e.nodeOut[t.id]||[]).length||1:"Logistic"===t.machine.name&&"Merger"===t.instance.name||t.machine.name,e.nodeOut[t.id].forEach(function(n){if(a.has(n.id)){var r=e.graphData.links.filter(function(e){return e.source.id===t.id&&e.target.id===n.id});if(r&&1!==r.length)throw new Error("Too many links found!!!");r[0].instance.speed,c[n.id]=c[n.id]||0,c[n.id]+=i}}),(e.nodeOut[t.id]||[]).forEach(function(e){!n.has(e.id)&&a.has(e.id)&&(n.add(e.id),o.push(e))})};o.length;)d();var m=c[s]-l[s];if(!i.length||m>l||0===Math.round(1e6*m)||998===r)return Object.keys(c).forEach(function(e){u[e]=Math.round(100*u[e])/100}),{v:u};c[s]-=l[s],Object.keys(c).forEach(function(e){u[e]=u[e]||0,u[e]+=c[e]}),l[s]=m,c=Me({},s,m),r++};r<999;){var m=d();if("object"===Te(m))return m.v}}(t,n,K),r=n.throughput.item;Object.keys(a||[]).forEach(function(e){U[e]=U[e]||{},U[e][r]=U[e][r]||0,U[e][r]+=a[e]})})}),n.forEach(function(t){e.nodeOut[t.id].forEach(function(n){if(K.has(n.id)){var i=e.graphData.links.filter(function(e){return e.source.id===t.id&&e.target.id===n.id});if(i&&1!==i.length)throw new Error("Too many links found!!!");var a=i[0],r=a.instance.speed,o=Object.keys(U[t.id]||{}).map(function(e){return U[t.id][e]}).reduce(function(e){return e+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)},0);Object.keys(U[t.id]||{}).forEach(function(n){var i=U[t.id][n];a.itemThroughPut=a.itemThroughPut||{},a.itemThroughPut[n]=a.itemThroughPut[n]||{max:0,actual:0},a.itemThroughPut[n].max=i/(o||1)*r,a.itemThroughPut[n].actual+=i/((e.nodeOut[t.id]||[]).length||1),a.forceOverwritable=!0})}})}),n.forEach(function(e){e.itemsPerMinute={},e.efficiency=1,n.forEach(function(t){(h[t.id]||[]).forEach(function(t){var n=JSON.parse(JSON.stringify(t)).throughput.item;e.itemsPerMinute[n]=U[e.id][n]||0})})}),(u[a]||[]).forEach(function(t){var i=n.map(function(e){return e.id}),a=s[t].map(function(e){return e.id});i.forEach(function(t){a.forEach(function(i){var a=e.graphData.links.filter(function(e){return e.source.id===t&&e.target.id===i}),r=null;if(a&&1===a.length){var o=(r=a[0]).instance.speed,c=Object.keys(U[t]||{}).map(function(e){return U[t][e]}).reduce(function(e){return e+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)},0);Object.keys(U[t]||{}).forEach(function(n){var i=U[t][n];r.itemThroughPut=r.itemThroughPut||{},r.itemThroughPut[n]=r.itemThroughPut[n]||{max:0,actual:0},r.itemThroughPut[n].max=i/c*o,r.itemThroughPut[n].actual+=i/((e.nodeOut[t]||[]).length||1),r.forceOverwritable=!0}),n.forEach(function(n){var a=h[n.id]||[],r={};a.forEach(function(e){var t=e.throughput.item;r[t]=r[t]||[],r[t].push(e)}),Object.keys(r).forEach(function(n){var a=r[n],c=a.map(function(e){return e.calculatedItemPerSecond}).reduce(function(e){return e+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)},0);a.forEach(function(a){var r=JSON.parse(JSON.stringify(a)),s=r.calculatedItemPerSecond/c;r.calculatedItemPerSecond=s/60*(U[t][n]/((e.nodeOut[t]||[]).length||1)),r.calculatedItemPerSecond=Math.min(r.calculatedItemPerSecond,o/60),r.maxItemsPerSecLimiter=r.calculatedItemPerSecond;var l=r;(l.throughput.quantity/l.throughput.time*l.efficiency*l.throughput.overclock*l.throughput.speed||0)<r.calculatedItemPerSecond&&(l.throughput.overclock=1/0),h[i]=h[i]||[],h[i].push(l)})})})}else if(a&&a.length>1)throw new Error("Too many links found!!!")})})})}}(i,a.map(function(e){return s[e]}),n),Object.keys(d).forEach(function(e){d[e].delete(parseInt(n,10))}),p.reheapify()};p.size();)y();Ze("efficiency",59,322)},Ne=function(e,t,n){var i=this,a=this,r=this.graphData.nodes,o=this.graphData.links;this.nodeIn={},this.nodeOut={},o.forEach(function(e){var t=e.source.id,n=e.target.id;i.nodeOut[t]=i.nodeOut[t]||[],i.nodeIn[n]=i.nodeIn[n]||[],i.nodeOut[t].push(e.target),i.nodeIn[n].push(e.source)}),r.forEach(function(e){var t=e.instance.input_slots,n=e.instance.output_slots;e.open_in_slots=t-(a.nodeIn[e.id]||[]).length,e.open_out_slot=n-(a.nodeOut[e.id]||[]).length}),Ge.call(a);var c=B.c().clickDistance(10).on("start",function(t){console.debug("[Debug] Dragstart"),function(e,t,n){n.state&&n.state.shiftHeld?n.setState({mouseDragSource:e}):(B.d.active||t.alphaTarget(.3).restart(),n.setState({wasFixed:null!==e.fx&&null!=e.fy}))}.call(i,t,e,a)}).on("drag",function(e){console.debug("[Debug] Dragging"),function(e,t){t.state&&t.state.shiftHeld?t.dragLine.classed("hidden",!1).attr("d","M"+e.x+","+e.y+"L"+B.k(t.svgGroup.node())[0]+","+B.k(t.svgGroup.node())[1]):(e.fx=B.d.x,e.fy=B.d.y,t.setState({wasMoved:!0}))}.call(i,e,a)}).on("end",function(t){console.debug("[Debug] Drag end"),function(e,t,n){t.state&&t.state.shiftHeld?(t.state.mouseOverNode&&(t.state.mouseDragSource,t.state.mouseOverNode,Be.call(void 0,t,t.state.mouseDragSource,t.state.mouseOverNode)),t.dragLine.classed("hidden",!0).attr("d","M0,0L0,0")):t.state&&t.state.wasMoved?(t.state.snapToGrid&&e.fx&&(e.fx=J(e.fx,100),e.fy=J(e.fy,100)),e.x=e.fx,e.y=e.fy):t.state&&!t.state.wasFixed&&(e.fx=null,e.fy=null);B.l("."+V.graphNodeGrabbedClass).classed(V.graphNodeGrabbedClass,!1),t.setState({shiftHeld:!1,wasMoved:!1,wasFixed:!1})}.call(this,t,a,e)}),s=t.selectAll(".node-data-class").data(r,function(e){return e.id}),l=s.enter().append("g").classed("node-data-class",!0).attr("id",function(e){return e.id||null}).on("wheel.zoom",function(e){console.debug("Wheel zoom"),tt.call(this,e)}).on("click",function(e){console.debug("Clicked"),B.d.stopImmediatePropagation(),Qe.call(this,e,a)}).on("dblclick",function(e){console.debug("Double clicked"),B.d.stopImmediatePropagation(),Ke(a),oe("nodePhysics")&&(e.fx=null,e.fy=null)}).on("mouseover",function(e){Ue.call(this,e,a)}).on("mouseout",function(e){Ve.call(this,e,a)}).on("mousedown",function(e){Je.call(this,e,a)}).on("mouseup",function(e){Xe.call(this,e,a)}).call(c);s.exit().remove(),l.append("circle").classed(V.graphNodeClass,!0).attr("cursor","pointer").attr("r",function(e){return 50});Ye(l,"efficiency",59,322),$e(l),st(l),ct(l),rt.call(a,l),s=l.merge(s);var u=n.selectAll(".link-data-class").data(o,function(e){return e.source.id+"-"+e.target.id}),d=u.enter().append("g").classed("link-data-class",!0),m=(u.exit().remove(),d.append("g").attr("id",function(e){return"path-parent"+e.source.id+"-"+e.target.id}).classed(V.lineParentObjectClass,!0));m.append("path").classed(V.lineStylingPathClass,!0).classed(V.lineStylingFullClass,!0).attr("display","none").attr("stroke","orange").attr("stroke-width",10),m.append("path").classed(V.lineStylingArrowClass,!0).classed(V.lineStylingFullClass,!0).attr("display","none").attr("stroke",null).attr("marker-end","url(#highlight-path-arrow-orange)").attr("stroke-width",3),m.append("path").classed(V.lineObjectClass,!0).attr("stroke",function(e){return B.b("#000000")}).attr("marker-end","url(#default-path-arrow)"),He.call(this,m),m.append("path").classed(V.lineHitboxObjectClass,!0).on("mouseover",function(e){}).on("mouseout",function(e){}).on("click",function(e){Fe.call(this,e,a)}),u=d.merge(u),e.nodes(r).on("tick",function(){Re.call(i,s,u,e)}).on("end",function(){console.log("Simulation Ended!")}),e.force("link").links(o),[].forEach(function(e){return e()}),e.alphaTarget(.3).restart()},je=function(e){e.setState({selectedPath:null,selectedNode:null}),B.m("."+V.lineStylingFullClass).attr("display","none"),Ke(e)},Re=function(e,t,n){var i=100*n.alpha();e.attr("transform",function(e){return"translate("+e.x+","+e.y+")"}).attr("cx",function(e){return e.x}).attr("cy",function(e){return e.y}),t.selectAll("line").attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y}),t.selectAll("path").attr("d",function(e){return"M "+e.source.x+" "+e.source.y+" L "+e.target.x+" "+e.target.y}),ze.call(this,t),t.selectAll("."+V.lineObjectClass).each(function(e){e.source.vx+=i,e.target.vx-=i})};function Le(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Ge=function(){var e=this,t=new Set(Object.keys(this.nodeIn));Object.keys(this.nodeOut).forEach(function(e){return t.add(e)});var n=Array.from(t),i={};n.forEach(function(t,a){n[a]=e.graphData.nodes.filter(function(e){return e.id.toString()===t})[0],i[n[a].id]=n[a],n[a].childProvides=[],n[a].hasSources=new Set,n[a].infiniteSource||(n[a].containedItems=[]),"Container"!==n[a].machine.name&&"Logistic"!==n[a].machine.name||(n[a].allowedIn=[],n[a].infiniteSource||(n[a].allowedOut=[]))});var a={};Object.keys(this.nodeOut).forEach(function(t){var n=e.nodeOut[t];a[t]=new Set(n.map(function(e){return e.id.toString()}))});var r=X(a),o={},c={},s={};r.forEach(function(e,t){o[t]=e,c[t]=e.map(function(e){return i[e]}),e.forEach(function(e){s[e]=t})});var l={};Object.keys(this.nodeOut).forEach(function(t){var n=e.nodeOut[t].map(function(e){return e.id}),i=s[t];l[i]=l[i]||new Set;var a=l[i];n.forEach(function(e){var t=s[e];t!==i&&a.add(t)})});var u={},d={};Object.keys(this.nodeOut).forEach(function(t){var n=e.nodeOut[t].map(function(e){return e.id}),i=s[t];u[i]=u[i]||new Set,d[i]=d[i]||new Set,n.forEach(function(e){var t=s[e];t!==i&&(u[t]||(u[t]=new Set,d[t]=new Set),u[t].add(i),d[t].add(i))})});for(var m=new se(Array.from(new Set([].concat(Le(Object.keys(l)),Le(Object.keys(u))))),function(e,t){return(u[e]||[]).size-(u[t]||[]).size}),p={},h=[],f=function(){var e=m.pop();h.push(e);var t,n,i,a,r,o=c[e],s=Array.from(l[e]||new Set);s.map(function(e){return c[e]});t=o,n=e,i=s,a=[],r=new Set,t.forEach(function(e){"Container"!==e.machine.name&&"Logistic"!==e.machine.name?a.push({item:e.data.recipe,source:n}):e.infiniteSource?e.childProvides=[]:(e.childProvides=p[n]||[],e.childProvides.forEach(function(e){r.has(e.source)||(a.push(e),r.add(e.source))}),e.allowedIn=e.childProvides.map(function(e){return e.item.item.id}),e.allowedOut=e.childProvides.map(function(e){return e.item.item.id}),e.containedItemsMap=e.childProvides.map(function(e){return{item:e.item.item,source:e.source}}),e.containedItems=e.childProvides.map(function(e){return e.item.item}))}),i.forEach(function(e){p[e]||(p[e]=[]),a.forEach(function(t){new Set(p[e].map(function(e){return e.source})).has(t.source)||p[e].push(t)})}),Object.keys(u).forEach(function(t){u[t].delete(parseInt(e,10))}),m.reheapify()};m.size();)f();for(;h.length;){var y=h.pop(),g=c[y],_=Array.from(l[y]||new Set);!function(e,t,n,i){var a=new Set;t.forEach(function(e){return e.forEach(function(e){e.infiniteSource||e.allowedIn.forEach(function(e){return a.add(e)})})}),e.forEach(function(e){"Container"!==e.machine.name&&"Logistic"!==e.machine.name||0===e.allowedIn.length&&0===e.allowedOut.length&&(e.infiniteSource||(e.allowedIn=Array.from(a)),e.allowedOut=Array.from(a))})}(g,_.map(function(e){return c[e]}))}},Be=function(e,t,n){if(t.id!==n.id){var i=(t.allowedIn||[]).length>0||(t.allowedOut||[]).length>0,a=(n.allowedIn||[]).length>0||(n.allowedOut||[]).length>0,r=["Container","Logistic"].includes(t.machine.name),o=["Container","Logistic"].includes(n.machine.name),c=["Logistic"].includes(t.machine.name)&&["Merger"].includes(t.instance.name),s=["Logistic"].includes(n.machine.name)&&["Merger"].includes(n.instance.name),l=n.instance.input_slots===(e.nodeIn[n.id]?e.nodeIn[n.id].length:0);t.instance.output_slots,e.nodeOut[t.id]&&e.nodeOut[t.id].length;console.error(i,a,r,o,l);var u=e.props.parentAccessor.state.path_type.path_type;u.sort(function(e,t){return e.rank-t.rank});var d=u.filter(function(e){return e.rank>=0}),m=d[0],p={source:t,target:n,instance:m,upgradeTypes:d};if(r&&!i||o&&!a||c||s){if(n.infiniteSource)return;var h=t.id,f=n.id,y=e.nodeOut[h]?e.nodeOut[h].length:0,g=e.nodeIn[f]?e.nodeIn[f].length:0;if(y>=t.instance.output_slots||g>=n.instance.input_slots)return void e.updateGraphHelper();0===e.graphData.links.filter(function(t){return t.source.id===p.target.id&&t.target.id===p.source.id&&De(t,e),t.source.id===p.source.id&&t.target.id===p.target.id||p.source.id===p.target.id}).length&&e.graphData.links.push(p),e.updateGraphHelper()}else{if(n.infiniteSource)return;var _=n.allowedIn.filter(function(e){return t.allowedOut.includes(e)}),b=t.id,v=n.id,w=e.nodeOut[b]?e.nodeOut[b].length:0,k=e.nodeIn[v]?e.nodeIn[v].length:0;if(w>=t.instance.output_slots||k>=n.instance.input_slots||_.length<=0)return void e.updateGraphHelper();0===e.graphData.links.filter(function(t){return t.source.id===p.target.id&&t.target.id===p.source.id&&De(t,e),t.source.id===p.source.id&&t.target.id===p.target.id||p.source.id===p.target.id}).length&&e.graphData.links.push(p),e.updateGraphHelper()}}},Fe=function(e,t){B.d.stopImmediatePropagation();var n=B.l(this.parentElement);t.state&&t.state.selectedPath&&t.state.selectedPath===e?je.call(this,t):(je.call(this,t),B.m("."+V.lineStylingFullClass).attr("display","none"),t.setState({selectedPath:e}),n.selectAll("."+V.lineStylingFullClass).attr("display","inherit"))},De=function(e,t){if(-1===t.graphData.links.indexOf(e))throw new Error("d not found in graph links: "+JSON.stringify(e));var n=e.source.id,i=e.target.id;"Container"!==e.target.machine.name&&"Logistic"!==e.target.machine.name||(e.target.childProvides=e.target.childProvides.filter(function(e){return e.source!==""+n}),e.target.containedItemsMap&&(e.target.containedItemsMap=e.target.containedItemsMap.filter(function(e){return e.source!==""+n}),e.target.containedItems=e.target.containedItemsMap.map(function(e){return e.item})),e.target.allowedIn=e.target.childProvides.map(function(e){return e.item.item.id}),e.target.allowedOut=e.target.childProvides.map(function(e){return e.item.item.id})),ne(t.nodeOut[n],e.target),ne(t.nodeIn[i],e.source),ne(t.graphData.links,e),"Container"!==e.source.machine.name&&"Logistic"!==e.source.machine.name||0!==(t.nodeIn[e.source.id]||[]).length||(e.source.childProvides=[],e.source.containedItems=[],e.source.containedItemsMap=[],e.source.allowedIn=[],e.source.allowedOut=[])},ze=function(e){e.selectAll("."+V.nodeVersionTextClass).attr("x",function(e){var t=B.l(B.l(this).node().parentElement.parentElement).select("path").node(),n=t.getTotalLength();return e.point=t.getPointAtLength(n/2),e.point.x}).attr("y",function(e){return e.point.y}),e.selectAll("."+V.lineLimitedThroughputClass).attr("x",function(e){var t=B.l(B.l(this).node().parentElement.parentElement).select("path").node(),n=t.getTotalLength();return e.point=t.getPointAtLength(n/2),e.point.x-44}).attr("y",function(e){return e.point.y+20*e.tempIndex[B.l(this).attr("data-key")]+15}),e.selectAll("."+V.lineLimitedThroughputText).attr("x",function(e){var t=B.l(B.l(this).node().parentElement.parentElement).select("path").node(),n=t.getTotalLength();return e.point=t.getPointAtLength(n/2),e.point.x-20}).attr("y",function(e){return e.point.y+20*e.tempIndex[B.l(this).attr("data-key")]+24})},He=function(e){var t=e.append("g").attr("class","textLabel");ot(t,0,0);e.append("g").attr("class","resourceThroughput");B.m("."+V.lineLimitedThroughputText).remove(),B.m("."+V.lineLimitedThroughputClass).remove(),B.m(".resourceThroughput").each(function(e){var t=B.l(this),n=0;e.tempIndex={},Object.keys(e.itemThroughPut||{}).forEach(function(i){var a=e.itemThroughPut[i];if(e.itemIconLookup){e.tempIndex[i]=n++;var r="LightCoral",o="link-has-problems";e.forceOverwritable&&(r="LightBlue"),Math.round(1e3*a.actual)<=Math.round(1e3*a.max)&&(r="white",o="");var c=e.itemIconLookup[i];t.classed("link-has-problems",!1),t.classed("link-has-no-problems",!0),o.length&&(t.classed("link-has-problems",!0),t.classed("link-has-no-problems",!1)),t.append("svg:image").classed(V.lineLimitedThroughputClass,!0).attr("xlink:href",function(e){return c}).attr("data-key",i).attr("height",20).attr("width",20),t.append("text").attr("fill","black").attr("class","overclockFont").classed(V.lineLimitedThroughputText,!0).style("text-anchor","start").style("dominant-baseline","central").attr("stroke","black").attr("stroke-width",4).attr("font-size",20).attr("data-key",i).text(function(e){return Math.round(100*a.actual)/100+"/"+Math.round(100*a.max)/100}),t.append("text").attr("fill",r).attr("class","overclockFont").classed(V.lineLimitedThroughputText,!0).style("text-anchor","start").style("dominant-baseline","central").attr("font-size",20).attr("data-key",i).text(function(e){return Math.round(100*a.actual)/100+"/"+Math.round(100*a.max)/100})}})})},We=n(178),Qe=function(e,t){var n=t.state.selectedNode;Ke(t),n!==e&&(je(t),t.setState({selectedNode:e}),B.l(this).classed(V.graphNodeHoverClass,!0).classed(V.graphNodeGrabbedClass,!1).classed(V.selectedNodeClass,!0))},Ke=function(e){B.l("."+V.selectedNodeClass).classed(V.selectedNodeClass,!1).classed(V.graphNodeGrabbedClass,!1),e.setState({selectedNode:null})},Ue=function(e,t){t.setState({mouseOverNode:B.l(this).datum()}),B.l(this).classed(V.graphNodeHoverClass,!0)},Ve=function(e,t){t.setState({mouseOverNode:null}),B.l(this).classed(V.graphNodeHoverClass,!1)},Je=function(e,t){B.d.shiftKey?t.setState({shiftHeld:!0,sourceId:B.l(this).datum().id}):B.l(this).classed(V.graphNodeGrabbedClass,!0)},Xe=function(e,t){t.state&&t.state.shiftHeld,t.setState({shiftHeld:!1})},Ye=function(e,t,n,i){e.append("path").filter(function(e){return!["Container","Logistic"].includes(e.machine.name)}).attr("class",V.overclockedArcClass).attr("fill","none").attr("stroke-width",8),Ze(t,n,i)},Ze=function(e,t,n){B.m("."+V.overclockedArcClass).attr("d",function(i){return function(e,t,n,i){var a=i+n,r=100*e[t]||0,o=(a-n)/100,c=n;return B.a().innerRadius(50).outerRadius(50)({startAngle:c/180*Math.PI,endAngle:(o*r+c)/180*Math.PI})}(i,e,t,n)}).attr("stroke",function(t){var n,i,a,r=100*(t[e]||0);return(n=r)<50?(i=255,a=Math.round(5.1*n)):(a=255,i=Math.round(510-5.1*n)),"#"+("000000"+(65536*i+256*a+0).toString(16)).slice(-6)})},$e=function(e){e.append("svg:image").attr("class",function(e){return e.machine&&e.machine.icon?"machine-icon":"dev-icon"}).attr("xlink:href",function(e){return e.instance&&e.instance.icon?e.instance.icon:e.machine&&e.machine.icon?e.machine.icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Smelter.png"}).attr("x",function(e){return-50}).attr("y",function(e){return-50}).attr("height",100).attr("width",100)},et=function(){nt(B.m("."+V.overclockedTextClass))},tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===t){B.d.stopImmediatePropagation();var i=-1;B.d.deltaY<0&&(i=1),e.overclock=e.overclock+i,e.overclock<0?e.overclock=251+e.overclock:e.overclock>250&&(e.overclock=e.overclock-251),nt(B.l(this).select("."+V.overclockedTextClass))}else e.overclock=t,nt(n)},nt=function(e){e.text(function(e){return Math.round(e.overclock)})},it=function(e){e.text(function(e){return e.instance.machine_version.representation})},at=function(){(function(e){var t=this,n=t.props.parentAccessor.state.recipe.item;e.each(function(e){var i=e.allowedIn.slice();(t.nodeIn[e.id]||[]).map(function(e){return e.allowedOut}).flat(1).forEach(function(e){ne(i,e)});var a=B.l(this);if(a.selectAll("."+V.nodeRequirementsSubIconClass).remove(),i.length>0){a.append("svg:image").attr("xlink:href",function(e){return"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/arrow.png"}).classed(V.nodeRequirementsSubIconClass,!0).attr("x",function(e){return-81}).attr("y",function(e){return 3}).attr("height",25).attr("width",25);var r=i.map(function(e){return n.filter(function(t){return e===t.id})[0]}),o=new Set,c=0;r.forEach(function(e){o.has(e.icon)||(o.add(e.icon),a.append("svg:image").classed(V.nodeRequirementsSubIconClass,!0).on("mousedown",function(e){B.d.stopImmediatePropagation()}).on("click",function(n){var i=t.graphData.nodes.filter(function(t){return t.id!==n.id&&t.open_out_slot>0&&t.allowedOut.includes(e.id)}),a=t.graphData.nodes.filter(function(e){return e.id===n.id});i.length>0&&Be(t,i[0],a[0]),B.d.stopImmediatePropagation()}).attr("xlink:href",function(t){return e.icon}).attr("x",function(e){return-114-28*c++}).attr("y",function(e){return 3}).attr("height",25).attr("width",25))})}var s=e.allowedOut.slice();if((t.nodeOut[e.id]||[]).map(function(e){return e.allowedIn}).flat(1).forEach(function(e){ne(s,e)}),s.length>0){a.append("svg:image").attr("xlink:href",function(e){return"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/arrow.png"}).classed(V.nodeRequirementsSubIconClass,!0).attr("x",function(e){return 58}).attr("y",function(e){return-28}).attr("height",25).attr("width",25);var l=s.map(function(e){return n.filter(function(t){return e===t.id})[0]}),u=new Set,d=0;l.forEach(function(e){u.has(e.icon)||(u.add(e.icon),a.append("svg:image").classed(V.nodeRequirementsSubIconClass,!0).on("mousedown",function(e){B.d.stopImmediatePropagation()}).on("click",function(n){var i=t.graphData.nodes.filter(function(t){return t.id!==n.id&&t.open_in_slots>0&&t.allowedIn.includes(e.id)}),a=t.graphData.nodes.filter(function(e){return e.id===n.id});i.length>0&&Be(t,a[0],i[0]),B.d.stopImmediatePropagation()}).attr("xlink:href",function(t){return e.icon}).attr("x",function(e){return 85+28*d++}).attr("y",function(e){return-28}).attr("height",25).attr("width",25))})}})}).call(this,B.m("."+V.nodeRequirementsIconClass))},rt=function(e){e.append("g").classed(V.nodeRequirementsIconClass,!0).each(function(e){e.machine&&["Container","Logistic"].includes(e.machine.name)||B.l(this).append("svg:image").classed(V.nodeProducesClass,!0).attr("xlink:href",function(e){return e.data.recipe.item.icon}).attr("x",function(e){return-55}).attr("y",function(e){return 18}).attr("height",40).attr("width",40)}),B.m("."+V.nodeRequirementsIconClass).each(function(e){if(e.machine&&["Container","Logistic"].includes(e.machine.name)){var t=B.l(this);t.selectAll("."+V.nodeProducesClass).remove();var n=new Set,i=0;(e.containedItems||[]).forEach(function(e,a){n.has(e.icon)||(n.add(e.icon),t.append("svg:image").classed(V.nodeProducesClass,!0).attr("xlink:href",function(e){return e.containedItems[a].icon}).attr("x",function(e){return-55}).attr("y",function(e){return 18+30*i++}).attr("height",40).attr("width",40))})}}),e.append("g").classed(V.nodeSurplusIconClass,!0),B.m("."+V.nodeSurplusIconClass).each(function(e){var t=B.l(this);t.selectAll("."+V.nodeProducesPerMinText).remove(),t.append("text").attr("fill","white").attr("class","overclockFont").classed(V.nodeProducesPerMinText,!0).style("text-anchor","end").style("dominant-baseline","central").attr("stroke","black").attr("stroke-width",4).attr("x",-5).attr("y",-37).attr("font-size",30).text(function(e){var t=0;return Object.keys(e.itemsPerMinute||{}).forEach(function(n){t+=e.itemsPerMinute[n]}),(Math.round(100*t)/100||0)+"/m"}),t.append("text").attr("fill","white").attr("class","overclockFont").classed(V.nodeProducesPerMinText,!0).style("text-anchor","end").style("dominant-baseline","central").attr("x",-5).attr("y",-37).attr("font-size",30).text(function(e){var t=0;return Object.keys(e.itemsPerMinute||{}).forEach(function(n){t+=e.itemsPerMinute[n]}),(Math.round(100*t)/100||0)+"/m"})});e.append("g").classed(V.nodeLimitingThroughputClass,!0);B.m("."+V.nodeLimitingThroughputClass).each(function(e){var t=B.l(this);t.selectAll("."+V.nodeLimitingThroughputText).remove(),Object.keys(e.itemThroughPut||{}).forEach(function(n,i){var a=e.itemThroughPut[n]||{actual:0,max:0};if(e.itemIconLookup){var r="LightCoral",o="node-has-problems";Math.round(1e3*a.actual)===Math.round(1e3*a.max)?(r="white",o=""):Math.round(1e3*a.actual)<Math.round(1e3*a.max)&&(r="gold");var c=e.itemIconLookup[n];t.classed("node-has-problems",!1),t.classed("node-has-no-problems",!0),o.length&&(t.classed("node-has-problems",!0),t.classed("node-has-no-problems",!1)),t.append("svg:image").classed(V.nodeLimitingThroughputText,!0).attr("xlink:href",function(e){return c}).attr("x",-14).attr("y",59+20*i).attr("height",20).attr("width",20),t.append("text").attr("fill","black").attr("class","overclockFont").classed(V.nodeLimitingThroughputText,!0).style("text-anchor","start").style("dominant-baseline","central").attr("stroke","black").attr("stroke-width",4).attr("x",10).attr("y",68+20*i).attr("font-size",20).text(function(e){return Math.round(100*a.actual)/100+"/"+Math.round(100*a.max)/100}),t.append("text").attr("fill",r).attr("class","overclockFont").classed(V.nodeLimitingThroughputText,!0).style("text-anchor","start").style("dominant-baseline","central").attr("x",10).attr("y",68+20*i).attr("font-size",20).text(function(e){return Math.round(100*a.actual)/100+"/"+Math.round(100*a.max)/100})}})}),at.call(this)},ot=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:35;e.selectAll("."+V.nodeVersionTextClass).remove();var i=e.append("text").attr("fill","white").attr("class","overclockFont").classed(V.nodeVersionTextClass,!0).style("text-anchor","middle").style("dominant-baseline","central").attr("stroke","black").attr("stroke-width",4).attr("x",t).attr("y",n).attr("font-size",30);it(i);var a=e.append("text").attr("fill","white").attr("class","overclockFont").classed(V.nodeVersionTextClass,!0).style("text-anchor","middle").style("dominant-baseline","central").attr("x",t).attr("y",n).attr("font-size",30);it(a)},ct=function(e){var t=e.append("g").attr("id",function(e){return"node-level-accessor-"+e.id});ot(t)},st=function(e){var t=e.filter(function(e){return!["Container","Logistic"].includes(e.machine.name)}).append("g").attr("text-anchor","middle").attr("dy",0);t.append("circle").attr("r",17).attr("fill","#FFFFFF").attr("cx",32).attr("cy",-38).attr("stroke","black").attr("stroke-width",1);var n=t.append("text").attr("fill","black").attr("class","overclockFont").classed(V.overclockedTextClass,!0).attr("x",32).attr("dy",-32).attr("font-size",20).attr("id",function(e){return"node-overclock-accessor-"+e.id});nt(n)},lt=function(e,t){if(!(document.activeElement&&"INPUT"===document.activeElement.nodeName||t.state.pressedKey))switch(t.setState({pressedKey:B.d.keyCode}),B.d.keyCode){case V.BACKSPACE_KEY:case V.DELETE_KEY:t.state.selectedPath?(De.call(this,t.state.selectedPath,t),t.setState({selectedPath:null}),t.updateGraphHelper()):t.state.selectedNode&&(function(e,t){var n=t.state.selectedNode;Ke(t),t.graphData.links.filter(function(e){return e.source.id===n.id||e.target.id===n.id}).map(function(e){De(e,t)}),ne(t.graphData.nodes,n)}.call(this,e,t),t.setState({selectedNode:null}),t.updateGraphHelper())}},ut=function(e){return e.attr("viewBox","0 -5 10 10").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("svg:path").attr("d","M0,-5L10,0L0,5")};function dt(e){return(dt="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})(e)}function mt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function pt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ht(e){return(ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ft(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yt(e,t){return(yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _t=function(e){function t(e){var n,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=ht(t).call(this,e),n=!a||"object"!==dt(a)&&"function"!=typeof a?ft(i):a,gt(ft(n),"analyze",function(){Ae.call(ft(n)),n.updateGraphHelper()}),gt(ft(n),"optimize",function(){Ae.call(ft(n),!0),et(),n.updateGraphHelper()}),n.state={snapToGrid:!0},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yt(e,t)}(t,i["Component"]),n=t,o=[{key:"inflateGraphData",value:function(e){return Object(Y.a)($.a.inflate(te.a.atob(e),{to:"string"}))}}],(r=[{key:"addNode",value:function(e){var t,n,i,a,r,o,c;t=e,n=this,i=Object(We.b)(B.l("#svgGroup").attr("transform")),a=[],r=document.getElementById("svgParent"),o=r.clientWidth,c=r.clientHeight,a[0]=o/i.scaleX*.5-i.translateX/i.scaleX,a[1]=c/i.scaleY*.5-i.translateY/i.scaleY,t.id=t.id||n.id++,t.x=t.x||0,t.y=t.y||0,t.fx=a[0],t.fy=a[1],t.overclock=t.overclock||100,n.graphData.nodes.push(t),n.updateGraphHelper(),console.log(JSON.stringify(e))}},{key:"resetCamera",value:function(){this.inputSvg.transition().duration(750).call(this.zoom_handler.transform,B.o),this.updateGraphHelper()}},{key:"jiggle",value:function(){this.graphData.nodes.forEach(function(e){e.x=0,e.y=0}),this.updateGraphHelper()}},{key:"fixNodes",value:function(){this.graphData.nodes.forEach(function(e){e.fx=e.x,e.fy=e.y}),this.updateGraphHelper()}},{key:"unfixNodes",value:function(){this.graphData.nodes.forEach(function(e){e.fx=null,e.fy=null,e.vx=0,e.vy=0}),this.updateGraphHelper()}},{key:"createGraph",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.graphData={nodes:t,links:n},this.id=Math.max.apply(Math,mt(this.graphData.nodes.map(function(e){return e.id})))+1,this.id===Number.NEGATIVE_INFINITY&&(this.id=0),this.inputSvg=e,this.svgGroup=e.append("g").attr("class","objects").attr("id","svgGroup");var i=this.svgGroup,a=this;e.on("click",function(e){je.call(this,a)}),B.l(window).on("keydown",function(e){lt.call(this,e,a)}).on("keyup",function(e){(function(e,t){t.setState({pressedKey:null})}).call(this,e,a)}),this.zoom_handler=B.n().on("zoom",function(){return function(e){e.attr("transform",B.d.transform)}(i)}).scaleExtent([.1,6]),this.zoom_handler(e),e.on("dblclick.zoom",null);var r=i.append("defs");ut(r.append("svg:marker").attr("id","default-path-arrow").attr("refX",35)),ut(r.append("svg:marker").attr("id","highlight-path-arrow-orange").attr("fill","orange").attr("refX",24)),ut(r.append("svg:marker").attr("id","dragged-end-arrow").attr("refX",7));var o=r.append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").attr("filterUnits","userSpaceOnUse");o.append("feGaussianBlur").attr("in","SourceAlpha").attr("stdDeviation",5).attr("result","blur"),o.append("feOffset").attr("in","blur").attr("result","offsetBlur"),o.append("feFlood").attr("in","offsetBlur").attr("flood-color","white").attr("flood-opacity","1").attr("result","offsetColor"),o.append("feComposite").attr("in","offsetColor").attr("in2","offsetBlur").attr("operator","in").attr("result","offsetBlur");var c=o.append("feMerge");c.append("feMergeNode").attr("in","offsetBlur"),c.append("feMergeNode").attr("in","SourceGraphic"),this.dragLine=i.append("g").append("svg:path").attr("class","link dragline line-object hidden").attr("d","M0,0L0,0").attr("stroke",function(e){return B.b("#000000")}).style("marker-end","url(#dragged-end-arrow)");var s,l,u,d=i.append("g").attr("class","links-g-group"),m=i.append("g").attr("class","nodes-g-group"),p=(s=document.getElementById("svgParent"),l=s.clientWidth,u=s.clientHeight,B.h().force("link",B.f().id(function(e){return e.id}).distance(60)).force("charge",B.g().strength(20)).force("collision",B.e().radius(function(e){return 120})).force("xAxis",B.i().strength(.1).x(function(e){return e.initialX||l/2})).force("yAxis",B.j().strength(.5).y(function(e){return e.initialY||u/2})));this.graphNodesGroup=m,this.graphLinksGroup=d,this.simulation=p,this.updateGraphHelper()}},{key:"updateGraphHelper",value:function(){Ne.call(this,this.simulation,this.graphNodesGroup,this.graphLinksGroup)}},{key:"clearGraphDataRaw",value:function(){var e=B.l(B.l("#mainRender").node().parentElement);return B.l("#mainRender").selectAll("*").remove(),B.l("#mainRender").remove(),e.append("svg").attr("id","mainRender")}},{key:"clearGraphData",value:function(e){je.call(this,e);var t=this.clearGraphDataRaw();this.createGraph(t)}},{key:"loadGraphData",value:function(e){var t=this.clearGraphDataRaw();this.createGraph(t,e.graphData.nodes,e.graphData.links)}},{key:"compressGraphData",value:function(){var e={satisgraphtory:{version:.01},graphData:this.graphData,playerData:{},secret:{}};return te.a.btoa($.a.deflate(Object(Y.b)(e),{to:"string"}))}},{key:"uploadDataWithResponse",value:function(){return function(e){return new Promise(function(t,n){return fetch("https://api.myjson.com/bins/",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(e)}).then(function(e){return e.json()}).then(function(e){if(e.uri){var n=e.uri.replace("https://api.myjson.com/bins//","");return t(encodeURIComponent(te.a.btoa(n)))}throw new Error("Invalid save")}).catch(function(e){console.log("Fetch error:",e.message),n(e)})})}({data:this.compressGraphData()})}},{key:"componentDidMount",value:function(){this.loadGraphData(this.props.parentAccessor.state.coreGraphData),this.analyze()}},{key:"componentDidUpdate",value:function(e,t,n){this.state.selectedPath===t.selectedPath&&this.state.selectedNode===t.selectedNode||this.props.parentAccessor.setState({selectedPath:this.state.selectedPath,selectedNode:this.state.selectedNode})}},{key:"render",value:function(){return a.a.createElement("svg",{id:"mainRender"})}}])&&pt(n.prototype,r),o&&pt(n,o),t}(),bt=(n(214),n(66)),vt=n.n(bt),wt=n(142),kt=n.n(wt),St=n(141),Et=n.n(St),Ct=n(69),Ot=n.n(Ct),It=n(219),qt=n.n(It),Pt=n(70),Tt=n.n(Pt),Mt=n(65),xt=n.n(Mt),At=n(45);function Nt(e){return(Nt="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})(e)}function jt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Rt(e,t){return!t||"object"!==Nt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lt(e){return(Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gt(e,t){return(Gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Bt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Rt(this,Lt(t).call(this,e))).windowOnClobber=null,n.clobberList=[],n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gt(e,t)}(t,a.a.Component),n=t,(i=[{key:"componentDidMount",value:function(){this.windowOnClobber=B.l(this.props.clobberedElement).on("click"),B.l(this.props.clobberedElement).on("click",this.props.onClickAway);var e=!0,t=!1,n=void 0;try{for(var i,a=document.querySelectorAll("*")[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var r=i.value;this.clobberList.push(r),r.addEventListener("click",this.props.onClickAway,!0)}}catch(e){t=!0,n=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}}},{key:"componentWillUnmount",value:function(){B.l(this.props.clobberedElement).on("click",this.windowOnClobber);var e=!0,t=!1,n=void 0;try{for(var i,a=this.clobberList[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){i.value.removeEventListener("click",this.props.onClickAway,!0)}}catch(e){t=!0,n=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}this.clobberList=[]}},{key:"render",value:function(){var e=this.props.onClickAway;return a.a.createElement(At.a,{onClickAway:e},this.props.children)}}])&&jt(n.prototype,i),r&&jt(n,r),t}();Bt.propTypes={classes:s.a.object.isRequired,clobberedElement:s.a.string.isRequired,onClickAway:s.a.func.isRequired,children:s.a.object.isRequired};var Ft=Object(l.withStyles)(function(e){return{}})(Bt);function Dt(e){return(Dt="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})(e)}function zt(){return(zt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Ht(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wt(e){return(Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kt(e,t){return(Kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vt=function(e){function t(e){var n,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=Wt(t).call(this,e),n=!a||"object"!==Dt(a)&&"function"!=typeof a?Qt(i):a,Ut(Qt(n),"handleMenu",function(e){n.setState({anchorEl:e.currentTarget})}),Ut(Qt(n),"handleClose",function(e){n.setState({anchorEl:null})}),Ut(Qt(n),"clickAwayClose",function(e){n.state.anchorEl&&n.setState({anchorEl:null})}),n.state={anchorEl:null},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kt(e,t)}(t,a.a.Component),n=t,(i=[{key:"listItems",value:function(e,t,n){var i=this;return this.props.items.map(function(t){return a.a.createElement(qt.a,{key:t.id,className:e.tooltip,placement:"right",title:t.inputs.map(function(t,n){return a.a.createElement(a.a.Fragment,{key:t.item.id},a.a.createElement("img",{src:t.item.icon,className:0===n?e.tooltipIconFirst:e.tooltipIcon}),a.a.createElement("div",{className:e.tooltipText},t.quantity))})},a.a.createElement(vt.a,{onClick:function(){var e=n.state.machine_node.machine_node;e.sort(function(e,t){return e.rank-t.rank});var a=e.filter(function(e){return e.machine_class.id===t.machine_class.id}),r=a[0];n.graphSvg.addNode({data:{recipe:t},machine:t.machine_class,allowedIn:t.inputs.map(function(e){return e.item.id}),allowedOut:[t.item.id],instance:r,upgradeTypes:a}),i.handleClose(),n.setState({mobileOpen:!1})}},a.a.createElement("img",{alt:"probably some goat image",src:t.item.icon,className:e.itemListIcon}),1===t.quantity?"":t.quantity+"x ",t.name,a.a.createElement("div",{className:e.grow})))})}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,i=t.label,r=t.appObject,o=this.state.anchorEl,c=Boolean(o),s=this.listItems(n,i,r);return a.a.createElement(a.a.Fragment,{key:i},a.a.createElement(de.a,{className:n.paper},a.a.createElement(G.a,{"aria-owns":c?"menu-appbar":null,"aria-haspopup":"true",onClick:c?this.handleClose:this.handleMenu,className:n.button},c?a.a.createElement(Et.a,null):a.a.createElement(kt.a,null),a.a.createElement("div",{className:n.label},i)),a.a.createElement(Ot.a,{className:n.popper,open:c,anchorEl:o,transition:!0,placement:"right-start"},function(t){var i=t.TransitionProps,r=t.placement;return a.a.createElement(xt.a,zt({},i,{id:"menu-list-grow-2",style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(de.a,{className:n.maxHeightPaper},a.a.createElement(Ft,{onClickAway:e.clickAwayClose,clobberedElement:"#mainRender"},a.a.createElement(Tt.a,null,s))))})))}}])&&Ht(n.prototype,i),r&&Ht(n,r),t}(),Jt=Object(l.withStyles)(function(e){return{root:{},button:{flex:"0 0 100%",justifyContent:"left",padding:10},paper:{margin:2*e.spacing.unit,display:"flex",zIndex:1302},label:{paddingLeft:10},popper:{zIndex:1301,left:"13px !important"},itemListIcon:{height:24,width:24,paddingRight:15},tooltip:{},tooltipIcon:{height:40,display:"inline-block",paddingLeft:10},tooltipIconFirst:{height:40,display:"inline-block"},tooltipText:{fontSize:18,display:"inline-block"},maxHeightPaper:{overflowY:"auto",maxHeight:600}}})(Vt),Xt=n(170),Yt=n.n(Xt),Zt=n(394),$t=n.n(Zt),en=n(220),tn=n.n(en),nn=n(223),an=n.n(nn),rn=n(222),on=n.n(rn),cn=n(221),sn=n.n(cn);function ln(e){return(ln="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})(e)}function un(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function dn(e,t){return!t||"object"!==ln(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mn(e){return(mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pn(e,t){return(pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var hn=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),dn(this,mn(t).call(this,e))}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pn(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.title,i=(e.contents,e.open),r=e.handleModalClose,o=e.children;return a.a.createElement(tn.a,{className:t.modal,open:Boolean(i),onClose:r,id:"modal"},a.a.createElement(sn.a,null,n),a.a.createElement(on.a,null,o),a.a.createElement(an.a,null,a.a.createElement(G.a,{onClick:r,color:"secondary"},"Close")))}}])&&un(n.prototype,i),r&&un(n,r),t}(),fn=Object(l.withStyles)(function(e){return{root:{}}})(hn);function yn(e){return(yn="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})(e)}function gn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vn(e,t){return(vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wn=function(e){function t(e){var n,i,a,r,o,c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=_n(t).call(this,e),n=!a||"object"!==yn(a)&&"function"!=typeof a?bn(i):a,r=bn(n),c=function(e){n.setState({dontShow:e.target.checked}),e.target.checked?window.localStorage.setItem("dontShowAgainv2","1"):window.localStorage.setItem("dontShowAgainv2","0")},(o="handleDontShow")in r?Object.defineProperty(r,o,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[o]=c;var s=!1,l=!1;return"1"===window.localStorage.getItem("dontShowAgainv2")?(window.localStorage.setItem("dontShowAgainv2","1"),l=!0):(window.localStorage.setItem("dontShowAgainv2","0"),l=!1),l||(s=!0),n.state={modalOpen:s,dontShow:l},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vn(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this,t=this.props,n=t.classes,i=(t.title,this.props.children);return a.a.createElement(a.a.Fragment,null,a.a.createElement(Yt.a,{id:"helpFab","aria-label":"help",color:"secondary",className:n.fab,onClick:function(){return e.setState({modalOpen:!0})}},a.a.createElement($t.a,null)),a.a.createElement(fn,{title:"",open:this.state.modalOpen,handleModalClose:function(){return e.setState({modalOpen:!1})}},i,a.a.createElement(we.a,{control:a.a.createElement(be.a,{checked:this.state.dontShow,onChange:this.handleDontShow,value:"checkedA"}),label:"Don't show this message again"})))}}])&&gn(n.prototype,i),r&&gn(n,r),t}(),kn=Object(l.withStyles)(function(e){return{fab:{position:"absolute",bottom:2*e.spacing.unit,right:2*e.spacing.unit}}})(wn),Sn=n(169),En=n.n(Sn),Cn=n(225),On=n.n(Cn),In=n(224),qn=n.n(In);function Pn(e){return(Pn="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})(e)}function Tn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Mn(e,t){return!t||"object"!==Pn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xn(e){return(xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function An(e,t){return(An=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Nn=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Mn(this,xn(t).call(this,e))).state={modalOpen:!1},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&An(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this,t=this.props,n=t.classes,i=t.Icon,r=t.label,o=t.title;t.contents;return a.a.createElement(a.a.Fragment,null,a.a.createElement(En.a,{button:!0,key:r,onClick:function(){return e.setState({modalOpen:!0})}},a.a.createElement(qn.a,{className:n.icons},a.a.createElement(i,null)),a.a.createElement(On.a,{primary:r})),a.a.createElement(fn,{title:o,open:this.state.modalOpen,handleModalClose:function(){return e.setState({modalOpen:!1})}},this.props.children))}}])&&Tn(n.prototype,i),r&&Tn(n,r),t}(),jn=Object(l.withStyles)(function(e){return{icons:{marginRight:0}}})(Nn);n(166);function Rn(e){return(Rn="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})(e)}function Ln(){return(Ln=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Gn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dn(e,t){return(Dn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hn=function(e){function t(e){var n,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=Bn(t).call(this,e),n=!a||"object"!==Rn(a)&&"function"!=typeof a?Fn(i):a,zn(Fn(n),"handleMenu",function(e){e.currentTarget!==n.state.lastTarget&&n.setState({anchorEl:e.currentTarget,selectedButton:e.currentTarget.id})}),zn(Fn(n),"handleClose",function(e){n.setState({anchorEl:null,lastTarget:n.state.anchorEl,selectedButton:null},function(){return new Promise(function(e){return setTimeout(e,100)}).then(function(){return n.setState({lastTarget:null})})})}),n.state={anchorEl:null},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dn(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this,t=this.props,n=t.classes,i=t.resource,r=t.appObject,o=this.state.anchorEl,c=i.item.icon,s=i.item.name,l=i.purities,u=i.machine_class.icon,d=Boolean(o);return a.a.createElement(a.a.Fragment,{key:s},a.a.createElement(vt.a,{"aria-owns":d?"menu-appbar":null,"aria-haspopup":"true",onClick:d?this.handleClose:this.handleMenu,selected:this.state.selectedButton===s,id:s},a.a.createElement("img",{src:c,className:n.itemListIcon}),s),a.a.createElement(Ot.a,{className:n.popper,open:d,anchorEl:o,transition:!0,placement:"right-start"},function(t){var o=t.TransitionProps,c=t.placement;return a.a.createElement(xt.a,Ln({},o,{id:"menu-list-grow",style:{transformOrigin:"bottom"===c?"center top":"center bottom"}}),a.a.createElement(de.a,null,a.a.createElement(Ft,{onClickAway:e.handleClose,clobberedElement:"#mainRender"},a.a.createElement(Tt.a,null,l.map(function(t){return a.a.createElement(vt.a,{onClick:function(){var n=r.state.machine_node.machine_node;console.log(n),n.sort(function(e,t){return e.rank-t.rank});var a=n.filter(function(e){return e.machine_class.id===i.machine_class.id}),o=a[0];r.graphSvg.addNode({data:{machine:i,node:t,recipe:i,purity:t.name},machine:i.machine_class,allowedIn:[],allowedOut:[i.item.id],instance:o,upgradeTypes:a}),e.handleClose()},key:s+t.name},a.a.createElement("img",{src:u,className:n.itemListIcon}),t.name)})))))}))}}])&&Gn(n.prototype,i),r&&Gn(n,r),t}(),Wn=Object(l.withStyles)(function(e){return{root:{},paper:{margin:2*e.spacing.unit,zIndex:1304,display:"flex"},label:{paddingLeft:10},popper:{zIndex:1303,left:"13px !important"},itemListIcon:{height:24,width:24,paddingRight:15}}})(Hn),Qn=n(168),Kn=n.n(Qn);function Un(e){return(Un="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})(e)}function Vn(){return(Vn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Jn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Xn(e){return(Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zn(e,t){return(Zn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ei=function(e){function t(e){var n,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=Xn(t).call(this,e),n=!a||"object"!==Un(a)&&"function"!=typeof a?Yn(i):a,$n(Yn(n),"handleMenu",function(e){e.currentTarget!==n.state.lastTarget&&n.setState({anchorEl:e.currentTarget})}),$n(Yn(n),"handleClose",function(){n.setState({anchorEl:null,lastTarget:n.state.anchorEl},function(){return new Promise(function(e){return setTimeout(e,100)}).then(function(){return n.setState({lastTarget:null})})})}),n.state={anchorEl:null},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zn(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this,t=this.props,n=t.classes,i=t.listItems,r=t.label,o=t.appObject,c=this.state.anchorEl,s=Boolean(c);return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(de.a,{className:n.paper},a.a.createElement(G.a,{"aria-owns":s?"menu-appbar":null,"aria-haspopup":"true",onClick:s?this.handleClose:this.handleMenu,className:n.button},s?a.a.createElement(Et.a,null):a.a.createElement(kt.a,null),a.a.createElement("div",{className:n.label},r)),a.a.createElement(Ot.a,{className:n.popper,open:s,anchorEl:c,transition:!0,placement:"right-start"},function(t){var n=t.TransitionProps,r=t.placement;return a.a.createElement(xt.a,Vn({},n,{id:"menu-list-grow",style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(de.a,null,a.a.createElement(Kn.a,{onClickAway:e.handleClose},a.a.createElement(Tt.a,null,Object.keys(i).map(function(e){var t=[];return["Miner"].includes(e)&&i[e].forEach(function(e){t.push(a.a.createElement(Wn,{appObject:o,resource:e}))}),t})))))})))}}])&&Jn(n.prototype,i),r&&Jn(n,r),t}(),ti=Object(l.withStyles)(function(e){return{root:{},button:{flex:"0 0 100%",justifyContent:"left",padding:10},paper:{margin:2*e.spacing.unit,display:"flex",zIndex:1302},label:{paddingLeft:10},popper:{zIndex:1301,left:"13px !important"},itemListIcon:{height:24,width:24,paddingRight:15}}})(ei);function ni(e){return(ni="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})(e)}function ii(){return(ii=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ai(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ri(e){return(ri=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ci(e,t){return(ci=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function si(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var li=function(e){function t(e){var n,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=ri(t).call(this,e),n=!a||"object"!==ni(a)&&"function"!=typeof a?oi(i):a,si(oi(n),"handleMenu",function(e){e.currentTarget!==n.state.lastTarget&&n.setState({anchorEl:e.currentTarget})}),si(oi(n),"handleClose",function(){n.setState({anchorEl:null,lastTarget:n.state.anchorEl},function(){return new Promise(function(e){return setTimeout(e,100)}).then(function(){return n.setState({lastTarget:null})})})}),n.state={anchorEl:null},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ci(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this,t=this.props,n=t.classes,i=t.listItems,r=(t.label,t.appObject),o=this.state.anchorEl,c=Boolean(o);return a.a.createElement(de.a,{className:n.paper},a.a.createElement(G.a,{"aria-owns":c?"menu-appbar":null,"aria-haspopup":"true",onClick:c?this.handleClose:this.handleMenu,className:n.button},c?a.a.createElement(Et.a,null):a.a.createElement(kt.a,null),a.a.createElement("div",{className:n.label},"Logistics")),a.a.createElement(Ot.a,{className:n.popper,open:c,anchorEl:o,transition:!0,placement:"right-start"},function(t){var o=t.TransitionProps,c=t.placement;return a.a.createElement(xt.a,ii({},o,{id:"menu-list-grow-1",style:{transformOrigin:"bottom"===c?"center top":"center bottom"}}),a.a.createElement(de.a,null,a.a.createElement(Ft,{onClickAway:e.handleClose,clobberedElement:"#mainRender"},a.a.createElement(Tt.a,null,Object.keys(i).map(function(t){var o=[];return["Miner","Logistic"].includes(t)||i[t].forEach(function(t){o.push(a.a.createElement(vt.a,{onClick:function(){var n=r.state.machine_node.machine_node;n.sort(function(e,t){return e.rank-t.rank});var i=n.filter(function(e){return e.machine_class.id===t.machine_class.id}),a=i[0];r.graphSvg.addNode({data:{recipe:t},machine:t.machine_class,allowedIn:[],allowedOut:[],instance:a,upgradeTypes:i}),e.handleClose()},key:t.machine_class.name+t.machine_class.id},a.a.createElement("img",{src:t.machine_class.icon,className:n.itemListIcon}),t.machine_class.name))}),["Logistic"].includes(t)&&i[t].forEach(function(t){o.push(a.a.createElement(vt.a,{onClick:function(){var n=r.state.machine_node.machine_node;n.sort(function(e,t){return e.rank-t.rank});var i=n.filter(function(e){return e.machine_class.id===t.machine_class.id&&t.name===e.name}),a=i[0];r.graphSvg.addNode({data:{recipe:t},machine:t.machine_class,allowedIn:[],allowedOut:[],instance:a,upgradeTypes:i}),e.handleClose(),r.setState({mobileOpen:!1})},key:t.name},a.a.createElement("img",{src:t.icon,className:n.itemListIcon}),t.name))}),o})))))}))}}])&&ai(n.prototype,i),r&&ai(n,r),t}(),ui=Object(l.withStyles)(function(e){return{root:{},button:{flex:"0 0 100%",justifyContent:"left",padding:10},paper:{margin:2*e.spacing.unit,display:"flex",zIndex:1302},label:{paddingLeft:10},popper:{zIndex:1301,left:"13px !important"},itemListIcon:{height:24,width:24,paddingRight:15}}})(li),di=n(230),mi=n.n(di),pi=n(43),hi=n.n(pi);function fi(e){return(fi="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})(e)}function yi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function gi(e){return(gi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bi(e,t){return(bi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wi=function(e){function t(e){var n,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=gi(t).call(this,e),n=!a||"object"!==fi(a)&&"function"!=typeof a?_i(i):a,vi(_i(n),"handleModalClose",function(){return n.setState({modalOpen:!1})}),vi(_i(n),"handleModalOpen",function(){return n.setState({modalOpen:!0})}),n.state={modalOpen:!1},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bi(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this,t=this.props,n=t.classes,i=(t.label,t.title,t.children,t.onClick);return a.a.createElement(a.a.Fragment,null,a.a.createElement(G.a,{color:"inherit",onClick:i||this.handleModalOpen},a.a.createElement(mi.a,null),a.a.createElement(hi.a,{smDown:!0,implementation:"css"},a.a.createElement("div",{className:n.label},"Clear"))),a.a.createElement(fn,{title:"Clear Graph?",open:this.state.modalOpen,handleModalClose:this.handleModalClose},a.a.createElement("div",{className:n.dialogContainer},a.a.createElement(b.a,{variant:"h5"},"Are you sure you want to clear everything?"),a.a.createElement(G.a,{color:"secondary",variant:"outlined",className:"".concat(n.dialogButton),onClick:function(){e.props.t.graphSvg.clearGraphData(e.props.t),e.handleModalClose()}},a.a.createElement(mi.a,null),a.a.createElement("div",{className:n.label},"Yes, I'm sure!")))))}}])&&yi(n.prototype,i),r&&yi(n,r),t}(),ki=Object(l.withStyles)(function(e){return{label:{paddingLeft:10},dialogContainer:{display:"flex",flexDirection:"column"}}})(wi),Si=n(395),Ei=n.n(Si),Ci=n(396),Oi=n.n(Ci),Ii=n(98),qi=n.n(Ii);function Pi(e){return(Pi="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})(e)}function Ti(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Mi(e){return(Mi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ai(e,t){return(Ai=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ji=function(e){function t(e){var n,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=Mi(t).call(this,e),n=!a||"object"!==Pi(a)&&"function"!=typeof a?xi(i):a,Ni(xi(n),"handleModalClose",function(){return n.setState({modalOpen:!1})}),Ni(xi(n),"handleModalOpen",function(){return n.setState({modalOpen:!0})}),n.state={modalOpen:!1,value:!0},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ai(e,t)}(t,a.a.Component),n=t,(i=[{key:"componentDidUpdate",value:function(e,t,n){var i=this;!t.modalOpen&&this.state.modalOpen&&this.setState({value:"Loading..."},function(){i.props.t.graphSvg.uploadDataWithResponse().then(function(e){var t,n=window.location.port?":"+window.location.port:"",a=window.location.protocol+"//"+window.location.hostname+n+window.location.pathname+"#"+e+(t={},window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(e,n,i){t[n]=i}),Object.keys(t).length?"?"+Object.keys(t).map(function(e){return e+"="+t[e]}).join("&"):"");i.setState({value:a})})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,i=t.onClick,r=this.state.value;return a.a.createElement(a.a.Fragment,null,a.a.createElement(G.a,{color:"inherit",onClick:i||this.handleModalOpen},a.a.createElement(Ei.a,null),a.a.createElement(hi.a,{smDown:!0,implementation:"css"},a.a.createElement("div",{className:n.label},"Share"))),a.a.createElement(fn,{title:"Share Code",open:this.state.modalOpen,handleModalClose:this.handleModalClose},a.a.createElement("div",{className:n.dialogContainer},a.a.createElement("div",null,a.a.createElement(qi.a,{spellCheck:!1,inputRef:function(t){return e.inputRef=t},label:"Share Code",value:r}),a.a.createElement(G.a,{color:"primary",className:n.inlineDialogButton,onClick:function(){return new Promise(function(t){e.inputRef.select(),document.execCommand("copy"),t(!0)}).then(function(t){e.setState({statusMessage:"Copied!"},function(){setTimeout(function(){e.setState({statusMessage:""})},3e3)})})}},a.a.createElement(Oi.a,null),a.a.createElement("div",{className:n.label},"Copy"))),oe("sti")?a.a.createElement(G.a,{color:"inherit",className:n.dialogButton,fullWidth:!0},a.a.createElement("div",{className:n.label},"Generate Image")):null,a.a.createElement("div",{className:n.statusMessage},this.state.statusMessage))))}}])&&Ti(n.prototype,i),r&&Ti(n,r),t}(),Ri=Object(l.withStyles)(function(e){return{label:{paddingLeft:10},dialogContainer:{display:"flex",flexDirection:"column"},inlineDialogButton:{paddingTop:10,paddingBottom:10},dialogButton:{marginTop:10},statusMessage:{display:"flex",flexDirection:"column"}}})(ji),Li=n(398),Gi=n.n(Li),Bi=n(397),Fi=n.n(Bi),Di=n(97),zi=n.n(Di),Hi=n(399),Wi=n.n(Hi),Qi=n(173),Ki=n.n(Qi),Ui=n(115),Vi=n.n(Ui),Ji=n(226),Xi=n.n(Ji),Yi=n(172),Zi=n.n(Yi),$i=n(171),ea=n.n($i);function ta(e){return(ta="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})(e)}function na(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function ia(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function aa(e){return(aa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ra(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oa(e,t){return(oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ca(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sa={PaperProps:{style:{maxHeight:224}}},la=function(e){function t(e){var n,i,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,r=aa(t).call(this,e),n=!r||"object"!==ta(r)&&"function"!=typeof r?ra(i):r,ca(ra(n),"debounce",function(e,t,n){var i;return function(){var a=this,r=arguments,o=n&&!i;clearTimeout(i),i=setTimeout(function(){i=null,n||e.apply(a,r)},t),o&&e.apply(a,r)}}),ca(ra(n),"update",function(){if(n.props.selected.machine){var e=B.l("#node-level-accessor-"+n.props.selected.id);ot(e),n.props.selected.overclock=n.state.sliderValue;var t=B.l("#node-overclock-accessor-"+n.props.selected.id);tt.call(ra(n),n.props.selected,n.state.sliderValue,t)}else{var i=B.l("#path-parent"+n.props.selected.source.id+"-"+n.props.selected.target.id);ot(i)}}),ca(ra(n),"debouncedUpdateGraph",n.debounce(function(){n.props.graphSvg.updateGraphHelper()},200)),ca(ra(n),"debouncedUpdate",n.debounce(function(){n.update()},200)),ca(ra(n),"upgrade",function(){var e=n.props.selected.instance,t=n.props.selected.upgradeTypes.indexOf(e);(t+=1)>=n.props.selected.upgradeTypes.length||(n.props.selected.instance=n.props.selected.upgradeTypes[t],n.update(),n.setState({dummy:!n.state.dummy}))}),ca(ra(n),"downgrade",function(){var e=n.props.selected.instance,t=n.props.selected.upgradeTypes.indexOf(e);n.props.selected.upgradeTypes.length;(t-=1)<0||(n.props.selected.instance=n.props.selected.upgradeTypes[t],n.update(),n.setState({dummy:!n.state.dummy}))}),ca(ra(n),"changeSlider",function(e,t){n.setState({sliderValue:t},function(){n.debouncedUpdate()})}),ca(ra(n),"handleChangeOverclockText",function(e){n.setState({sliderValue:e.target.value})}),ca(ra(n),"handleCheckboxChange",function(){n.infiniteSourceEligible?n.props.selected.infiniteSource?(n.props.selected.open_in_slots=1,delete n.props.selected.infiniteSource,delete n.props.selected.quantityPerInfinite,delete n.props.selected.timePerInfinite,n.props.selected.allowedIn=n.props.selected.allowedInClobbered):(n.props.selected.open_in_slots=0,n.props.selected.allowedInClobbered=n.props.selected.allowedIn,n.props.selected.allowedIn=[],n.props.selected.infiniteSource=!0,n.updateContained()):(n.props.selected.open_in_slots=1,delete n.props.selected.infiniteSource,delete n.props.selected.quantityPerInfinite,delete n.props.selected.timePerInfinite,n.props.selected.allowedIn=n.props.selected.allowedInClobbered),n.setState({dummy:!n.state.dummy}),n.debouncedUpdateGraph()}),ca(ra(n),"infiniteSourceEligible",function(){return n.props.selected.machine&&"Container"===n.props.selected.machine.name&&1===n.props.selected.open_in_slots||n.props.selected.infiniteSource&&0===n.props.selected.open_in_slots}),ca(ra(n),"hasInfiniteSource",function(){return n.props.selected.machine&&n.props.selected.infiniteSource}),ca(ra(n),"updateContained",function(){var e=n.props.selected.allowedOut,t=[];e.forEach(function(e){t.push(n.props.items.filter(function(t){return t.id===e})[0])}),n.props.selected.containedItems=t}),ca(ra(n),"handleChange",function(e){var t=e.target.value;0===n.props.selected.open_out_slots&&(t=Array.from(new Set([].concat(na(e.target.value),[n.props.selected.allowedInClobbered])))),n.props.selected.allowedOut=t,n.updateContained(),n.setState({selectedSource:t}),n.debouncedUpdateGraph()}),ca(ra(n),"handleTextChangeQuantity",function(e){n.props.selected.quantityPerInfinite=parseInt(e.target.value),n.setState({quantity:e.target.value}),n.debouncedUpdateGraph()}),ca(ra(n),"handleTextChangeSeconds",function(e){n.props.selected.timePerInfinite=parseInt(e.target.value),n.setState({time:e.target.value}),n.debouncedUpdateGraph()}),ca(ra(n),"shouldShowOverclock",function(){return-1!==n.props.overclock&&"Container"!==n.props.selected.machine.name&&"Logistic"!==n.props.selected.machine.name}),ca(ra(n),"hasUpgradeTypes",function(){return n.props.selected.upgradeTypes.length>1}),ca(ra(n),"shouldShowAnything",function(){return n.infiniteSourceEligible()||n.hasUpgradeTypes()||n.shouldShowOverclock()||n.hasInfiniteSource()}),ca(ra(n),"renderContent",function(){var e=n.props,t=e.classes,i=e.label;return a.a.createElement(a.a.Fragment,null,a.a.createElement(At.b,{variant:"h5"},i),n.hasUpgradeTypes()?a.a.createElement(At.b,{variant:"body1"},a.a.createElement(zi.a,{color:"secondary",className:t.button,onClick:n.downgrade},a.a.createElement(Fi.a,null)),n.props.selected.instance.name,a.a.createElement(zi.a,{color:"primary",className:t.button,onClick:n.upgrade},a.a.createElement(Gi.a,null))):null,n.shouldShowOverclock()?a.a.createElement(a.a.Fragment,null,a.a.createElement(qi.a,{id:"standard-name",label:"Overclock (%)",className:t.overclockTextField,value:n.state.sliderValue,onChange:n.handleChangeOverclockText,margin:"normal"}),a.a.createElement(Wi.a,{classes:{root:t.slider},value:n.state.sliderValue,min:0,max:250,step:1,onChange:n.changeSlider})):null,n.infiniteSourceEligible()?a.a.createElement(a.a.Fragment,null,a.a.createElement(we.a,{control:a.a.createElement(be.a,{checked:n.props.selected.infiniteSource||!1,onChange:n.handleCheckboxChange,value:"snapToGrid",className:t.checkbox}),label:"Use as Infinite Source",className:t.checkboxLabel})):null,n.hasInfiniteSource()?a.a.createElement("div",null,a.a.createElement(Zi.a,null,a.a.createElement(ea.a,{htmlFor:"select-multiple-chip"},"Contents"),a.a.createElement(Ki.a,{multiple:!0,className:t.itemInput,value:n.state.selectedSource,onChange:n.handleChange,input:a.a.createElement(Vi.a,{id:"select-multiple-chip"}),renderValue:function(e){return a.a.createElement("div",{className:t.chips},e.map(function(e){return a.a.createElement(Xi.a,{key:e,label:n.itemMap[e].name,className:t.chip})}))},MenuProps:sa},n.items.map(function(e){return a.a.createElement(vt.a,{key:e.id,value:e.id},a.a.createElement("img",{className:t.icon,src:e.icon,alt:"",height:"30",width:"30"}),e.name)})),a.a.createElement("div",{className:t.formGroup},a.a.createElement(qi.a,{id:"quantity",label:"Quantity (each)",className:t.textField,value:n.state.quantity,onChange:n.handleTextChangeQuantity,margin:"normal",type:"number",inputProps:{min:"0",max:"999999",step:"1"}}),a.a.createElement("div",{className:t.textMiddle},"every"),a.a.createElement(qi.a,{id:"quantity",label:"Seconds",className:t.textField,value:n.state.time,onChange:n.handleTextChangeSeconds,margin:"normal",type:"number",inputProps:{min:"1",max:"60",step:"1"}})))):null)});var o=JSON.parse(JSON.stringify(e.items.filter(function(e){return!e.hidden})));return n.itemMap={},o.forEach(function(e){n.itemMap[e.id]=e}),o.sort(function(e,t){return e.name.localeCompare(t.name)}),n.items=o,n.state={quantity:e.selected.quantityPerInfinite||0,time:e.selected.timePerInfinite||1,dummy:!1,sliderValue:e.selected.overclock,selectedSource:e.selected.allowedOut||[]},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oa(e,t)}(t,a.a.Component),n=t,(i=[{key:"render",value:function(){var e=this.props.classes;return this.shouldShowAnything()?a.a.createElement(a.a.Fragment,null,a.a.createElement(hi.a,{smDown:!0,implementation:"css"},a.a.createElement(de.a,{className:e.paper},this.renderContent())),a.a.createElement(hi.a,{mdUp:!0,implementation:"css"},a.a.createElement(de.a,{className:e.paperMobile},this.renderContent()))):null}}])&&ia(n.prototype,i),r&&ia(n,r),t}(),ua=Object(l.withStyles)(function(e){return{root:{},formControl:{maxWidth:260},paper:{position:"absolute",left:280,bottom:20,margin:16,padding:12,minWidth:160},paperMobile:{position:"absolute",left:20,bottom:20,margin:16,padding:12,minWidth:160},textField:{paddingBottom:10,minWidth:110},button:{},label:{paddingLeft:10},slider:{padding:"10px"},overclock:{paddingLeft:10},icon:{paddingRight:4},itemInput:{},formGroup:{display:"flex",flexWrap:"wrap",alignItems:"flex-end"},textMiddle:{margin:10,marginBottom:20},overclockTextField:{paddingLeft:10,paddingRight:10,marginTop:0}}})(la),da=n(401),ma=n.n(da),pa=n(400),ha=n.n(pa);function fa(e){return(fa="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})(e)}function ya(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ga(e,t){return!t||"object"!==fa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _a(e){return(_a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ba(e,t){return(ba=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var va=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=ga(this,_a(t).call(this,e));var i="light";return i!==window.localStorage.getItem("nightMode")&&(i="dark"),n.state={night:i},n}var n,i,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ba(e,t)}(t,a.a.Component),n=t,(i=[{key:"shouldComponentUpdate",value:function(e,t){return e.night!==this.state.night&&(this.setState({night:e.night}),!0)}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.onNightToggle;e.night;return a.a.createElement(a.a.Fragment,null,a.a.createElement(G.a,{onClick:n,color:"inherit"},"dark"===this.state.night?a.a.createElement(ha.a,null):a.a.createElement(ma.a,null),a.a.createElement(hi.a,{smDown:!0,implementation:"css"},a.a.createElement("div",{className:t.label},"dark"===this.state.night?"Day":"Night"))))}}])&&ya(n.prototype,i),r&&ya(n,r),t}(),wa=Object(l.withStyles)(function(e){return{label:{paddingLeft:10}}})(va),ka=n(7),Sa=n.n(ka);function Ea(e,t,n,i,a,r,o){try{var c=e[r](o),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(i,a)}function Ca(e){return function(){var t=this,n=arguments;return new Promise(function(i,a){var r=e.apply(t,n);function o(e){Ea(r,i,a,o,c,"next",e)}function c(e){Ea(r,i,a,o,c,"throw",e)}o(void 0)})}}var Oa=Sa.a.schema.create("test",11);Oa.createTable("node_type").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("hidden",Sa.a.Type.BOOLEAN).addColumn("name",Sa.a.Type.STRING),Oa.createTable("machine_node_type").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("hidden",Sa.a.Type.BOOLEAN),Oa.createTable("machine_version").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("hidden",Sa.a.Type.BOOLEAN).addColumn("color",Sa.a.Type.STRING).addColumn("rank",Sa.a.Type.INTEGER).addColumn("representation",Sa.a.Type.STRING).addColumn("name",Sa.a.Type.STRING).addNullable(["color","rank"]),Oa.createTable("machine_class").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("icon",Sa.a.Type.STRING).addNullable(["icon"]).addColumn("hidden",Sa.a.Type.BOOLEAN).addColumn("node_type_id",Sa.a.Type.STRING).addColumn("plural",Sa.a.Type.STRING),Oa.createTable("machine_node").addColumn("id",Sa.a.Type.INTEGER).addColumn("speed",Sa.a.Type.INTEGER).addColumn("power",Sa.a.Type.INTEGER).addNullable(["power"]).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("hidden",Sa.a.Type.BOOLEAN).addColumn("icon",Sa.a.Type.STRING).addColumn("input_slots",Sa.a.Type.INTEGER).addColumn("output_slots",Sa.a.Type.INTEGER),Oa.createTable("path_type").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("speed",Sa.a.Type.INTEGER).addColumn("rank",Sa.a.Type.INTEGER).addColumn("machine_class_id",Sa.a.Type.INTEGER).addNullable(["machine_class_id"]).addColumn("hidden",Sa.a.Type.BOOLEAN),Oa.createTable("purity_type").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("hidden",Sa.a.Type.BOOLEAN).addColumn("quantity",Sa.a.Type.INTEGER),Oa.createTable("spring_type").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("hidden",Sa.a.Type.BOOLEAN),Oa.createTable("spring").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("spring_type_id",Sa.a.Type.INTEGER).addColumn("machine_class_id",Sa.a.Type.INTEGER).addColumn("item_id",Sa.a.Type.INTEGER).addColumn("icon",Sa.a.Type.STRING).addNullable(["item_id","icon"]).addColumn("hidden",Sa.a.Type.BOOLEAN).addColumn("purities",Sa.a.Type.OBJECT),Oa.createTable("item").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("icon",Sa.a.Type.STRING).addColumn("hidden",Sa.a.Type.BOOLEAN),Oa.createTable("recipe").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("inputs",Sa.a.Type.OBJECT).addColumn("machine_class_id",Sa.a.Type.INTEGER).addColumn("item_id",Sa.a.Type.INTEGER).addColumn("time",Sa.a.Type.INTEGER).addColumn("quantity",Sa.a.Type.INTEGER).addColumn("hidden",Sa.a.Type.BOOLEAN).addColumn("player_unlock_id",Sa.a.Type.INTEGER).addColumn("icon",Sa.a.Type.STRING).addNullable(["item_id","icon","player_unlock_id"]),Oa.createTable("player_unlock").addColumn("id",Sa.a.Type.INTEGER).addPrimaryKey(["id"]).addColumn("name",Sa.a.Type.STRING).addColumn("chip_name",Sa.a.Type.STRING).addNullable(["chip_name"]).addColumn("hidden",Sa.a.Type.BOOLEAN);var Ia=function(e,t){return function(n){var i=n.getSchema().table(e);return new Promise(function(a,r){n.select().from(i).where(i.name.eq(t)).exec().then(function(n){1==n.length?a(n[0].id):r("No element found or too many matching rows: "+e+"|"+JSON.stringify(t,null,4)+"^^^^"+JSON.stringify(n,null,4))})})}},qa=function(e,t){var n=t.getSchema().table(e);return new Promise(function(e){t.select().from(n).exec().then(function(t){e(t)})})},Pa="https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/",Ta=function(e){return function(){var t=Ca(regeneratorRuntime.mark(function t(n){var i,a,r,o,c;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=0;case 1:if(!(i<e.length)){t.next=17;break}a=e[i],r=Object.keys(a),o=0;case 5:if(!(o<r.length)){t.next=14;break}if("function"!=typeof(c=a[r[o]])){t.next=11;break}return t.next=10,c(n);case 10:a[r[o]]=t.sent;case 11:o++,t.next=5;break;case 14:i++,t.next=1;break;case 17:return t.abrupt("return",e);case 18:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()},Ma=function(){var e=Ca(regeneratorRuntime.mark(function e(t){var n,i,a,r,o,c,s,l,u,d,m,p,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],i=["Coal Ore","Iron Ore","Limestone Ore","Copper Ore","Caterium Ore","Crude Oil","Raw Quartz","Sulfur","Bauxite","S.A.M. Ore","Silica","Uranium"],e.next=4,Ia("machine_class","Miner")(t);case 4:return a=e.sent,e.next=7,Ia("machine_class","Container")(t);case 7:return r=e.sent,e.next=10,Ia("spring_type","Miner")(t);case 10:return o=e.sent,e.next=13,Ia("spring_type","Container")(t);case 13:return c=e.sent,e.next=16,Ia("machine_class","Oil Pump")(t);case 16:return s=e.sent,e.next=19,qa("purity_type",t);case 19:l=e.sent,u=0;case 21:if(!(u<i.length)){e.next=32;break}return e.next=24,Ia("item",i[u])(t);case 24:d=e.sent,m=a,"Crude Oil"===i[u]&&(m=s),p={item_id:d,machine_class_id:m,spring_type_id:o,purities:l},n.push(p);case 29:u++,e.next=21;break;case 32:return h={machine_class_id:r,spring_type_id:c},n.push(h),e.abrupt("return",n);case 35:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),xa=[{key:"purity_type",value:[{name:"Impure",quantity:30},{name:"Normal",quantity:60},{name:"Pure",quantity:120}]},{key:"item",value:[{name:"Copper Ore",icon:Pa+"Copper_Ore.png"},{name:"Iron Ore",icon:Pa+"Iron_Ore.png"},{name:"Limestone Ore",icon:Pa+"Limestone.png"},{name:"Coal Ore",icon:Pa+"Coal.png"},{name:"Iron Ingot",icon:Pa+"Iron_Ingot.png"},{name:"Copper Ingot",icon:Pa+"Copper_Ingot.png"},{name:"Iron Plate",icon:Pa+"Iron_Plate.png"},{name:"Iron Rod",icon:Pa+"Iron_Rod.png"},{name:"Screw",icon:Pa+"Screw.png"},{name:"Wire",icon:Pa+"Wire.png"},{name:"Cable",icon:Pa+"Cable.png"},{name:"Concrete",icon:Pa+"Concrete.png"},{name:"Reinforced Iron Plate",icon:Pa+"Reinforced_Iron_Plate.png"},{name:"Modular Frame",icon:Pa+"Modular_Frame.png"},{name:"Rotor",icon:Pa+"Rotor.png"},{name:"Caterium Ore",icon:Pa+"Caterium_Ore.png"},{name:"Caterium Ingot",icon:Pa+"Caterium_Ingot.png"},{name:"Quickwire",icon:Pa+"Quickwire.png"},{name:"Steel Ingot",icon:Pa+"Steel_Ingot.png"},{name:"Steel Beam",icon:Pa+"Steel_Beam.png"},{name:"Steel Pipe",icon:Pa+"Steel_Pipe.png"},{name:"Encased Industrial Beam",icon:Pa+"Encased_Industrial_Beam.png"},{name:"Stator",icon:Pa+"Stator.png"},{name:"Heavy Modular Frame",icon:Pa+"Heavy_Modular_Frame.png"},{name:"Motor",icon:Pa+"Motor.png"},{name:"Crude Oil",icon:Pa+"Crude_Oil.png"},{name:"Raw Quartz",icon:Pa+"Raw_Quartz.png"},{name:"Sulfur",icon:Pa+"Sulfur.png"},{name:"Bauxite",icon:Pa+"Bauxite.png"},{name:"S.A.M. Ore",icon:Pa+"SAM_Ore.png"},{name:"Silica",icon:Pa+"Silica.png"},{name:"Uranium",icon:Pa+"Uranium.png"},{name:"Plastic",icon:Pa+"Plastic.png"},{name:"Fuel",icon:Pa+"Fuel.png"},{name:"Rubber",icon:Pa+"Rubber.png"},{name:"Circuit Board",icon:Pa+"Circuit_Board.png"},{name:"Computer",icon:Pa+"Computer.png"},{name:"A.I. Limiter",icon:Pa+"AI_Limiter.png"},{name:"Supercomputer",icon:Pa+"Supercomputer.png"},{name:"High-Speed Connector",icon:Pa+"High_Speed_Connector.png"},{name:"Nuclear Fuel Rod",icon:Pa+"Nuclear_Fuel_Rod.png"},{name:"Aluminum Ingot",icon:Pa+"Iron_Ingot.png"},{name:"Aluminum Sheet",icon:Pa+"Aluminum_Sheet.png"},{name:"Heat Sink",icon:Pa+"Heat_Sink.png"},{name:"Radio Control Unit",icon:Pa+"Radio_Control_Unit.png"},{name:"Turbo Motor",icon:Pa+"Turbo_Motor.png"},{name:"Battery",icon:Pa+"Battery.png"},{name:"Quantum Crystal",icon:Pa+"Generic.png"},{name:"Superposition Oscillator",icon:Pa+"Generic.png"},{name:"Quantum Computer",icon:Pa+"Quantum_Computer.png"},{name:"Biomass",icon:Pa+"Biomass.png"},{name:"Biofuel",icon:Pa+"Biofuel.png"},{name:"S.A.M. Ingot",icon:Pa+"Generic.png"},{name:"Compacted Coal",icon:Pa+"Generic.png"},{name:"Crystal Oscillator",icon:Pa+"Generic.png"},{name:"Quartz Crystal",icon:Pa+"Generic.png"},{name:"Dark Matter",icon:Pa+"Generic.png"},{name:"Packaged Fuel",icon:Pa+"Generic.png"},{name:"Filter",icon:Pa+"Generic.png"},{name:"Smart Plating",icon:Pa+"Generic.png"},{name:"Versatile Framework",icon:Pa+"Generic.png"},{name:"Automated Wiring",icon:Pa+"Generic.png"},{name:"Modular Engine",icon:Pa+"Generic.png"},{name:"Adaptive Control Unit",icon:Pa+"Generic.png"},{name:"Copper Sheet",icon:Pa+"Generic.png"},{name:"Aluminum Scrap",icon:Pa+"Generic.png"},{name:"Black Powder",icon:Pa+"Generic.png"}]},{key:"node_type",value:[{name:"Machine Node"},{name:"Resource Node"}]},{key:"machine_version",value:[{name:"internal",representation:""},{name:"Mk.1",rank:0,representation:"I"},{name:"Mk.2",rank:1,representation:"II"},{name:"Mk.3",rank:2,representation:"III"},{name:"Mk.4",rank:3,representation:"IV"},{name:"Mk.5",rank:4,representation:"V"},{name:"Mk.6",rank:5,representation:"VI"},{name:"S",rank:6,representation:"S"},{name:"M",rank:7,representation:"M"}]},{key:"path_type",value:[{name:"Item Belt Mk 1",speed:60,machine_version_id:Ia("machine_version","Mk.1"),rank:0},{name:"Item Belt Mk 2",speed:120,machine_version_id:Ia("machine_version","Mk.2"),rank:1},{name:"Item Belt Mk 3",speed:270,machine_version_id:Ia("machine_version","Mk.3"),rank:2},{name:"Item Belt Mk 4",speed:450,machine_version_id:Ia("machine_version","Mk.4"),rank:3},{name:"Item Belt Mk 5",speed:660,machine_version_id:Ia("machine_version","Mk.5"),rank:4},{name:"Item Belt Mk 6",speed:900,machine_version_id:Ia("machine_version","Mk.6"),rank:5},{name:"internal",speed:9999999,machine_version_id:Ia("machine_version","internal"),rank:-1}]},{key:"machine_class",value:[{name:"Constructor",plural:"Constructors",icon:Pa+"Constructor.png",node_type_id:Ia("node_type","Machine Node")},{name:"Miner",plural:"Miners",icon:Pa+"Miner_MK1.png",node_type_id:Ia("node_type","Resource Node")},{name:"Oil Pump",plural:"Oil Pumps",icon:Pa+"Oil_Pump.png",node_type_id:Ia("node_type","Resource Node")},{name:"Assembler",plural:"Assemblers",icon:Pa+"Assembler.png",node_type_id:Ia("node_type","Machine Node")},{name:"Refinery",plural:"Refineries",icon:Pa+"Oil_Refinery.png",node_type_id:Ia("node_type","Machine Node")},{name:"Smelter",plural:"Smelters",icon:Pa+"Smelter.png",node_type_id:Ia("node_type","Machine Node")},{name:"Generator",plural:"Generators",icon:Pa+"Coal_Generator.png",node_type_id:Ia("node_type","Machine Node")},{name:"Manufacturer",plural:"Manufacturer",icon:Pa+"Manufacturer.png",node_type_id:Ia("node_type","Machine Node")},{name:"Container",plural:"Containers",icon:Pa+"Storage_Container_MK1.png",node_type_id:Ia("node_type","Machine Node")},{name:"Logistic",plural:"Logistics",icon:Pa+"Splitter.png",node_type_id:Ia("node_type","Machine Node")},{name:"Foundry",plural:"Foundries",icon:Pa+"Foundry_MK1.png",node_type_id:Ia("node_type","Machine Node")}]},{key:"machine_node",value:[{name:"Container Mk.1",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Container"),speed:999999,icon:Pa+"Storage_Container_MK1.png",input_slots:1,output_slots:1},{name:"Container Mk.2",machine_version_id:Ia("machine_version","Mk.2"),machine_class_id:Ia("machine_class","Container"),speed:999999,icon:Pa+"Storage_Container_MK2.png",input_slots:1,output_slots:1},{name:"Splitter",machine_version_id:Ia("machine_version","S"),machine_class_id:Ia("machine_class","Logistic"),speed:999999,icon:Pa+"Splitter.png",input_slots:1,output_slots:3},{name:"Merger",machine_version_id:Ia("machine_version","M"),machine_class_id:Ia("machine_class","Logistic"),speed:999999,icon:Pa+"Merger.png",input_slots:3,output_slots:1},{name:"Miner Mk.1",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Miner"),speed:100,power:5,icon:Pa+"Miner_MK1.png",input_slots:0,output_slots:1},{name:"Miner Mk.2",machine_version_id:Ia("machine_version","Mk.2"),machine_class_id:Ia("machine_class","Miner"),icon:Pa+"Miner_MK2.png",speed:200,power:12,hidden:!0,input_slots:0,output_slots:1},{name:"Oil Pump",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Oil Pump"),speed:200,power:40,icon:Pa+"Oil_Pump.png",input_slots:0,output_slots:1},{name:"Smelter Mk.1",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Smelter"),speed:100,power:4,icon:Pa+"Smelter.png",input_slots:1,output_slots:1},{name:"Smelter Mk.2",machine_version_id:Ia("machine_version","Mk.2"),machine_class_id:Ia("machine_class","Smelter"),icon:Pa+"Smelter.png",speed:200,power:8,hidden:!0,input_slots:1,output_slots:1},{name:"Constructor Mk.1",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Constructor"),icon:Pa+"Constructor.png",speed:100,power:4,input_slots:1,output_slots:1},{name:"Constructor Mk.2",machine_version_id:Ia("machine_version","Mk.2"),machine_class_id:Ia("machine_class","Constructor"),icon:Pa+"Constructor.png",speed:200,power:8,hidden:!0,input_slots:1,output_slots:1},{name:"Oil Refinery",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Refinery"),icon:Pa+"Oil_Refinery.png",speed:100,power:50,input_slots:1,output_slots:1},{name:"Assembler Mk.1",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Assembler"),icon:Pa+"Assembler.png",speed:100,power:15,input_slots:2,output_slots:1},{name:"Assembler Mk.2",machine_version_id:Ia("machine_version","Mk.2"),machine_class_id:Ia("machine_class","Assembler"),icon:Pa+"Assembler.png",speed:100,hidden:!0,power:30,input_slots:2,output_slots:1},{name:"Manufacturer Mk.1",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Manufacturer"),icon:Pa+"Manufacturer.png",speed:100,power:55,hidden:!0,input_slots:4,output_slots:1},{name:"Manufacturer Mk.2",machine_version_id:Ia("machine_version","Mk.2"),machine_class_id:Ia("machine_class","Manufacturer"),icon:Pa+"Manufacturer.png",speed:200,power:110,hidden:!0,input_slots:4,output_slots:1},{name:"Coal Generator",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Generator"),icon:Pa+"Coal_Generator.png",speed:100,power:-50,hidden:!0,input_slots:1,output_slots:0},{name:"Fuel Generator",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Generator"),icon:Pa+"Fuel_Generator.png",speed:100,power:-150,hidden:!0,input_slots:1,output_slots:0},{name:"Biomass Burner",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Generator"),icon:Pa+"Biomass_Burner.png",speed:100,power:-20,hidden:!0,input_slots:1,output_slots:0},{name:"Foundry Mk.1",machine_version_id:Ia("machine_version","Mk.1"),machine_class_id:Ia("machine_class","Foundry"),icon:Pa+"Foundry_MK1.png",speed:100,power:16,hidden:!0,input_slots:2,output_slots:1},{name:"Foundry Mk.2",machine_version_id:Ia("machine_version","Mk.2"),machine_class_id:Ia("machine_class","Foundry"),icon:Pa+"Foundry_MK2.png",speed:200,power:38,hidden:!0,input_slots:2,output_slots:1}]},{key:"spring_type",value:[{name:"Miner"},{name:"Container"}]},{key:"player_unlock",value:[{name:"Reinforced Iron Plate (Alt.)"},{name:"Stitched Iron Plate"},{name:"Caterium Wire"},{name:"Encased Industrial Beam (Alt.)"},{name:"Heavy Modular Frame (Alt.)"},{name:"Iron Ingot (Alt.)"},{name:"Iron Wire"},{name:"Modular Frame (Alt.)"},{name:"Rotor (Alt.)"},{name:"Stator (Alt.)"},{name:"Steel Ingot (Alt.)"},{name:"Screw (Alt.)"},{name:"Quickwire (Alt.)"},{name:"Rubber Cable"},{name:"Circuit Board (Alt.)"},{name:"Caterium Circuit Board"},{name:"Caterium Computer"},{name:"Compacted Coal (Alt.)"},{name:"Silica (Alt.)"},{name:"Crystal Oscillator (Alt.)"}]},{key:"spring",value:Ma},{key:"recipe",value:[{name:"Iron Ingot",inputs:Ta([{item_id:Ia("item","Iron Ore"),quantity:1}]),machine_class_id:Ia("machine_class","Smelter"),item_id:Ia("item","Iron Ingot"),time:2,power:4,quantity:1},{name:"Copper Ingot",inputs:Ta([{item_id:Ia("item","Copper Ore"),quantity:1}]),machine_class_id:Ia("machine_class","Smelter"),item_id:Ia("item","Copper Ingot"),time:2,quantity:1},{name:"Caterium Ingot",inputs:Ta([{item_id:Ia("item","Caterium Ore"),quantity:3}]),machine_class_id:Ia("machine_class","Smelter"),item_id:Ia("item","Caterium Ingot"),time:4,quantity:1},{name:"Iron Plate",inputs:Ta([{item_id:Ia("item","Iron Ingot"),quantity:3}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Iron Plate"),time:6,quantity:2},{name:"Iron Rod",inputs:Ta([{item_id:Ia("item","Iron Ingot"),quantity:1}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Iron Rod"),time:4,quantity:1},{name:"Wire",inputs:Ta([{item_id:Ia("item","Copper Ingot"),quantity:1}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Wire"),time:4,quantity:2},{name:"Iron Wire",inputs:Ta([{item_id:Ia("item","Iron Ingot"),quantity:5}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Wire"),time:24,quantity:9,hidden:!0,player_unlock_id:Ia("player_unlock","Iron Wire")},{name:"Caterium Wire",inputs:Ta([{item_id:Ia("item","Caterium Ingot"),quantity:1}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Wire"),time:8,quantity:4,hidden:!0,player_unlock_id:Ia("player_unlock","Caterium Wire")},{name:"Cable",inputs:Ta([{item_id:Ia("item","Wire"),quantity:2}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Cable"),time:4,quantity:1},{name:"Screw",inputs:Ta([{item_id:Ia("item","Iron Rod"),quantity:1}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Screw"),time:4,quantity:4},{name:"Screw (Alt.)",inputs:Ta([{item_id:Ia("item","Iron Ingot"),quantity:5}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Screw"),time:24,quantity:20,hidden:!0,player_unlock_id:Ia("player_unlock","Screw (Alt.)")},{name:"Concrete",inputs:Ta([{item_id:Ia("item","Limestone Ore"),quantity:3}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Concrete"),time:4,quantity:1},{name:"Reinforced Iron Plate",inputs:Ta([{item_id:Ia("item","Iron Plate"),quantity:6},{item_id:Ia("item","Screw"),quantity:12}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Reinforced Iron Plate"),time:12,quantity:1},{name:"Reinforced Iron Plate (Alt.)",inputs:Ta([{item_id:Ia("item","Iron Plate"),quantity:16},{item_id:Ia("item","Screw"),quantity:250}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Reinforced Iron Plate"),time:12,quantity:3,hidden:!0,player_unlock_id:Ia("player_unlock","Reinforced Iron Plate (Alt.)")},{name:"Stitched Iron Plate",inputs:Ta([{item_id:Ia("item","Iron Plate"),quantity:10},{item_id:Ia("item","Wire"),quantity:26}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Reinforced Iron Plate"),time:32,quantity:3,hidden:!0,player_unlock_id:Ia("player_unlock","Stitched Iron Plate")},{name:"Rotor",inputs:Ta([{item_id:Ia("item","Iron Rod"),quantity:5},{item_id:Ia("item","Screw"),quantity:25}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Rotor"),time:15,quantity:1},{name:"Rotor (Alt.)",inputs:Ta([{item_id:Ia("item","Steel Pipe"),quantity:2},{item_id:Ia("item","Wire"),quantity:12}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Rotor"),time:12,quantity:1,hidden:!0,player_unlock_id:Ia("player_unlock","Rotor (Alt.)")},{name:"Modular Frame",inputs:Ta([{item_id:Ia("item","Reinforced Iron Plate"),quantity:3},{item_id:Ia("item","Iron Rod"),quantity:12}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Modular Frame"),time:60,quantity:2},{name:"Modular Frame (Alt.)",inputs:Ta([{item_id:Ia("item","Reinforced Iron Plate"),quantity:2},{item_id:Ia("item","Steel Pipe"),quantity:10}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Modular Frame"),time:60,quantity:3,hidden:!0,player_unlock_id:Ia("player_unlock","Modular Frame (Alt.)")},{name:"Encased Industrial Beam",inputs:Ta([{item_id:Ia("item","Steel Beam"),quantity:4},{item_id:Ia("item","Concrete"),quantity:5}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Encased Industrial Beam"),time:10,quantity:1},{name:"Encased Industrial Beam (Alt.)",inputs:Ta([{item_id:Ia("item","Steel Pipe"),quantity:7},{item_id:Ia("item","Concrete"),quantity:5}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Encased Industrial Beam"),time:15,quantity:1,hidden:!0,player_unlock_id:Ia("player_unlock","Encased Industrial Beam (Alt.)")},{name:"Heavy Modular Frame",inputs:Ta([{item_id:Ia("item","Modular Frame"),quantity:5},{item_id:Ia("item","Encased Industrial Beam"),quantity:5},{item_id:Ia("item","Steel Pipe"),quantity:15},{item_id:Ia("item","Screw"),quantity:100}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","Heavy Modular Frame"),time:30,quantity:1},{name:"Heavy Modular Frame (Alt.)",inputs:Ta([{item_id:Ia("item","Modular Frame"),quantity:8},{item_id:Ia("item","Encased Industrial Beam"),quantity:10},{item_id:Ia("item","Steel Pipe"),quantity:36},{item_id:Ia("item","Concrete"),quantity:22}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","Heavy Modular Frame"),time:64,quantity:3,hidden:!0,player_unlock_id:Ia("player_unlock","Heavy Modular Frame (Alt.)")},{name:"Iron Ingot (Alt.)",inputs:Ta([{item_id:Ia("item","Iron Ore"),quantity:2},{item_id:Ia("item","Copper Ore"),quantity:2}]),machine_class_id:Ia("machine_class","Foundry"),item_id:Ia("item","Iron Ingot"),time:6,quantity:5,hidden:!0,player_unlock_id:Ia("player_unlock","Iron Ingot (Alt.)")},{name:"Steel Ingot",inputs:Ta([{item_id:Ia("item","Iron Ore"),quantity:3},{item_id:Ia("item","Coal Ore"),quantity:3}]),machine_class_id:Ia("machine_class","Foundry"),item_id:Ia("item","Steel Ingot"),time:4,quantity:2},{name:"Steel Ingot (Alt.)",inputs:Ta([{item_id:Ia("item","Iron Ingot"),quantity:3},{item_id:Ia("item","Coal Ore"),quantity:3}]),machine_class_id:Ia("machine_class","Foundry"),item_id:Ia("item","Steel Ingot"),time:4,quantity:3,hidden:!0,player_unlock_id:Ia("player_unlock","Steel Ingot (Alt.)")},{name:"Steel Beam",inputs:Ta([{item_id:Ia("item","Steel Ingot"),quantity:4}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Steel Beam"),time:4,quantity:1},{name:"Steel Pipe",inputs:Ta([{item_id:Ia("item","Steel Ingot"),quantity:3}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Steel Pipe"),time:6,quantity:2},{name:"Quickwire",inputs:Ta([{item_id:Ia("item","Caterium Ingot"),quantity:1}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Quickwire"),time:5,quantity:5},{name:"Quickwire (Alt.)",inputs:Ta([{item_id:Ia("item","Caterium Ingot"),quantity:1},{item_id:Ia("item","Copper Ingot"),quantity:2}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Quickwire"),time:8,quantity:12,hidden:!0,player_unlock_id:Ia("player_unlock","Quickwire (Alt.)")},{name:"Motor",inputs:Ta([{item_id:Ia("item","Rotor"),quantity:2},{item_id:Ia("item","Stator"),quantity:2}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Motor"),time:12,quantity:1},{name:"Aluminum Ingot",inputs:Ta([{item_id:Ia("item","Bauxite"),quantity:7},{item_id:Ia("item","Silica"),quantity:6}]),machine_class_id:Ia("machine_class","Foundry"),item_id:Ia("item","Aluminum Ingot"),time:4,quantity:2},{name:"S.A.M. Ingot",inputs:Ta([{item_id:Ia("item","S.A.M. Ore"),quantity:6}]),machine_class_id:Ia("machine_class","Smelter"),item_id:Ia("item","S.A.M. Ingot"),time:12,quantity:1},{name:"Biofuel",inputs:Ta([{item_id:Ia("item","Biomass"),quantity:4}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Biofuel"),time:4,quantity:2},{name:"A.I. Limiter",inputs:Ta([{item_id:Ia("item","Circuit Board"),quantity:1},{item_id:Ia("item","Quickwire"),quantity:18}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","A.I. Limiter"),time:12,quantity:1},{name:"Circuit Board",inputs:Ta([{item_id:Ia("item","Wire"),quantity:12},{item_id:Ia("item","Plastic"),quantity:6}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Circuit Board"),time:12,quantity:1},{name:"Circuit Board (Alt.)",inputs:Ta([{item_id:Ia("item","Rubber"),quantity:16},{item_id:Ia("item","Wire"),quantity:24}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Circuit Board"),time:24,quantity:3,player_unlock_id:Ia("player_unlock","Circuit Board (Alt.)")},{name:"Caterium Circuit Board",inputs:Ta([{item_id:Ia("item","Plastic"),quantity:12},{item_id:Ia("item","Quickwire"),quantity:32}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Circuit Board"),time:24,quantity:3,player_unlock_id:Ia("player_unlock","Caterium Circuit Board")},{name:"Rubber Cable",inputs:Ta([{item_id:Ia("item","Wire"),quantity:3},{item_id:Ia("item","Rubber"),quantity:2}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Cable"),time:8,quantity:10,player_unlock_id:Ia("player_unlock","Rubber Cable")},{name:"Computer",inputs:Ta([{item_id:Ia("item","Circuit Board"),quantity:5},{item_id:Ia("item","Cable"),quantity:12},{item_id:Ia("item","Plastic"),quantity:18},{item_id:Ia("item","Screw"),quantity:60}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","Computer"),time:32,quantity:1},{name:"Caterium Computer",inputs:Ta([{item_id:Ia("item","Quickwire"),quantity:112},{item_id:Ia("item","Circuit Board"),quantity:10},{item_id:Ia("item","Rubber"),quantity:48}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","Computer"),time:64,quantity:3,player_unlock_id:Ia("player_unlock","Caterium Computer")},{name:"Supercomputer",inputs:Ta([{item_id:Ia("item","Computer"),quantity:2},{item_id:Ia("item","A.I. Limiter"),quantity:2},{item_id:Ia("item","High-Speed Connector"),quantity:3},{item_id:Ia("item","Plastic"),quantity:21}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","Supercomputer"),time:32,quantity:1},{name:"High-Speed Connector",inputs:Ta([{item_id:Ia("item","Quickwire"),quantity:40},{item_id:Ia("item","Cable"),quantity:10},{item_id:Ia("item","Plastic"),quantity:6}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","High-Speed Connector"),time:24,quantity:1},{name:"Fuel",inputs:Ta([{item_id:Ia("item","Crude Oil"),quantity:8}]),machine_class_id:Ia("machine_class","Refinery"),item_id:Ia("item","Fuel"),time:8,quantity:5},{name:"Plastic",inputs:Ta([{item_id:Ia("item","Crude Oil"),quantity:4}]),machine_class_id:Ia("machine_class","Refinery"),item_id:Ia("item","Plastic"),time:8,quantity:3},{name:"Rubber",inputs:Ta([{item_id:Ia("item","Crude Oil"),quantity:4}]),machine_class_id:Ia("machine_class","Refinery"),item_id:Ia("item","Rubber"),time:8,quantity:4},{name:"Stator",inputs:Ta([{item_id:Ia("item","Steel Pipe"),quantity:3},{item_id:Ia("item","Wire"),quantity:10}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Stator"),time:10,quantity:1},{name:"Stator (Alt.)",inputs:Ta([{item_id:Ia("item","Steel Pipe"),quantity:6},{item_id:Ia("item","Quickwire"),quantity:25}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Stator"),time:20,quantity:3,player_unlock_id:Ia("player_unlock","Stator (Alt.)")},{name:"Battery",inputs:Ta([{item_id:Ia("item","Aluminum Sheet"),quantity:8},{item_id:Ia("item","Sulfur"),quantity:20},{item_id:Ia("item","Plastic"),quantity:9},{item_id:Ia("item","Wire"),quantity:24}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","Battery"),time:32,quantity:3},{name:"Compacted Coal (Alt.)",inputs:Ta([{item_id:Ia("item","Coal Ore"),quantity:3},{item_id:Ia("item","Sulfur"),quantity:3}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Compacted Coal"),time:6,quantity:3,player_unlock_id:Ia("player_unlock","Compacted Coal (Alt.)")},{name:"Silica (Alt.)",inputs:Ta([{item_id:Ia("item","Raw Quartz"),quantity:4},{item_id:Ia("item","Limestone Ore"),quantity:2}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Silica"),time:8,quantity:9,player_unlock_id:Ia("player_unlock","Silica (Alt.)")},{name:"Quartz Crystal",inputs:Ta([{item_id:Ia("item","Raw Quartz"),quantity:2}]),machine_class_id:Ia("machine_class","Constructor"),item_id:Ia("item","Quartz Crystal"),time:4,quantity:1},{name:"Quantum Crystal",inputs:Ta([{item_id:Ia("item","Quartz Crystal"),quantity:6},{item_id:Ia("item","Dark Matter"),quantity:12}]),machine_class_id:Ia("machine_class","Assembler"),item_id:Ia("item","Quantum Crystal"),time:24,quantity:1},{name:"Crystal Oscillator (Alt.)",inputs:Ta([{item_id:Ia("item","Quartz Crystal"),quantity:20},{item_id:Ia("item","Rubber"),quantity:24},{item_id:Ia("item","A.I. Limiter"),quantity:1}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","Crystal Oscillator"),time:64,quantity:1,player_unlock_id:Ia("player_unlock","Crystal Oscillator (Alt.)")},{name:"Crystal Oscillator",inputs:Ta([{item_id:Ia("item","Quartz Crystal"),quantity:10},{item_id:Ia("item","Cable"),quantity:14},{item_id:Ia("item","Reinforced Iron Plate"),quantity:4}]),machine_class_id:Ia("machine_class","Manufacturer"),item_id:Ia("item","Crystal Oscillator"),time:32,quantity:1}]}],Aa={};xa.forEach(function(e){Aa[e.key]=e.value});var Na={purity_type:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],item:[{name:"Copper Ore",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Copper_Ore.png",hidden:!1,id:0},{name:"Iron Ore",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Iron_Ore.png",hidden:!1,id:1},{name:"Limestone Ore",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Limestone.png",hidden:!1,id:2},{name:"Coal Ore",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Coal.png",hidden:!1,id:3},{name:"Iron Ingot",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Iron_Ingot.png",hidden:!1,id:4},{name:"Copper Ingot",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Copper_Ingot.png",hidden:!1,id:5},{name:"Iron Plate",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Iron_Plate.png",hidden:!1,id:6},{name:"Iron Rod",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Iron_Rod.png",hidden:!1,id:7},{name:"Screw",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Screw.png",hidden:!1,id:8},{name:"Wire",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Wire.png",hidden:!1,id:9},{name:"Cable",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Cable.png",hidden:!1,id:10},{name:"Concrete",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Concrete.png",hidden:!1,id:11},{name:"Reinforced Iron Plate",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Reinforced_Iron_Plate.png",hidden:!1,id:12},{name:"Modular Frame",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Modular_Frame.png",hidden:!1,id:13},{name:"Rotor",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Rotor.png",hidden:!1,id:14},{name:"Caterium Ore",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Caterium_Ore.png",hidden:!1,id:15},{name:"Caterium Ingot",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Caterium_Ingot.png",hidden:!1,id:16},{name:"Quickwire",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Quickwire.png",hidden:!1,id:17},{name:"Steel Ingot",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Steel_Ingot.png",hidden:!1,id:18},{name:"Steel Beam",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Steel_Beam.png",hidden:!1,id:19},{name:"Steel Pipe",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Steel_Pipe.png",hidden:!1,id:20},{name:"Encased Industrial Beam",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Encased_Industrial_Beam.png",hidden:!1,id:21},{name:"Stator",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Stator.png",hidden:!1,id:22},{name:"Heavy Modular Frame",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Heavy_Modular_Frame.png",hidden:!1,id:23},{name:"Motor",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Motor.png",hidden:!1,id:24},{name:"Crude Oil",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Crude_Oil.png",hidden:!1,id:25},{name:"Raw Quartz",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Raw_Quartz.png",hidden:!1,id:26},{name:"Sulfur",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Sulfur.png",hidden:!1,id:27},{name:"Bauxite",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Bauxite.png",hidden:!1,id:28},{name:"S.A.M. Ore",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/SAM_Ore.png",hidden:!1,id:29},{name:"Silica",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Silica.png",hidden:!1,id:30},{name:"Uranium",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Uranium.png",hidden:!1,id:31},{name:"Plastic",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Plastic.png",hidden:!1,id:32},{name:"Fuel",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Fuel.png",hidden:!1,id:33},{name:"Rubber",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Rubber.png",hidden:!1,id:34},{name:"Circuit Board",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Circuit_Board.png",hidden:!1,id:35},{name:"Computer",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Computer.png",hidden:!1,id:36},{name:"A.I. Limiter",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/AI_Limiter.png",hidden:!1,id:37},{name:"Supercomputer",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Supercomputer.png",hidden:!1,id:38},{name:"High-Speed Connector",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/High_Speed_Connector.png",hidden:!1,id:39},{name:"Nuclear Fuel Rod",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Nuclear_Fuel_Rod.png",hidden:!1,id:40},{name:"Aluminum Ingot",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Iron_Ingot.png",hidden:!1,id:41},{name:"Aluminum Sheet",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Aluminum_Sheet.png",hidden:!1,id:42},{name:"Heat Sink",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Heat_Sink.png",hidden:!1,id:43},{name:"Radio Control Unit",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Radio_Control_Unit.png",hidden:!1,id:44},{name:"Turbo Motor",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Turbo_Motor.png",hidden:!1,id:45},{name:"Battery",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Battery.png",hidden:!1,id:46},{name:"Quantum Crystal",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Generic.png",hidden:!1,id:47},{name:"Superposition Oscillator",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Generic.png",hidden:!1,id:48},{name:"Quantum Computer",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Quantum_Computer.png",hidden:!1,id:49},{name:"Biomass",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Biomass.png",hidden:!1,id:50},{name:"Biofuel",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Biofuel.png",hidden:!1,id:51},{name:"S.A.M. Ingot",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Generic.png",hidden:!1,id:52},{name:"Compacted Coal",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Generic.png",hidden:!1,id:53},{name:"Crystal Oscillator",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Generic.png",hidden:!1,id:54},{name:"Quartz Crystal",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Generic.png",hidden:!1,id:55},{name:"Dark Matter",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Generic.png",hidden:!1,id:56}],node_type:[{name:"Machine Node",hidden:!1,id:0},{name:"Resource Node",hidden:!1,id:1}],machine_version:[{name:"internal",representation:"",hidden:!1,id:0},{name:"Mk.1",rank:0,representation:"I",hidden:!1,id:1},{name:"Mk.2",rank:1,representation:"II",hidden:!1,id:2},{name:"Mk.3",rank:2,representation:"III",hidden:!1,id:3},{name:"Mk.4",rank:3,representation:"IV",hidden:!1,id:4},{name:"Mk.5",rank:4,representation:"V",hidden:!1,id:5},{name:"Mk.6",rank:5,representation:"VI",hidden:!1,id:6},{name:"S",rank:6,representation:"S",hidden:!1,id:7},{name:"M",rank:7,representation:"M",hidden:!1,id:8}],path_type:[{name:"Item Belt Mk 1",speed:60,machine_version_id:1,rank:0,hidden:!1,id:0},{name:"Item Belt Mk 2",speed:120,machine_version_id:2,rank:1,hidden:!1,id:1},{name:"Item Belt Mk 3",speed:270,machine_version_id:3,rank:2,hidden:!1,id:2},{name:"Item Belt Mk 4",speed:450,machine_version_id:4,rank:3,hidden:!1,id:3},{name:"Item Belt Mk 5",speed:660,machine_version_id:5,rank:4,hidden:!1,id:4},{name:"Item Belt Mk 6",speed:900,machine_version_id:6,rank:5,hidden:!1,id:5},{name:"internal",speed:9999999,machine_version_id:0,rank:-1,hidden:!1,id:6}],machine_class:[{name:"Constructor",plural:"Constructors",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Constructor.png",node_type_id:0,hidden:!1,id:0},{name:"Miner",plural:"Miners",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Miner_MK1.png",node_type_id:1,hidden:!1,id:1},{name:"Oil Pump",plural:"Oil Pumps",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Oil_Pump.png",node_type_id:1,hidden:!1,id:2},{name:"Assembler",plural:"Assemblers",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Assembler.png",node_type_id:0,hidden:!1,id:3},{name:"Refinery",plural:"Refineries",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Oil_Refinery.png",node_type_id:0,hidden:!1,id:4},{name:"Smelter",plural:"Smelters",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Smelter.png",node_type_id:0,hidden:!1,id:5},{name:"Generator",plural:"Generators",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Coal_Generator.png",node_type_id:0,hidden:!1,id:6},{name:"Manufacturer",plural:"Manufacturer",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Manufacturer.png",node_type_id:0,hidden:!1,id:7},{name:"Container",plural:"Containers",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Storage_Container_MK1.png",node_type_id:0,hidden:!1,id:8},{name:"Logistic",plural:"Logistics",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Splitter.png",node_type_id:0,hidden:!1,id:9},{name:"Foundry",plural:"Foundries",icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Foundry_MK1.png",node_type_id:0,hidden:!1,id:10}],machine_node:[{name:"Container Mk.1",machine_version_id:1,machine_class_id:8,speed:999999,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Storage_Container_MK1.png",input_slots:1,output_slots:1,hidden:!1,id:0},{name:"Container Mk.2",machine_version_id:2,machine_class_id:8,speed:999999,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Storage_Container_MK2.png",input_slots:1,output_slots:1,hidden:!1,id:1},{name:"Splitter",machine_version_id:7,machine_class_id:9,speed:999999,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Splitter.png",input_slots:1,output_slots:3,hidden:!1,id:2},{name:"Merger",machine_version_id:8,machine_class_id:9,speed:999999,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Merger.png",input_slots:3,output_slots:1,hidden:!1,id:3},{name:"Miner Mk.1",machine_version_id:1,machine_class_id:1,speed:100,power:5,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Miner_MK1.png",input_slots:0,output_slots:1,hidden:!1,id:4},{name:"Miner Mk.2",machine_version_id:2,machine_class_id:1,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Miner_MK2.png",speed:200,power:12,hidden:!0,input_slots:0,output_slots:1,id:5},{name:"Oil Pump",machine_version_id:1,machine_class_id:2,speed:200,power:40,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Oil_Pump.png",input_slots:0,output_slots:1,hidden:!1,id:6},{name:"Smelter Mk.1",machine_version_id:1,machine_class_id:5,speed:100,power:4,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Smelter.png",input_slots:1,output_slots:1,hidden:!1,id:7},{name:"Smelter Mk.2",machine_version_id:2,machine_class_id:5,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Smelter.png",speed:200,power:8,hidden:!0,input_slots:1,output_slots:1,id:8},{name:"Constructor Mk.1",machine_version_id:1,machine_class_id:0,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Constructor.png",speed:100,power:4,input_slots:1,output_slots:1,hidden:!1,id:9},{name:"Constructor Mk.2",machine_version_id:2,machine_class_id:0,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Constructor.png",speed:200,power:8,hidden:!0,input_slots:1,output_slots:1,id:10},{name:"Oil Refinery",machine_version_id:1,machine_class_id:4,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Oil_Refinery.png",speed:100,power:50,input_slots:1,output_slots:1,hidden:!1,id:11},{name:"Assembler Mk.1",machine_version_id:1,machine_class_id:3,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Assembler.png",speed:100,power:15,input_slots:2,output_slots:1,hidden:!1,id:12},{name:"Assembler Mk.2",machine_version_id:2,machine_class_id:3,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Assembler.png",speed:100,hidden:!0,power:30,input_slots:2,output_slots:1,id:13},{name:"Manufacturer Mk.1",machine_version_id:1,machine_class_id:7,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Manufacturer.png",speed:100,power:55,hidden:!0,input_slots:4,output_slots:1,id:14},{name:"Manufacturer Mk.2",machine_version_id:2,machine_class_id:7,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Manufacturer.png",speed:200,power:110,hidden:!0,input_slots:4,output_slots:1,id:15},{name:"Coal Generator",machine_version_id:1,machine_class_id:6,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Coal_Generator.png",speed:100,power:-50,hidden:!0,input_slots:1,output_slots:0,id:16},{name:"Fuel Generator",machine_version_id:1,machine_class_id:6,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Fuel_Generator.png",speed:100,power:-150,hidden:!0,input_slots:1,output_slots:0,id:17},{name:"Biomass Burner",machine_version_id:1,machine_class_id:6,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Biomass_Burner.png",speed:100,power:-20,hidden:!0,input_slots:1,output_slots:0,id:18},{name:"Foundry Mk.1",machine_version_id:1,machine_class_id:10,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Foundry_MK1.png",speed:100,power:16,hidden:!0,input_slots:2,output_slots:1,id:19},{name:"Foundry Mk.2",machine_version_id:2,machine_class_id:10,icon:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/Foundry_MK2.png",speed:200,power:38,hidden:!0,input_slots:2,output_slots:1,id:20}],spring_type:[{name:"Miner",hidden:!1,id:0},{name:"Container",hidden:!1,id:1}],player_unlock:[{name:"Reinforced Iron Plate (Alt.)",hidden:!1,id:0},{name:"Stitched Iron Plate",hidden:!1,id:1},{name:"Caterium Wire",hidden:!1,id:2},{name:"Encased Industrial Beam (Alt.)",hidden:!1,id:3},{name:"Heavy Modular Frame (Alt.)",hidden:!1,id:4},{name:"Iron Ingot (Alt.)",hidden:!1,id:5},{name:"Iron Wire",hidden:!1,id:6},{name:"Modular Frame (Alt.)",hidden:!1,id:7},{name:"Rotor (Alt.)",hidden:!1,id:8},{name:"Stator (Alt.)",hidden:!1,id:9},{name:"Steel Ingot (Alt.)",hidden:!1,id:10},{name:"Screw (Alt.)",hidden:!1,id:11},{name:"Quickwire (Alt.)",hidden:!1,id:12},{name:"Rubber Cable",hidden:!1,id:13},{name:"Circuit Board (Alt.)",hidden:!1,id:14},{name:"Caterium Circuit Board",hidden:!1,id:15},{name:"Caterium Computer",hidden:!1,id:16},{name:"Compacted Coal (Alt.)",hidden:!1,id:17},{name:"Silica (Alt.)",hidden:!1,id:18},{name:"Crystal Oscillator (Alt.)",hidden:!1,id:19}],spring:[{item_id:3,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:0},{item_id:1,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:1},{item_id:2,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:2},{item_id:0,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:3},{item_id:15,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:4},{item_id:25,machine_class_id:2,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:5},{item_id:26,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:6},{item_id:27,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:7},{item_id:28,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:8},{item_id:29,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:9},{item_id:30,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:10},{item_id:31,machine_class_id:1,spring_type_id:0,purities:[{name:"Impure",quantity:30,hidden:!1,id:0},{name:"Normal",quantity:60,hidden:!1,id:1},{name:"Pure",quantity:120,hidden:!1,id:2}],hidden:!1,id:11},{machine_class_id:8,spring_type_id:1,hidden:!1,id:12}],recipe:[{name:"Iron Ingot",inputs:[{item_id:1,quantity:1}],machine_class_id:5,item_id:4,time:2,power:4,quantity:1,hidden:!1,id:0},{name:"Copper Ingot",inputs:[{item_id:0,quantity:1}],machine_class_id:5,item_id:5,time:2,quantity:1,hidden:!1,id:1},{name:"Caterium Ingot",inputs:[{item_id:15,quantity:3}],machine_class_id:5,item_id:16,time:4,quantity:1,hidden:!1,id:2},{name:"Iron Plate",inputs:[{item_id:4,quantity:3}],machine_class_id:0,item_id:6,time:6,quantity:2,hidden:!1,id:3},{name:"Iron Rod",inputs:[{item_id:4,quantity:1}],machine_class_id:0,item_id:7,time:4,quantity:1,hidden:!1,id:4},{name:"Wire",inputs:[{item_id:5,quantity:1}],machine_class_id:0,item_id:9,time:4,quantity:2,hidden:!1,id:5},{name:"Iron Wire",inputs:[{item_id:4,quantity:5}],machine_class_id:0,item_id:9,time:24,quantity:9,hidden:!0,player_unlock_id:6,id:6},{name:"Caterium Wire",inputs:[{item_id:16,quantity:1}],machine_class_id:0,item_id:9,time:8,quantity:4,hidden:!0,player_unlock_id:2,id:7},{name:"Cable",inputs:[{item_id:9,quantity:2}],machine_class_id:0,item_id:10,time:4,quantity:1,hidden:!1,id:8},{name:"Screw",inputs:[{item_id:7,quantity:1}],machine_class_id:0,item_id:8,time:4,quantity:4,hidden:!1,id:9},{name:"Screw (Alt.)",inputs:[{item_id:4,quantity:5}],machine_class_id:0,item_id:8,time:24,quantity:20,hidden:!0,player_unlock_id:11,id:10},{name:"Concrete",inputs:[{item_id:2,quantity:3}],machine_class_id:0,item_id:11,time:4,quantity:1,hidden:!1,id:11},{name:"Reinforced Iron Plate",inputs:[{item_id:6,quantity:6},{item_id:8,quantity:12}],machine_class_id:3,item_id:12,time:12,quantity:1,hidden:!1,id:12},{name:"Reinforced Iron Plate (Alt.)",inputs:[{item_id:6,quantity:16},{item_id:8,quantity:250}],machine_class_id:3,item_id:12,time:12,quantity:3,hidden:!0,player_unlock_id:0,id:13},{name:"Stitched Iron Plate",inputs:[{item_id:6,quantity:10},{item_id:9,quantity:26}],machine_class_id:3,item_id:12,time:32,quantity:3,hidden:!0,player_unlock_id:1,id:14},{name:"Rotor",inputs:[{item_id:7,quantity:5},{item_id:8,quantity:25}],machine_class_id:3,item_id:14,time:15,quantity:1,hidden:!1,id:15},{name:"Rotor (Alt.)",inputs:[{item_id:20,quantity:2},{item_id:9,quantity:12}],machine_class_id:3,item_id:14,time:12,quantity:1,hidden:!0,player_unlock_id:8,id:16},{name:"Modular Frame",inputs:[{item_id:12,quantity:3},{item_id:7,quantity:12}],machine_class_id:3,item_id:13,time:60,quantity:2,hidden:!1,id:17},{name:"Modular Frame (Alt.)",inputs:[{item_id:12,quantity:2},{item_id:20,quantity:10}],machine_class_id:3,item_id:13,time:60,quantity:3,hidden:!0,player_unlock_id:7,id:18},{name:"Encased Industrial Beam",inputs:[{item_id:19,quantity:4},{item_id:11,quantity:5}],machine_class_id:3,item_id:21,time:10,quantity:1,hidden:!1,id:19},{name:"Encased Industrial Beam (Alt.)",inputs:[{item_id:20,quantity:7},{item_id:11,quantity:5}],machine_class_id:3,item_id:21,time:15,quantity:1,hidden:!0,player_unlock_id:3,id:20},{name:"Heavy Modular Frame",inputs:[{item_id:13,quantity:5},{item_id:21,quantity:5},{item_id:20,quantity:15},{item_id:8,quantity:100}],machine_class_id:7,item_id:23,time:30,quantity:1,hidden:!1,id:21},{name:"Heavy Modular Frame (Alt.)",inputs:[{item_id:13,quantity:8},{item_id:21,quantity:10},{item_id:20,quantity:36},{item_id:11,quantity:22}],machine_class_id:7,item_id:23,time:64,quantity:3,hidden:!0,player_unlock_id:4,id:22},{name:"Iron Ingot (Alt.)",inputs:[{item_id:1,quantity:2},{item_id:0,quantity:2}],machine_class_id:10,item_id:4,time:6,quantity:5,hidden:!0,player_unlock_id:5,id:23},{name:"Steel Ingot",inputs:[{item_id:1,quantity:3},{item_id:3,quantity:3}],machine_class_id:10,item_id:18,time:4,quantity:2,hidden:!1,id:24},{name:"Steel Ingot (Alt.)",inputs:[{item_id:4,quantity:3},{item_id:3,quantity:3}],machine_class_id:10,item_id:18,time:4,quantity:3,hidden:!0,player_unlock_id:10,id:25},{name:"Steel Beam",inputs:[{item_id:18,quantity:4}],machine_class_id:0,item_id:19,time:4,quantity:1,hidden:!1,id:26},{name:"Steel Pipe",inputs:[{item_id:18,quantity:3}],machine_class_id:0,item_id:20,time:6,quantity:2,hidden:!1,id:27},{name:"Quickwire",inputs:[{item_id:16,quantity:1}],machine_class_id:0,item_id:17,time:5,quantity:5,hidden:!1,id:28},{name:"Quickwire (Alt.)",inputs:[{item_id:16,quantity:1},{item_id:5,quantity:2}],machine_class_id:3,item_id:17,time:8,quantity:12,hidden:!0,player_unlock_id:12,id:29},{name:"Motor",inputs:[{item_id:14,quantity:2},{item_id:22,quantity:2}],machine_class_id:3,item_id:24,time:12,quantity:1,hidden:!1,id:30},{name:"Aluminum Ingot",inputs:[{item_id:28,quantity:7},{item_id:30,quantity:6}],machine_class_id:10,item_id:41,time:4,quantity:2,hidden:!1,id:31},{name:"S.A.M. Ingot",inputs:[{item_id:29,quantity:6}],machine_class_id:5,item_id:52,time:12,quantity:1,hidden:!1,id:32},{name:"Biofuel",inputs:[{item_id:50,quantity:4}],machine_class_id:0,item_id:51,time:4,quantity:2,hidden:!1,id:33},{name:"A.I. Limiter",inputs:[{item_id:35,quantity:1},{item_id:17,quantity:18}],machine_class_id:3,item_id:37,time:12,quantity:1,hidden:!1,id:34},{name:"Circuit Board",inputs:[{item_id:9,quantity:12},{item_id:32,quantity:6}],machine_class_id:3,item_id:35,time:12,quantity:1,hidden:!1,id:35},{name:"Circuit Board (Alt.)",inputs:[{item_id:34,quantity:16},{item_id:9,quantity:24}],machine_class_id:3,item_id:35,time:24,quantity:3,player_unlock_id:14,hidden:!1,id:36},{name:"Caterium Circuit Board",inputs:[{item_id:32,quantity:12},{item_id:17,quantity:32}],machine_class_id:3,item_id:35,time:24,quantity:3,player_unlock_id:15,hidden:!1,id:37},{name:"Rubber Cable",inputs:[{item_id:9,quantity:3},{item_id:34,quantity:2}],machine_class_id:3,item_id:10,time:8,quantity:10,player_unlock_id:13,hidden:!1,id:38},{name:"Computer",inputs:[{item_id:35,quantity:5},{item_id:10,quantity:12},{item_id:32,quantity:18},{item_id:8,quantity:60}],machine_class_id:7,item_id:36,time:32,quantity:1,hidden:!1,id:39},{name:"Caterium Computer",inputs:[{item_id:17,quantity:112},{item_id:35,quantity:10},{item_id:34,quantity:48}],machine_class_id:7,item_id:36,time:64,quantity:3,player_unlock_id:16,hidden:!1,id:40},{name:"Supercomputer",inputs:[{item_id:36,quantity:2},{item_id:37,quantity:2},{item_id:39,quantity:3},{item_id:32,quantity:21}],machine_class_id:7,item_id:38,time:32,quantity:1,hidden:!1,id:41},{name:"High-Speed Connector",inputs:[{item_id:17,quantity:40},{item_id:10,quantity:10},{item_id:32,quantity:6}],machine_class_id:7,item_id:39,time:24,quantity:1,hidden:!1,id:42},{name:"Fuel",inputs:[{item_id:25,quantity:8}],machine_class_id:4,item_id:33,time:8,quantity:5,hidden:!1,id:43},{name:"Plastic",inputs:[{item_id:25,quantity:4}],machine_class_id:4,item_id:32,time:8,quantity:3,hidden:!1,id:44},{name:"Rubber",inputs:[{item_id:25,quantity:4}],machine_class_id:4,item_id:34,time:8,quantity:4,hidden:!1,id:45},{name:"Stator",inputs:[{item_id:20,quantity:3},{item_id:9,quantity:10}],machine_class_id:3,item_id:22,time:10,quantity:1,hidden:!1,id:46},{name:"Stator (Alt.)",inputs:[{item_id:20,quantity:6},{item_id:17,quantity:25}],machine_class_id:3,item_id:22,time:20,quantity:3,player_unlock_id:9,hidden:!1,id:47},{name:"Battery",inputs:[{item_id:42,quantity:8},{item_id:27,quantity:20},{item_id:32,quantity:9},{item_id:9,quantity:24}],machine_class_id:7,item_id:46,time:32,quantity:3,hidden:!1,id:48},{name:"Compacted Coal (Alt.)",inputs:[{item_id:3,quantity:3},{item_id:27,quantity:3}],machine_class_id:3,item_id:53,time:6,quantity:3,player_unlock_id:17,hidden:!1,id:49},{name:"Silica (Alt.)",inputs:[{item_id:26,quantity:4},{item_id:2,quantity:2}],machine_class_id:3,item_id:30,time:8,quantity:9,player_unlock_id:18,hidden:!1,id:50},{name:"Quartz Crystal",inputs:[{item_id:26,quantity:2}],machine_class_id:0,item_id:55,time:4,quantity:1,hidden:!1,id:51},{name:"Quantum Crystal",inputs:[{item_id:55,quantity:6},{item_id:56,quantity:12}],machine_class_id:3,item_id:47,time:24,quantity:1,hidden:!1,id:52},{name:"Crystal Oscillator (Alt.)",inputs:[{item_id:55,quantity:20},{item_id:34,quantity:24},{item_id:37,quantity:1}],machine_class_id:7,item_id:54,time:64,quantity:1,player_unlock_id:19,hidden:!1,id:53},{name:"Crystal Oscillator",inputs:[{item_id:55,quantity:10},{item_id:10,quantity:14},{item_id:12,quantity:4}],machine_class_id:7,item_id:54,time:32,quantity:1,hidden:!1,id:54}]};function ja(e){return(ja="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})(e)}function Ra(e,t,n,i,a,r,o){try{var c=e[r](o),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(i,a)}function La(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ga(e){return(Ga=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ba(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fa(e,t){return(Fa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var za=Object(l.createMuiTheme)({typography:{useNextVariants:!0},palette:{type:"light",primary:{main:"#FF9100"},secondary:{main:"#FF3D00",contrastText:"#FAFAFA"}},themeName:"Pizazz Vermilion Gayal"}),Ha=Object(l.createMuiTheme)({typography:{useNextVariants:!0},palette:{type:"dark",primary:{main:"#FF9100"},secondary:{main:"#FF3D00",contrastText:"#FAFAFA"}},themeName:"Pizazz Vermilion Gayal"}),Wa=function(e){function t(e){var n,i,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,r=Ga(t).call(this,e),n=!r||"object"!==ja(r)&&"function"!=typeof r?Ba(i):r,Da(Ba(n),"handleNightToggle",function(){var e="light"===window.localStorage.getItem("nightMode")?"dark":"light";n.setState({theme:"light"===e?za:Ha,night:e}),window.localStorage.setItem("nightMode",e)}),Da(Ba(n),"handleDrawerToggle",function(){n.setState(function(e){return{mobileOpen:!e.mobileOpen}})}),Da(Ba(n),"drawerContents",function(){var e=n.props.classes;return a.a.createElement(a.a.Fragment,null,a.a.createElement(w.a,null,a.a.createElement(b.a,{variant:"h5",className:e.drawerTitle},"Nodes"),n.generateNodeList(),n.generateSpringList(),n.generateContainerList()),a.a.createElement(S.a,null),a.a.createElement(Pe,{parentState:Ba(n),playerUnlock:n.state.player_unlock}),a.a.createElement(S.a,null),a.a.createElement(w.a,null,a.a.createElement(jn,{Icon:R.a,label:"About/Disclaimers",title:"About/Disclaimers"},a.a.createElement(b.a,{variant:"body1"},"Created by ",a.a.createElement(C.a,{href:"https://github.com/tehalexf",target:"_blank",rel:"noopener",color:"secondary"},"Alex")," and ",a.a.createElement(C.a,{href:"https://github.com/thinkaliker",target:"_blank",rel:"noopener",color:"secondary"},"Adam")," (",a.a.createElement(C.a,{href:"https://twitter.com/thinkaliker",target:"_blank",rel:"noopener",color:"secondary"},"@thinkaliker"),")."),a.a.createElement(b.a,{variant:"body1"},"Not officially affiliated with Satisfactory, Coffee Stain Studios AB, or THQ Nordic AB."),a.a.createElement(b.a,{variant:"body1"},"Images sourced from the Satisfactory Wiki, which is sourced from Coffee Stain Studios AB's Satisfactory.")),a.a.createElement(jn,{Icon:q.a,label:"Known Issues",title:"Known Issues"},a.a.createElement("ul",null,a.a.createElement(b.a,{variant:"body1"},a.a.createElement("li",null,"Resource nodes do not have purities displayed on the graph.")),a.a.createElement(b.a,{variant:"body1"},a.a.createElement("li",null,"No option yet to hide belt and factory numbers."))))))});var o=null!=window.localStorage.getItem("nightMode")?window.localStorage.getItem("nightMode"):"light";return window.localStorage.setItem("nightMode",o),n.state={loaded:!1,mobileOpen:!1,theme:"light"===o?za:Ha,night:o},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fa(e,t)}(t,i["Component"]),n=t,(r=[{key:"getRefkeyTableFireBase",value:function(e){var t=this.state.fbdb[e];return Promise.resolve(t)}},{key:"generateRecursiveStructureFireBase",value:function(e){var t=this,n=this.state.fbdb[e];this.globalStructure=this.globalStructure||{};var i=this.globalStructure;return Promise.resolve(n).then(function(){var n,a=(n=regeneratorRuntime.mark(function n(a){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!(a.length>0)){n.next=2;break}return n.delegateYield(regeneratorRuntime.mark(function n(){var r,o,c,s;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:i[e]=a,r=Object.keys(a[0]).filter(function(e){return e.endsWith("_id")});case 2:if(!(r.length>0)){n.next=12;break}if(o=r.pop(),c=o.slice(0,-3),i[c]){n.next=10;break}return n.next=8,t.getRefkeyTableFireBase(c);case 8:i[c]=n.sent,Object.keys(i[c]).filter(function(e){return e.endsWith("_id")}).forEach(function(e){i[e.slice(0,-3)]||r.push(e)});case 10:n.next=2;break;case 12:s=function e(t,n){return Array.isArray(t)?(t.forEach(function(i,a){e(i,n)&&(console.error("Why are we doing this to an array?"),t[a]=n(i))}),!1):"object"!==ja(t)||(Object.keys(t).forEach(function(i){var a=t[i];e(a,n)&&n(a,i,t)}),!1)},Object.keys(i).forEach(function(e){i[e].forEach(function(t){Object.keys(t).filter(function(e){return e.endsWith("_id")}).forEach(function(n){var a=t[n],r=n.slice(0,-3),o=i[r];delete t[n];var c=o.filter(function(e){return e.id===a});if(1!==c.length)throw new Error("Unrecognized Id "+a+" in "+n+" within "+e);t[r]=c[0]})})}),Object.keys(i).forEach(function(e){i[e].forEach(function(t){Object.keys(t).filter(function(e){return e.endsWith("_id")}).forEach(function(n){var a=t[n],r=n.slice(0,-3),o=i[r];delete t[n];var c=o.filter(function(e){return e.id===a});if(1!==c.length)throw new Error("Unrecognized Id "+a+" in "+n+" within "+e);t[r]=c[0]}),Object.keys(t).filter(function(e){return!e.endsWith("_id")}).forEach(function(e){var n=t[e];s(n,function(e,t,n){if(t.endsWith("_id")){var a=e,r=t.slice(0,-3),o=i[r];delete n[t];var c=o.filter(function(e){return e.id===a});if(1!==c.length)throw new Error("Unrecognized Id "+a+" in table "+t+" within "+n);n[r]=c[0]}else"string"==typeof n[t]&&n[t].startsWith("http")&&((new Image).src=n[t])})})})});case 15:case"end":return n.stop()}},n)})(),"t0",2);case 2:return n.abrupt("return",i);case 3:case"end":return n.stop()}},n)}),function(){var e=this,t=arguments;return new Promise(function(i,a){var r=n.apply(e,t);function o(e){Ra(r,i,a,o,c,"next",e)}function c(e){Ra(r,i,a,o,c,"throw",e)}o(void 0)})});return function(e){return a.apply(this,arguments)}}())}},{key:"componentDidMount",value:function(){var e=this;O.a("UA-136827615-1"),O.b(window.location.pathname+window.location.search),window.addEventListener("hashchange",function(){document.location.reload()},!1),new Promise(function(e,t){if(window.location.hash){var n=null;return n=-1===window.location.hash.indexOf("?")?window.location.hash.slice(1):window.location.hash.slice(1,window.location.hash.indexOf("?")),fetch("https://api.myjson.com/bins//"+te.a.atob(decodeURIComponent(n)),{method:"GET"}).then(function(e){return e.json()}).then(function(t){e(ie(t.data))}).catch(function(t){console.log("Fetch error:",t.message),e(ie(ae))})}e(ie(ae))}).then(function(t){e.setState({coreGraphData:t},function(){e.setState({fbdb:Na,loaded:!0},function(){var t=function(){e.setState({isLoaded:!0})};["spring","recipe","path_type","machine_node","player_unlock","machine_class","item","spring_type","purity_type","node_type","machine_version","machine_class"].forEach(function(n){t=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return function(){return e.generateRecursiveStructureFireBase(t).then(function(i){e.setState(Da({},t,i),function(){console.debug("Loaded",t),n()})})}}(n,t)}),t()})})})}},{key:"generateNodeList",value:function(){var e=this,t={},n={};return this.state.recipe&&this.state.recipe.recipe.forEach(function(e){var i=t[e.machine_class.name]||[];i.push(e),t[e.machine_class.name]=i,n[e.machine_class.name]=e.machine_class.plural}),Object.keys(t).map(function(e){t[e].sort(function(e,t){return e.item.id-t.item.id})}),Object.keys(t).map(function(i){return a.a.createElement(Jt,{appObject:e,label:n[i],key:i,items:t[i]})})}},{key:"generateContainerList",value:function(){var e={};return this.state.purity_type&&this.state.spring&&this.state.spring.spring.forEach(function(t){var n=e[t.spring_type.name]||[];n.push(t),e[t.spring_type.name]=n}),e.Logistic=this.state.machine_node.machine_node.filter(function(e){return"Logistic"===e.machine_class.name}),a.a.createElement(a.a.Fragment,null,a.a.createElement(ui,{label:"Logistics",appObject:this,listItems:e}))}},{key:"generateUnlocksList",value:function(){var e=this;return this.state.player_unlock&&this.state.player_unlock.player_unlock.forEach(function(t){e.state.recipe.recipe.filter(function(e){return e.player_unlock&&e.player_unlock.id===t.id})[0]}),a.a.createElement("div",null,"hello")}},{key:"generateSpringList",value:function(){this.generateUnlocksList();var e={};return this.state.spring&&this.state.spring.spring.forEach(function(t){var n=e[t.spring_type.name]||[];n.push(t),e[t.spring_type.name]=n}),a.a.createElement(ti,{label:"Miners",listItems:e,appObject:this})}},{key:"render",value:function(){var e=this.props.classes;if(!this.state.isReady)return a.a.createElement(U,{ready:this.state.isLoaded,parentState:this});var t=this;return a.a.createElement("div",{className:e.root},a.a.createElement(f.a,null),a.a.createElement(l.MuiThemeProvider,{theme:this.state.theme},a.a.createElement(p.a,{position:"fixed",className:e.appBar},a.a.createElement(g.a,null,a.a.createElement(hi.a,{mdUp:!0,implementation:"css"},a.a.createElement("div",{className:e.centeredLogo},a.a.createElement(zi.a,{color:"inherit","aria-label":"Open drawer",onClick:this.handleDrawerToggle},a.a.createElement(T.a,null)),a.a.createElement("img",{alt:"wow so satis factory",className:e.logoSmall,src:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satoolsfactory_icons/dot.png",title:"logo"}))),a.a.createElement(hi.a,{smDown:!0,implementation:"css"},a.a.createElement("img",{alt:"wow so satis factory",className:e.logo,src:"https://raw.githubusercontent.com/rhocode/rhocode.github.io/master/img/satisgraphtory.png",title:"logo"})),a.a.createElement("div",{className:e.grow}),a.a.createElement(wa,{t:t,onNightToggle:this.handleNightToggle,night:this.state.night}),oe("opt")?a.a.createElement(G.a,{color:"inherit",onClick:function(){return t.graphSvg.optimize()}},a.a.createElement(x.a,null),a.a.createElement(hi.a,{smDown:!0,implementation:"css"},a.a.createElement("div",{className:e.label},"Optimize"))):null,a.a.createElement(G.a,{color:"inherit",onClick:function(){return t.graphSvg.analyze()}},a.a.createElement(N.a,null),a.a.createElement(hi.a,{smDown:!0,implementation:"css"},a.a.createElement("div",{className:e.label},"Analyze"))),a.a.createElement(Ri,{t:t}),a.a.createElement(ki,{t:t}))),a.a.createElement(kn,null,a.a.createElement(b.a,{variant:"h4"},"Welcome to SatisGraphtory!"),a.a.createElement(b.a,{variant:"body1"},"This is a factory planner/optimizer/analyzer tool for factories old and new, meant to accompany the game Satisfactory by Coffee Stain Studios. "),a.a.createElement("br",null),a.a.createElement(b.a,{variant:"body1"},"We are looking for more developers! If you know React, reach out to us on our ",a.a.createElement(C.a,{href:"https://discord.gg/ZRpcgqY",target:"_blank",rel:"noopener",color:"secondary"},"Discord server"),"!"),a.a.createElement(b.a,{variant:"body1"},"Thanks for checking out our tool! If you have any questions, suggestions, feedback, ",a.a.createElement(C.a,{href:"https://discord.gg/ZRpcgqY",target:"_blank",rel:"noopener",color:"secondary"},"join our community!")),a.a.createElement("br",null),a.a.createElement(b.a,{variant:"h5"},"This tool will always be free."),a.a.createElement("br",null),a.a.createElement(b.a,{variant:"h5"},"Graph Basics"),a.a.createElement("ul",null,a.a.createElement(b.a,{variant:"body1"},a.a.createElement("li",null,"Use the ",a.a.createElement("b",null,"left menu")," to ",a.a.createElement("b",null,"add")," machines to the diagram")),a.a.createElement(b.a,{variant:"body1"},a.a.createElement("li",null,a.a.createElement("b",null,"CLICK")," on a node/path to ",a.a.createElement("b",null,"select")," it")),a.a.createElement(b.a,{variant:"body1"},a.a.createElement("li",null,"Press ",a.a.createElement("b",null,"BACKSPACE")," on a selected node/path to delete it")),a.a.createElement(b.a,{variant:"body1"},a.a.createElement("li",null,"Hold down ",a.a.createElement("b",null,"SHIFT")," and ",a.a.createElement("b",null,"drag")," from node to node to create belts")),a.a.createElement(b.a,{variant:"body1"},a.a.createElement("li",null,"Use ",a.a.createElement("b",null,"MOUSE SCROLL")," to control overclock (black text in the white circle)"))),a.a.createElement(b.a,{variant:"h5"},"Sharing"),a.a.createElement(b.a,{variant:"body1"},"Generate a share code by using the Share button in the top right."),a.a.createElement("br",null),a.a.createElement(b.a,{variant:"h5"},"Legend"),a.a.createElement(b.a,{variant:"body1"},a.a.createElement("span",{style:{color:"orange"}},"Orange")," numbers means the machine wastes time doing nothing."),a.a.createElement(b.a,{variant:"body1"},a.a.createElement("span",{style:{color:"LightCoral"}},"Red")," numbers means the machine isn't processing fast enough."),a.a.createElement(b.a,{variant:"body1"},a.a.createElement("span",{style:{color:"Blue"}},"Blue")," numbers means the belt capacity was overridden (and you need to fix it ASAP!)"),a.a.createElement("br",null),a.a.createElement(b.a,{variant:"body1"},"Revisit these instructions anytime by clicking on the ",a.a.createElement("b",null,"?")," in the bottom right.")),this.state.selectedNode||this.state.selectedPath?a.a.createElement(ua,{items:this.state.item.item,label:"Options",graphSvg:this.graphSvg,overclock:this.state.selectedNode?this.state.selectedNode.overclock:-1,selected:this.state.selectedNode||this.state.selectedPath}):null,a.a.createElement(hi.a,{mdUp:!0,implementation:"css"},a.a.createElement(d.a,{container:this.props.container,variant:"temporary",anchor:"rtl"===za.direction?"right":"left",open:this.state.mobileOpen,onClose:this.handleDrawerToggle,classes:{paper:e.drawerPaper}},this.drawerContents())),a.a.createElement(hi.a,{smDown:!0,implementation:"css"},a.a.createElement("div",{className:e.hiddenFlex},a.a.createElement(d.a,{className:e.drawer,variant:"permanent",classes:{paper:e.drawerPaper}},this.drawerContents()))),a.a.createElement("div",{id:"svgParent",className:"".concat(e.content," ").concat("dark"===this.state.night?"dark":"")},this.state.loaded?a.a.createElement(_t,{parentAccessor:this,ref:function(e){t.graphSvg=e}}):a.a.createElement("div",null))))}}])&&La(n.prototype,r),o&&La(n,o),t}();Wa.propTypes={classes:s.a.object.isRequired};var Qa=Object(l.withStyles)(function(e){return{centeredLogo:{display:"flex",alignItems:"center",justifyContent:"center"},root:{display:"flex",flexGrow:1,flexBasis:"auto"},menuButton:{marginLeft:0,marginRight:12},appBar:{zIndex:e.zIndex.drawer+1,minHeight:64},drawer:{width:260,flexShrink:0,display:"flex",paddingTop:64},drawerPaper:{width:260,position:"unset"},drawerTitle:{paddingLeft:15,paddingTop:5},content:{display:"flex",flexGrow:1,paddingTop:64},toolbar:e.mixins.toolbar,logo:{width:250},logoSmall:{width:25},grow:{flexGrow:1},pathIcon:{height:15,width:15,display:"inline-block"},pathText:{display:"inline-block"},paper:{margin:2*e.spacing.unit,display:"flex"},button:{flex:"0 0 100%"},label:{paddingLeft:10},inlineDialogButton:{paddingTop:10,paddingBottom:10},dialogButton:{marginTop:10},dialogContainer:{display:"flex",flexDirection:"column"},clearButton:{paddingTop:20},hiddenFlex:{display:"flex",height:"100%"}}})(Wa);n(923),n(928);o.a.render(a.a.createElement(Qa,null),document.getElementById("app"))},928:function(e,t){}});
//# sourceMappingURL=main.f6cb1104cb6e009e012e.js.map