{"version":3,"sources":["webpack:///../../../../../src/.internal/plugins/forceDirected/ForceDirectedLink.ts","webpack:///../../../../../src/.internal/plugins/forceDirected/ForceDirectedNode.ts","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/add.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/cover.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/quad.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/x.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/y.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/quadtree.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/data.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/extent.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/find.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/remove.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/root.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/size.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/visit.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/visitAfter.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/constant.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/jiggle.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/collide.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/link.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-dispatch/src/dispatch.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-timer/src/timer.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/simulation.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/x.js","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/y.js","webpack:///../../../../../src/.internal/plugins/forceDirected/ForceDirectedSeries.ts","webpack:///C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/manyBody.js","webpack:///../../../../../src/.internal/plugins/forceDirected/ForceDirectedTree.ts","webpack:///./plugins/forceDirected.js"],"names":["ForceDirectedLink_ForceDirectedLink","_super","ForceDirectedLink","_this","call","this","className","interfaceColors","InterfaceColorSet","fillOpacity","strokeOpacity","stroke","getFor","isMeasured","nonScalingStroke","interactionsEnabled","distance","strength","applyTheme","tslib_es6","prototype","validate","source","target","path","Path","x","pixelX","y","pixelY","isHidden","isHiding","hide","show","Object","defineProperty","_source","value","_disposers","push","events","on","invalidate","_target","adapter","isEnabled","apply","properties","setPropertyValue","Sprite","Registry","registeredClasses","ForceDirectedNode_ForceDirectedNode","ForceDirectedNode","applyOnClones","togglable","draggable","setStateOnChildren","isActive","expandAll","linksWith","Dictionary","dataItem","component","nodeDragStarted","updateSimulation","outerCircle","createChild","Circle","shouldClone","strokeWidth","bgColor","fill","states","create","scale","outerActiveState","visible","circle","hiddenState","radius","addDisposer","updateLabelSize","label","Label","horizontalCenter","verticalCenter","textAlign","textValign","add","pixelRadius","text","dsRadius","defaultState","Type","width","height","copyFrom","setActive","children","dataItemsInvalid","childrenInited","initNode","updateNodeList","each","child","node","parentLink","dispatchVisibility","restartSimulation","getPropertyValue","linkWith","link","getKey","uid","links","parent","zIndex","nodeIndex","nodes","indexOf","childIndex","forceLinks","childLinks","setKey","unlinkWith","removeKey","Container","tree","d","isNaN","xm","ym","xp","yp","right","bottom","i","j","_root","leaf","data","x0","_x0","y0","_y0","x1","_x1","y1","_y1","length","_x","_y","next","Array","src_quad","defaultX","defaultY","quadtree","Quadtree","NaN","addAll","undefined","leaf_copy","copy","treeProto","pop","cover","n","xz","yz","Infinity","Math","floor","z","visit","extent","_","arguments","find","x2","y2","q","x3","y3","quads","Quad","dx","dy","d2","sqrt","remove","retainer","previous","removeAll","root","size","callback","visitAfter","constant","jiggle","random","vx","vy","index","nodeById","nodeId","get","Error","noop","dispatch","t","Dispatch","type","name","c","set","slice","concat","constructor","typename","T","typenames","types","trim","split","map","hasOwnProperty","parseTypenames","that","args","taskHead","taskTail","frame","timeout","interval","pokeDelay","clockLast","clockNow","clockSkew","clock","performance","timer__typeof","now","Date","setFrame","window","requestAnimationFrame","bind","f","setTimeout","clearNow","Timer","_call","_time","_next","timer","delay","time","restart","wake","e","timerFlush","t0","t2","t1","sleep","nap","poke","clearTimeout","clearInterval","setInterval","TypeError","stop","initialRadius","initialAngle","PI","src_simulation","simulation","alpha","alphaMin","alphaDecay","pow","alphaTarget","velocityDecay","forces","Map","stepper","step","event","tick","iterations","k","forEach","force","fx","fy","initializeNodes","angle","cos","sin","initializeForce","initialize","closest","d3_force_src_x","strengths","d3_force_src_y","ForceDirectedSeries_ForceDirectedSeriesDataItem","ForceDirectedSeriesDataItem","hasChildren","List","duration","fields","_visible","event_1","dispatchImmediately","toValue","event_2","values","setValue","_node","component_1","node_1","Disposer","removeValue","addSprite","itemsFocusable","role","focusable","once","ev","readerTitle","populateString","itemReaderText","hoverable","level","color","colors","getIndex","setProperty","hiddenInLegend","collapsed","createLegendMarker","marker","_legendDataItem","valueLabel","Series","ForceDirectedSeries_ForceDirectedSeries","ForceDirectedSeries","d3forceSimulation","maxRadius","Percent","minRadius","ColorSet","manyBodyStrength","centerStrength","updateRadiuses","dataItems","updateLinksAndNodes","w","utils_Math","innerWidth","h","innerHeight","getMaxValue","max","cmax","validateDataItems","_dataDisposers","_maxValue","reset","min","dataFields","processLinkWith","chart","feedLegend","_linkForce","distances","count","bias","id","l","b","m","_typeof","initializeStrength","initializeDistance","src_link","_collisionForce","radii","xi","yi","ri","ri2","prepare","quad","rj","r","collide","linkDatum","getDistance","getStrength","__disabled","disabled","distanceMin2","distanceMax2","theta2","accumulate","weight","abs","distanceMin","distanceMax","theta","manyBody","nodeDragEnded","updateRadius","minSide","Utils","cursorOverStyle","Mouse","pointer","default","maxLevels","index_1","diColor","utils_Array","dataItemToConnect","getDataItemById","linkWithStrength","di","createDataItem","_nodes","createNode","_links","createLink","RoundedRectangle","cornerRadius","legendDataItem","colorOrig","property","ForceDirectedTree_ForceDirectedTreeDataItem","ForceDirectedTreeDataItem","SerialChart","ForceDirectedTree_ForceDirectedTree","ForceDirectedTree","seriesContainer","layout","createSeries","legend","legendData_1","series","legendSettings","labelText","labels","template","itemLabelText","valueText","valueLabels","itemValueText","applyInternalDefaults","language","translate","getExporting","exporting","info","format","am4plugins_forceDirected","forceDirected_namespaceObject"],"mappings":";;;;;;;;;;;;;;;;;;;yfAqEAA,EAAA,SAAAC,GA8BC,SAAAC,IAAA,IAAAC,EACCF,EAAAG,KAAAC,OAAOA,KACPF,EAAKG,UAAY,oBAEjB,IAAIC,EAAkB,IAAIC,EAAA,SAE1BL,EAAKM,YAAc,EACnBN,EAAKO,cAAgB,GACrBP,EAAKQ,OAASJ,EAAgBK,OAAO,QACrCT,EAAKU,YAAa,EAClBV,EAAKW,kBAAmB,EAExBX,EAAKY,qBAAsB,EAE3BZ,EAAKa,SAAW,IAChBb,EAAKc,SAAW,EAEhBd,EAAKe,eAoHP,OAnKuCC,EAAA,EAAAjB,EAAAD,GAyD/BC,EAAAkB,UAAAC,SAAP,WACCpB,EAAAmB,UAAMC,SAAQjB,KAAAC,MACd,IAAIiB,EAASjB,KAAKiB,OACdC,EAASlB,KAAKkB,OACdD,GAAUC,IACblB,KAAKmB,KAAOC,EAAA,QAAeC,EAAGJ,EAAOK,OAAQC,EAAGN,EAAOO,SAAYJ,EAAA,QAAeC,EAAGH,EAAOI,OAAQC,EAAGL,EAAOM,SAE1GP,EAAOQ,UAAYP,EAAOO,UAAYR,EAAOS,UAAYR,EAAOQ,SACnE1B,KAAK2B,OAGL3B,KAAK4B,SAWRC,OAAAC,eAAWjC,EAAAkB,UAAA,cAUX,WACC,OAAOf,KAAK+B,aAXb,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eI,eAE1CJ,EAAeK,YAClBR,EAAOS,YAAYH,SAAS3W,KAAOwW,EAAeK,WAE/CL,EAAeO,gBAClBV,EAAOS,YAAYH,SAAS3W,KAAOwW,EAAeO,sBAQxDV,EAAOnT,KAAOoT,EACdD,EAAO5E,WAAW9J,KAAO,SASjBsO,EAAAxa,UAAAub,sBAAV,WAEC1c,EAAAmB,UAAMub,sBAAqBvc,KAAAC,MAItByF,EAAA,SAAezF,KAAKsU,eACxBtU,KAAKsU,YAActU,KAAKuc,SAASC,UAAU,yBAUnCjB,EAAAxa,UAAA0b,aAAV,eAAA3c,EAAAE,KACO0c,EAAY9c,EAAAmB,UAAM0b,aAAY1c,KAAAC,MAWpC,OAVA0c,EAAUna,QAAQ6C,IAAI,mBAAoB,SAACuX,GAQ1C,MAPmB,OAAfA,EAAKC,QAAkC,QAAfD,EAAKC,QAChC9c,EAAK+b,OAAO1V,KAAK,SAAC0V,GACdpW,EAAA,SAAeoW,EAAO9E,WAAWjR,kBAC5B6W,EAAK5F,WAAW8E,EAAO9E,WAAWjR,YAIrC6W,IAEDD,GAGTnB,EA5JA,CAAuCF,EAAA,GAoKvCxY,EAAA,EAASC,kBAAqC,kBAAIwY,GAClDzY,EAAA,EAASC,kBAA6C,0BAAIqY,GCzP1DlM,OAAA4N,yBAAkCC","file":"./plugins/forceDirected.js","sourcesContent":["/**\r\n * ForceDirectedLink module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite, ISpriteProperties, ISpriteAdapters, ISpriteEvents } from \"../../core/Sprite\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { ForceDirectedNode } from \"./ForceDirectedNode\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[ForceDirectedLink]].\r\n */\r\nexport interface IForceDirectedLinkProperties extends ISpriteProperties {\r\n\r\n\t/**\r\n\t * Distance between centers of source and target nodes.\r\n\t */\r\n\tdistance?: number;\r\n\r\n\t/**\r\n\t * Strength of the \"traction\" between source and target nodes.\r\n\t */\r\n\tstrength?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[ForceDirectedLink]].\r\n */\r\nexport interface IForceDirectedLinkEvents extends ISpriteEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ForceDirectedLink]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IForceDirectedLinkAdapters extends ISpriteAdapters, IForceDirectedLinkProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * A class that builds links between [[ForceDirectedNode]] elements.\r\n *\r\n * @see {@link IForceDirectedLinkEvents} for a list of available events\r\n * @see {@link IForceDirectedLinkAdapters} for a list of available Adapters\r\n * @since 4.3.8\r\n * @important\r\n */\r\nexport class ForceDirectedLink extends Sprite {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IForceDirectedLinkProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IForceDirectedLinkAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IForceDirectedLinkEvents;\r\n\r\n\t/**\r\n\t * Link source node\r\n\t */\r\n\tprotected _source: ForceDirectedNode;\r\n\r\n\t/**\r\n\t * Link parent node\r\n\t */\r\n\tprotected _target: ForceDirectedNode;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedLink\";\r\n\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\r\n\t\tthis.fillOpacity = 0;\r\n\t\tthis.strokeOpacity = 0.5;\r\n\t\tthis.stroke = interfaceColors.getFor(\"grid\");\r\n\t\tthis.isMeasured = false;\r\n\t\tthis.nonScalingStroke = true;\r\n\r\n\t\tthis.interactionsEnabled = false;\r\n\r\n\t\tthis.distance = 1.5;\r\n\t\tthis.strength = 1;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Validates element:\r\n\t * * Triggers events\r\n\t * * Redraws the element\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\tsuper.validate();\r\n\t\tlet source = this.source;\r\n\t\tlet target = this.target;\r\n\t\tif (source && target) {\r\n\t\t\tthis.path = $path.moveTo({ x: source.pixelX, y: source.pixelY }) + $path.lineTo({ x: target.pixelX, y: target.pixelY });\r\n\r\n\t\t\tif (source.isHidden || target.isHidden || source.isHiding || target.isHiding) {\r\n\t\t\t\tthis.hide();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.show()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Source node - a node link starts from.\r\n\t * \r\n\t * @param value Source node\r\n\t */\r\n\tpublic set source(value: ForceDirectedNode) {\r\n\t\tif (value) {\r\n\t\t\tthis._source = value;\r\n\t\t\tthis._disposers.push(value.events.on(\"positionchanged\", this.invalidate, this, false));\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Source node\r\n\t */\r\n\tpublic get source(): ForceDirectedNode {\r\n\t\treturn this._source;\r\n\t}\r\n\r\n\t/**\r\n\t * Target node - a node link ends at.\r\n\t * \r\n\t * @param value Target node\r\n\t */\r\n\tpublic set target(value: ForceDirectedNode) {\r\n\t\tif (value) {\r\n\t\t\tthis._target = value;\r\n\t\t\tthis._disposers.push(value.events.on(\"positionchanged\", this.invalidate, this, false));\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Target node\r\n\t */\r\n\tpublic get target(): ForceDirectedNode {\r\n\t\treturn this._target;\r\n\t}\r\n\r\n\t/**\r\n\t * Distance between centers of source and target nodes.\r\n\t *\r\n\t * This is relative to the radii to sum of both source and target nodes.\r\n\t *\r\n\t * E.g. if this would be set to `1` both nodes would be touching each other.\r\n\t *\r\n\t * @default 1.5\r\n\t * @param value Distance\r\n\t */\r\n\tpublic set distance(value: number) {\r\n\t\tthis.setPropertyValue(\"distance\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Distance\r\n\t */\r\n\tpublic get distance(): number {\r\n\t\tif (this.adapter.isEnabled(\"distance\")) {\r\n\t\t\treturn this.adapter.apply(\"distance\", this.properties.distance);\r\n\t\t}\r\n\t\treturn this.properties.distance;\r\n\t}\r\n\r\n\t/**\r\n\t * Relative \"strength\" of the traction between linked nodes.\r\n\t *\r\n\t * Available values: 0 to XX.\r\n\t *\r\n\t * The bigger the number, the more rigid the link and the less it will\r\n\t * stretch when node is dragged.\r\n\t *\r\n\t * Carefully with very big numbers: nodes and links might start behaving\r\n\t * quite \"nerviously\".\r\n\t *\r\n\t * @default 1\r\n\t * @param value Strength\r\n\t */\r\n\tpublic set strength(value: number) {\r\n\t\tthis.setPropertyValue(\"strength\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Strength\r\n\t */\r\n\tpublic get strength(): number {\r\n\t\tif (this.adapter.isEnabled(\"strength\")) {\r\n\t\t\treturn this.adapter.apply(\"strength\", this.properties.strength);\r\n\t\t}\r\n\t\treturn this.properties.strength;\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ForceDirectedLink\"] = ForceDirectedLink;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/forceDirected/ForceDirectedLink.ts","/**\r\n * Module that defines everything related to building ForceDirectedNodes.\r\n * \r\n * It is a container which has ForceDirectedNode element which is a RoundedRectangle.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container, IContainerProperties, IContainerAdapters, IContainerEvents } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Circle } from \"../../core/elements/Circle\";\r\nimport { Label } from \"../../core/elements/Label\";\r\nimport { ForceDirectedSeriesDataItem } from \"./ForceDirectedSeries\";\r\nimport { ForceDirectedLink } from \"./ForceDirectedLink\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { Dictionary, DictionaryDisposer } from \"../../core/utils/Dictionary\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[ForceDirectedNode]].\r\n */\r\nexport interface IForceDirectedNodeProperties extends IContainerProperties {\r\n\texpandAll?: boolean;\r\n}\r\n\r\n/**\r\n * Defines events for [[ForceDirectedNode]].\r\n */\r\nexport interface IForceDirectedNodeEvents extends IContainerEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ForceDirectedNode]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IForceDirectedNodeAdapters extends IContainerAdapters, IForceDirectedNodeProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Class used to creates [[ForceDirectedNode]] elements (circles).\r\n *\r\n * @see {@link IForceDirectedNodeEvents} for a list of available events\r\n * @see {@link IForceDirectedNodeAdapters} for a list of available Adapters\r\n * @since 4.3.8\r\n * @important\r\n */\r\nexport class ForceDirectedNode extends Container {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IForceDirectedNodeProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IForceDirectedNodeAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IForceDirectedNodeEvents;\r\n\r\n\t/**\r\n\t * A node's [[Circle]] element.\r\n\t */\r\n\tpublic circle: Circle;\r\n\r\n\t/**\r\n\t * A [[Circle]] element for node's outline. This outline is used on nodes\r\n\t * that have children.\r\n\t */\r\n\tpublic outerCircle: Circle;\r\n\r\n\t/**\r\n\t * Related data item.\r\n\t */\r\n\tpublic _dataItem: ForceDirectedSeriesDataItem;\r\n\r\n\t/**\r\n\t * Node's [[Label]] element.\r\n\t */\r\n\tpublic label: Label;\r\n\r\n\t/**\r\n\t * A list of other [[ForceDirectedNode]] elements this node is linked with\r\n\t * using `linkWith`.\r\n\t *\r\n\t * @since 4.4.8\r\n\t */\r\n\tpublic linksWith: Dictionary;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedNode\";\r\n\r\n\t\t//this.isMeasured = true; // for correct position of the tooltip\r\n\t\tthis.applyOnClones = true;\r\n\t\tthis.togglable = true;\r\n\t\tthis.draggable = true;\r\n\t\tthis.setStateOnChildren = true;\r\n\r\n\t\tthis.isActive = false;\r\n\t\tthis.expandAll = true;\r\n\r\n\t\tthis.linksWith = new Dictionary()\r\n\t\tthis._disposers.push(new DictionaryDisposer(this.linksWith));\r\n\r\n\t\tthis.events.on(\"dragstart\", () => {\r\n\t\t\tif (this.dataItem.component) {\r\n\t\t\t\tthis.dataItem.component.nodeDragStarted();\r\n\t\t\t}\r\n\t\t}, this, false);\r\n\r\n\t\tthis.events.on(\"drag\", () => {\r\n\t\t\tthis.updateSimulation();\r\n\t\t}, this, false);\r\n\r\n\t\tlet outerCircle = this.createChild(Circle);\r\n\t\touterCircle.shouldClone = false;\r\n\t\touterCircle.strokeWidth = 2;\r\n\r\n\t\tlet bgColor = new InterfaceColorSet().getFor(\"background\");\r\n\t\touterCircle.fill = bgColor;\r\n\t\tthis.outerCircle = outerCircle;\r\n\r\n\t\tlet hoverState = outerCircle.states.create(\"hover\");\r\n\t\thoverState.properties.scale = 1.1;\r\n\r\n\t\tlet outerActiveState = outerCircle.states.create(\"active\");\r\n\t\touterActiveState.properties.scale = 1.1;\r\n\t\touterActiveState.properties.visible = true;\r\n\r\n\t\tlet activeHoverState = outerCircle.states.create(\"hoverActive\");\r\n\t\tactiveHoverState.properties.scale = 1;\r\n\r\n\t\tlet circle = this.createChild(Circle);\r\n\r\n\t\tlet activeState = circle.states.create(\"active\");\r\n\t\tactiveState.properties.visible = true;\r\n\r\n\t\tcircle.shouldClone = false;\r\n\t\tcircle.interactionsEnabled = false;\r\n\t\tcircle.hiddenState.properties.radius = 0.01;\r\n\t\tcircle.events.on(\"validated\", this.updateSimulation, this, false)\r\n\t\tcircle.hiddenState.properties.visible = true;\r\n\r\n\r\n\t\tthis.circle = circle;\r\n\r\n\t\tthis.addDisposer(circle.events.on(\"validated\", this.updateLabelSize, this, false));\r\n\r\n\t\tthis._disposers.push(this.circle);\r\n\r\n\t\tlet label = this.createChild(Label);\r\n\t\tlabel.shouldClone = false;\r\n\t\tlabel.horizontalCenter = \"middle\";\r\n\t\tlabel.verticalCenter = \"middle\";\r\n\t\tlabel.fill = bgColor;\r\n\t\tlabel.strokeOpacity = 0;\r\n\t\tlabel.interactionsEnabled = false;\r\n\t\tlabel.textAlign = \"middle\";\r\n\t\tlabel.textValign = \"middle\";\r\n\t\tthis.label = label;\r\n\r\n\t\tthis.adapter.add(\"tooltipY\", (y, target) => {\r\n\t\t\treturn -target.circle.pixelRadius;\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected updateLabelSize() {\r\n\t\tif (this.label.text) {\r\n\t\t\tlet circle = this.circle;\r\n\t\t\tlet radius = circle.pixelRadius;\r\n\r\n\t\t\tlet ds = circle.defaultState;\r\n\t\t\tlet dsRadius = ds.properties.radius\r\n\t\t\tif ($type.isNumber(dsRadius)) {\r\n\t\t\t\tradius = dsRadius;\r\n\t\t\t}\r\n\r\n\t\t\tthis.label.width = 2 * radius;\r\n\t\t\tthis.label.height = 2 * radius;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Copies all parameters from another [[ForceDirectedNode]].\r\n\t *\r\n\t * @param source Source ForceDirectedNode\r\n\t */\r\n\tpublic copyFrom(source: this) {\r\n\t\tsuper.copyFrom(source);\r\n\t\tif (this.circle) {\r\n\t\t\tthis.circle.copyFrom(source.circle);\r\n\t\t}\r\n\t\tif (this.label) {\r\n\t\t\tthis.label.copyFrom(source.label);\r\n\t\t}\r\n\t\tif (this.outerCircle) {\r\n\t\t\tthis.outerCircle.copyFrom(source.outerCircle);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets node as \"active\" (expanded).\r\n\t * \r\n\t * @ignore\r\n\t * @param value Active or not?\r\n\t */\r\n\tpublic setActive(value: boolean) {\r\n\t\tsuper.setActive(value);\r\n\r\n\t\tlet dataItem = this.dataItem;\r\n\r\n\t\tif (dataItem) {\r\n\r\n\t\t\tlet children = dataItem.children;\r\n\t\t\tlet component = dataItem.component;\r\n\t\t\tif (!component.dataItemsInvalid) {\r\n\t\t\t\tif (value && children && !dataItem.childrenInited) {\r\n\t\t\t\t\tcomponent.initNode(dataItem);\r\n\t\t\t\t\tcomponent.updateNodeList();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tif (children) {\r\n\t\t\t\t\t\tchildren.each((child) => {\r\n\t\t\t\t\t\t\tchild.node.show();\r\n\t\t\t\t\t\t\tchild.node.interactionsEnabled = true;\r\n\t\t\t\t\t\t\tif (child.parentLink) {\r\n\t\t\t\t\t\t\t\tchild.parentLink.show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (this.expandAll) {\r\n\t\t\t\t\t\t\t\tchild.node.isActive = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tchild.node.isActive = false;\r\n\t\t\t\t\t\t\t\t//child.node.hide(0)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdataItem.dispatchVisibility(true);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (children) {\r\n\t\t\t\t\t\tchildren.each((child) => {\r\n\t\t\t\t\t\t\tif (child.parentLink) {\r\n\t\t\t\t\t\t\t\tchild.parentLink.hide();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tchild.node.isActive = false;\r\n\t\t\t\t\t\t\tchild.node.interactionsEnabled = false;\r\n\r\n\t\t\t\t\t\t\tchild.node.hide();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdataItem.dispatchVisibility(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.updateSimulation();\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tprotected updateSimulation() {\r\n\t\tlet dataItem = this.dataItem;\r\n\t\tif (dataItem && dataItem.component) {\r\n\t\t\tdataItem.component.restartSimulation();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * If set to `true` (default) toggling a node on will automatically expand\r\n\t * all nodes across the whole tree (all levels) of its descendants.\r\n\t *\r\n\t * Setting to `false` will only expand immediate children (one level).\r\n\t * \r\n\t * @default true\r\n\t * @since 4.4.8\r\n\t * @param value Expand all?\r\n\t */\r\n\tpublic set expandAll(value: boolean) {\r\n\t\tthis.setPropertyValue(\"expandAll\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Expand all?\r\n\t */\r\n\tpublic get expandAll(): boolean {\r\n\t\treturn this.getPropertyValue(\"expandAll\");\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new link between two nodes.\r\n\t *\r\n\t * Use this method to dynamically add links without requiring to revalidate\r\n\t * whole of the data.\r\n\t * \r\n\t * @since 4.4.8\r\n\t * @param node Target node\r\n\t * @param strength Link strength\r\n\t * @return New link\r\n\t */\r\n\tpublic linkWith(node: ForceDirectedNode, strength?: number): ForceDirectedLink {\r\n\t\tlet link = this.linksWith.getKey(node.uid);\r\n\t\tif (!link) {\r\n\t\t\tlink = node.linksWith.getKey(this.uid);\r\n\t\t}\r\n\r\n\t\tif (!link) {\r\n\t\t\tlet dataItem = this.dataItem;\r\n\t\t\tlet component = dataItem.component;\r\n\t\t\tlink = component.links.create();\r\n\t\t\tlink.parent = component;\r\n\t\t\tlink.zIndex = -1;\r\n\t\t\tlink.source = this;\r\n\t\t\tlink.target = node;\r\n\t\t\tlink.stroke = dataItem.node.fill;\r\n\r\n\t\t\tlink.dataItem = node.dataItem;\r\n\r\n\t\t\tif ($type.isNumber(strength)) {\r\n\t\t\t\tlink.strength = strength;\r\n\t\t\t}\r\n\r\n\t\t\tlet nodeIndex = component.nodes.indexOf(dataItem.node);\r\n\t\t\tlet childIndex = component.nodes.indexOf(node);\r\n\r\n\t\t\tcomponent.forceLinks.push({ source: nodeIndex, target: childIndex });\r\n\t\t\tcomponent.updateNodeList();\r\n\r\n\t\t\tdataItem.childLinks.push(link);\r\n\r\n\t\t\tthis.linksWith.setKey(node.uid, link);\r\n\t\t}\r\n\t\treturn link;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a link between two nodes.\r\n\t * \r\n\t * @since 4.4.8\r\n\t * @param node Target node\r\n\t */\r\n\tpublic unlinkWith(node: ForceDirectedNode) {\r\n\t\tthis.linksWith.removeKey(node.uid);\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ForceDirectedNode\"] = ForceDirectedNode;\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/forceDirected/ForceDirectedNode.ts","export default function(d) {\n var x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/add.js","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/cover.js","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/quad.js","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/x.js","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/y.js","import tree_add, {addAll as tree_addAll} from \"./add\";\nimport tree_cover from \"./cover\";\nimport tree_data from \"./data\";\nimport tree_extent from \"./extent\";\nimport tree_find from \"./find\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove\";\nimport tree_root from \"./root\";\nimport tree_size from \"./size\";\nimport tree_visit from \"./visit\";\nimport tree_visitAfter from \"./visitAfter\";\nimport tree_x, {defaultX} from \"./x\";\nimport tree_y, {defaultY} from \"./y\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/quadtree.js","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/data.js","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/extent.js","import Quad from \"./quad\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/find.js","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/remove.js","export default function() {\n return this._root;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/root.js","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/size.js","import Quad from \"./quad\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/visit.js","import Quad from \"./quad\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-quadtree/src/visitAfter.js","export default function(x) {\n return function() {\n return x;\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/constant.js","export default function() {\n return (Math.random() - 0.5) * 1e-6;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/jiggle.js","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nexport default function(radius) {\n var nodes,\n radii,\n strength = 1,\n iterations = 1;\n\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i, n = nodes.length,\n tree,\n node,\n xi,\n yi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree = quadtree(nodes, x, y).visitAfter(prepare);\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n yi = node.y + node.vy;\n tree.visit(apply);\n }\n }\n\n function apply(quad, x0, y0, x1, y1) {\n var data = quad.data, rj = quad.r, r = ri + rj;\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = yi - data.y - data.vy,\n l = x * x + y * y;\n if (l < r * r) {\n if (x === 0) x = jiggle(), l += x * x;\n if (y === 0) y = jiggle(), l += y * y;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n node.vy += (y *= l) * r;\n data.vx -= x * (r = 1 - r);\n data.vy -= y * r;\n }\n }\n return;\n }\n return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n }\n }\n\n function prepare(quad) {\n if (quad.data) return quad.r = radii[quad.data.index];\n for (var i = quad.r = 0; i < 4; ++i) {\n if (quad[i] && quad[i].r > quad.r) {\n quad.r = quad[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n radii = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/collide.js","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"missing: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n count,\n bias,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle();\n y = target.y + target.vy - source.y - source.vy || jiggle();\n l = Math.sqrt(x * x + y * y);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l;\n target.vx -= x * (b = bias[i]);\n target.vy -= y * b;\n source.vx += x * (b = 1 - b);\n source.vy += y * b;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/link.js","var noop = {value: function() {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-dispatch/src/dispatch.js","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-timer/src/timer.js","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nexport default function(nodes) {\n var simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\");\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function(force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function(x, y, radius) {\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n\n if (radius == null) radius = Infinity;\n else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/simulation.js","import constant from \"./constant.js\";\n\nexport default function(x) {\n var strength = constant(0.1),\n nodes,\n strengths,\n xz;\n\n if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n xz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n };\n\n return force;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/x.js","import constant from \"./constant.js\";\n\nexport default function(y) {\n var strength = constant(0.1),\n nodes,\n strengths,\n yz;\n\n if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n yz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n };\n\n return force;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/y.js","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\nimport { Series, SeriesDataItem, ISeriesDataFields, ISeriesProperties, ISeriesAdapters, ISeriesEvents } from \"../../charts/series/Series\";\r\nimport { ForceDirectedTree, ForceDirectedTreeDataItem } from \"./ForceDirectedTree\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { ListTemplate, ListDisposer, List } from \"../../core/utils/List\";\r\nimport { ForceDirectedNode } from \"./ForceDirectedNode\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\nimport { ForceDirectedLink } from \"./ForceDirectedLink\";\r\nimport { ColorSet } from \"../../core/utils/ColorSet\";\r\nimport * as d3force from \"d3-force\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport { Percent, percent } from \"../../core/utils/Percent\";\r\nimport { Color } from \"../../core/utils/Color\";\r\nimport { LinearGradient } from \"../../core/rendering/fills/LinearGradient\";\r\nimport { RadialGradient } from \"../../core/rendering/fills/RadialGradient\";\r\nimport { Pattern } from \"../../core/rendering/fills/Pattern\";\r\nimport { MouseCursorStyle } from \"../../core/interaction/Mouse\";\r\nimport { OrderedListTemplate } from \"../../core/utils/SortedList\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { LegendDataItem } from \"../../charts/Legend\";\r\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\r\nimport { Animation } from \"../../core/utils/Animation\";\r\nimport { AMEvent } from \"../../core/utils/EventDispatcher\";\r\nimport { IDataItemEvents } from \"../../core/DataItem\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[ForceDirectedSeries]].\r\n *\r\n * @see {@link DataItem}\r\n * @since 4.3.8\r\n */\r\nexport class ForceDirectedSeriesDataItem extends SeriesDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: ForceDirectedSeries;\r\n\r\n\t/**\r\n\t * A reference to a component of a data item.\r\n\t */\r\n\tpublic component: ForceDirectedSeries;\r\n\r\n\t/**\r\n\t * A type of node used for this series.\r\n\t */\r\n\tpublic _node: ForceDirectedNode;\r\n\r\n\t/**\r\n\t * A list of [[ForceDirectedLink]] elements of links to node's children.\r\n\t *\r\n\t * This list does not include a link to node's parent, which is available\r\n\t * through `parentLink`.\r\n\t */\r\n\tpublic childLinks: List;\r\n\r\n\t/**\r\n\t * A [[ForceDirectedLink]] to node's parent.\r\n\t */\r\n\tpublic parentLink: ForceDirectedLink;\r\n\r\n\t/**\r\n\t * A Legend's data item.\r\n\t */\r\n\tprotected _legendDataItem: LegendDataItem;\r\n\r\n\t/**\r\n\t * Have all children already been initialized?\r\n\t */\r\n\tpublic childrenInited: boolean = false;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedSeriesDataItem\";\r\n\r\n\t\tthis.hasChildren.children = true;\r\n\r\n\t\tthis.childLinks = new List();\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Shows the Data Item and related visual elements.\r\n\t *\r\n\t * @param duration Animation duration (ms)\r\n\t * @param delay Delay animation (ms)\r\n\t * @param fields A list of fields to set values of\r\n\t */\r\n\tpublic show(duration?: number, delay?: number, fields?: string[]): $type.Optional {\r\n\t\tthis._visible = true;\r\n\r\n\t\tif (this.node) {\r\n\t\t\tthis.node.isActive = true;\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic dispatchVisibility(visible: boolean) {\r\n\t\tif (this.events.isEnabled(\"visibilitychanged\")) {\r\n\t\t\tconst event: AMEvent[\"visibilitychanged\"] = {\r\n\t\t\t\ttype: \"visibilitychanged\",\r\n\t\t\t\ttarget: this,\r\n\t\t\t\tvisible: visible\r\n\t\t\t};\r\n\r\n\t\t\tthis.events.dispatchImmediately(\"visibilitychanged\", event);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Hides the Data Item and related visual elements.\r\n\t *\r\n\t * @param duration Animation duration (ms)\r\n\t * @param delay Delay animation (ms)\r\n\t * @param toValue A value to set to `fields` when hiding\r\n\t * @param fields A list of data fields to set value to `toValue`\r\n\t */\r\n\tpublic hide(duration?: number, delay?: number, toValue?: number, fields?: string[]): $type.Optional {\r\n\t\tthis._visible = false;\r\n\r\n\t\tif (this.events.isEnabled(\"visibilitychanged\")) {\r\n\t\t\tconst event: AMEvent[\"visibilitychanged\"] = {\r\n\t\t\t\ttype: \"visibilitychanged\",\r\n\t\t\t\ttarget: this,\r\n\t\t\t\tvisible: false\r\n\t\t\t};\r\n\r\n\t\t\tthis.events.dispatchImmediately(\"visibilitychanged\", event);\r\n\t\t}\r\n\r\n\t\tif (this.node) {\r\n\t\t\tthis.node.isActive = false;\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t/**\r\n\t * Numeric value of the item.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set value(value: number) {\r\n\t\tthis.setValue(\"value\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get value(): number {\r\n\r\n\t\tlet value = this.values.value.value;\r\n\r\n\t\tif (!$type.isNumber(value)) {\r\n\t\t\tif (this.children) {\r\n\t\t\t\tvalue = 0;\r\n\t\t\t\tthis.children.each((child) => {\r\n\t\t\t\t\tvalue += child.value;\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t/**\r\n\t * An element, related to this data item. (node)\r\n\t *\r\n\t * @readonly\r\n\t * @return node element\r\n\t */\r\n\tpublic get node(): ForceDirectedNode {\r\n\t\tif (!this._node) {\r\n\r\n\t\t\tlet component = this.component;\r\n\r\n\t\t\tlet node = component.nodes.create();\r\n\t\t\tnode.draggable = true;\r\n\t\t\tthis._node = node;\r\n\r\n\t\t\tthis._disposers.push(node);\r\n\r\n\t\t\tthis._disposers.push(new Disposer(() => {\r\n\t\t\t\tcomponent.nodes.removeValue(node);\r\n\t\t\t}));\r\n\r\n\t\t\tthis.addSprite(node);\r\n\t\t\tnode.visible = this.visible;\r\n\t\t\tnode.hiddenState.properties.visible = true;\r\n\r\n\t\t\t// Apply accessibility\r\n\t\t\tif (component.itemsFocusable()) {\r\n\t\t\t\tnode.role = \"menuitem\";\r\n\t\t\t\tnode.focusable = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnode.role = \"listitem\";\r\n\t\t\t\tnode.focusable = false;\r\n\t\t\t}\r\n\r\n\t\t\t// Apply screen reader label\r\n\t\t\tif (node.focusable) {\r\n\t\t\t\tnode.events.once(\"focus\", (ev) => {\r\n\t\t\t\t\tnode.readerTitle = component.populateString(component.itemReaderText, this);\r\n\t\t\t\t}, undefined, false);\r\n\t\t\t\tnode.events.once(\"blur\", (ev) => {\r\n\t\t\t\t\tnode.readerTitle = \"\";\r\n\t\t\t\t}, undefined, false);\r\n\t\t\t}\r\n\t\t\tif (node.hoverable) {\r\n\t\t\t\tnode.events.once(\"over\", (ev) => {\r\n\t\t\t\t\tnode.readerTitle = component.populateString(component.itemReaderText, this);\r\n\t\t\t\t}, undefined, false);\r\n\t\t\t\tnode.events.once(\"out\", (ev) => {\r\n\t\t\t\t\tnode.readerTitle = \"\";\r\n\t\t\t\t}, undefined, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this._node;\r\n\t}\r\n\r\n\t/**\r\n\t * Depth level in the series hierarchy.\r\n\t *\r\n\t * The top-level item will have level set at 0. Its children will have\r\n\t * level 1, and so on.\r\n\t *\r\n\t * @readonly\r\n\t * @return Level\r\n\t */\r\n\tpublic get level(): number {\r\n\t\tif (!this.parent) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn this.parent.level + 1;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Item's color.\r\n\t *\r\n\t * If not set, will use parent's color, or, if that is not set either,\r\n\t * automatically assigned color from chart's color set. (`chart.colors`)\r\n\t *\r\n\t * @param value : Color | LinearGradient | RadialGradient | Pattern\r\n\t */\r\n\tpublic set color(value: Color | LinearGradient | RadialGradient | Pattern) {\r\n\t\tthis.setProperty(\"color\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Color\r\n\t */\r\n\tpublic get color(): Color | LinearGradient | RadialGradient | Pattern {\r\n\t\tlet color = this.properties.color;\r\n\r\n\t\tif (color == undefined) {\r\n\t\t\tif (this.parent) {\r\n\t\t\t\tcolor = this.parent.color;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (color == undefined) {\r\n\t\t\tif (this.component) {\r\n\t\t\t\tcolor = this.component.colors.getIndex(this.component.colors.step * this.index);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn color;\r\n\t}\r\n\r\n\t/**\r\n\t * An array of id's of other nodes outside of the child/parent tree to link\r\n\t * with.\r\n\t * \r\n\t * @param value Link list\r\n\t */\r\n\tpublic set linkWith(value: string[]) {\r\n\t\tthis.setProperty(\"linkWith\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Link list\r\n\t */\r\n\tpublic get linkWith(): string[] {\r\n\t\treturn this.properties.linkWith;\r\n\t}\r\n\r\n\t/**\r\n\t * Should dataItem (node) be hidden in legend?\r\n\t *\r\n\t * @param value Visible in legend?\r\n\t */\r\n\tpublic set hiddenInLegend(value: boolean) {\r\n\t\tthis.setProperty(\"hiddenInLegend\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Hidden in legend?\r\n\t */\r\n\tpublic get hiddenInLegend(): boolean {\r\n\t\treturn this.properties.hiddenInLegend;\r\n\t}\r\n\r\n\t/**\r\n\t * Indicates whether node should start off as collapsed.\r\n\t *\r\n\t * This can be used to specify whether node should start off as collapsed\r\n\t * via data.\r\n\t *\r\n\t * To toggle actual node, use its `isActive` property instead.\r\n\t * \r\n\t * @param value Collapsed?\r\n\t */\r\n\tpublic set collapsed(value: boolean) {\r\n\t\tthis.setProperty(\"collapsed\", value);\r\n\t\tthis.node.isActive = !value;\r\n\t}\r\n\r\n\t/**\r\n\t * @return Collapsed?\r\n\t */\r\n\tpublic get collapsed(): boolean {\r\n\t\treturn this.properties.collapsed;\r\n\t}\r\n\r\n\t/**\r\n\t * A list of item's sub-children.\r\n\t *\r\n\t * @param children Item's children\r\n\t */\r\n\tpublic set children(children: OrderedListTemplate) {\r\n\t\tthis.setProperty(\"children\", children);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Item's children\r\n\t */\r\n\tpublic get children(): OrderedListTemplate {\r\n\t\treturn this.properties.children;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a marker used in the legend for this slice.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param marker Marker container\r\n\t */\r\n\tpublic createLegendMarker(marker: Container) {\r\n\t\tthis.component.createLegendMarker(marker, this);\r\n\t\tif (!this.node.isActive) {\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A legend's data item, that corresponds to this data item.\r\n\t *\r\n\t * @param value Legend data item\r\n\t */\r\n\tpublic set legendDataItem(value: LegendDataItem) {\r\n\t\tthis._legendDataItem = value;\r\n\t\tif (value.label) {\r\n\t\t\tvalue.label.dataItem = this;\r\n\t\t}\r\n\t\tif (value.valueLabel) {\r\n\t\t\tvalue.valueLabel.dataItem = this;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Legend data item\r\n\t */\r\n\tpublic get legendDataItem(): LegendDataItem {\r\n\t\treturn this._legendDataItem;\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[ForceDirectedSeries]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedSeriesDataFields extends ISeriesDataFields {\r\n\r\n\t/**\r\n\t * Name of the field in data that holds category.\r\n\t */\r\n\tcategory?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's sub-items.\r\n\t */\r\n\tchildren?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's name.\r\n\t */\r\n\tname?: string;\r\n\r\n\t/**\r\n\t * A name of the field tha holds an array of ids that node should link with\r\n\t * besides of it's own children or parent.\r\n\t */\r\n\tlinkWith?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's color.\r\n\t *\r\n\t * If not set, a new color will be automatically assigned to each item as\r\n\t * defined by theme.\r\n\t */\r\n\tcolor?: string;\r\n\r\n\t/**\r\n\t * Name of the field in data that holds boolean flag if item should be\r\n\t * hidden in legend.\r\n\t */\r\n\thiddenInLegend?: string;\r\n\r\n\t/**\r\n\t * A name of the field that holds boolean flag whether node should start\r\n\t * as collapsed. (nodes start as fully expanded by default)\r\n\t */\r\n\tcollapsed?: string;\r\n}\r\n\r\n/**\r\n * Defines properties for [[ForceDirectedSeries]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedSeriesProperties extends ISeriesProperties {\r\n\r\n\t/**\r\n\t * Smallest possible radius in pixels of the node circle.\r\n\t * \r\n\t * @default 5\r\n\t */\r\n\tminRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * Biggest possible radius in pixels of the node circle.\r\n\t * \r\n\t * @default 70\r\n\t */\r\n\tmaxRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * A color set to be used for coloring nodes.\r\n\t *\r\n\t * Each new top level will be assigned a new color from this list.\r\n\t */\r\n\tcolors?: ColorSet;\r\n\r\n\t/**\r\n\t * Number of levels to display initially.\r\n\t */\r\n\tmaxLevels?: number;\r\n\r\n\t/**\r\n\t * A relative strength with which nodes push or attract each other.\r\n\t */\r\n\tmanyBodyStrength?: number;\r\n\r\n\t/**\r\n\t * A relative strength with which nodes are pushed away or attracted to\r\n\t * center of the chart.\r\n\t */\r\n\tcenterStrength?: number;\r\n\r\n\t/**\r\n\t * Relative attraction strength between the nodes connected with `linkWith`.\r\n\t *\r\n\t * @since 4.4.8\r\n\t */\r\n\tlinkWithStrength?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[ForceDirectedSeries]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedSeriesEvents extends ISeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ForceDirectedSeries]].\r\n *\r\n * @see {@link Adapter}\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedSeriesAdapters extends ISeriesAdapters, IForceDirectedSeriesProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines [[Series]] for a [[ForceDirectedTree]] chart.\r\n *\r\n * @see {@link IForceDirectedSeriesEvents} for a list of available Events\r\n * @see {@link IForceDirectedSeriesAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/ForceDirectedTree/} For more information\r\n * @todo Example\r\n * @since 4.3.8\r\n * @important\r\n */\r\nexport class ForceDirectedSeries extends Series {\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic _node: ForceDirectedNode;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _nodes: ListTemplate;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic _link: ForceDirectedLink;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _links: ListTemplate;\r\n\r\n\t/**\r\n\t * Defines the type of data fields used for the series.\r\n\t */\r\n\tpublic _dataFields: IForceDirectedSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IForceDirectedSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IForceDirectedSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IForceDirectedSeriesEvents;\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: ForceDirectedSeriesDataItem;\r\n\r\n\t/**\r\n\t * A chart series belongs to.\r\n\t */\r\n\tpublic _chart: ForceDirectedTree;\r\n\r\n\t/**\r\n\t * Parent data item of a series.\r\n\t */\r\n\tpublic parentDataItem: ForceDirectedTreeDataItem;\r\n\r\n\t/**\r\n\t * A reference to the `d3.Simulation` instance for fine-grained configuration\r\n\t * of node gravitational dynamics.\r\n\t *\r\n\t * @see {@link https://github.com/d3/d3-force#simulation} For more info\r\n\t */\r\n\tpublic d3forceSimulation: d3force.Simulation<{}, d3force.SimulationLinkDatum>;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _maxValue: number;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic forceLinks: d3force.SimulationLinkDatum[];\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _linkForce: d3force.ForceLink>;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _collisionForce: d3force.ForceCollide;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedSeries\";\r\n\r\n\t\tthis.d3forceSimulation = d3force.forceSimulation();\r\n\r\n\t\tthis.maxRadius = percent(8);\r\n\t\tthis.minRadius = percent(1);\r\n\r\n\t\tthis.width = percent(100);\r\n\t\tthis.height = percent(100);\r\n\r\n\t\tthis.colors = new ColorSet();\r\n\t\tthis.colors.step = 2;\r\n\r\n\t\tthis.width = percent(100);\r\n\t\tthis.height = percent(100);\r\n\r\n\t\tthis.manyBodyStrength = -15;\r\n\t\tthis.centerStrength = 0.8;\r\n\r\n\t\tthis.events.on(\"maxsizechanged\", () => {\r\n\t\t\tthis.updateRadiuses(this.dataItems);\r\n\t\t\tthis.updateLinksAndNodes();\r\n\r\n\t\t\tlet d3forceSimulation = this.d3forceSimulation;\r\n\r\n\t\t\tlet w = $math.max(50, this.innerWidth);\r\n\t\t\tlet h = $math.max(50, this.innerHeight);\r\n\r\n\t\t\tif (d3forceSimulation) {\r\n\t\t\t\td3forceSimulation.force(\"x\", d3force.forceX().x(w / 2).strength(this.centerStrength * 100 / w));\r\n\t\t\t\td3forceSimulation.force(\"y\", d3force.forceY().y(h / 2).strength(this.centerStrength * 100 / h));\r\n\t\t\t\tif (d3forceSimulation.alpha() < 0.4) {\r\n\t\t\t\t\td3forceSimulation.alpha(0.4);\r\n\t\t\t\t\td3forceSimulation.restart();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns maximum value from all supplied data items.\r\n\t * \r\n\t * @ignore\r\n\t * @param dataItems List of data items\r\n\t * @param max Default max\r\n\t * @return Max\r\n\t */\r\n\tprotected getMaxValue(dataItems: OrderedListTemplate, max: number): number {\r\n\t\tdataItems.each((dataItem) => {\r\n\t\t\tif (dataItem.value > max) {\r\n\t\t\t\tmax = dataItem.value;\r\n\t\t\t}\r\n\r\n\t\t\tif (dataItem.children) {\r\n\t\t\t\tlet cmax = this.getMaxValue(dataItem.children, max);\r\n\t\t\t\tif (cmax > max) {\r\n\t\t\t\t\tmax = cmax;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t\treturn max;\r\n\t}\r\n\r\n\t/**\r\n\t * Validates (processes) data items.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateDataItems(): void {\r\n\r\n\t\tthis._dataDisposers.push(new ListDisposer(this.links));\r\n\r\n\t\tthis._maxValue = this.getMaxValue(this.dataItems, 0);\r\n\r\n\t\tthis.forceLinks = [];\r\n\r\n\t\tthis.colors.reset();\r\n\r\n\t\tlet index = 0;\r\n\r\n\t\tlet radius = Math.min(this.innerHeight / 3, this.innerWidth / 3);\r\n\r\n\t\tif (this.dataItems.length <= 1) {\r\n\t\t\tradius = 0;\r\n\t\t}\r\n\r\n\t\tthis.dataItems.each((dataItem) => {\r\n\r\n\t\t\tlet angle = index / this.dataItems.length * 360;\r\n\r\n\t\t\tdataItem.node.x = this.innerWidth / 2 + radius * $math.cos(angle);\r\n\t\t\tdataItem.node.y = this.innerHeight / 2 + radius * $math.sin(angle);\r\n\r\n\t\t\tdataItem.node.fill = dataItem.color;\r\n\t\t\tdataItem.node.stroke = dataItem.color;\r\n\r\n\t\t\tindex++;\r\n\r\n\t\t\tthis.initNode(dataItem);\r\n\t\t})\r\n\r\n\t\tif (this.dataFields.linkWith) {\r\n\t\t\tthis.dataItems.each((dataItem) => {\r\n\t\t\t\tthis.processLinkWith(dataItem);\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tlet d3forceSimulation = this.d3forceSimulation;\r\n\r\n\t\td3forceSimulation.on(\"tick\", () => {\r\n\t\t\tthis.updateLinksAndNodes();\r\n\t\t});\r\n\r\n\t\t// helps to avoid initial scatter\r\n\t\tfor (let i = 0; i < 10; i++) {\r\n\t\t\td3forceSimulation.tick();\r\n\t\t}\r\n\t\td3forceSimulation.alphaDecay(1 - Math.pow(0.001, 1 / 600));\r\n\r\n\t\tthis.chart.feedLegend();\r\n\r\n\t\tsuper.validateDataItems();\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tpublic updateNodeList() {\r\n\t\tlet d3forceSimulation = this.d3forceSimulation;\r\n\t\td3forceSimulation.nodes(this.nodes.values);\r\n\t\tthis._linkForce = d3force.forceLink(this.forceLinks);\r\n\t\td3forceSimulation.force(\"link\", this._linkForce);\r\n\t\tthis._collisionForce = d3force.forceCollide();\r\n\t\td3forceSimulation.force(\"collision\", this._collisionForce);\r\n\r\n\t\tlet w = $math.max(50, this.innerWidth);\r\n\t\tlet h = $math.max(50, this.innerHeight);\r\n\r\n\t\td3forceSimulation.force(\"x\", d3force.forceX().x(w / 2).strength(this.centerStrength * 100 / w));\r\n\t\td3forceSimulation.force(\"y\", d3force.forceY().y(h / 2).strength(this.centerStrength * 100 / h));\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tpublic updateLinksAndNodes() {\r\n\t\tif (this._linkForce) {\r\n\t\t\tthis._linkForce.distance((linkDatum) => {\r\n\t\t\t\treturn this.getDistance(linkDatum)\r\n\t\t\t});\r\n\t\t\tthis._linkForce.strength((linkDatum) => {\r\n\t\t\t\treturn this.getStrength(linkDatum)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this._collisionForce) {\r\n\t\t\tthis._collisionForce.radius(function(node) {\r\n\t\t\t\tif (node instanceof ForceDirectedNode) {\r\n\t\t\t\t\tlet radius = node.circle.pixelRadius;\r\n\t\t\t\t\tif (!node.outerCircle.__disabled && !node.outerCircle.disabled && node.outerCircle.visible) {\r\n\t\t\t\t\t\tradius = (radius + 3) * node.outerCircle.scale;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn radius;\r\n\t\t\t\t}\r\n\t\t\t\treturn 1;\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tthis.d3forceSimulation.force(\"manybody\", d3force.forceManyBody().strength((node) => {\r\n\t\t\tif (node instanceof ForceDirectedNode) {\r\n\t\t\t\treturn node.circle.pixelRadius * this.manyBodyStrength;\r\n\t\t\t}\r\n\t\t\treturn this.manyBodyStrength;\r\n\t\t}));\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tprotected getDistance(linkDatum: d3force.SimulationLinkDatum) {\r\n\t\tlet source: ForceDirectedNode = linkDatum.source;\r\n\t\tlet target: ForceDirectedNode = linkDatum.target;\r\n\r\n\t\tlet distance = 0;\r\n\t\tif (target.dataItem && source.dataItem) {\r\n\r\n\r\n\t\t\tlet link = source.linksWith.getKey(target.uid);\r\n\r\n\t\t\tif (link) {\r\n\t\t\t\tdistance = link.distance;\r\n\t\t\t}\r\n\r\n\t\t\tif (!source.isActive) {\r\n\t\t\t\tdistance = 1;\r\n\t\t\t}\r\n\r\n\t\t\treturn (distance * (source.circle.pixelRadius + target.circle.pixelRadius));\r\n\t\t}\r\n\r\n\t\treturn distance;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tprotected getStrength(linkDatum: d3force.SimulationLinkDatum) {\r\n\t\tlet source: ForceDirectedNode = linkDatum.source;\r\n\t\tlet target: ForceDirectedNode = linkDatum.target;\r\n\r\n\t\tlet strength = 0;\r\n\r\n\t\tlet link = source.linksWith.getKey(target.uid);\r\n\t\tif (link) {\r\n\t\t\tstrength = link.strength;\r\n\t\t}\r\n\r\n\t\treturn strength;\r\n\t}\r\n\r\n\t/**\r\n\t * Handler for drag end event.\r\n\t * \r\n\t * @ignore\r\n\t */\r\n\tpublic nodeDragEnded(): void {\r\n\t\tthis.d3forceSimulation.alphaTarget(0);\r\n\t}\r\n\t/**\r\n\t * Handler for drag start event.\r\n\t * \r\n\t * @ignore\r\n\t */\r\n\tpublic nodeDragStarted(): void {\r\n\t\tthis.d3forceSimulation.alpha(0.1);\r\n\t\tthis.d3forceSimulation.restart();\r\n\t}\r\n\r\n\t/**\r\n\t * Resets positions of whole tree.\r\n\t * \r\n\t * @ignore\r\n\t */\r\n\tpublic restartSimulation(): void {\r\n\t\tif (this.d3forceSimulation.alpha() <= 0.3) {\r\n\t\t\tthis.d3forceSimulation.alpha(0.3);\r\n\t\t\tthis.d3forceSimulation.restart();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected updateRadiuses(dataItems: OrderedListTemplate) {\r\n\t\tdataItems.each((dataItem) => {\r\n\t\t\tthis.updateRadius(dataItem);\r\n\t\t\tif (dataItem.childrenInited) {\r\n\t\t\t\tthis.updateRadiuses(dataItem.children);\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected updateRadius(dataItem: ForceDirectedSeriesDataItem) {\r\n\t\tlet node = dataItem.node;\r\n\t\tlet minSide = (this.innerWidth + this.innerHeight) / 2;\r\n\t\tlet minRadius = $utils.relativeToValue(this.minRadius, minSide)\r\n\t\tlet maxRadius = $utils.relativeToValue(this.maxRadius, minSide)\r\n\r\n\t\tlet radius = minRadius + dataItem.value / this._maxValue * (maxRadius - minRadius);\r\n\r\n\t\tif (!$type.isNumber(radius)) {\r\n\t\t\tradius = minRadius;\r\n\t\t}\r\n\r\n\t\t//if(!node.circle.isHidden){\r\n\t\tnode.circle.radius = radius;\r\n\t\t//}\r\n\t\tnode.outerCircle.radius = radius + 3;\r\n\r\n\t\tnode.circle.states.getKey(\"active\").properties.radius = radius;\r\n\t\tnode.circle.defaultState.properties.radius = radius;\r\n\t}\r\n\r\n\t/**\r\n\t * Initializes node.\r\n\t * \r\n\t * @ignore\r\n\t */\r\n\tpublic initNode(dataItem: ForceDirectedSeriesDataItem): void {\r\n\r\n\t\tlet node = dataItem.node;\r\n\t\tnode.parent = this;\r\n\t\tthis.updateRadius(dataItem);\r\n\r\n\t\t//let nodeIndex = this.nodes.indexOf(dataItem.node);\r\n\r\n\t\tif (!dataItem.children || dataItem.children.length == 0) {\r\n\t\t\tnode.outerCircle.disabled = true;\r\n\t\t\tnode.circle.interactionsEnabled = true;\r\n\t\t\tnode.cursorOverStyle = MouseCursorStyle.default;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.cursorOverStyle = MouseCursorStyle.pointer;\r\n\t\t}\r\n\r\n\r\n\t\tif (this.dataItemsInvalid && (dataItem.level >= this.maxLevels - 1 || dataItem.collapsed)) {\r\n\t\t\tnode.isActive = false;\r\n\t\t\tthis.updateNodeList();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!node.isActive) {\r\n\t\t\tnode.hide(0);\r\n\t\t}\r\n\r\n\t\tif (dataItem.children) {\r\n\t\t\tlet index = 0;\r\n\t\t\tdataItem.childrenInited = true;\r\n\r\n\t\t\tif (this.dataItems.length == 1 && dataItem.level == 0) {\r\n\t\t\t\tthis.colors.next();\r\n\t\t\t}\r\n\r\n\t\t\tdataItem.children.each((child) => {\r\n\t\t\t\t/*\r\n\t\t\t\tlet link = this.links.create();\r\n\t\t\t\tlink.parent = this;\r\n\t\t\t\tlink.zIndex = -1;\r\n\t\t\t\tdataItem.childLinks.push(link);\r\n\t\t\t\tlink.source = dataItem.node;\r\n\t\t\t\tlet childIndex = this.nodes.indexOf(child.node);\r\n\t\t\t\tlink.target = child.node;\r\n\t\t\t\tchild.parentLink = link;\r\n\r\n\t\t\t\tthis._forceLinks.push({ source: nodeIndex, target: childIndex });\r\n\t\t\t\t*/\r\n\r\n\t\t\t\tlet link = node.linkWith(child.node);\r\n\t\t\t\tchild.parentLink = link;\r\n\r\n\t\t\t\tlet radius = 2 * node.circle.pixelRadius + child.node.circle.pixelRadius;\r\n\r\n\t\t\t\tlet angle = index / dataItem.children.length * 360;\r\n\r\n\t\t\t\tchild.node.x = node.pixelX + radius * $math.cos(angle);\r\n\t\t\t\tchild.node.y = node.pixelY + radius * $math.sin(angle);\r\n\r\n\t\t\t\tchild.node.circle.radius = 0;\r\n\r\n\t\t\t\tlet color: Color | LinearGradient | RadialGradient | Pattern;\r\n\r\n\t\t\t\tlet diColor = child.properties.color;\r\n\t\t\t\tif ($type.hasValue(diColor)) {\r\n\t\t\t\t\tcolor = diColor;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (this.dataItems.length == 1 && dataItem.level == 0) {\r\n\t\t\t\t\t\tcolor = this.colors.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tcolor = dataItem.color;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tchild.color = color;\r\n\t\t\t\tchild.node.fill = color;\r\n\t\t\t\tchild.node.stroke = color;\r\n\t\t\t\tchild.parentLink.stroke = color;\r\n\r\n\t\t\t\tthis.initNode(child);\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t})\r\n\t\t}\r\n\t\tnode.isActive = true;\r\n\t\tnode.show();\r\n\t\tthis.updateNodeList();\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tprotected processLinkWith(dataItem: ForceDirectedSeriesDataItem) {\r\n\r\n\t\tif (dataItem.linkWith) {\r\n\t\t\t$array.each(dataItem.linkWith, (id, index) => {\r\n\t\t\t\tlet dataItemToConnect = this.getDataItemById(this.dataItems, id);\r\n\r\n\t\t\t\tif (dataItemToConnect) {\r\n\t\t\t\t\tdataItem.node.linkWith(dataItemToConnect.node, this.linkWithStrength);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tif (dataItem.children) {\r\n\t\t\tdataItem.children.each((child) => {\r\n\t\t\t\tthis.processLinkWith(child);\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a [[ForceDirectedSeriesDataItem]] related to node by specific id.\r\n\t *\r\n\t * @param dataItems List of data items to search in\r\n\t * @param id Id to search for\r\n\t * @return Data item\r\n\t */\r\n\tpublic getDataItemById(dataItems: OrderedListTemplate, id: string): ForceDirectedSeriesDataItem {\r\n\t\tfor (let i = dataItems.length - 1; i >= 0; i--) {\r\n\t\t\tlet dataItem = dataItems.getIndex(i);\r\n\r\n\t\t\tif (dataItem.id == id) {\r\n\t\t\t\treturn dataItem;\r\n\t\t\t}\r\n\t\t\tif (dataItem.children) {\r\n\t\t\t\tlet di = this.getDataItemById(dataItem.children, id);\r\n\t\t\t\tif (di) {\r\n\t\t\t\t\treturn di;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new ForceDirectedSeriesDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * A list of nodes in series.\r\n\t * \r\n\t * @return Node list\r\n\t */\r\n\tpublic get nodes(): ListTemplate {\r\n\t\tif (!this._nodes) {\r\n\t\t\tlet node = this.createNode();\r\n\r\n\t\t\tnode.applyOnClones = true;\r\n\t\t\tthis._disposers.push(node);\r\n\r\n\t\t\tthis._nodes = new ListTemplate(node);\r\n\t\t\tthis._disposers.push(new ListDisposer(this._nodes));\r\n\t\t}\r\n\t\treturn this._nodes;\r\n\t}\r\n\r\n\t/**\r\n\t * A list of links between nodes.\r\n\t * \r\n\t * @return Link list\r\n\t */\r\n\tpublic get links(): ListTemplate {\r\n\t\tif (!this._links) {\r\n\t\t\tlet link = this.createLink();\r\n\t\t\tlink.applyOnClones = true;\r\n\t\t\tthis._disposers.push(link);\r\n\r\n\t\t\tthis._links = new ListTemplate(link);\r\n\t\t\tthis._disposers.push(new ListDisposer(this._links));\r\n\t\t}\r\n\t\treturn this._links;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new node.\r\n\t */\r\n\tprotected createNode(): this[\"_node\"] {\r\n\t\treturn new ForceDirectedNode();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new link.\r\n\t */\r\n\tprotected createLink(): this[\"_link\"] {\r\n\t\treturn new ForceDirectedLink();\r\n\t}\r\n\r\n\t/**\r\n\t * Smallest possible radius in pixels of the node circle.\r\n\t * \r\n\t * If set in percent, it radius will be calculated from average width and\r\n\t * height of series.\r\n\t * \r\n\t * @default Percent(1)\r\n\t * @param value Minimum radius (px or percent)\r\n\t */\r\n\tpublic set minRadius(value: number | Percent) {\r\n\t\tthis.setPropertyValue(\"minRadius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Minimum radius (px or percent)\r\n\t */\r\n\tpublic get minRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"minRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Biggest possible radius in pixels of the node circle.\r\n\t * \r\n\t * If set in percent, it radius will be calculated from average width and\r\n\t * height of series.\r\n\t *\r\n\t * @default Percent(8)\r\n\t * @param value Maximum radius (px or Percent)\r\n\t */\r\n\tpublic set maxRadius(value: number | Percent) {\r\n\t\tthis.setPropertyValue(\"maxRadius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Maximum radius (px or Percent)\r\n\t */\r\n\tpublic get maxRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"maxRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * A color set to be used for nodes.\r\n\t *\r\n\t * iIt works like this:\r\n\t * \r\n\t * The first level with more than one node, assigns different colors to all\r\n\t * nodes in this list. Their child nodes inherit the color.\r\n\t *\r\n\t * For example, if the top level has one node with three children, the top\r\n\t * node will get first color, the first child will get second color, etc.\r\n\t *\r\n\t * If there are two top nodes, the first top node gets first color, the\r\n\t * second top node gets the second color. Their subsequent children inherit\r\n\t * colors.\r\n\t *\r\n\t * @param value Color set\r\n\t */\r\n\tpublic set colors(value: ColorSet) {\r\n\t\tthis.setPropertyValue(\"colors\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Color set\r\n\t */\r\n\tpublic get colors(): ColorSet {\r\n\t\treturn this.getPropertyValue(\"colors\");\r\n\t}\r\n\r\n\t/**\r\n\t * Number of levels to be displayed initially.\r\n\t * \r\n\t * @param value Number of levels\r\n\t */\r\n\tpublic set maxLevels(value: number) {\r\n\t\tthis.setPropertyValue(\"maxLevels\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Number of levels\r\n\t */\r\n\tpublic get maxLevels(): number {\r\n\t\treturn this.getPropertyValue(\"maxLevels\");\r\n\t}\r\n\r\n\t/**\r\n\t * Relative strength each node pushes (or attracts) other nodes (it is\r\n\t * multiplied by `node.circle.radius` for big nodes to push stronger).\r\n\t * \r\n\t * Positive value will make nodes attract each other, while negative will\r\n\t * push away each other. The bigger the negative number is, the more \r\n\t * scattered nodes will be.\r\n\t *\r\n\t * Available value range: `-XX` to `XX`.\r\n\t * \r\n\t * @default -15\r\n\t * @param value Body push/attrack strength\r\n\t */\r\n\tpublic set manyBodyStrength(value: number) {\r\n\t\tif (this.setPropertyValue(\"manyBodyStrength\", value)) {\r\n\t\t\tthis.restartSimulation();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Body push/attrack strength\r\n\t */\r\n\tpublic get manyBodyStrength(): number {\r\n\t\treturn this.getPropertyValue(\"manyBodyStrength\");\r\n\t}\r\n\r\n\t/**\r\n\t * Relative strength each child node is pushes (or attracted) to the center\r\n\t * of the chart.\r\n\t * \r\n\t * Positive value will make nodes to be attracted to center, while negative\r\n\t * will push them away.\r\n\t *\r\n\t * Available value range: `-50` to `50`.\r\n\t * \r\n\t * @default 0.8\r\n\t * @param value Stregth of attraction to center\r\n\t */\r\n\tpublic set centerStrength(value: number) {\r\n\t\tif (this.setPropertyValue(\"centerStrength\", value)) {\r\n\t\t\tthis.restartSimulation();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Stregth of attraction to center\r\n\t */\r\n\tpublic get centerStrength(): number {\r\n\t\treturn this.getPropertyValue(\"centerStrength\");\r\n\t}\r\n\r\n\t/**\r\n\t * Relative attraction strength between the nodes connected with `linkWith`.\r\n\t *\r\n\t * @since 4.4.8\r\n\t * @param value Strength\r\n\t * @default undefined\r\n\t */\r\n\tpublic set linkWithStrength(value: number) {\r\n\t\tif (this.setPropertyValue(\"linkWithStrength\", value)) {\r\n\t\t\tthis.restartSimulation();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Strength\r\n\t */\r\n\tpublic get linkWithStrength(): number {\r\n\t\treturn this.getPropertyValue(\"linkWithStrength\");\r\n\t}\r\n\r\n\t/**\r\n\t * Binds related legend data item's visual settings to this series' visual\r\n\t * settings.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param marker Container\r\n\t * @param dataItem Data item\r\n\t */\r\n\tpublic createLegendMarker(marker: Container, dataItem?: this[\"_dataItem\"]): void {\r\n\t\tmarker.children.each((child) => {\r\n\t\t\tlet node = dataItem.node;\r\n\r\n\t\t\tif (child instanceof RoundedRectangle) {\r\n\t\t\t\tchild.cornerRadius(40, 40, 40, 40);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tchild.defaultState.properties.fill = node.fill;\r\n\t\t\tchild.defaultState.properties.stroke = node.stroke;\r\n\t\t\tchild.defaultState.properties.fillOpacity = node.fillOpacity;\r\n\t\t\tchild.defaultState.properties.strokeOpacity = node.strokeOpacity;\r\n\r\n\t\t\tchild.fill = node.fill;\r\n\t\t\tchild.stroke = node.stroke;\r\n\t\t\tchild.fillOpacity = node.fillOpacity;\r\n\t\t\tchild.strokeOpacity = node.strokeOpacity;\r\n\r\n\t\t\tif (child.fill == undefined) {\r\n\t\t\t\tchild.__disabled = true;\r\n\t\t\t}\r\n\r\n\t\t\tlet legendDataItem = marker.dataItem;\r\n\t\t\tlegendDataItem.color = node.fill;\r\n\t\t\tlegendDataItem.colorOrig = node.fill;\r\n\r\n\t\t\tnode.events.on(\"propertychanged\", (ev) => {\r\n\t\t\t\tif (ev.property == \"fill\") {\r\n\r\n\t\t\t\t\tchild.__disabled = false;\r\n\r\n\t\t\t\t\tif (!child.isActive) {\r\n\t\t\t\t\t\tchild.fill = node.fill;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tchild.defaultState.properties.fill = node.fill;\r\n\t\t\t\t\tlegendDataItem.color = node.fill;\r\n\t\t\t\t\tlegendDataItem.colorOrig = node.fill;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (ev.property == \"stroke\") {\r\n\t\t\t\t\tif (!child.isActive) {\r\n\t\t\t\t\t\tchild.stroke = node.stroke;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tchild.defaultState.properties.stroke = node.stroke;\r\n\t\t\t\t}\r\n\t\t\t}, undefined, false)\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ForceDirectedSeries\"] = ForceDirectedSeries;\r\nregistry.registeredClasses[\"ForceDirectedSeriesDataItem\"] = ForceDirectedSeriesDataItem;\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/forceDirected/ForceDirectedSeries.ts","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n node,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate);\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(quad) {\n var strength = 0, q, c, weight = 0, x, y, i;\n\n // For internal nodes, accumulate forces from child quadrants.\n if (quad.length) {\n for (x = y = i = 0; i < 4; ++i) {\n if ((q = quad[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n }\n }\n quad.x = x / weight;\n quad.y = y / weight;\n }\n\n // For leaf nodes, accumulate forces from coincident quadrants.\n else {\n q = quad;\n q.x = q.data.x;\n q.y = q.data.y;\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n quad.value = strength;\n }\n\n function apply(quad, x1, _, x2) {\n if (!quad.value) return true;\n\n var x = quad.x - node.x,\n y = quad.y - node.y,\n w = x2 - x1,\n l = x * x + y * y;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(), l += x * x;\n if (y === 0) y = jiggle(), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * quad.value * alpha / l;\n node.vy += y * quad.value * alpha / l;\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (quad.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (quad.data !== node || quad.next) {\n if (x === 0) x = jiggle(), l += x * x;\n if (y === 0) y = jiggle(), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (quad.data !== node) {\n w = strengths[quad.data.index] * alpha / l;\n node.vx += x * w;\n node.vy += y * w;\n } while (quad = quad.next);\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n\n\n\n// WEBPACK FOOTER //\n// C:/Dropbox/www/amcharts4dev/node_modules/d3-force/src/manyBody.js","/**\r\n * ForceDirectedTree chart module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { SerialChart, ISerialChartProperties, ISerialChartDataFields, ISerialChartAdapters, ISerialChartEvents, SerialChartDataItem } from \"../../charts/types/SerialChart\";\r\nimport { ForceDirectedSeries, ForceDirectedSeriesDataItem } from \"./ForceDirectedSeries\";\r\nimport { Export } from \"../../core/export/Export\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n * @see {@link DataItem}\r\n */\r\nexport class ForceDirectedTreeDataItem extends SerialChartDataItem { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedTreeDataFields extends ISerialChartDataFields { }\r\n\r\n/**\r\n * Defines properties for [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedTreeProperties extends ISerialChartProperties { }\r\n\r\n/**\r\n * Defines events for [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedTreeEvents extends ISerialChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n * @see {@link Adapter}\r\n */\r\nexport interface IForceDirectedTreeAdapters extends ISerialChartAdapters, IForceDirectedTreeProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * A main class for [[ForceDirectedTree]] chart type.\r\n *\r\n * @see {@link IForceDirectedTreeEvents} for a list of available Events\r\n * @see {@link IForceDirectedTreeAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/force-directed/} For more information\r\n * @since 4.3.8\r\n * @important\r\n */\r\nexport class ForceDirectedTree extends SerialChart {\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: ForceDirectedTreeDataItem;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: IForceDirectedTreeDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IForceDirectedTreeProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IForceDirectedTreeAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IForceDirectedTreeEvents;\r\n\r\n\t/**\r\n\t * Defines a type of series that this chart uses.\r\n\t */\r\n\tpublic _seriesType: ForceDirectedSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedTree\";\r\n\r\n\t\tthis.seriesContainer.isMeasured = true;\r\n\t\tthis.seriesContainer.layout = \"absolute\";\r\n\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a new series of the suitable type.\r\n\t *\r\n\t * @return New series\r\n\t */\r\n\tprotected createSeries(): this[\"_seriesType\"] {\r\n\t\treturn new ForceDirectedSeries();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new ForceDirectedTreeDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Setups the legend to use the chart's data.\r\n\t *\r\n\t * @ignore\r\n\t */\r\n\tpublic feedLegend(): void {\r\n\t\tlet legend = this.legend;\r\n\t\tif (legend) {\r\n\r\n\t\t\tlet legendData: any[] = [];\r\n\r\n\t\t\tthis.series.each((series) => {\r\n\t\t\t\tif (!series.hiddenInLegend) {\r\n\r\n\t\t\t\t\tlet dataItems = series.dataItems;\r\n\t\t\t\t\tif (dataItems.length == 1) {\r\n\t\t\t\t\t\tlet children = series.dataItems.getIndex(0).children;\r\n\t\t\t\t\t\tif (children.length > 0) {\r\n\t\t\t\t\t\t\tdataItems = children;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataItems.each((dataItem) => {\r\n\t\t\t\t\t\tif (!dataItem.hiddenInLegend) {\r\n\t\t\t\t\t\t\tlegendData.push(dataItem);\r\n\r\n\t\t\t\t\t\t\tlet legendSettings = series.legendSettings;\r\n\t\t\t\t\t\t\tif (legendSettings) {\r\n\t\t\t\t\t\t\t\tif (legendSettings.labelText) {\r\n\t\t\t\t\t\t\t\t\tlegend.labels.template.text = legendSettings.labelText;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (legendSettings.itemLabelText) {\r\n\t\t\t\t\t\t\t\t\tlegend.labels.template.text = legendSettings.itemLabelText;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (legendSettings.valueText) {\r\n\t\t\t\t\t\t\t\t\tlegend.valueLabels.template.text = legendSettings.valueText;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (legendSettings.itemValueText) {\r\n\t\t\t\t\t\t\t\t\tlegend.valueLabels.template.text = legendSettings.itemValueText;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tlegend.data = legendData;\r\n\t\t\tlegend.dataFields.name = \"name\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Force directed tree\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Since this chart uses hierarchical data, we need to remove childrent\r\n\t * dataField from export of non-hierarchical formats such as CSV and XSLX.\r\n\t *\r\n\t * @return Export\r\n\t */\r\n\tprotected getExporting(): Export {\r\n\t\tconst exporting = super.getExporting();\r\n\t\texporting.adapter.add(\"formatDataFields\", (info) => {\r\n\t\t\tif (info.format == \"csv\" || info.format == \"xlsx\") {\r\n\t\t\t\tthis.series.each((series) => {\r\n\t\t\t\t\tif($type.hasValue(series.dataFields.children)) {\r\n\t\t\t\t\t\tdelete info.dataFields[series.dataFields.children];\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\treturn info;\r\n\t\t})\r\n\t\treturn exporting;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ForceDirectedTree\"] = ForceDirectedTree;\r\nregistry.registeredClasses[\"ForceDirectedTreeDataItem\"] = ForceDirectedTreeDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/forceDirected/ForceDirectedTree.ts","import * as m from \"../../es2015/plugins/forceDirected\";\nwindow.am4plugins_forceDirected = m;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./plugins/forceDirected.js\n// module id = null\n// module chunks = "],"sourceRoot":""}