text: (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"./.storybook/preview.js-generated-config-entry.js":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var preview_namespaceObject={};__webpack_require__.r(preview_namespaceObject),__webpack_require__.d(preview_namespaceObject,"parameters",(function(){return parameters}));__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.for-each.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.object.define-properties.js"),__webpack_require__("./node_modules/core-js/modules/es.object.define-property.js");var ClientApi=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),esm=__webpack_require__("./node_modules/@storybook/client-logger/dist/esm/index.js"),parameters={actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}}};function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.keys(preview_namespaceObject).forEach((function(key){var value=preview_namespaceObject[key];switch(key){case"args":case"argTypes":return esm.a.warn("Invalid args/argTypes in config, ignoring.",JSON.stringify(value));case"decorators":return value.forEach((function(decorator){return Object(ClientApi.d)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return Object(ClientApi.e)(loader,!1)}));case"parameters":return Object(ClientApi.f)(function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}({},value),!1);case"argTypesEnhancers":return value.forEach((function(enhancer){return Object(ClientApi.b)(enhancer)}));case"argsEnhancers":return value.forEach((function(enhancer){return Object(ClientApi.c)(enhancer)}));case"render":return Object(ClientApi.g)(value);case"globals":case"globalTypes":var v={};return v[key]=value,Object(ClientApi.f)(v,!1);case"__namedExportsOrder":case"decorateStory":case"renderToDOM":return null;default:return console.log(key+" was not supported :( !")}}))},"./README.md":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_exports__.default='# Nodal Background\n![Nodal Background](https://raw.githubusercontent.com/david-polak/nodal-background/main/static/img/repo_background_short.jpg)\nAn abstract animated nodal background JavaScript canvas library.\n\n* [Demonstration page](https://nodal-background.polakdavid.com)\n\n## Features\n* Different modes of operation\n    * `AntiGravity` produces a pleasing effect of nodes pulling \n                    away from each other.\n    * `Gravity` creates a true n-body simulation with emerging \n                chaotic behaviour.\n    * `Simple` makes the simulation serene and non-distracting.\n     \n* Fully configurable\n  * Everything that could have been has been exposed as a configuration \n    variable. Values can be changed that greatly affect the behaviour and \n    visuals of the simulation.\n  * Concrete implementations of abstract classes can be created to achieve \n    custom behaviour.\n   \n* Interactive\n  * Nodes can be interacted with using the mouse\n  * Click scrolling changes the mass of the added node\n\n# Usage\n\n## Installation\n[NPM Package link](https://www.npmjs.com/package/nodal-background)\n```bash\nnpm install --save nodal-background\n```\n\n## React\n### Custom wrapper\n```tsx\nimport { useNodalBackground } from "nodal-background"\n\nexport const NodalBackgroundComponent = (props: NodalBackgroundProps) => {\n  const container = useRef()\n  const {setContainer} = useNodalBackground({\n    container: container.current,\n    ...props\n  })\n  \n  useEffect(() => {\n    if (container.current) {\n      setContainer(container.current)\n    }\n  }, [container.current])\n  \n  return <div ref={container}/>\n}\n```\n\n### Predefined wrapper\nThe wrapper above is also provided as an importable component.\n\n```tsx\nimport {NodalBackgroundComponent} from "nodal-background"\n\nconst YourComponent = () => <NodalBackgroundComponent>\n```\n\n## Generic JavaScript / TypeScript\n```js\nnew NodalBackground({container: document.getElementById("id")})\n```\n\n# Modes of operation\n## Gravity Mode\nhttps://user-images.githubusercontent.com/5686338/139601589-d5fa1313-59cd-4112-b781-e68cad123f30.mp4\n\n### AntiGravity Mode\nhttps://user-images.githubusercontent.com/5686338/139601633-0376d7a2-be8f-4a24-a39c-2415a0e8ce92.mp4\n\n# Configuration\n\nAll variables can be changed while the simulation is running.\n\nCanvas is by default transparent, changing the background color below the\ncanvas element combined with `nodeColor` and `linkColor` is an easy way to\nachieve a different theme.\n\nThe [demonstration page](https://nodal-background.polakdavid.com) can be used\nto interactively change the following controls.\n\n## Simulation controls\n\n#### `mode: NodalBackgroundMode`\nControls the behaviour of the entire simulation.\n\n* `NodalBackgroundMode.AntiGravity` (default)\n* `NodalBackgroundMode.Gravity`\n* `NodalBackgroundMode.Simple`\n\n#### `simMaxDistance: number, default: 150`\nMaximum distance between two nodes for the interaction to be calculated.\nHigher numbers are more computationally expensive and create a more connected\ngraph, whereas lower values produce fewer connection lines between nodes.\n\n#### `simMinDistance: number, default: 3`\nMinimum distance between two nodes for the interaction to be calculated.\nLower values produce large slingshot speeds when nodes get or spawn close \ntogether. Higher values minimize the slingshot potential. Too high values\nwill affect the perceived realism of the simulation.\n\n#### `simMassFactor: number, default: 1`\nMultiplier for node mass, affects speed and chaos.\n\n#### `simAttraction: number, default: 10`\nMultiplier for attraction, affects speed and chaos\n\n## Node controls\n#### `numberOfNodes: number, default: 100`\nThe target number of nodes, relative to a 1200x1200 pixel area. Simulation\ncomplexity rises with O(n*log n), so higher numbers are discouraged.\n\n#### `preserveNumberOfNodes: boolean, default: true`\nWhether to delete extraneous nodes, with this disabled, the user created nodes\ndo not disappear.\n\n#### `nodeColor: hex string, default: #000000`\nColor of the nodes.\n\n#### `nodeMaxInitialVelocity: number, default: 20`\nNode initial velocity is chosen at random from a range, this control affects \nthat range. Higher values significantly affect the behaviour, increasing the \nchaos.\n\n#### `nodeInitialMass: number, default: 1.5`\nInitial mass of the nodes.\n\n#### `nodeInitialMassRange: number, default: 0`\nWhen greater than 0, initial mass of nodes will be randomized up to the value.\n\n#### `nodeMaxMass: number, default: 0`\nMaximum mass of the nodes, applied when merging. Value `0` sets no maximum mass.\n\n#### `nodeVisualSize: number, default: 0.5`\nVisual node size offset, does not affect the simulation apart from merging.\n\n#### `nodeAgeFactor: number, default: 0.5`\nHow quickly nodes fade in after spawn.\n\n#### `nodeDeAgeFactor: number, default: 2`\nHow quickly nodes fade out after leaving the area.\n\n## Link controls\n#### `linkColor: hex color, default: "#000000"`\nChanges the link color.\n\n#### `linkDash: setLineDash(segments: Array<number>), default: []`\nChanges the link line between nodes.\n\n[Documentation on MDN - setLineDash()](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash)\n\n## Performance\n#### `fps: number, default: 30`\nSets the target FPS. Simulation is generally acceptable down to 20 fps.\n\n#### `fpsCounter: boolean, defaul: false`\nDisplays the FPS counter, the current implementation of the fps counter has a \nnegative impact on the actual fps, when bottlenecked it takes about 10fps.\n\n## Overrides\nCustom simulation behaviour can be achieved by extending the base abstract \nclasses.\n\nFor more information read the included implementing classes.\n\n#### `ticker: AbstractTicker`\nTicker performs the simulation steps. \n\n#### `linker: AbstractLinker`\nLinker draws links between the nodes.\n'},"./generated-stories-entry.js":function(module,exports,__webpack_require__){"use strict";(function(module){(0,__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js").configure)([__webpack_require__("./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)Introduction\\/Introduction\\.stories\\.tsx)$"),__webpack_require__("./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"),__webpack_require__("./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$")],module,!1)}).call(this,__webpack_require__("./node_modules/webpack/buildin/module.js")(module))},"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./stories/Introduction/Introduction.css":function(module,exports,__webpack_require__){(exports=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.i,'#content {\n  width: 50vw;\n  margin: auto;\n  padding: 2rem;\n  background-color: #ffffffea;\n  border-right: 1px solid #0000001a;\n  border-left: 1px solid #0000001a;\n  box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);\n  line-height: 2;\n\n  font-family: system-ui, /* macOS 10.11-10.12 */ -apple-system,\n    /* Windows 6+ */ "Segoe UI", /* Android 4+ */ "Roboto",\n    /* Ubuntu 10.10+ */ "Ubuntu", /* Gnome 3+ */ "Cantarell",\n    /* KDE Plasma 5+ */ "Noto Sans", /* fallback */ sans-serif,\n    /* macOS emoji */ "Apple Color Emoji", /* Windows emoji */ "Segoe UI Emoji",\n    /* Windows emoji */ "Segoe UI Symbol", /* Linux emoji */ "Noto Color Emoji";\n\n  position: relative;\n  z-index: 2;\n}\n\n#content img {\n  width: 100%;\n}\n',""]),module.exports=exports},"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./stories/Presets.css":function(module,exports,__webpack_require__){(exports=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.i,'#presets-content {\n  width: 30vw;\n  margin: auto;\n  /*padding: 0 2rem 0 0 ;*/\n  padding: 0.5rem 2rem;\n  background-color: #ffffffea;\n  border-right: 1px solid #0000001a;\n  border-left: 1px solid #0000001a;\n  box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);\n  line-height: 2;\n\n  font-family: system-ui, /* macOS 10.11-10.12 */ -apple-system,\n    /* Windows 6+ */ "Segoe UI", /* Android 4+ */ "Roboto",\n    /* Ubuntu 10.10+ */ "Ubuntu", /* Gnome 3+ */ "Cantarell",\n    /* KDE Plasma 5+ */ "Noto Sans", /* fallback */ sans-serif,\n    /* macOS emoji */ "Apple Color Emoji", /* Windows emoji */ "Segoe UI Emoji",\n    /* Windows emoji */ "Segoe UI Symbol", /* Linux emoji */ "Noto Color Emoji";\n\n  position: relative;\n  z-index: 2;\n}\n',""]),module.exports=exports},"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./stories/common.css":function(module,exports,__webpack_require__){(exports=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.i,"body {\n    margin: 0 !important;\n    padding: 0 !important;\n    background-color: white;\n}\n\n\n#nodal-background-wrapper {\n    height: 100%;\n    width: 100%;\n    padding:0;\n    margin:0;\n    position: fixed;\n    z-index: 1;\n}\n\n#nodal-background-wrapper canvas {\n    height: 100%;\n    width: 100%;\n}\n",""]),module.exports=exports},"./src/main/NodalBackground.ts":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return NodalBackgroundMode})),__webpack_require__.d(__webpack_exports__,"a",(function(){return NodalBackground_NodalBackground}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/core-js/modules/es.function.bind.js"),__webpack_require__("./node_modules/core-js/modules/es.date.now.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.for-each.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.array.find-index.js"),__webpack_require__("./node_modules/core-js/modules/es.array.splice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.define-property.js"),__webpack_require__("./node_modules/core-js/modules/es.array.fill.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.reflect.construct.js"),__webpack_require__("./node_modules/core-js/modules/es.object.create.js");function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var utils_Vector2=function(){function Vector2(x,y){!function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Vector2),this.x=void 0,this.y=void 0,this.x=x||0,this.y=y||0}return function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(Vector2,[{key:"clone",value:function clone(){return new Vector2(this.x,this.y)}},{key:"add",value:function add(vector){return this.x=this.x+vector.x,this.y=this.y+vector.y,this}},{key:"distance",value:function distance(vector){var distanceX=this.x-vector.x,distanceY=this.y-vector.y;return Math.sqrt(distanceX*distanceX+distanceY*distanceY)}},{key:"subtract",value:function subtract(vector){return this.x=this.x-vector.x,this.y=this.y-vector.y,this}},{key:"negate",value:function negate(){return this.x=-this.x,this.y=-this.y,this}},{key:"magnitude",value:function magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)}},{key:"multiplyByScalar",value:function multiplyByScalar(factor){return this.x=this.x*factor,this.y=this.y*factor,this}}]),Vector2}();var utils_getRandomArbitrary=function getRandomArbitrary(min,max){return Math.random()*(max-min)+min},hex_rgb=__webpack_require__("./node_modules/hex-rgb/index.js");function AbstractNode_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function BasicNode_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function BasicNode_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"==typeof call||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}var BasicNode=function(_AbstractNode){!function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(BasicNode,_AbstractNode);var _super=_createSuper(BasicNode);function BasicNode(){return BasicNode_classCallCheck(this,BasicNode),_super.apply(this,arguments)}return function BasicNode_createClass(Constructor,protoProps,staticProps){return protoProps&&BasicNode_defineProperties(Constructor.prototype,protoProps),staticProps&&BasicNode_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(BasicNode,[{key:"render",value:function render(){this._context.beginPath(),this._context.fillStyle="rgba("+this._nodeColor.red+","+this._nodeColor.green+","+this._nodeColor.blue+","+(this.age<1?this.age:1)+")",this._context.arc(this.position.x,this.position.y,Math.sqrt(this.mass/Math.PI)+this._visualSize,0,2*Math.PI),this._context.fill()}}]),BasicNode}(function(){function AbstractNode(canvas,maxVelocity,mass){!function AbstractNode_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AbstractNode),this._canvas=void 0,this._context=void 0,this._nodeColor=void 0,this._ageFactor=void 0,this._deAgeFactor=void 0,this._visualSize=void 0,this.position=void 0,this.velocity=void 0,this.age=void 0,this.mass=void 0,this._canvas=canvas,this._context=canvas.getContext("2d"),this.age=0,this.recreate(maxVelocity,mass)}return function AbstractNode_createClass(Constructor,protoProps,staticProps){return protoProps&&AbstractNode_defineProperties(Constructor.prototype,protoProps),staticProps&&AbstractNode_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(AbstractNode,[{key:"nodeColor",set:function set(nodeColor){this._nodeColor=Object(hex_rgb.a)(nodeColor)}},{key:"ageFactor",set:function set(ageFactor){this._ageFactor=ageFactor}},{key:"deAgeFactor",set:function set(deAgeFactor){this._deAgeFactor=deAgeFactor}},{key:"visualSize",set:function set(visualSize){this._visualSize=visualSize}},{key:"recreate",value:function recreate(maxVelocity,mass){this.age=0,this.mass=mass,this.position=new utils_Vector2(utils_getRandomArbitrary(0,this._canvas.width),utils_getRandomArbitrary(0,this._canvas.height)),this.velocity=new utils_Vector2(utils_getRandomArbitrary(-maxVelocity,maxVelocity),utils_getRandomArbitrary(-maxVelocity,maxVelocity))}},{key:"ageNode",value:function ageNode(tDelta){this.age=this.age+this._ageFactor*(tDelta/1e3)}},{key:"deAgeNode",value:function deAgeNode(tDelta){this.age=this.age-this._deAgeFactor*(tDelta/1e3)}}]),AbstractNode}());function AbstractTicker_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var AbstractTicker=function(){function AbstractTicker(){!function AbstractTicker_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AbstractTicker),this._maxDistance=void 0,this._minDistance=void 0,this._attraction=void 0,this._massFactor=void 0}return function AbstractTicker_createClass(Constructor,protoProps,staticProps){return protoProps&&AbstractTicker_defineProperties(Constructor.prototype,protoProps),staticProps&&AbstractTicker_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(AbstractTicker,[{key:"maxDistance",set:function set(maxDistance){this._maxDistance=maxDistance}},{key:"minDistance",set:function set(minDistance){this._minDistance=minDistance}},{key:"attraction",set:function set(attraction){this._attraction=attraction}},{key:"massFactor",set:function set(massFactor){this._massFactor=massFactor}}]),AbstractTicker}();function BasicTicker_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function BasicTicker_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function BasicTicker_setPrototypeOf(o,p){return BasicTicker_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},BasicTicker_setPrototypeOf(o,p)}function BasicTicker_createSuper(Derived){var hasNativeReflectConstruct=function BasicTicker_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var result,Super=BasicTicker_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=BasicTicker_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return BasicTicker_possibleConstructorReturn(this,result)}}function BasicTicker_possibleConstructorReturn(self,call){if(call&&("object"==typeof call||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function BasicTicker_assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function BasicTicker_getPrototypeOf(o){return BasicTicker_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},BasicTicker_getPrototypeOf(o)}var BasicTicker=function(_AbstractTicker){!function BasicTicker_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&BasicTicker_setPrototypeOf(subClass,superClass)}(BasicTicker,_AbstractTicker);var _super=BasicTicker_createSuper(BasicTicker);function BasicTicker(){return BasicTicker_classCallCheck(this,BasicTicker),_super.apply(this,arguments)}return function BasicTicker_createClass(Constructor,protoProps,staticProps){return protoProps&&BasicTicker_defineProperties(Constructor.prototype,protoProps),staticProps&&BasicTicker_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(BasicTicker,[{key:"tickSingle",value:function tickSingle(tDelta,node){var scalar=tDelta/1e3;node.position.x=node.position.x+node.velocity.x*scalar,node.position.y=node.position.y+node.velocity.y*scalar}},{key:"tickBoth",value:function tickBoth(tDelta,nodeA,nodeB){var distanceX=nodeA.position.x-nodeB.position.x,distanceY=nodeA.position.y-nodeB.position.y,distance=Math.sqrt(distanceX*distanceX+distanceY*distanceY);return distance<10?(nodeA.age<1?nodeA.age:1)*(nodeB.age<1?nodeB.age:1):distance>this._maxDistance?0:(distance-this._maxDistance)/(0-this._maxDistance)*(nodeA.age<1?nodeA.age:1)*(nodeB.age<1?nodeB.age:1)}}]),BasicTicker}(AbstractTicker);function AbstractLinker_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function StandardLinker_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function StandardLinker_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function StandardLinker_setPrototypeOf(o,p){return StandardLinker_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},StandardLinker_setPrototypeOf(o,p)}function StandardLinker_createSuper(Derived){var hasNativeReflectConstruct=function StandardLinker_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var result,Super=StandardLinker_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=StandardLinker_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return StandardLinker_possibleConstructorReturn(this,result)}}function StandardLinker_possibleConstructorReturn(self,call){if(call&&("object"==typeof call||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function StandardLinker_assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function StandardLinker_getPrototypeOf(o){return StandardLinker_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},StandardLinker_getPrototypeOf(o)}var StandardLinker=function(_AbstractLinker){!function StandardLinker_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&StandardLinker_setPrototypeOf(subClass,superClass)}(StandardLinker,_AbstractLinker);var _super=StandardLinker_createSuper(StandardLinker);function StandardLinker(){return StandardLinker_classCallCheck(this,StandardLinker),_super.apply(this,arguments)}return function StandardLinker_createClass(Constructor,protoProps,staticProps){return protoProps&&StandardLinker_defineProperties(Constructor.prototype,protoProps),staticProps&&StandardLinker_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(StandardLinker,[{key:"renderLink",value:function renderLink(factor,nodeA,nodeB){this._context.beginPath(),this._context.strokeStyle="rgba("+this._linkColor.red+","+this._linkColor.green+","+this._linkColor.blue+","+factor+")",this._context.setLineDash(this._linkDash),this._context.moveTo(nodeA.position.x,nodeA.position.y),this._context.lineTo(nodeB.position.x,nodeB.position.y),this._context.stroke()}}]),StandardLinker}(function(){function AbstractLinker(context){!function AbstractLinker_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AbstractLinker),this._context=void 0,this._linkColor=void 0,this._linkDash=[],this._context=context}return function AbstractLinker_createClass(Constructor,protoProps,staticProps){return protoProps&&AbstractLinker_defineProperties(Constructor.prototype,protoProps),staticProps&&AbstractLinker_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(AbstractLinker,[{key:"linkColor",set:function set(linkColor){this._linkColor=Object(hex_rgb.a)(linkColor)}},{key:"linkDash",set:function set(linkDash){this._linkDash=linkDash}}]),AbstractLinker}());function MouseHandler_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var MouseHandler_MouseHandler=function(){function MouseHandler(canvas,addNode){!function MouseHandler_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,MouseHandler),this.canvas=void 0,this.addNode=void 0,this.active=void 0,this.node=void 0,this.position=void 0,this.velocity=void 0,this.canvas=canvas,this.addNode=addNode,this.active=!1,this.canvas.addEventListener("mousedown",this.onMouseDown.bind(this)),this.canvas.addEventListener("mouseup",this.onMouseUp.bind(this)),this.canvas.addEventListener("mousemove",this.onMouseMove.bind(this)),this.canvas.addEventListener("wheel",this.onWheel.bind(this))}return function MouseHandler_createClass(Constructor,protoProps,staticProps){return protoProps&&MouseHandler_defineProperties(Constructor.prototype,protoProps),staticProps&&MouseHandler_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(MouseHandler,[{key:"onMouseDown",value:function onMouseDown(event){var _this=this,rect=this.canvas.getBoundingClientRect();this.position=new utils_Vector2((event.clientX-rect.left)/(rect.right-rect.left)*this.canvas.width,(event.clientY-rect.top)/(rect.bottom-rect.top)*this.canvas.height),this.node=this.addNode(),this.velocity=this.node.velocity,this.node.position=this.position,this.node.velocity=new utils_Vector2(0,0),this.active=!0,this.tick=function(){_this.node.position=_this.position.clone()}}},{key:"onMouseMove",value:function onMouseMove(event){if(this.active){var rect=this.canvas.getBoundingClientRect();this.node.position=new utils_Vector2((event.clientX-rect.left)/(rect.right-rect.left)*this.canvas.width,(event.clientY-rect.top)/(rect.bottom-rect.top)*this.canvas.height),this.position=this.node.position}}},{key:"onWheel",value:function onWheel(event){this.active&&(event.preventDefault(),this.node.mass=this.node.mass+(event.deltaY>0?-5:5))}},{key:"onMouseUp",value:function onMouseUp(){this.active&&(this.node.velocity=this.velocity,this.active=!1,this.tick=function(){})}},{key:"tick",value:function tick(){}}]),MouseHandler}();function EulerTicker_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function EulerTicker_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function EulerTicker_setPrototypeOf(o,p){return EulerTicker_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},EulerTicker_setPrototypeOf(o,p)}function EulerTicker_createSuper(Derived){var hasNativeReflectConstruct=function EulerTicker_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var result,Super=EulerTicker_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=EulerTicker_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return EulerTicker_possibleConstructorReturn(this,result)}}function EulerTicker_possibleConstructorReturn(self,call){if(call&&("object"==typeof call||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function EulerTicker_assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function EulerTicker_getPrototypeOf(o){return EulerTicker_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},EulerTicker_getPrototypeOf(o)}var EulerTicker=function(_AbstractTicker){!function EulerTicker_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&EulerTicker_setPrototypeOf(subClass,superClass)}(EulerTicker,_AbstractTicker);var _super=EulerTicker_createSuper(EulerTicker);function EulerTicker(){return EulerTicker_classCallCheck(this,EulerTicker),_super.apply(this,arguments)}return function EulerTicker_createClass(Constructor,protoProps,staticProps){return protoProps&&EulerTicker_defineProperties(Constructor.prototype,protoProps),staticProps&&EulerTicker_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(EulerTicker,[{key:"tickSingle",value:function tickSingle(tDelta,node){var scalar=tDelta/1e3;node.position.x=node.position.x+node.velocity.x*scalar,node.position.y=node.position.y+node.velocity.y*scalar}},{key:"tickBoth",value:function tickBoth(tDelta,nodeA,nodeB){var distanceX=nodeA.position.x-nodeB.position.x,distanceY=nodeA.position.y-nodeB.position.y,distance=Math.sqrt(distanceX*distanceX+distanceY*distanceY);if(distance<Math.sqrt((nodeA.mass+nodeB.mass)/Math.PI)+1.5*nodeA._visualSize)return!0;if(distance<this._minDistance)return(nodeA.age<1?nodeA.age:1)*(nodeB.age<1?nodeB.age:1);if(distance>this._maxDistance)return 0;var scalar=Math.pow(distance,-3)*this._attraction*tDelta,accelerationX=(nodeA.position.x-nodeB.position.x)*scalar,accelerationY=(nodeA.position.y-nodeB.position.y)*scalar,forceAx=-accelerationX*nodeB.mass*this._massFactor,forceAy=-accelerationY*nodeB.mass*this._massFactor,forceBx=accelerationX*nodeA.mass*this._massFactor,forceBy=accelerationY*nodeA.mass*this._massFactor;return nodeA.velocity.x+=forceAx,nodeA.velocity.y+=forceAy,nodeB.velocity.x+=forceBx,nodeB.velocity.y+=forceBy,(distance-this._maxDistance)/(0-this._maxDistance)*(nodeA.age<1?nodeA.age:1)*(nodeB.age<1?nodeB.age:1)}}]),EulerTicker}(AbstractTicker);__webpack_require__("./node_modules/core-js/modules/es.number.to-fixed.js");function FPSCounter_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var FPSCounter=function(){function FPSCounter(context,enabled){!function FPSCounter_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,FPSCounter),this.context=void 0,this.fps=void 0,this.decay=void 0,this.context=context,this.fps=1,this.decay=.9,enabled||(this.draw=function(){})}return function FPSCounter_createClass(Constructor,protoProps,staticProps){return protoProps&&FPSCounter_defineProperties(Constructor.prototype,protoProps),staticProps&&FPSCounter_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(FPSCounter,[{key:"draw",value:function draw(time){this.fps=this.decay*this.fps+(1-this.decay)*(1/(time/1e3)),this.context.font="12px serif",this.context.fillText(this.fps.toFixed(2)+" fps "+time.toFixed(2)+" ms",0,12)}}]),FPSCounter}();function AntiEulerTicker_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function AntiEulerTicker_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function AntiEulerTicker_setPrototypeOf(o,p){return AntiEulerTicker_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},AntiEulerTicker_setPrototypeOf(o,p)}function AntiEulerTicker_createSuper(Derived){var hasNativeReflectConstruct=function AntiEulerTicker_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var result,Super=AntiEulerTicker_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=AntiEulerTicker_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return AntiEulerTicker_possibleConstructorReturn(this,result)}}function AntiEulerTicker_possibleConstructorReturn(self,call){if(call&&("object"==typeof call||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function AntiEulerTicker_assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function AntiEulerTicker_getPrototypeOf(o){return AntiEulerTicker_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},AntiEulerTicker_getPrototypeOf(o)}var NodalBackgroundMode,AntiEulerTicker=function(_AbstractTicker){!function AntiEulerTicker_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&AntiEulerTicker_setPrototypeOf(subClass,superClass)}(AntiEulerTicker,_AbstractTicker);var _super=AntiEulerTicker_createSuper(AntiEulerTicker);function AntiEulerTicker(){return AntiEulerTicker_classCallCheck(this,AntiEulerTicker),_super.apply(this,arguments)}return function AntiEulerTicker_createClass(Constructor,protoProps,staticProps){return protoProps&&AntiEulerTicker_defineProperties(Constructor.prototype,protoProps),staticProps&&AntiEulerTicker_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(AntiEulerTicker,[{key:"tickSingle",value:function tickSingle(tDelta,node){var scalar=tDelta/1e3;node.position.x=node.position.x+node.velocity.x*scalar,node.position.y=node.position.y+node.velocity.y*scalar}},{key:"tickBoth",value:function tickBoth(tDelta,nodeA,nodeB){var distanceX=nodeA.position.x-nodeB.position.x,distanceY=nodeA.position.y-nodeB.position.y,distance=Math.sqrt(distanceX*distanceX+distanceY*distanceY);if(distance<Math.sqrt((nodeA.mass+nodeB.mass)/Math.PI)+1.5*nodeA._visualSize)return!0;if(distance<this._minDistance)return(nodeA.age<1?nodeA.age:1)*(nodeB.age<1?nodeB.age:1);if(distance>this._maxDistance)return 0;var scalar=Math.pow(distance,-3)*this._attraction*tDelta,accelerationX=(nodeA.position.x-nodeB.position.x)*scalar,accelerationY=(nodeA.position.y-nodeB.position.y)*scalar,forceAx=accelerationX*nodeB.mass*this._massFactor,forceAy=accelerationY*nodeB.mass*this._massFactor,forceBx=-accelerationX*nodeA.mass*this._massFactor,forceBy=-accelerationY*nodeA.mass*this._massFactor;return nodeA.velocity.x+=forceAx,nodeA.velocity.y+=forceAy,nodeB.velocity.x+=forceBx,nodeB.velocity.y+=forceBy,(distance-this._maxDistance)/(0-this._maxDistance)*(nodeA.age<1?nodeA.age:1)*(nodeB.age<1?nodeB.age:1)}}]),AntiEulerTicker}(AbstractTicker);function NodalBackground_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}!function(NodalBackgroundMode){NodalBackgroundMode.Gravity="Gravity",NodalBackgroundMode.AntiGravity="AntiGravity",NodalBackgroundMode.Simple="Simple"}(NodalBackgroundMode||(NodalBackgroundMode={}));var defaultNodalBackgroundProps={container:null,mode:NodalBackgroundMode.Gravity,numberOfNodes:100,preserveNumberOfNodes:!0,linkColor:"#000000",linkDash:[],nodeColor:"#000000",nodeMaxInitialVelocity:20,nodeInitialMass:1.5,nodeInitialMassRange:0,nodeAgeFactor:.5,nodeDeAgeFactor:2,nodeVisualSize:.5,nodeMaxMass:0,fps:30,fpsCounter:!1,ticker:null,linker:null,simMaxDistance:150,simMinDistance:3,simMassFactor:1,simAttraction:10},NodalBackground_NodalBackground=function(){function NodalBackground(props){!function NodalBackground_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodalBackground),this.props=void 0,this.canvas=void 0,this._context=void 0,this._resizeListener=void 0,this._alive=void 0,this._ticker=void 0,this._linker=void 0,this._fpsCounter=void 0,this._mouseHandler=void 0,this._tFps=void 0,this._tPrevious=void 0,this._nodes=[],this._nodesToAdd=[],this._nodesToRemove=[],this._nodesToMerge=[],this._adjustedNumberOfNodes=void 0,this._dropDistance=void 0,this._factors=[],this.props=Object.assign({},defaultNodalBackgroundProps),this.props.container=props.container,this.canvas=document.createElement("canvas"),this.props.container.appendChild(this.canvas),this._context=this.canvas.getContext("2d"),this._resizeListener=this.resize.bind(this),window.addEventListener("resize",this._resizeListener),this.nodeColor=props.nodeColor?props.nodeColor:this.props.nodeColor,this.nodeMaxInitialVelocity=props.nodeMaxInitialVelocity?props.nodeMaxInitialVelocity:this.props.nodeMaxInitialVelocity,this.nodeInitialMass=props.nodeInitialMass?props.nodeInitialMass:this.props.nodeInitialMass,this.nodeInitialMassRange=props.nodeInitialMassRange?props.nodeInitialMassRange:this.props.nodeInitialMassRange,this.nodeAgeFactor=props.nodeAgeFactor?props.nodeAgeFactor:this.props.nodeAgeFactor,this.nodeDeAgeFactor=props.nodeDeAgeFactor?props.nodeDeAgeFactor:this.props.nodeDeAgeFactor,this.nodeVisualSize=props.nodeVisualSize?props.nodeVisualSize:this.props.nodeVisualSize,this.nodeMaxMass=props.nodeMaxMass?props.nodeMaxMass:this.props.nodeMaxMass,this.numberOfNodes=props.numberOfNodes?props.numberOfNodes:this.props.numberOfNodes,this.preserveNumberOfNodes=props.preserveNumberOfNodes?props.preserveNumberOfNodes:this.preserveNumberOfNodes,this.resize(),this.mode=props.mode?props.mode:this.props.mode,this.ticker=props.ticker?props.ticker:this.props.ticker,this.simMaxDistance=props.simMaxDistance?props.simMaxDistance:this.props.simMaxDistance,this.simMinDistance=props.simMinDistance?props.simMinDistance:this.props.simMinDistance,this.simMassFactor=props.simMassFactor?props.simMassFactor:this.props.simMassFactor,this.simAttraction=props.simAttraction?props.simAttraction:this.props.simAttraction,this.linker=props.linker?props.linker:this.props.linker,this.linkColor=props.linkColor?props.linkColor:this.props.linkColor,this.linkDash=props.linkDash?props.linkDash:this.props.linkDash,this.fps=props.fps?props.fps:this.props.fps,this.fpsCounter=props.fpsCounter?props.fpsCounter:this.props.fpsCounter,this._dropDistance=0,this._mouseHandler=new MouseHandler_MouseHandler(this.canvas,this.addNode.bind(this)),this._tPrevious=Date.now(),this._alive=!0,requestAnimationFrame(this.handleAnimationFrame.bind(this))}return function NodalBackground_createClass(Constructor,protoProps,staticProps){return protoProps&&NodalBackground_defineProperties(Constructor.prototype,protoProps),staticProps&&NodalBackground_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(NodalBackground,[{key:"linkColor",set:function set(linkColor){this.props.linkColor=linkColor,this._linker.linkColor=linkColor}},{key:"nodeColor",set:function set(nodeColor){this.props.nodeColor=nodeColor,this._nodes.forEach((function(node){return node.nodeColor=nodeColor}))}},{key:"nodeMaxInitialVelocity",set:function set(nodeMaxInitialVelocity){this.props.nodeMaxInitialVelocity=nodeMaxInitialVelocity}},{key:"nodeInitialMass",get:function get(){return this.props.nodeInitialMassRange>0?utils_getRandomArbitrary(0,this.props.nodeInitialMassRange):this.props.nodeInitialMass},set:function set(nodeInitialMass){this.props.nodeInitialMass=nodeInitialMass}},{key:"nodeInitialMassRange",set:function set(nodeInitialMassRange){this.props.nodeInitialMassRange=nodeInitialMassRange}},{key:"nodeAgeFactor",set:function set(nodeAgeFactor){this.props.nodeAgeFactor=nodeAgeFactor,this._nodes.forEach((function(node){return node.ageFactor=nodeAgeFactor}))}},{key:"nodeDeAgeFactor",set:function set(nodeDeAgeFactor){this.props.nodeDeAgeFactor=nodeDeAgeFactor,this._nodes.forEach((function(node){return node.deAgeFactor=nodeDeAgeFactor}))}},{key:"nodeVisualSize",set:function set(nodeVisualSize){this.props.nodeVisualSize=nodeVisualSize,this._nodes.forEach((function(node){return node.visualSize=nodeVisualSize}))}},{key:"nodeMaxMass",set:function set(nodeMaxMass){this.props.nodeMaxMass=nodeMaxMass}},{key:"ticker",set:function set(ticker){if(ticker){this.props.ticker=ticker;var instantiable=ticker;this._ticker=new instantiable}}},{key:"linker",set:function set(linker){if(linker){this.props.linker=linker;var instantiable=linker;this._linker=new instantiable(this._context)}else this._linker=new StandardLinker(this._context)}},{key:"linkDash",set:function set(linkDash){this.props.linkDash=linkDash,this._linker.linkDash=linkDash}},{key:"mode",set:function set(mode){this.props.mode=mode,mode===NodalBackgroundMode.Gravity?this._ticker=new EulerTicker:mode===NodalBackgroundMode.AntiGravity?this._ticker=new AntiEulerTicker:mode===NodalBackgroundMode.Simple?this._ticker=new BasicTicker:this._ticker=new EulerTicker,this._ticker.maxDistance=this.props.simMaxDistance,this._ticker.minDistance=this.props.simMinDistance,this._ticker.massFactor=this.props.simMassFactor,this._ticker.attraction=this.props.simAttraction}},{key:"simMaxDistance",set:function set(simMaxDistance){this.props.simMaxDistance=simMaxDistance,this._ticker.maxDistance=simMaxDistance}},{key:"simMinDistance",set:function set(simMinDistance){this.props.simMinDistance=simMinDistance,this._ticker.minDistance=simMinDistance}},{key:"simMassFactor",set:function set(simMassFactor){this.props.simMassFactor=simMassFactor,this._ticker.massFactor=simMassFactor}},{key:"simAttraction",set:function set(simAttraction){this.props.simAttraction=simAttraction,this._ticker.attraction=simAttraction}},{key:"numberOfNodes",set:function set(numberOfNodes){this.props.numberOfNodes=numberOfNodes;var pixels=this.canvas.width*this.canvas.height;for(this._adjustedNumberOfNodes=pixels/144e4*numberOfNodes;this._adjustedNumberOfNodes>this._nodes.length+this._nodesToAdd.length;)this.addNode()}},{key:"fps",set:function set(fps){this.props.fps=fps,this._tFps=1/fps*1e3}},{key:"fpsCounter",set:function set(fpsCounter){this.props.fpsCounter=fpsCounter,this._fpsCounter=new FPSCounter(this._context,fpsCounter)}},{key:"preserveNumberOfNodes",set:function set(preserveNumberOfNodes){this.props.preserveNumberOfNodes=preserveNumberOfNodes}},{key:"destroy",value:function destroy(){this._alive?(window.removeEventListener("resize",this._resizeListener),this.canvas.remove()):this._alive=!1}},{key:"resize",value:function resize(){this.canvas.width=this.props.container.clientWidth*devicePixelRatio,this.canvas.height=this.props.container.clientHeight*devicePixelRatio,this.numberOfNodes=this.props.numberOfNodes}},{key:"handleAnimationFrame",value:function handleAnimationFrame(){if(this._alive){var now=Date.now(),tDelta=now-this._tPrevious;tDelta>this._tFps&&(this.tick(tDelta),this._tPrevious=now-tDelta%this._tFps),requestAnimationFrame(this.handleAnimationFrame.bind(this))}else this.destroy()}},{key:"addNode",value:function addNode(){var node=new BasicNode(this.canvas,this.props.nodeMaxInitialVelocity,this.nodeInitialMass);return node.nodeColor=this.props.nodeColor,node.visualSize=this.props.nodeVisualSize,node.ageFactor=this.props.nodeAgeFactor,node.deAgeFactor=this.props.nodeDeAgeFactor,this._nodesToAdd.push(node),node}},{key:"mergeNodes",value:function mergeNodes(nodeA,nodeB){nodeA.velocity.x=(nodeA.mass*nodeA.velocity.x+nodeB.mass*nodeB.velocity.x)/(nodeA.mass+nodeB.mass),nodeA.velocity.y=(nodeA.mass*nodeA.velocity.y+nodeB.mass*nodeB.velocity.y)/(nodeA.mass+nodeB.mass),nodeA.mass+=nodeB.mass,this.props.nodeMaxMass>0&&nodeA.mass>this.props.nodeMaxMass&&(nodeA.mass=this.props.nodeMaxMass),nodeB.recreate(this.props.nodeMaxInitialVelocity,this.nodeInitialMass)}},{key:"tick",value:function tick(time){var _this=this;this._context.clearRect(0,0,this.canvas.width,this.canvas.height),this._fpsCounter.draw(time);for(var _loop=function _loop(){var node=_this._nodesToRemove.pop(),index=_this._nodes.findIndex((function(n){return n===node}));_this._nodes.splice(index,1)};this._nodesToRemove.length;)_loop();for(;this._nodesToAdd.length;)this._nodes.push(this._nodesToAdd.pop()),this._factors.push([]);for(var i=0;i<this._nodes.length;i++)for(var j=i+1;j<this._nodes.length;j++)this._factors[i][j]=this._ticker.tickBoth(time,this._nodes[i],this._nodes[j]);for(var _i=0;_i<this._nodes.length;_i++){var node=this._nodes[_i];this._ticker.tickSingle(time,node),this._mouseHandler.tick()}for(var _i2=0;_i2<this._nodes.length;_i2++)for(var _j=_i2+1;_j<this._nodes.length;_j++){var factor=this._factors[_i2][_j];!0!==factor&&!1!==factor||(this._nodesToMerge.push([this._nodes[_i2],this._nodes[_j]]),factor=0),factor>.01&&this._linker.renderLink(factor,this._nodes[_i2],this._nodes[_j])}for(;this._nodesToMerge.length;){var toMerge=this._nodesToMerge.pop(),nodeA=toMerge[0],nodeB=toMerge[1];nodeA.mass>nodeB.mass?this.mergeNodes(nodeA,nodeB):this.mergeNodes(nodeB,nodeA)}for(var _i3=0;_i3<this._nodes.length;_i3++){var _nodeA=this._nodes[_i3];if(_nodeA.render(),_nodeA.position.x<-this._dropDistance||_nodeA.position.y<-this._dropDistance||_nodeA.position.x>this.canvas.width+this._dropDistance||_nodeA.position.y>this.canvas.height+this._dropDistance)if(_nodeA.age<0){if(!this.props.preserveNumberOfNodes){_nodeA.recreate(this.props.nodeMaxInitialVelocity,this.nodeInitialMass);continue}this._nodes.length+this._nodesToRemove.length>this._adjustedNumberOfNodes?this._nodesToRemove.push(_nodeA):_nodeA.recreate(this.props.nodeMaxInitialVelocity,this.nodeInitialMass)}else _nodeA.age>1?_nodeA.age=1:_nodeA.deAgeNode(time);else _nodeA.ageNode(time)}}}]),NodalBackground}()},"./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$":function(module,exports,__webpack_require__){var map={"./AllControls/AllControls.stories.tsx":"./stories/AllControls/AllControls.stories.tsx","./Introduction/Introduction.stories.tsx":"./stories/Introduction/Introduction.stories.tsx","./Presets/AntiGravityChill.stories.tsx":"./stories/Presets/AntiGravityChill.stories.tsx","./Presets/GravityChill.stories.tsx":"./stories/Presets/GravityChill.stories.tsx","./Presets/GravitySpaz.stories.tsx":"./stories/Presets/GravitySpaz.stories.tsx","./Presets/SimpleDash.stories.tsx":"./stories/Presets/SimpleDash.stories.tsx","./Themes/Dark.stories.tsx":"./stories/Themes/Dark.stories.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"},"./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$":function(module,exports){function webpackEmptyContext(req){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=function(){return[]},webpackEmptyContext.resolve=webpackEmptyContext,module.exports=webpackEmptyContext,webpackEmptyContext.id="./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},"./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)Introduction\\/Introduction\\.stories\\.tsx)$":function(module,exports,__webpack_require__){var map={"./Introduction/Introduction.stories.tsx":"./stories/Introduction/Introduction.stories.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./stories sync recursive ^\\.(?:(?:^|\\/|(?:(?:(?!(?:^|\\/)\\.).)*?)\\/)Introduction\\/Introduction\\.stories\\.tsx)$"},"./stories/AllControls/AllControls.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"AllControls",(function(){return AllControls}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./stories/NodalBackgroundWrapper.tsx"),_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./stories/ArgumentTypes.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react/jsx-runtime.js");__webpack_exports__.default={title:"Controls/All Controls",argTypes:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.a),args:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.b),parameters:{controls:{expanded:!0},previewTabs:{"storybook/docs/panel":{hidden:!0}},backgrounds:{disable:!0}}};var AllControls=function AllControls(props){return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__.a,Object.assign({},props))};AllControls.displayName="AllControls",AllControls.parameters=Object.assign({storySource:{source:"(props: any) => <NodalBackgroundWrapper {...props} />"}},AllControls.parameters);try{AllControls.displayName="AllControls",AllControls.__docgenInfo={description:"",displayName:"AllControls",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["stories/AllControls/AllControls.stories.tsx#AllControls"]={docgenInfo:AllControls.__docgenInfo,name:"AllControls",path:"stories/AllControls/AllControls.stories.tsx#AllControls"})}catch(__react_docgen_typescript_loader_error){}},"./stories/ArgumentTypes.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return DefaultArguments})),__webpack_require__.d(__webpack_exports__,"a",(function(){return ArgumentTypes}));var _src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/main/NodalBackground.ts"),DefaultArguments={mode:_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_0__.b.AntiGravity,linkColor:"#000000",nodeColor:"#000000",numberOfNodes:100,preserveNumberOfNodes:!0,fps:30,fpsCounter:!1,linkDash:[],nodeMaxInitialVelocity:20,nodeInitialMass:1.5,nodeInitialMassRange:0,nodeAgeFactor:.5,nodeDeAgeFactor:2,nodeVisualSize:.5,nodeMaxMass:0,simMaxDistance:150,simMinDistance:3,simMassFactor:1,simAttraction:10},ArgumentTypes={mode:{description:"The type of the behaviour of the nodes. Greatly affects the visuals.",control:{type:"radio"},options:[_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_0__.b.AntiGravity,_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_0__.b.Gravity,_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_0__.b.Simple],table:{type:{summary:"enum[AntiGravity|Gravity|Simple]"},defaultValue:{summary:"AntiGravity"}}},numberOfNodes:{description:"Target number of nodes in a 1200x1200 area (fuzzy).",control:{type:"range",min:1,max:300,step:1},table:{type:{summary:"number"},defaultValue:{summary:100}}},preserveNumberOfNodes:{description:"Whether to preserve the number of nodes.",control:{type:"boolean"},table:{type:{summary:"boolean"},defaultValue:{summary:!0}}},nodeColor:{description:"Color of the nodes.",control:{type:"color"},table:{type:{summary:"hex color"},defaultValue:{summary:"#000000"}}},nodeMaxInitialVelocity:{description:"Initial velocity of nodes.",control:{type:"range",min:0,max:300,step:.01},table:{type:{summary:"number"},defaultValue:{summary:20}}},nodeInitialMass:{description:"Initial mass of the nodes.",control:{type:"range",min:1,max:100,step:.1},table:{type:{summary:"number"},defaultValue:{summary:1.5}}},nodeInitialMassRange:{description:"Range of the initial mass of the nodes.",control:{type:"range",min:0,max:100,step:.1},table:{type:{summary:"number"},defaultValue:{summary:0}}},nodeMaxMass:{description:"Maximum node size when merging, prevents large nodes.",control:{type:"range",min:0,max:500,step:1},table:{type:{summary:"number"},defaultValue:{summary:0}}},nodeVisualSize:{description:"Visual size of the nodes (does not affect gravity)",control:{type:"range",min:0,max:30,step:.01},table:{type:{summary:"number"},defaultValue:{summary:1.5}}},nodeAgeFactor:{description:"How quickly nodes fade in.",control:{type:"range",min:0,max:10,step:.01},table:{type:{summary:"number"},defaultValue:{summary:.5}}},nodeDeAgeFactor:{description:"How quickly nodes fade out.",control:{type:"range",min:0,max:10,step:.01},table:{type:{summary:"number"},defaultValue:{summary:2}}},fps:{description:"Target fps",control:{type:"range",min:1,max:300,step:1},table:{type:{summary:"number"},defaultValue:{summary:30}}},linkColor:{description:"Color of the links between nodes.",control:{type:"color"},table:{type:{summary:"hex color"},defaultValue:{summary:"#000000"}}},linkDash:{description:"Segments of links, try [20,10] or [12,3,3]",control:{type:"object",raw:!0},table:{type:{summary:"setLineDash(segments: Array<number>)"},defaultValue:{summary:"[]"}}},fpsCounter:{description:"Displays a fps counter. (expensive)",control:{type:"boolean"},table:{type:{summary:"boolean"},defaultValue:{summary:!1}}},simMaxDistance:{description:"Maximum simulation distance between nodes. Affects overall visuals and performance.",control:{type:"range",min:1,max:300,step:.1},table:{type:{summary:"number"},defaultValue:{summary:150}}},simMinDistance:{description:"Minimum simulation distance between nodes. Low values produce significant slingshot speeds.",control:{type:"range",min:0,max:100,step:.01},table:{type:{summary:"number"},defaultValue:{summary:1}}},simMassFactor:{description:"Mass factor multiplier",control:{type:"range",min:0,max:100,step:.01},table:{type:{summary:"number"},defaultValue:{summary:1}}},simAttraction:{description:"Strength of the force applied between nodes.",control:{type:"range",min:0,max:100,step:.01},table:{type:{summary:"number"},defaultValue:{summary:10}}}}},"./stories/Introduction/Introduction.css":function(module,exports,__webpack_require__){var api=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),content=__webpack_require__("./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./stories/Introduction/Introduction.css");"string"==typeof(content=content.__esModule?content.default:content)&&(content=[[module.i,content,""]]);var options={insert:"head",singleton:!1};api(content,options);module.exports=content.locals||{}},"./stories/Introduction/Introduction.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"Introduction",(function(){return Introduction}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./stories/NodalBackgroundWrapper.tsx"),react_markdown__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react-markdown/lib/react-markdown.js"),_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__=(__webpack_require__("./stories/common.css"),__webpack_require__("./stories/Introduction/Introduction.css"),__webpack_require__("./stories/ArgumentTypes.tsx")),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react/jsx-runtime.js");__webpack_exports__.default={title:"Introduction",component:Introduction,argTypes:{mode:_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__.a.mode,numberOfNodes:_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__.a.numberOfNodes,linkColor:_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__.a.linkColor,nodeColor:_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__.a.nodeColor},args:{mode:_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__.b.mode,linkColor:_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__.b.linkColor,nodeColor:_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__.b.nodeColor,numberOfNodes:_ArgumentTypes__WEBPACK_IMPORTED_MODULE_6__.b.numberOfNodes},parameters:{controls:{expanded:!0},docs:{page:null},previewTabs:{"storybook/docs/panel":{hidden:!0}},backgrounds:{disable:!0}}};var Introduction=function Introduction(props){var readme=__webpack_require__("./README.md");return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__.a,Object.assign({},props)),Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{id:"content",children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_markdown__WEBPACK_IMPORTED_MODULE_3__.a,{children:readme.default})})]})};Introduction.parameters=Object.assign({storySource:{source:'function Introduction(props: NodalBackgroundProps) {\n  const readme = require("../../README.md")\n  return (\n    <>\n      <NodalBackgroundWrapper {...props} />\n      <div id="content">\n        <ReactMarkdown>{readme.default}</ReactMarkdown>\n      </div>\n    </>\n  )\n}'}},Introduction.parameters);try{Introduction.displayName="Introduction",Introduction.__docgenInfo={description:"",displayName:"Introduction",props:{container:{defaultValue:null,description:"",name:"container",required:!1,type:{name:"Element"}},mode:{defaultValue:null,description:"",name:"mode",required:!1,type:{name:"enum",value:[{value:'"Gravity"'},{value:'"AntiGravity"'},{value:'"Simple"'}]}},numberOfNodes:{defaultValue:null,description:"",name:"numberOfNodes",required:!1,type:{name:"number"}},preserveNumberOfNodes:{defaultValue:null,description:"",name:"preserveNumberOfNodes",required:!1,type:{name:"boolean"}},linkColor:{defaultValue:null,description:"",name:"linkColor",required:!1,type:{name:"string"}},linkDash:{defaultValue:null,description:"",name:"linkDash",required:!1,type:{name:"number[]"}},nodeColor:{defaultValue:null,description:"",name:"nodeColor",required:!1,type:{name:"string"}},nodeMaxInitialVelocity:{defaultValue:null,description:"",name:"nodeMaxInitialVelocity",required:!1,type:{name:"number"}},nodeInitialMass:{defaultValue:null,description:"",name:"nodeInitialMass",required:!1,type:{name:"number"}},nodeInitialMassRange:{defaultValue:null,description:"",name:"nodeInitialMassRange",required:!1,type:{name:"number"}},nodeAgeFactor:{defaultValue:null,description:"",name:"nodeAgeFactor",required:!1,type:{name:"number"}},nodeDeAgeFactor:{defaultValue:null,description:"",name:"nodeDeAgeFactor",required:!1,type:{name:"number"}},nodeVisualSize:{defaultValue:null,description:"",name:"nodeVisualSize",required:!1,type:{name:"number"}},nodeMaxMass:{defaultValue:null,description:"",name:"nodeMaxMass",required:!1,type:{name:"number"}},fps:{defaultValue:null,description:"",name:"fps",required:!1,type:{name:"number"}},fpsCounter:{defaultValue:null,description:"",name:"fpsCounter",required:!1,type:{name:"boolean"}},simMaxDistance:{defaultValue:null,description:"",name:"simMaxDistance",required:!1,type:{name:"number"}},simMinDistance:{defaultValue:null,description:"",name:"simMinDistance",required:!1,type:{name:"number"}},simMassFactor:{defaultValue:null,description:"",name:"simMassFactor",required:!1,type:{name:"number"}},simAttraction:{defaultValue:null,description:"",name:"simAttraction",required:!1,type:{name:"number"}},ticker:{defaultValue:null,description:"",name:"ticker",required:!1,type:{name:"typeof AbstractTicker"}},linker:{defaultValue:null,description:"",name:"linker",required:!1,type:{name:"typeof AbstractLinker"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["stories/Introduction/Introduction.stories.tsx#Introduction"]={docgenInfo:Introduction.__docgenInfo,name:"Introduction",path:"stories/Introduction/Introduction.stories.tsx#Introduction"})}catch(__react_docgen_typescript_loader_error){}},"./stories/NodalBackgroundWrapper.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return NodalBackgroundWrapper_NodalBackgroundWrapper}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js");var react=__webpack_require__("./node_modules/react/index.js"),NodalBackground=__webpack_require__("./src/main/NodalBackground.ts");__webpack_require__("./node_modules/core-js/modules/es.array.is-array.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function useNodalBackground(props){var fps=props.fps,fpsCounter=props.fpsCounter,mode=props.mode,numberOfNodes=props.numberOfNodes,preserveNumberOfNodes=props.preserveNumberOfNodes,linkColor=props.linkColor,linkDash=props.linkDash,nodeColor=props.nodeColor,nodeMaxInitialVelocity=props.nodeMaxInitialVelocity,nodeInitialMass=props.nodeInitialMass,nodeInitialMassRange=props.nodeInitialMassRange,nodeAgeFactor=props.nodeAgeFactor,nodeDeAgeFactor=props.nodeDeAgeFactor,nodeVisualSize=props.nodeVisualSize,nodeMaxMass=props.nodeMaxMass,ticker=props.ticker,linker=props.linker,simMaxDistance=props.simMaxDistance,simMassFactor=props.simMassFactor,simMinDistance=props.simMinDistance,simAttraction=props.simAttraction,_useState2=_slicedToArray(Object(react.useState)(props.container),2),container=_useState2[0],setContainer=_useState2[1],_useState4=_slicedToArray(Object(react.useState)(null),2),nodalBackground=_useState4[0],setNodalBackground=_useState4[1];return Object(react.useEffect)((function(){if(container){var _nodalBackground=new NodalBackground.a(props);return setNodalBackground(_nodalBackground),function(){_nodalBackground.destroy()}}}),[container]),Object(react.useEffect)((function(){null!=linkColor&&nodalBackground&&(nodalBackground.linkColor=linkColor)}),[linkColor]),Object(react.useEffect)((function(){null!=linkDash&&nodalBackground&&(nodalBackground.linkDash=linkDash)}),[linkDash]),Object(react.useEffect)((function(){null!=mode&&nodalBackground&&(nodalBackground.mode=mode)}),[mode]),Object(react.useEffect)((function(){null!=nodeColor&&nodalBackground&&(nodalBackground.nodeColor=nodeColor)}),[nodeColor]),Object(react.useEffect)((function(){null!=numberOfNodes&&nodalBackground&&(nodalBackground.numberOfNodes=numberOfNodes)}),[numberOfNodes]),Object(react.useEffect)((function(){null!=preserveNumberOfNodes&&nodalBackground&&(nodalBackground.preserveNumberOfNodes=preserveNumberOfNodes)}),[preserveNumberOfNodes]),Object(react.useEffect)((function(){null!=fps&&nodalBackground&&(nodalBackground.fps=fps)}),[fps]),Object(react.useEffect)((function(){null!=fpsCounter&&nodalBackground&&(nodalBackground.fpsCounter=fpsCounter)}),[fpsCounter]),Object(react.useEffect)((function(){null!=ticker&&nodalBackground&&(nodalBackground.ticker=ticker)}),[ticker]),Object(react.useEffect)((function(){null!=linker&&nodalBackground&&(nodalBackground.linker=linker)}),[linker]),Object(react.useEffect)((function(){null!=nodeMaxInitialVelocity&&nodalBackground&&(nodalBackground.nodeMaxInitialVelocity=nodeMaxInitialVelocity)}),[nodeMaxInitialVelocity]),Object(react.useEffect)((function(){null!=nodeInitialMass&&nodalBackground&&(nodalBackground.nodeInitialMass=nodeInitialMass)}),[nodeInitialMass]),Object(react.useEffect)((function(){null!=nodeInitialMassRange&&nodalBackground&&(nodalBackground.nodeInitialMassRange=nodeInitialMassRange)}),[nodeInitialMassRange]),Object(react.useEffect)((function(){null!=nodeAgeFactor&&nodalBackground&&(nodalBackground.nodeAgeFactor=nodeAgeFactor)}),[nodeAgeFactor]),Object(react.useEffect)((function(){null!=nodeDeAgeFactor&&nodalBackground&&(nodalBackground.nodeDeAgeFactor=nodeDeAgeFactor)}),[nodeDeAgeFactor]),Object(react.useEffect)((function(){null!=nodeVisualSize&&nodalBackground&&(nodalBackground.nodeVisualSize=nodeVisualSize)}),[nodeVisualSize]),Object(react.useEffect)((function(){null!=nodeMaxMass&&nodalBackground&&(nodalBackground.nodeMaxMass=nodeMaxMass)}),[nodeMaxMass]),Object(react.useEffect)((function(){null!=simMaxDistance&&nodalBackground&&(nodalBackground.simMaxDistance=simMaxDistance)}),[simMaxDistance]),Object(react.useEffect)((function(){null!=simMassFactor&&nodalBackground&&(nodalBackground.simMassFactor=simMassFactor)}),[simMassFactor]),Object(react.useEffect)((function(){null!=simMinDistance&&nodalBackground&&(nodalBackground.simMinDistance=simMinDistance)}),[simMinDistance]),Object(react.useEffect)((function(){null!=simAttraction&&nodalBackground&&(nodalBackground.simAttraction=simAttraction)}),[simAttraction]),{setContainer:setContainer,nodalBackground:nodalBackground}}var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),NodalBackgroundComponent_NodalBackgroundComponent=function NodalBackgroundComponent(props){var container=Object(react.useRef)(),setContainer=useNodalBackground(Object.assign({container:container.current},props)).setContainer;return Object(react.useEffect)((function(){container.current&&setContainer(container.current)}),[container.current]),Object(jsx_runtime.jsx)("div",{id:"nodal-background-component",ref:container})};NodalBackgroundComponent_NodalBackgroundComponent.displayName="NodalBackgroundComponent";try{NodalBackgroundComponent_NodalBackgroundComponent.displayName="NodalBackgroundComponent",NodalBackgroundComponent_NodalBackgroundComponent.__docgenInfo={description:"",displayName:"NodalBackgroundComponent",props:{container:{defaultValue:null,description:"",name:"container",required:!1,type:{name:"Element"}},mode:{defaultValue:null,description:"",name:"mode",required:!1,type:{name:"enum",value:[{value:'"Gravity"'},{value:'"AntiGravity"'},{value:'"Simple"'}]}},numberOfNodes:{defaultValue:null,description:"",name:"numberOfNodes",required:!1,type:{name:"number"}},preserveNumberOfNodes:{defaultValue:null,description:"",name:"preserveNumberOfNodes",required:!1,type:{name:"boolean"}},linkColor:{defaultValue:null,description:"",name:"linkColor",required:!1,type:{name:"string"}},linkDash:{defaultValue:null,description:"",name:"linkDash",required:!1,type:{name:"number[]"}},nodeColor:{defaultValue:null,description:"",name:"nodeColor",required:!1,type:{name:"string"}},nodeMaxInitialVelocity:{defaultValue:null,description:"",name:"nodeMaxInitialVelocity",required:!1,type:{name:"number"}},nodeInitialMass:{defaultValue:null,description:"",name:"nodeInitialMass",required:!1,type:{name:"number"}},nodeInitialMassRange:{defaultValue:null,description:"",name:"nodeInitialMassRange",required:!1,type:{name:"number"}},nodeAgeFactor:{defaultValue:null,description:"",name:"nodeAgeFactor",required:!1,type:{name:"number"}},nodeDeAgeFactor:{defaultValue:null,description:"",name:"nodeDeAgeFactor",required:!1,type:{name:"number"}},nodeVisualSize:{defaultValue:null,description:"",name:"nodeVisualSize",required:!1,type:{name:"number"}},nodeMaxMass:{defaultValue:null,description:"",name:"nodeMaxMass",required:!1,type:{name:"number"}},fps:{defaultValue:null,description:"",name:"fps",required:!1,type:{name:"number"}},fpsCounter:{defaultValue:null,description:"",name:"fpsCounter",required:!1,type:{name:"boolean"}},simMaxDistance:{defaultValue:null,description:"",name:"simMaxDistance",required:!1,type:{name:"number"}},simMinDistance:{defaultValue:null,description:"",name:"simMinDistance",required:!1,type:{name:"number"}},simMassFactor:{defaultValue:null,description:"",name:"simMassFactor",required:!1,type:{name:"number"}},simAttraction:{defaultValue:null,description:"",name:"simAttraction",required:!1,type:{name:"number"}},ticker:{defaultValue:null,description:"",name:"ticker",required:!1,type:{name:"typeof AbstractTicker"}},linker:{defaultValue:null,description:"",name:"linker",required:!1,type:{name:"typeof AbstractLinker"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/main/NodalBackgroundComponent.tsx#NodalBackgroundComponent"]={docgenInfo:NodalBackgroundComponent_NodalBackgroundComponent.__docgenInfo,name:"NodalBackgroundComponent",path:"src/main/NodalBackgroundComponent.tsx#NodalBackgroundComponent"})}catch(__react_docgen_typescript_loader_error){}var NodalBackgroundWrapper_NodalBackgroundWrapper=function NodalBackgroundWrapper(props){var container=Object(react.useRef)(),setContainer=useNodalBackground(Object.assign({container:container.current},props)).setContainer;return Object(react.useEffect)((function(){container.current&&setContainer(container.current)}),[container.current]),Object(jsx_runtime.jsx)("div",{id:"nodal-background-wrapper",ref:container})};NodalBackgroundWrapper_NodalBackgroundWrapper.displayName="NodalBackgroundWrapper";try{NodalBackgroundWrapper_NodalBackgroundWrapper.displayName="NodalBackgroundWrapper",NodalBackgroundWrapper_NodalBackgroundWrapper.__docgenInfo={description:"",displayName:"NodalBackgroundWrapper",props:{container:{defaultValue:null,description:"",name:"container",required:!1,type:{name:"Element"}},mode:{defaultValue:null,description:"",name:"mode",required:!1,type:{name:"enum",value:[{value:'"Gravity"'},{value:'"AntiGravity"'},{value:'"Simple"'}]}},numberOfNodes:{defaultValue:null,description:"",name:"numberOfNodes",required:!1,type:{name:"number"}},preserveNumberOfNodes:{defaultValue:null,description:"",name:"preserveNumberOfNodes",required:!1,type:{name:"boolean"}},linkColor:{defaultValue:null,description:"",name:"linkColor",required:!1,type:{name:"string"}},linkDash:{defaultValue:null,description:"",name:"linkDash",required:!1,type:{name:"number[]"}},nodeColor:{defaultValue:null,description:"",name:"nodeColor",required:!1,type:{name:"string"}},nodeMaxInitialVelocity:{defaultValue:null,description:"",name:"nodeMaxInitialVelocity",required:!1,type:{name:"number"}},nodeInitialMass:{defaultValue:null,description:"",name:"nodeInitialMass",required:!1,type:{name:"number"}},nodeInitialMassRange:{defaultValue:null,description:"",name:"nodeInitialMassRange",required:!1,type:{name:"number"}},nodeAgeFactor:{defaultValue:null,description:"",name:"nodeAgeFactor",required:!1,type:{name:"number"}},nodeDeAgeFactor:{defaultValue:null,description:"",name:"nodeDeAgeFactor",required:!1,type:{name:"number"}},nodeVisualSize:{defaultValue:null,description:"",name:"nodeVisualSize",required:!1,type:{name:"number"}},nodeMaxMass:{defaultValue:null,description:"",name:"nodeMaxMass",required:!1,type:{name:"number"}},fps:{defaultValue:null,description:"",name:"fps",required:!1,type:{name:"number"}},fpsCounter:{defaultValue:null,description:"",name:"fpsCounter",required:!1,type:{name:"boolean"}},simMaxDistance:{defaultValue:null,description:"",name:"simMaxDistance",required:!1,type:{name:"number"}},simMinDistance:{defaultValue:null,description:"",name:"simMinDistance",required:!1,type:{name:"number"}},simMassFactor:{defaultValue:null,description:"",name:"simMassFactor",required:!1,type:{name:"number"}},simAttraction:{defaultValue:null,description:"",name:"simAttraction",required:!1,type:{name:"number"}},ticker:{defaultValue:null,description:"",name:"ticker",required:!1,type:{name:"typeof AbstractTicker"}},linker:{defaultValue:null,description:"",name:"linker",required:!1,type:{name:"typeof AbstractLinker"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["stories/NodalBackgroundWrapper.tsx#NodalBackgroundWrapper"]={docgenInfo:NodalBackgroundWrapper_NodalBackgroundWrapper.__docgenInfo,name:"NodalBackgroundWrapper",path:"stories/NodalBackgroundWrapper.tsx#NodalBackgroundWrapper"})}catch(__react_docgen_typescript_loader_error){}},"./stories/Presets.css":function(module,exports,__webpack_require__){var api=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),content=__webpack_require__("./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./stories/Presets.css");"string"==typeof(content=content.__esModule?content.default:content)&&(content=[[module.i,content,""]]);var options={insert:"head",singleton:!1};api(content,options);module.exports=content.locals||{}},"./stories/Presets/AntiGravityChill.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"AntiGravityChill",(function(){return AntiGravityChill}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./stories/NodalBackgroundWrapper.tsx"),_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./stories/ArgumentTypes.tsx"),_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/main/NodalBackground.ts"),react_markdown__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/react-markdown/lib/react-markdown.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__("./stories/Presets.css"),__webpack_require__("./node_modules/react/jsx-runtime.js"));__webpack_exports__.default={title:"Presets/Anti Gravity Chill",argTypes:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.a),args:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.b,{mode:_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_4__.b.AntiGravity,numberOfNodes:40,nodeVisualSize:2,simMaxDistance:180,simMinDistance:0,simAttraction:4.5}),parameters:{controls:{expanded:!0},previewTabs:{"storybook/docs/panel":{hidden:!0}},backgrounds:{disable:!0}}};var AntiGravityChill=function AntiGravityChill(props){return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__.a,Object.assign({},props)),Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{id:"presets-content",children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_markdown__WEBPACK_IMPORTED_MODULE_5__.a,{children:"\n  ## AntiGravity Chill\n  AntiGravity mode with less movement and larger node sizes.\n  ```\n  mode: NodalBackgroundMode.AntiGravity,\n  numberOfNodes: 40,\n  nodeVisualSize: 2,\n  simMaxDistance: 180,\n  simMinDistance: 0,\n  simAttraction: 4.5,\n  ```\n  "})})]})};AntiGravityChill.parameters=Object.assign({storySource:{source:'(props: any) => {\n  const description = `\n  ## AntiGravity Chill\n  AntiGravity mode with less movement and larger node sizes.\n  \\`\\`\\`\n  mode: NodalBackgroundMode.AntiGravity,\n  numberOfNodes: 40,\n  nodeVisualSize: 2,\n  simMaxDistance: 180,\n  simMinDistance: 0,\n  simAttraction: 4.5,\n  \\`\\`\\`\n  `\n\n  return (\n    <>\n      <NodalBackgroundWrapper {...props} />\n      <div id="presets-content">\n        <ReactMarkdown>{description}</ReactMarkdown>\n      </div>\n    </>\n  )\n}'}},AntiGravityChill.parameters);try{AntiGravityChill.displayName="AntiGravityChill",AntiGravityChill.__docgenInfo={description:"",displayName:"AntiGravityChill",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["stories/Presets/AntiGravityChill.stories.tsx#AntiGravityChill"]={docgenInfo:AntiGravityChill.__docgenInfo,name:"AntiGravityChill",path:"stories/Presets/AntiGravityChill.stories.tsx#AntiGravityChill"})}catch(__react_docgen_typescript_loader_error){}},"./stories/Presets/GravityChill.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"GravityChill",(function(){return GravityChill}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./stories/NodalBackgroundWrapper.tsx"),_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./stories/ArgumentTypes.tsx"),_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/main/NodalBackground.ts"),react_markdown__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/react-markdown/lib/react-markdown.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__("./stories/Presets.css"),__webpack_require__("./node_modules/react/jsx-runtime.js"));__webpack_exports__.default={title:"Presets/Gravity Chill",argTypes:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.a),args:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.b,{mode:_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_4__.b.Gravity,numberOfNodes:130,nodeVisualSize:1.5,nodeMaxMass:30,simMaxDistance:85,simMinDistance:10,simAttraction:3}),parameters:{controls:{expanded:!0},previewTabs:{"storybook/docs/panel":{hidden:!0}},backgrounds:{disable:!0}}};var GravityChill=function GravityChill(props){return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__.a,Object.assign({},props)),Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{id:"presets-content",children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_markdown__WEBPACK_IMPORTED_MODULE_5__.a,{children:"\n  ## Gravity Chill\n  Gravity mode with less movement and larger node sizes.\n  ```\n  mode: NodalBackgroundMode.Gravity,\n  numberOfNodes:  130,\n  nodeVisualSize:  1.5,\n  nodeMaxMass: 30,\n  simMaxDistance:  85,\n  simMinDistance:  10,\n  simAttraction:  3\n  ```\n  "})})]})};GravityChill.parameters=Object.assign({storySource:{source:'(props: any) => {\n  const description = `\n  ## Gravity Chill\n  Gravity mode with less movement and larger node sizes.\n  \\`\\`\\`\n  mode: NodalBackgroundMode.Gravity,\n  numberOfNodes:  130,\n  nodeVisualSize:  1.5,\n  nodeMaxMass: 30,\n  simMaxDistance:  85,\n  simMinDistance:  10,\n  simAttraction:  3\n  \\`\\`\\`\n  `\n\n  return (\n    <>\n      <NodalBackgroundWrapper {...props} />\n      <div id="presets-content">\n        <ReactMarkdown>{description}</ReactMarkdown>\n      </div>\n    </>\n  )\n}'}},GravityChill.parameters);try{GravityChill.displayName="GravityChill",GravityChill.__docgenInfo={description:"",displayName:"GravityChill",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["stories/Presets/GravityChill.stories.tsx#GravityChill"]={docgenInfo:GravityChill.__docgenInfo,name:"GravityChill",path:"stories/Presets/GravityChill.stories.tsx#GravityChill"})}catch(__react_docgen_typescript_loader_error){}},"./stories/Presets/GravitySpaz.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"GravitySpaz",(function(){return GravitySpaz}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./stories/NodalBackgroundWrapper.tsx"),_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./stories/ArgumentTypes.tsx"),_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/main/NodalBackground.ts"),react_markdown__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/react-markdown/lib/react-markdown.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__("./stories/Presets.css"),__webpack_require__("./node_modules/react/jsx-runtime.js"));__webpack_exports__.default={title:"Presets/Gravity Spaz",argTypes:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.a),args:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.b,{mode:_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_4__.b.Gravity,numberOfNodes:150,preserveNumberOfNodes:!1,nodeVisualSize:2.2,simMaxDistance:115,simAttraction:30}),parameters:{controls:{expanded:!0},previewTabs:{"storybook/docs/panel":{hidden:!0}},backgrounds:{disable:!0}}};var GravitySpaz=function GravitySpaz(props){return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__.a,Object.assign({},props)),Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{id:"presets-content",children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_markdown__WEBPACK_IMPORTED_MODULE_5__.a,{children:"\n  ## Gravity Spaz\n  Gravity mode with extreme movement. Use clickscroll to add large nodes.\n  ```\n  mode: NodalBackgroundMode.Gravity,\n  numberOfNodes:150,\n  preserveNumberOfNodes:false,\n  nodeVisualSize:2.2,\n  simMaxDistance:115,\n  simAttraction:30\n  ```\n  "})})]})};GravitySpaz.parameters=Object.assign({storySource:{source:'(props: any) => {\n  const description = `\n  ## Gravity Spaz\n  Gravity mode with extreme movement. Use clickscroll to add large nodes.\n  \\`\\`\\`\n  mode: NodalBackgroundMode.Gravity,\n  numberOfNodes:150,\n  preserveNumberOfNodes:false,\n  nodeVisualSize:2.2,\n  simMaxDistance:115,\n  simAttraction:30\n  \\`\\`\\`\n  `\n\n  return (\n    <>\n      <NodalBackgroundWrapper {...props} />\n      <div id="presets-content">\n        <ReactMarkdown>{description}</ReactMarkdown>\n      </div>\n    </>\n  )\n}'}},GravitySpaz.parameters);try{GravitySpaz.displayName="GravitySpaz",GravitySpaz.__docgenInfo={description:"",displayName:"GravitySpaz",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["stories/Presets/GravitySpaz.stories.tsx#GravitySpaz"]={docgenInfo:GravitySpaz.__docgenInfo,name:"GravitySpaz",path:"stories/Presets/GravitySpaz.stories.tsx#GravitySpaz"})}catch(__react_docgen_typescript_loader_error){}},"./stories/Presets/SimpleDash.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"SimpleDash",(function(){return SimpleDash}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./stories/NodalBackgroundWrapper.tsx"),_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./stories/ArgumentTypes.tsx"),_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/main/NodalBackground.ts"),react_markdown__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/react-markdown/lib/react-markdown.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__("./stories/Presets.css"),__webpack_require__("./node_modules/react/jsx-runtime.js"));__webpack_exports__.default={title:"Presets/Simple Dash",argTypes:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.a,{backgroundColor:{description:"Background color of this page, not a prop on the component.",control:{type:"color"}}}),args:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.b,{mode:_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_4__.b.Simple,linkDash:[1,6,1,2],linkColor:"#835600",nodeColor:"#835600",backgroundColor:"#decfac",numberOfNodes:120,nodeInitialMassRange:10,simMaxDistance:180}),parameters:{controls:{expanded:!0},previewTabs:{"storybook/docs/panel":{hidden:!0}},backgrounds:{disable:!0}}};var SimpleDash=function SimpleDash(props){return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{style:{backgroundColor:props.backgroundColor,height:"100vh",width:"100vw",position:"absolute"},children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__.a,Object.assign({},props))}),Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{id:"presets-content",children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_markdown__WEBPACK_IMPORTED_MODULE_5__.a,{children:'\n  ## Simple Dash\n  Dashed links can create interesting visuals.\n  ```\n    mode: NodalBackgroundMode.Simple,\n    linkDash: [1,6,1,2],\n    linkColor: "#835600",\n    nodeColor: "#835600",\n    backgroundColor: "#decfac",\n    numberOfNodes: 120,\n    nodeInitialMassRange: 10,\n    simMaxDistance: 180\n  ```\n  '})})]})};SimpleDash.parameters=Object.assign({storySource:{source:'(props: any) => {\n  const description = `\n  ## Simple Dash\n  Dashed links can create interesting visuals.\n  \\`\\`\\`\n    mode: NodalBackgroundMode.Simple,\n    linkDash: [1,6,1,2],\n    linkColor: "#835600",\n    nodeColor: "#835600",\n    backgroundColor: "#decfac",\n    numberOfNodes: 120,\n    nodeInitialMassRange: 10,\n    simMaxDistance: 180\n  \\`\\`\\`\n  `\n\n  return (\n    <>\n      <div\n        style={{\n          backgroundColor: props.backgroundColor,\n          height: "100vh",\n          width: "100vw",\n          position: "absolute",\n        }}\n      >\n        <NodalBackgroundWrapper {...props} />\n      </div>\n      <div id="presets-content">\n        <ReactMarkdown>{description}</ReactMarkdown>\n      </div>\n    </>\n  )\n}'}},SimpleDash.parameters);try{SimpleDash.displayName="SimpleDash",SimpleDash.__docgenInfo={description:"",displayName:"SimpleDash",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["stories/Presets/SimpleDash.stories.tsx#SimpleDash"]={docgenInfo:SimpleDash.__docgenInfo,name:"SimpleDash",path:"stories/Presets/SimpleDash.stories.tsx#SimpleDash"})}catch(__react_docgen_typescript_loader_error){}},"./stories/Themes/Dark.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"DarkBlue",(function(){return DarkBlue}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./stories/NodalBackgroundWrapper.tsx"),_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./stories/ArgumentTypes.tsx"),_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_5__=(__webpack_require__("./stories/Presets.css"),__webpack_require__("./src/main/NodalBackground.ts")),react_markdown__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react-markdown/lib/react-markdown.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react/jsx-runtime.js");__webpack_exports__.default={title:"Themes/Dark Blue",argTypes:Object.assign({backgroundColor:{description:"Background color of this page, not a prop on the component.",control:{type:"color"}}},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.a),args:Object.assign({},_ArgumentTypes__WEBPACK_IMPORTED_MODULE_3__.b,{mode:_src_main_NodalBackground__WEBPACK_IMPORTED_MODULE_5__.b.Gravity,numberOfNodes:130,nodeVisualSize:1.5,nodeMaxMass:30,simMaxDistance:85,simMinDistance:10,simAttraction:3,nodeColor:"#ffffff",linkColor:"#ffffff",backgroundColor:"#080b2b"}),parameters:{controls:{expanded:!0},previewTabs:{"storybook/docs/panel":{hidden:!0}},backgrounds:{disable:!0}}};var DarkBlue=function DarkBlue(props){return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{style:{backgroundColor:props.backgroundColor,height:"100vh",width:"100vw",position:"absolute"},children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_NodalBackgroundWrapper__WEBPACK_IMPORTED_MODULE_2__.a,Object.assign({},props))}),Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{id:"presets-content",children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_markdown__WEBPACK_IMPORTED_MODULE_6__.a,{children:'\n  ## Dark theme\n  Dark theme with the Gravity Chill preset.\n  ```\n    nodeColor: "#ffffff",\n    linkColor: "#ffffff",\n    backgroundColor: "#0a0f44"\n  ```\n  '})})]})};DarkBlue.parameters=Object.assign({storySource:{source:'(props: any) => {\n  const description = `\n  ## Dark theme\n  Dark theme with the Gravity Chill preset.\n  \\`\\`\\`\n    nodeColor: "#ffffff",\n    linkColor: "#ffffff",\n    backgroundColor: "#0a0f44"\n  \\`\\`\\`\n  `\n\n  return (\n    <>\n      <div\n        style={{\n          backgroundColor: props.backgroundColor,\n          height: "100vh",\n          width: "100vw",\n          position: "absolute",\n        }}\n      >\n        <NodalBackgroundWrapper {...props} />\n      </div>\n      <div id="presets-content">\n        <ReactMarkdown>{description}</ReactMarkdown>\n      </div>\n    </>\n  )\n}'}},DarkBlue.parameters);try{DarkBlue.displayName="DarkBlue",DarkBlue.__docgenInfo={description:"",displayName:"DarkBlue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["stories/Themes/Dark.stories.tsx#DarkBlue"]={docgenInfo:DarkBlue.__docgenInfo,name:"DarkBlue",path:"stories/Themes/Dark.stories.tsx#DarkBlue"})}catch(__react_docgen_typescript_loader_error){}},"./stories/common.css":function(module,exports,__webpack_require__){var api=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),content=__webpack_require__("./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./stories/common.css");"string"==typeof(content=content.__esModule?content.default:content)&&(content=[[module.i,content,""]]);var options={insert:"head",singleton:!1};api(content,options);module.exports=content.locals||{}},"./storybook-init-framework-entry.js":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js")},0:function(module,exports,__webpack_require__){__webpack_require__("./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js"),__webpack_require__("./node_modules/@storybook/core-client/dist/esm/globals/globals.js"),__webpack_require__("./storybook-init-framework-entry.js"),__webpack_require__("./node_modules/@storybook/addon-docs/dist/esm/frameworks/common/config.js-generated-config-entry.js"),__webpack_require__("./node_modules/@storybook/addon-docs/dist/esm/frameworks/react/config.js-generated-config-entry.js"),__webpack_require__("./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js"),__webpack_require__("./node_modules/@storybook/addon-links/dist/esm/preset/addDecorator.js-generated-config-entry.js"),__webpack_require__("./node_modules/@storybook/addon-backgrounds/dist/esm/preset/addDecorator.js-generated-config-entry.js"),__webpack_require__("./node_modules/@storybook/addon-backgrounds/dist/esm/preset/addParameter.js-generated-config-entry.js"),__webpack_require__("./node_modules/@storybook/addon-measure/dist/esm/preset/addDecorator.js-generated-config-entry.js"),__webpack_require__("./node_modules/@storybook/addon-outline/dist/esm/preset/addDecorator.js-generated-config-entry.js"),__webpack_require__("./.storybook/preview.js-generated-config-entry.js"),module.exports=__webpack_require__("./generated-stories-entry.js")},1:function(module,exports){}},[[0,5,6]]]);