diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/.babelrc b/tools/ui/node_modules/cytoscape-cose-bilkent/.babelrc new file mode 100644 index 0000000000000000000000000000000000000000..002b4aa0d58ec481a2688d3c0b66e9069e5d6adb --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["env"] +} diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/.eslintignore b/tools/ui/node_modules/cytoscape-cose-bilkent/.eslintignore new file mode 100644 index 0000000000000000000000000000000000000000..07e4fe727841738ff07aa0ee136c872c67729bfe --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/.eslintignore @@ -0,0 +1 @@ +node_modules/**/* diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/.eslintrc b/tools/ui/node_modules/cytoscape-cose-bilkent/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..31d35e21789367e839aff46bfbfb76d5862f2118 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/.eslintrc @@ -0,0 +1,13 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "node": true, + "amd": true, + "es6": true + }, + "extends": "eslint:recommended", + "rules": { + "semi": "error" + } +} diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/LICENSE b/tools/ui/node_modules/cytoscape-cose-bilkent/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9e21a7e3e05f3487da03a4e50f63c61d46686706 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/LICENSE @@ -0,0 +1,21 @@ + + +Copyright (c) 2016-2018, The Cytoscape Consortium. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/README.md b/tools/ui/node_modules/cytoscape-cose-bilkent/README.md new file mode 100644 index 0000000000000000000000000000000000000000..731b6002d88665f7884dd13088e4af7d43edc64d --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/README.md @@ -0,0 +1,145 @@ +cytoscape-cose-bilkent +================================================================================ + +[![DOI](https://zenodo.org/badge/42200589.svg)](https://zenodo.org/badge/latestdoi/42200589) + +## Description + +The CoSE (Compound Spring Embedder) layout for Cytoscape.js developed by [i-Vis Lab](http://cs.bilkent.edu.tr/~ivis/) in Bilkent University is a spring embedder layout with support for compound graphs (nested structures) and varying (non-uniform) node dimensions. +([demo](https://raw.githack.com/cytoscape/cytoscape.js-cose-bilkent/master/demo.html), [compound demo](https://raw.githack.com/cytoscape/cytoscape.js-cose-bilkent/master/demo-compound.html)) + +Please cite the following when using this layout: + +U. Dogrusoz, E. Giral, A. Cetintas, A. Civril, and E. Demir, "[A Layout Algorithm For Undirected Compound Graphs](http://www.sciencedirect.com/science/article/pii/S0020025508004799)", Information Sciences, 179, pp. 980-994, 2009. + +## Dependencies + + * Cytoscape.js ^3.2.0 + * cose-base ^1.0.0 + + +## Usage instructions + +Download the library: + * via npm: `npm install cytoscape-cose-bilkent`, + * via bower: `bower install cytoscape-cose-bilkent`, or + * via direct download in the repository (probably from a tag). + +Import the library as appropriate for your project: + +ES import: + +```js +import cytoscape from 'cytoscape'; +import coseBilkent from 'cytoscape-cose-bilkent'; + +cytoscape.use( coseBilkent ); +``` + +CommonJS require: + +```js +let cytoscape = require('cytoscape'); +let coseBilkent = require('cytoscape-cose-bilkent'); + +cytoscape.use( coseBilkent ); // register extension +``` + +AMD: + +```js +require(['cytoscape', 'cytoscape-cose-bilkent'], function( cytoscape, coseBilkent ){ + coseBilkent( cytoscape ); // register extension +}); +``` + +Plain HTML/JS has the extension registered for you automatically, because no `require()` is needed. + + +## API + +When calling the layout, e.g. `cy.layout({ name: 'cose-bilkent', ... })`, the following options are supported: + +```js +var defaultOptions = { + // Called on `layoutready` + ready: function () { + }, + // Called on `layoutstop` + stop: function () { + }, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: 'default', + // Whether to include labels in node dimensions. Useful for avoiding label overlap + nodeDimensionsIncludeLabels: false, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: true, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal (intra-graph) edge length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for inter-graph edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // Whether to tile disconnected nodes + tile: true, + // Type of layout animation. The option set is {'during', 'end', false} + animate: 'end', + // Duration for animate:end + animationDuration: 500, + // Amount of vertical space to put between degree zero nodes during tiling (can also be a function) + tilingPaddingVertical: 10, + // Amount of horizontal space to put between degree zero nodes during tiling (can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 +}; +``` + +*Note that this extension supports only relatively modern browsers. Browsers like IE require significant shimming, for example with [core-js](https://www.npmjs.com/package/core-js).* + +*Note that while running Cytoscape.js in headless mode, stylingEnabled option of Cytoscape.js should be set as true because this extension considers node dimensions and some other styling properties.* + + +## Build targets + +* `npm run test` : Run Mocha tests in `./test` +* `npm run build` : Build `./src/**` into `cytoscape-cose-bilkent.js` +* `npm run watch` : Automatically build on changes with live reloading (N.b. you must already have an HTTP server running) +* `npm run dev` : Automatically build on changes with live reloading with webpack dev server +* `npm run lint` : Run eslint on the source + +N.b. all builds use babel, so modern ES features can be used in the `src`. + + +## Publishing instructions + +This project is set up to automatically be published to npm and bower. To publish: + +1. Build the extension : `npm run build:release` +1. Commit the build : `git commit -am "Build for release"` +1. Bump the version number and tag: `npm version major|minor|patch` +1. Push to origin: `git push && git push --tags` +1. Publish to npm: `npm publish .` +1. If publishing to bower for the first time, you'll need to run `bower register cytoscape-cose-bilkent https://github.com/cytoscape/cytoscape.js-cose-bilkent.git` +1. [Make a new release](https://github.com/cytoscape/cytoscape.js-cose-bilkent/releases/new) for Zenodo. diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/bower.json b/tools/ui/node_modules/cytoscape-cose-bilkent/bower.json new file mode 100644 index 0000000000000000000000000000000000000000..bac81c964d9261948f0fb58a18604c3de9554183 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/bower.json @@ -0,0 +1,25 @@ +{ + "name": "cytoscape-cose-bilkent", + "description": "The CoSE layout for Cytoscape.js by Bilkent with enhanced compound node placement", + "main": "cytoscape-cose-bilkent.js", + "dependencies": { + "cytoscape": "^3.2.0", + "cose-base": "^1.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/cytoscape/cytoscape.js-cose-bilkent.git" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "keywords": [ + "cytoscape", + "cytoscape-extension" + ], + "license": "MIT" +} diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js b/tools/ui/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js new file mode 100644 index 0000000000000000000000000000000000000000..1f138a8970f4cdf939993e2d5d8eeaaf7d756807 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js @@ -0,0 +1,458 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("cose-base")); + else if(typeof define === 'function' && define.amd) + define(["cose-base"], factory); + else if(typeof exports === 'object') + exports["cytoscapeCoseBilkent"] = factory(require("cose-base")); + else + root["cytoscapeCoseBilkent"] = factory(root["coseBase"]); +})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var LayoutConstants = __webpack_require__(0).layoutBase.LayoutConstants; +var FDLayoutConstants = __webpack_require__(0).layoutBase.FDLayoutConstants; +var CoSEConstants = __webpack_require__(0).CoSEConstants; +var CoSELayout = __webpack_require__(0).CoSELayout; +var CoSENode = __webpack_require__(0).CoSENode; +var PointD = __webpack_require__(0).layoutBase.PointD; +var DimensionD = __webpack_require__(0).layoutBase.DimensionD; + +var defaults = { + // Called on `layoutready` + ready: function ready() {}, + // Called on `layoutstop` + stop: function stop() {}, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: 'default', + // include labels in node dimensions + nodeDimensionsIncludeLabels: false, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: true, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal edge (non nested) length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // Type of layout animation. The option set is {'during', 'end', false} + animate: 'end', + // Duration for animate:end + animationDuration: 500, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 +}; + +function extend(defaults, options) { + var obj = {}; + + for (var i in defaults) { + obj[i] = defaults[i]; + } + + for (var i in options) { + obj[i] = options[i]; + } + + return obj; +}; + +function _CoSELayout(_options) { + this.options = extend(defaults, _options); + getUserOptions(this.options); +} + +var getUserOptions = function getUserOptions(options) { + if (options.nodeRepulsion != null) CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion; + if (options.idealEdgeLength != null) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength; + if (options.edgeElasticity != null) CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity; + if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; + if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; + if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; + if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; + if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; + if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; + if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; + + if (options.quality == 'draft') LayoutConstants.QUALITY = 0;else if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 1; + + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize; + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; + CoSEConstants.TILE = options.tile; + CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; +}; + +_CoSELayout.prototype.run = function () { + var ready; + var frameId; + var options = this.options; + var idToLNode = this.idToLNode = {}; + var layout = this.layout = new CoSELayout(); + var self = this; + + self.stopped = false; + + this.cy = this.options.cy; + + this.cy.trigger({ type: 'layoutstart', layout: this }); + + var gm = layout.newGraphManager(); + this.gm = gm; + + var nodes = this.options.eles.nodes(); + var edges = this.options.eles.edges(); + + this.root = gm.addRoot(); + this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout); + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var sourceNode = this.idToLNode[edge.data("source")]; + var targetNode = this.idToLNode[edge.data("target")]; + if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { + var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + } + } + + var getPositions = function getPositions(ele, i) { + if (typeof ele === "number") { + ele = i; + } + var theId = ele.data('id'); + var lNode = self.idToLNode[theId]; + + return { + x: lNode.getRect().getCenterX(), + y: lNode.getRect().getCenterY() + }; + }; + + /* + * Reposition nodes in iterations animatedly + */ + var iterateAnimated = function iterateAnimated() { + // Thigs to perform after nodes are repositioned on screen + var afterReposition = function afterReposition() { + if (options.fit) { + options.cy.fit(options.eles, options.padding); + } + + if (!ready) { + ready = true; + self.cy.one('layoutready', options.ready); + self.cy.trigger({ type: 'layoutready', layout: self }); + } + }; + + var ticksPerFrame = self.options.refresh; + var isDone; + + for (var i = 0; i < ticksPerFrame && !isDone; i++) { + isDone = self.stopped || self.layout.tick(); + } + + // If layout is done + if (isDone) { + // If the layout is not a sublayout and it is successful perform post layout. + if (layout.checkLayoutSuccess() && !layout.isSubLayout) { + layout.doPostLayout(); + } + + // If layout has a tilingPostLayout function property call it. + if (layout.tilingPostLayout) { + layout.tilingPostLayout(); + } + + layout.isLayoutFinished = true; + + self.options.eles.nodes().positions(getPositions); + + afterReposition(); + + // trigger layoutstop when the layout stops (e.g. finishes) + self.cy.one('layoutstop', self.options.stop); + self.cy.trigger({ type: 'layoutstop', layout: self }); + + if (frameId) { + cancelAnimationFrame(frameId); + } + + ready = false; + return; + } + + var animationData = self.layout.getPositionsData(); // Get positions of layout nodes note that all nodes may not be layout nodes because of tiling + + // Position nodes, for the nodes whose id does not included in data (because they are removed from their parents and included in dummy compounds) + // use position of their ancestors or dummy ancestors + options.eles.nodes().positions(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + // If ele is a compound node, then its position will be defined by its children + if (!ele.isParent()) { + var theId = ele.id(); + var pNode = animationData[theId]; + var temp = ele; + // If pNode is undefined search until finding position data of its first ancestor (It may be dummy as well) + while (pNode == null) { + pNode = animationData[temp.data('parent')] || animationData['DummyCompound_' + temp.data('parent')]; + animationData[theId] = pNode; + temp = temp.parent()[0]; + if (temp == undefined) { + break; + } + } + if (pNode != null) { + return { + x: pNode.x, + y: pNode.y + }; + } else { + return { + x: ele.position('x'), + y: ele.position('y') + }; + } + } + }); + + afterReposition(); + + frameId = requestAnimationFrame(iterateAnimated); + }; + + /* + * Listen 'layoutstarted' event and start animated iteration if animate option is 'during' + */ + layout.addListener('layoutstarted', function () { + if (self.options.animate === 'during') { + frameId = requestAnimationFrame(iterateAnimated); + } + }); + + layout.runLayout(); // Run cose layout + + /* + * If animate option is not 'during' ('end' or false) perform these here (If it is 'during' similar things are already performed) + */ + if (this.options.animate !== "during") { + self.options.eles.nodes().not(":parent").layoutPositions(self, self.options, getPositions); // Use layout positions to reposition the nodes it considers the options parameter + ready = false; + } + + return this; // chaining +}; + +//Get the top most ones of a list of nodes +_CoSELayout.prototype.getTopMostNodes = function (nodes) { + var nodesMap = {}; + for (var i = 0; i < nodes.length; i++) { + nodesMap[nodes[i].id()] = true; + } + var roots = nodes.filter(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + var parent = ele.parent()[0]; + while (parent != null) { + if (nodesMap[parent.id()]) { + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + + return roots; +}; + +_CoSELayout.prototype.processChildrenList = function (parent, children, layout) { + var size = children.length; + for (var i = 0; i < size; i++) { + var theChild = children[i]; + var children_of_children = theChild.children(); + var theNode; + + var dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels + }); + + if (theChild.outerWidth() != null && theChild.outerHeight() != null) { + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + // Attach id to the layout node + theNode.id = theChild.data("id"); + // Attach the paddings of cy node to layout node + theNode.paddingLeft = parseInt(theChild.css('padding')); + theNode.paddingTop = parseInt(theChild.css('padding')); + theNode.paddingRight = parseInt(theChild.css('padding')); + theNode.paddingBottom = parseInt(theChild.css('padding')); + + //Attach the label properties to compound if labels will be included in node dimensions + if (this.options.nodeDimensionsIncludeLabels) { + if (theChild.isParent()) { + var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w; + var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h; + var labelPos = theChild.css("text-halign"); + theNode.labelWidth = labelWidth; + theNode.labelHeight = labelHeight; + theNode.labelPos = labelPos; + } + } + + // Map the layout node + this.idToLNode[theChild.data("id")] = theNode; + + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + + if (children_of_children != null && children_of_children.length > 0) { + var theNewGraph; + theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); + this.processChildrenList(theNewGraph, children_of_children, layout); + } + } +}; + +/** + * @brief : called on continuous layouts to stop them before they finish + */ +_CoSELayout.prototype.stop = function () { + this.stopped = true; + + return this; // chaining +}; + +var register = function register(cytoscape) { + // var Layout = getLayout( cytoscape ); + + cytoscape('layout', 'cose-bilkent', _CoSELayout); +}; + +// auto reg for globals +if (typeof cytoscape !== 'undefined') { + register(cytoscape); +} + +module.exports = register; + +/***/ }) +/******/ ]); +}); \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/demo-compound.html b/tools/ui/node_modules/cytoscape-cose-bilkent/demo-compound.html new file mode 100644 index 0000000000000000000000000000000000000000..0b4e3cd715d5343d40600016b8a7f073adf6ce9c --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/demo-compound.html @@ -0,0 +1,199 @@ + + + + + + cytoscape-cose-bilkent.js demo (compound) + + + + + + + + + + + + + + + + + + + + +

cytoscape-cose-bilkent demo (compound)

+ + + + +
+ + + + diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/demo.html b/tools/ui/node_modules/cytoscape-cose-bilkent/demo.html new file mode 100644 index 0000000000000000000000000000000000000000..f0f5af96701aa3ad18531dc233b504441dad6b2c --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/demo.html @@ -0,0 +1,117 @@ + + + + + + cytoscape-cose-bilkent.js demo + + + + + + + + + + + + + + + + + + + + +

cytoscape-cose-bilkent demo

+ + + + +
+ + + + diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/private/private.properties b/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/private/private.properties new file mode 100644 index 0000000000000000000000000000000000000000..3b1a22e6c97a8c2654cd087e610829a8b4eebdb8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/private/private.properties @@ -0,0 +1 @@ +browser=Chrome.INTEGRATED diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/project.properties b/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/project.properties new file mode 100644 index 0000000000000000000000000000000000000000..da97eba5689cca90e15d36e3313b84a7a7df27a4 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/project.properties @@ -0,0 +1,3 @@ +files.encoding=UTF-8 +site.root.folder= +source.folder= diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/project.xml b/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..22b7c4aae792f20358b87d7da5c2ca0e1e3250ba --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.web.clientproject + + + cytoscape-cose-bilkent + + + diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/package.json b/tools/ui/node_modules/cytoscape-cose-bilkent/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f2e1b4c90fe887e1e3d9dc5a085eece639a403b2 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/package.json @@ -0,0 +1,55 @@ +{ + "name": "cytoscape-cose-bilkent", + "version": "4.1.0", + "description": "The CoSE layout for Cytoscape.js by Bilkent with enhanced compound node placement", + "main": "cytoscape-cose-bilkent.js", + "scripts": { + "postpublish": "run-s gh-pages", + "gh-pages": "gh-pages -d pages", + "copyright": "update license", + "lint": "eslint src", + "build": "cross-env NODE_ENV=production webpack", + "build:min": "cross-env NODE_ENV=production MIN=true webpack", + "build:release": "run-s build copyright", + "watch": "webpack --progress --watch", + "dev": "webpack-dev-server --open", + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "https://github.com/cytoscape/cytoscape.js-cose-bilkent.git" + }, + "keywords": [ + "cytoscape", + "cytoscape-extension" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/cytoscape/cytoscape.js-cose-bilkent/issues" + }, + "homepage": "https://github.com/cytoscape/cytoscape.js-cose-bilkent", + "devDependencies": { + "babel-core": "^6.24.1", + "babel-loader": "^7.0.0", + "babel-preset-env": "^1.5.1", + "camelcase": "^4.1.0", + "chai": "4.0.2", + "cpy-cli": "^1.0.1", + "cross-env": "^5.0.0", + "eslint": "^3.9.1", + "gh-pages": "^1.0.0", + "mocha": "3.4.2", + "npm-run-all": "^4.1.2", + "rimraf": "^2.6.2", + "update": "^0.7.4", + "updater-license": "^1.0.0", + "webpack": "^2.6.1", + "webpack-dev-server": "^2.4.5" + }, + "peerDependencies": { + "cytoscape": "^3.2.0" + }, + "dependencies": { + "cose-base": "^1.0.0" + } +} diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/src/index.js b/tools/ui/node_modules/cytoscape-cose-bilkent/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4bf002dd2017cb7cf6e9759ffcff4347705f62f8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/src/index.js @@ -0,0 +1,390 @@ +'use strict'; + +var LayoutConstants = require('cose-base').layoutBase.LayoutConstants; +var FDLayoutConstants = require('cose-base').layoutBase.FDLayoutConstants; +var CoSEConstants = require('cose-base').CoSEConstants; +var CoSELayout = require('cose-base').CoSELayout; +var CoSENode = require('cose-base').CoSENode; +var PointD = require('cose-base').layoutBase.PointD; +var DimensionD = require('cose-base').layoutBase.DimensionD; + +var defaults = { + // Called on `layoutready` + ready: function () { + }, + // Called on `layoutstop` + stop: function () { + }, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: 'default', + // include labels in node dimensions + nodeDimensionsIncludeLabels: false, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: true, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal edge (non nested) length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // Type of layout animation. The option set is {'during', 'end', false} + animate: 'end', + // Duration for animate:end + animationDuration: 500, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 +}; + +function extend(defaults, options) { + var obj = {}; + + for (var i in defaults) { + obj[i] = defaults[i]; + } + + for (var i in options) { + obj[i] = options[i]; + } + + return obj; +}; + +function _CoSELayout(_options) { + this.options = extend(defaults, _options); + getUserOptions(this.options); +} + +var getUserOptions = function (options) { + if (options.nodeRepulsion != null) + CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion; + if (options.idealEdgeLength != null) + CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength; + if (options.edgeElasticity != null) + CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity; + if (options.nestingFactor != null) + CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; + if (options.gravity != null) + CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; + if (options.numIter != null) + CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; + if (options.gravityRange != null) + CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; + if(options.gravityCompound != null) + CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; + if(options.gravityRangeCompound != null) + CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; + if (options.initialEnergyOnIncremental != null) + CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; + + if (options.quality == 'draft') + LayoutConstants.QUALITY = 0; + else if(options.quality == 'proof') + LayoutConstants.QUALITY = 2; + else + LayoutConstants.QUALITY = 1; + + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = + !(options.randomize); + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; + CoSEConstants.TILE = options.tile; + CoSEConstants.TILING_PADDING_VERTICAL = + typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = + typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; +}; + +_CoSELayout.prototype.run = function () { + var ready; + var frameId; + var options = this.options; + var idToLNode = this.idToLNode = {}; + var layout = this.layout = new CoSELayout(); + var self = this; + + self.stopped = false; + + this.cy = this.options.cy; + + this.cy.trigger({ type: 'layoutstart', layout: this }); + + var gm = layout.newGraphManager(); + this.gm = gm; + + var nodes = this.options.eles.nodes(); + var edges = this.options.eles.edges(); + + this.root = gm.addRoot(); + this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout); + + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var sourceNode = this.idToLNode[edge.data("source")]; + var targetNode = this.idToLNode[edge.data("target")]; + if(sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0){ + var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + } + } + + var getPositions = function(ele, i){ + if(typeof ele === "number") { + ele = i; + } + var theId = ele.data('id'); + var lNode = self.idToLNode[theId]; + + return { + x: lNode.getRect().getCenterX(), + y: lNode.getRect().getCenterY() + }; + }; + + /* + * Reposition nodes in iterations animatedly + */ + var iterateAnimated = function () { + // Thigs to perform after nodes are repositioned on screen + var afterReposition = function() { + if (options.fit) { + options.cy.fit(options.eles, options.padding); + } + + if (!ready) { + ready = true; + self.cy.one('layoutready', options.ready); + self.cy.trigger({type: 'layoutready', layout: self}); + } + }; + + var ticksPerFrame = self.options.refresh; + var isDone; + + for( var i = 0; i < ticksPerFrame && !isDone; i++ ){ + isDone = self.stopped || self.layout.tick(); + } + + // If layout is done + if (isDone) { + // If the layout is not a sublayout and it is successful perform post layout. + if (layout.checkLayoutSuccess() && !layout.isSubLayout) { + layout.doPostLayout(); + } + + // If layout has a tilingPostLayout function property call it. + if (layout.tilingPostLayout) { + layout.tilingPostLayout(); + } + + layout.isLayoutFinished = true; + + self.options.eles.nodes().positions(getPositions); + + afterReposition(); + + // trigger layoutstop when the layout stops (e.g. finishes) + self.cy.one('layoutstop', self.options.stop); + self.cy.trigger({ type: 'layoutstop', layout: self }); + + if (frameId) { + cancelAnimationFrame(frameId); + } + + ready = false; + return; + } + + var animationData = self.layout.getPositionsData(); // Get positions of layout nodes note that all nodes may not be layout nodes because of tiling + + // Position nodes, for the nodes whose id does not included in data (because they are removed from their parents and included in dummy compounds) + // use position of their ancestors or dummy ancestors + options.eles.nodes().positions(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + // If ele is a compound node, then its position will be defined by its children + if(!ele.isParent()){ + var theId = ele.id(); + var pNode = animationData[theId]; + var temp = ele; + // If pNode is undefined search until finding position data of its first ancestor (It may be dummy as well) + while (pNode == null) { + pNode = animationData[temp.data('parent')] || animationData['DummyCompound_' + temp.data('parent')]; + animationData[theId] = pNode; + temp = temp.parent()[0]; + if(temp == undefined){ + break; + } + } + if(pNode != null){ + return { + x: pNode.x, + y: pNode.y + }; + } else{ + return { + x: ele.position('x'), + y: ele.position('y') + }; + } + } + }); + + afterReposition(); + + frameId = requestAnimationFrame(iterateAnimated); + }; + + /* + * Listen 'layoutstarted' event and start animated iteration if animate option is 'during' + */ + layout.addListener('layoutstarted', function () { + if (self.options.animate === 'during') { + frameId = requestAnimationFrame(iterateAnimated); + } + }); + + layout.runLayout(); // Run cose layout + + /* + * If animate option is not 'during' ('end' or false) perform these here (If it is 'during' similar things are already performed) + */ + if(this.options.animate !== "during"){ + self.options.eles.nodes().not(":parent").layoutPositions(self, self.options, getPositions); // Use layout positions to reposition the nodes it considers the options parameter + ready = false; + } + + return this; // chaining +}; + +//Get the top most ones of a list of nodes +_CoSELayout.prototype.getTopMostNodes = function(nodes) { + var nodesMap = {}; + for (var i = 0; i < nodes.length; i++) { + nodesMap[nodes[i].id()] = true; + } + var roots = nodes.filter(function (ele, i) { + if(typeof ele === "number") { + ele = i; + } + var parent = ele.parent()[0]; + while(parent != null){ + if(nodesMap[parent.id()]){ + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + + return roots; +}; + +_CoSELayout.prototype.processChildrenList = function (parent, children, layout) { + var size = children.length; + for (var i = 0; i < size; i++) { + var theChild = children[i]; + var children_of_children = theChild.children(); + var theNode; + + var dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels + }); + + if (theChild.outerWidth() != null + && theChild.outerHeight() != null) { + theNode = parent.add(new CoSENode(layout.graphManager, + new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), + new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } + else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + // Attach id to the layout node + theNode.id = theChild.data("id"); + // Attach the paddings of cy node to layout node + theNode.paddingLeft = parseInt( theChild.css('padding') ); + theNode.paddingTop = parseInt( theChild.css('padding') ); + theNode.paddingRight = parseInt( theChild.css('padding') ); + theNode.paddingBottom = parseInt( theChild.css('padding') ); + + //Attach the label properties to compound if labels will be included in node dimensions + if(this.options.nodeDimensionsIncludeLabels){ + if(theChild.isParent()){ + var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w; + var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h; + var labelPos = theChild.css("text-halign"); + theNode.labelWidth = labelWidth; + theNode.labelHeight = labelHeight; + theNode.labelPos = labelPos; + } + } + + // Map the layout node + this.idToLNode[theChild.data("id")] = theNode; + + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + + if (children_of_children != null && children_of_children.length > 0) { + var theNewGraph; + theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); + this.processChildrenList(theNewGraph, children_of_children, layout); + } + } +}; + +/** + * @brief : called on continuous layouts to stop them before they finish + */ +_CoSELayout.prototype.stop = function () { + this.stopped = true; + + return this; // chaining +}; + +var register = function( cytoscape ){ +// var Layout = getLayout( cytoscape ); + + cytoscape('layout', 'cose-bilkent', _CoSELayout); +}; + +// auto reg for globals +if( typeof cytoscape !== 'undefined' ){ + register( cytoscape ); +} + +module.exports = register; diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/test/example.js b/tools/ui/node_modules/cytoscape-cose-bilkent/test/example.js new file mode 100644 index 0000000000000000000000000000000000000000..2b907f27817cf0646989e6bddae6eecf9ad53d4d --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/test/example.js @@ -0,0 +1,7 @@ +const chai = require('chai'); + +describe('This', function(){ + it('does that', function(){ + expect( true ).to.be.true; + }); +}); diff --git a/tools/ui/node_modules/cytoscape-cose-bilkent/webpack.config.js b/tools/ui/node_modules/cytoscape-cose-bilkent/webpack.config.js new file mode 100644 index 0000000000000000000000000000000000000000..35232701252eac1c03ff851f6876c8200f38e29b --- /dev/null +++ b/tools/ui/node_modules/cytoscape-cose-bilkent/webpack.config.js @@ -0,0 +1,43 @@ +const path = require('path'); +const pkg = require('./package.json'); +const camelcase = require('camelcase'); +const process = require('process'); +const webpack = require('webpack'); +const env = process.env; +const NODE_ENV = env.NODE_ENV; +const MIN = env.MIN; +const PROD = NODE_ENV === 'production'; + +let config = { + devtool: PROD ? false : 'inline-source-map', + entry: './src/index.js', + output: { + path: path.join( __dirname ), + filename: pkg.name + '.js', + library: camelcase( pkg.name ), + libraryTarget: 'umd' + }, + module: { + rules: [ + { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' } + ] + }, + externals: PROD ? { + 'cose-base': { + commonjs2: 'cose-base', + commonjs: 'cose-base', + amd: 'cose-base', + root: 'coseBase' + } + } : {}, + plugins: MIN ? [ + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false, + drop_console: false, + } + }) + ] : [] +}; + +module.exports = config; diff --git a/tools/ui/node_modules/cytoscape-fcose/.babelrc b/tools/ui/node_modules/cytoscape-fcose/.babelrc new file mode 100644 index 0000000000000000000000000000000000000000..002b4aa0d58ec481a2688d3c0b66e9069e5d6adb --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["env"] +} diff --git a/tools/ui/node_modules/cytoscape-fcose/.eslintignore b/tools/ui/node_modules/cytoscape-fcose/.eslintignore new file mode 100644 index 0000000000000000000000000000000000000000..07e4fe727841738ff07aa0ee136c872c67729bfe --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/.eslintignore @@ -0,0 +1 @@ +node_modules/**/* diff --git a/tools/ui/node_modules/cytoscape-fcose/.eslintrc b/tools/ui/node_modules/cytoscape-fcose/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..31d35e21789367e839aff46bfbfb76d5862f2118 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/.eslintrc @@ -0,0 +1,13 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "node": true, + "amd": true, + "es6": true + }, + "extends": "eslint:recommended", + "rules": { + "semi": "error" + } +} diff --git a/tools/ui/node_modules/cytoscape-fcose/CITATION.cff b/tools/ui/node_modules/cytoscape-fcose/CITATION.cff new file mode 100644 index 0000000000000000000000000000000000000000..3c44350d83bab7e8d48b6bfdbe357ca0449a1d21 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/CITATION.cff @@ -0,0 +1,31 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: +- family-names: "Balci" + given-names: "Hasan" + orcid: "https://orcid.org/0000-0001-8319-7758" +- family-names: "Dogrusoz" + given-names: "Ugur" + orcid: "https://orcid.org/0000-0002-7153-0784" +title: "cytoscape.js-fcose" +version: 2.1.0 +date-released: 2021-06-25 +url: "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose" +preferred-citation: + type: article + authors: + - family-names: "Balci" + given-names: "Hasan" + orcid: "https://orcid.org/0000-0001-8319-7758" + - family-names: "Dogrusoz" + given-names: "Ugur" + orcid: "https://orcid.org/0000-0002-7153-0784" + doi: "10.1109/TVCG.2021.3095303" + journal: "IEEE Transactions on Visualization and Computer Graphics" + title: "fCoSE: A Fast Compound Graph Layout Algorithm with Constraint Support" + issue: 12 + volume: 28 + start: 4582 # First page number + end: 4593 # Last page number + month: 12 + year: 2022 diff --git a/tools/ui/node_modules/cytoscape-fcose/LICENSE b/tools/ui/node_modules/cytoscape-fcose/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..3552d1cad781ed4a7f57287a13aa133fbef3b43d --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018 - present, iVis-at-Bilkent. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/cytoscape-fcose/README.md b/tools/ui/node_modules/cytoscape-fcose/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7573ddebe1dc37c58def3ccbee0d94e6b4d38fd3 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/README.md @@ -0,0 +1,236 @@ +cytoscape-fcose +================================================================================ + + +## Description + + +fCoSE (pron. "f-cosay", **f**ast **Co**mpound **S**pring **E**mbedder), is a faster version of our earlier compound spring embedder algorithm named [CoSE](https://github.com/cytoscape/cytoscape.js-cose-bilkent), implemented as a Cytoscape.js extension by [i-Vis Lab](http://cs.bilkent.edu.tr/~ivis/) in Bilkent University. + +Here are some demos: **simple**, **compound**, and **constraints**, respectively: +

+   +   + +

+ +fCoSE layout algorithm combines the speed of spectral layout with the aesthetics of force-directed layout. fCoSE runs up to 2 times as fast as CoSE while achieving similar aesthetics. + +

+ +Furthermore, fCoSE also supports a fairly rich set of constraint types (i.e., fixed position, vertical/horizontal alignment and relative placement). + +

+ +You can see constraint support in action in the following videos: [fixed node](https://youtu.be/vRZVlwntzGY), [alignment](https://youtu.be/O5rddJ7DteU), [relative placement](https://youtu.be/Xcm87bT50RA), [hybrid](https://youtu.be/KRAQHmnTvUA), [real life graphs](https://youtu.be/vTPy9G2ALcI). Constraints can also be added [incrementally](https://youtu.be/DTm2WmzwP4k) on a given layout. + +Please cite the following when you use this layout: + +H. Balci and U. Dogrusoz, "[fCoSE: A Fast Compound Graph Layout Algorithm with Constraint Support](https://doi.org/10.1109/TVCG.2021.3095303)," in IEEE Transactions on Visualization and Computer Graphics, 28(12), pp. 4582-4593, 2022. + +U. Dogrusoz, E. Giral, A. Cetintas, A. Civril and E. Demir, "[A Layout Algorithm For Undirected Compound Graphs](http://www.sciencedirect.com/science/article/pii/S0020025508004799)", Information Sciences, 179, pp. 980-994, 2009. + +## Dependencies + + * Cytoscape.js ^3.2.0 + * cose-base ^2.0.0 + * cytoscape-layout-utilities.js (optional for packing disconnected components) ^1.0.0 + +## Documentation + +fCoSE supports user-defined placement constraints as well as its full support for compound graphs. These constraints may be defined for simple nodes. Supported constraint types are: + +* **Fixed node constraint:** The user may provide *exact* desired positions for a set of nodes called *fixed nodes*. For example, in order to position node *n1* to *(x: 100, y: 200)* and node *n2* to *(x: 200, y: -300)* as a result of the layout, ```fixedNodeConstraint``` option should be set as follows: + + ```js + fixedNodeConstraint: [{nodeId: 'n1', position: {x: 100, y: 200}}, + {nodeId: 'n2', position: {x: 200, y: -300}}], + ``` + +* **Alignment constraint:** This constraint aims to align two or more nodes (with respect to their centers) vertically or horizontally. For example, for the vertical alignment of nodes {*n1, n2, n3*} and {*n4, n5*}, and horizontal alignment of nodes {*n2, n4*} as a result of the layout, ```alignmentConstraint``` option should be set as follows: + ```js + alignmentConstraint: {vertical: [['n1', 'n2', 'n3'], ['n4', 'n5']], horizontal: [['n2', 'n4']]}, + ``` +      ***Note:** Alignment constraints in a direction must be given in most compact form. Example: ```['n1', 'n2', 'n3']``` instead of ```['n1', 'n2'], ['n1', 'n3']```.* + +* **Relative placement constraint:** The user may constrain the position of a node relative to another node in either vertical or horizontal direction. For example, in order to position node *n1* to be above of node *n2* by at least 100 pixels and position node *n3* to be on the left of node *n4* by at least 75 pixels as a result of the layout, ```relativePlacementConstraint``` option should be set as follows: + + ```js + relativePlacementConstraint: [{top: 'n1', bottom: 'n2', gap: 100}, + {left: 'n3', right: 'n4', gap: 75}], + ``` + The `gap` property is optional. If it is omitted, average `idealEdgeLength` is used as the gap value. + +## Usage instructions + +Download the library: + * via npm: `npm install cytoscape-fcose`, + * via bower: `bower install cytoscape-fcose`, or + * via direct download in the repository (probably from a tag). + +Import the library as appropriate for your project: + +ES import: + +```js +import cytoscape from 'cytoscape'; +import fcose from 'cytoscape-fcose'; + +cytoscape.use( fcose ); +``` + +CommonJS require: + +```js +let cytoscape = require('cytoscape'); +let fcose = require('cytoscape-fcose'); + +cytoscape.use( fcose ); // register extension +``` + +AMD: + +```js +require(['cytoscape', 'cytoscape-fcose'], function( cytoscape, fcose ){ + fcose( cytoscape ); // register extension +}); +``` + +Plain HTML/JS has the extension registered for you automatically, because no `require()` is needed. Just add the following files: + +``` + + + +``` + + +## API + +When calling the layout, e.g. `cy.layout({ name: 'fcose', ... })`, the following options are supported: + +```js +var defaultOptions = { + + // 'draft', 'default' or 'proof' + // - "draft" only applies spectral layout + // - "default" improves the quality with incremental layout (fast cooling rate) + // - "proof" improves the quality with incremental layout (slow cooling rate) + quality: "default", + // Use random node positions at beginning of layout + // if this is set to false, then quality option must be "proof" + randomize: true, + // Whether or not to animate the layout + animate: true, + // Duration of animation in ms, if enabled + animationDuration: 1000, + // Easing of animation, if enabled + animationEasing: undefined, + // Fit the viewport to the repositioned nodes + fit: true, + // Padding around layout + padding: 30, + // Whether to include labels in node dimensions. Valid in "proof" quality + nodeDimensionsIncludeLabels: false, + // Whether or not simple nodes (non-compound nodes) are of uniform dimensions + uniformNodeDimensions: false, + // Whether to pack disconnected components - cytoscape-layout-utilities extension should be registered and initialized + packComponents: true, + // Layout step - all, transformed, enforced, cose - for debug purpose only + step: "all", + + /* spectral layout options */ + + // False for random, true for greedy sampling + samplingType: true, + // Sample size to construct distance matrix + sampleSize: 25, + // Separation amount between nodes + nodeSeparation: 75, + // Power iteration tolerance + piTol: 0.0000001, + + /* incremental layout options */ + + // Node repulsion (non overlapping) multiplier + nodeRepulsion: node => 4500, + // Ideal edge (non nested) length + idealEdgeLength: edge => 50, + // Divisor to compute edge forces + edgeElasticity: edge => 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Maximum number of iterations to perform - this is a suggested value and might be adjusted by the algorithm as required + numIter: 2500, + // For enabling tiling + tile: true, + // The comparison function to be used while sorting nodes during tiling operation. + // Takes the ids of 2 nodes that will be compared as a parameter and the default tiling operation is performed when this option is not set. + // It works similar to ``compareFunction`` parameter of ``Array.prototype.sort()`` + // If node1 is less then node2 by some ordering criterion ``tilingCompareBy(nodeId1, nodeId2)`` must return a negative value + // If node1 is greater then node2 by some ordering criterion ``tilingCompareBy(nodeId1, nodeId2)`` must return a positive value + // If node1 is equal to node2 by some ordering criterion ``tilingCompareBy(nodeId1, nodeId2)`` must return 0 + tilingCompareBy: undefined, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity force (constant) + gravity: 0.25, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.3, + + /* constraint options */ + + // Fix desired nodes to predefined positions + // [{nodeId: 'n1', position: {x: 100, y: 200}}, {...}] + fixedNodeConstraint: undefined, + // Align desired nodes in vertical/horizontal direction + // {vertical: [['n1', 'n2'], [...]], horizontal: [['n2', 'n4'], [...]]} + alignmentConstraint: undefined, + // Place two nodes relatively in vertical/horizontal direction + // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}, {...}] + relativePlacementConstraint: undefined, + + /* layout event callbacks */ + ready: () => {}, // on layoutready + stop: () => {} // on layoutstop +}; +``` +To be able to use `packComponents` option, `cytoscape-layout-utilities` extension should also be registered in the application. +Packing related [options](https://github.com/iVis-at-Bilkent/cytoscape.js-layout-utilities#default-options) should be set via `cytoscape-layout-utilities` extension. +If they are not set, fCoSE uses default options. + + +## Build targets + +* `npm run test` : Run Mocha tests in `./test` +* `npm run build` : Build `./src/**` into `cytoscape-fcose.js` +* `npm run watch` : Automatically build on changes with live reloading (N.b. you must already have an HTTP server running) +* `npm run dev` : Automatically build on changes with live reloading with webpack dev server +* `npm run lint` : Run eslint on the source + +N.b. all builds use babel, so modern ES features can be used in the `src`. + + +## Publishing instructions + +This project is set up to automatically be published to npm and bower. To publish: + +1. Build the extension : `npm run build:release` +1. Commit the build : `git commit -am "Build for release"` +1. Bump the version number and tag: `npm version major|minor|patch` +1. Push to origin: `git push && git push --tags` +1. Publish to npm: `npm publish .` +1. If publishing to bower for the first time, you'll need to run `bower register cytoscape-fcose https://github.com/iVis-at-Bilkent/cytoscape.js-fcose.git` +1. [Make a new release](https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/releases/new) for Zenodo. + +## Team + + * [Hasan Balcı](https://github.com/hasanbalci) and [Ugur Dogrusoz](https://github.com/ugurdogrusoz) of [i-Vis at Bilkent University](http://www.cs.bilkent.edu.tr/~ivis) diff --git a/tools/ui/node_modules/cytoscape-fcose/bower.json b/tools/ui/node_modules/cytoscape-fcose/bower.json new file mode 100644 index 0000000000000000000000000000000000000000..a30ea7969044f8d73fe80885750ed0787103f761 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/bower.json @@ -0,0 +1,25 @@ +{ + "name": "cytoscape-fcose", + "description": "The fCoSE layout for Cytoscape.js by Bilkent with fast compound node placement", + "main": "cytoscape-fcose.js", + "dependencies": { + "cytoscape": "^3.2.0", + "cose-base": "^1.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose.git" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "keywords": [ + "cytoscape", + "cytoscape-extension" + ], + "license": "MIT" +} diff --git a/tools/ui/node_modules/cytoscape-fcose/cytoscape-fcose.js b/tools/ui/node_modules/cytoscape-fcose/cytoscape-fcose.js new file mode 100644 index 0000000000000000000000000000000000000000..9ad4f6ec33b8b114da2c5455906e40426dc690f4 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/cytoscape-fcose.js @@ -0,0 +1,1549 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("cose-base")); + else if(typeof define === 'function' && define.amd) + define(["cose-base"], factory); + else if(typeof exports === 'object') + exports["cytoscapeFcose"] = factory(require("cose-base")); + else + root["cytoscapeFcose"] = factory(root["coseBase"]); +})(this, function(__WEBPACK_EXTERNAL_MODULE__140__) { +return /******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 658: +/***/ ((module) => { + + + +// Simple, internal Object.assign() polyfill for options objects etc. + +module.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) { + for (var _len = arguments.length, srcs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + srcs[_key - 1] = arguments[_key]; + } + + srcs.forEach(function (src) { + Object.keys(src).forEach(function (k) { + return tgt[k] = src[k]; + }); + }); + + return tgt; +}; + +/***/ }), + +/***/ 548: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +/* + * Auxiliary functions + */ + +var LinkedList = __webpack_require__(140).layoutBase.LinkedList; + +var auxiliary = {}; + +// get the top most nodes +auxiliary.getTopMostNodes = function (nodes) { + var nodesMap = {}; + for (var i = 0; i < nodes.length; i++) { + nodesMap[nodes[i].id()] = true; + } + var roots = nodes.filter(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + var parent = ele.parent()[0]; + while (parent != null) { + if (nodesMap[parent.id()]) { + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + + return roots; +}; + +// find disconnected components and create dummy nodes that connect them +auxiliary.connectComponents = function (cy, eles, topMostNodes, dummyNodes) { + var queue = new LinkedList(); + var visited = new Set(); + var visitedTopMostNodes = []; + var currentNeighbor = void 0; + var minDegreeNode = void 0; + var minDegree = void 0; + + var isConnected = false; + var count = 1; + var nodesConnectedToDummy = []; + var components = []; + + var _loop = function _loop() { + var cmpt = cy.collection(); + components.push(cmpt); + + var currentNode = topMostNodes[0]; + var childrenOfCurrentNode = cy.collection(); + childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants().intersection(eles)); + visitedTopMostNodes.push(currentNode); + + childrenOfCurrentNode.forEach(function (node) { + queue.push(node); + visited.add(node); + cmpt.merge(node); + }); + + var _loop2 = function _loop2() { + currentNode = queue.shift(); + + // Traverse all neighbors of this node + var neighborNodes = cy.collection(); + currentNode.neighborhood().nodes().forEach(function (node) { + if (eles.intersection(currentNode.edgesWith(node)).length > 0) { + neighborNodes.merge(node); + } + }); + + for (var i = 0; i < neighborNodes.length; i++) { + var neighborNode = neighborNodes[i]; + currentNeighbor = topMostNodes.intersection(neighborNode.union(neighborNode.ancestors())); + if (currentNeighbor != null && !visited.has(currentNeighbor[0])) { + var childrenOfNeighbor = currentNeighbor.union(currentNeighbor.descendants()); + + childrenOfNeighbor.forEach(function (node) { + queue.push(node); + visited.add(node); + cmpt.merge(node); + if (topMostNodes.has(node)) { + visitedTopMostNodes.push(node); + } + }); + } + } + }; + + while (queue.length != 0) { + _loop2(); + } + + cmpt.forEach(function (node) { + eles.intersection(node.connectedEdges()).forEach(function (e) { + // connectedEdges() usually cached + if (cmpt.has(e.source()) && cmpt.has(e.target())) { + // has() is cheap + cmpt.merge(e); + } + }); + }); + + if (visitedTopMostNodes.length == topMostNodes.length) { + isConnected = true; + } + + if (!isConnected || isConnected && count > 1) { + minDegreeNode = visitedTopMostNodes[0]; + minDegree = minDegreeNode.connectedEdges().length; + visitedTopMostNodes.forEach(function (node) { + if (node.connectedEdges().length < minDegree) { + minDegree = node.connectedEdges().length; + minDegreeNode = node; + } + }); + nodesConnectedToDummy.push(minDegreeNode.id()); + // TO DO: Check efficiency of this part + var temp = cy.collection(); + temp.merge(visitedTopMostNodes[0]); + visitedTopMostNodes.forEach(function (node) { + temp.merge(node); + }); + visitedTopMostNodes = []; + topMostNodes = topMostNodes.difference(temp); + count++; + } + }; + + do { + _loop(); + } while (!isConnected); + + if (dummyNodes) { + if (nodesConnectedToDummy.length > 0) { + dummyNodes.set('dummy' + (dummyNodes.size + 1), nodesConnectedToDummy); + } + } + return components; +}; + +// relocates componentResult to originalCenter if there is no fixedNodeConstraint +auxiliary.relocateComponent = function (originalCenter, componentResult, options) { + if (!options.fixedNodeConstraint) { + var minXCoord = Number.POSITIVE_INFINITY; + var maxXCoord = Number.NEGATIVE_INFINITY; + var minYCoord = Number.POSITIVE_INFINITY; + var maxYCoord = Number.NEGATIVE_INFINITY; + if (options.quality == "draft") { + // calculate current bounding box + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = componentResult.nodeIndexes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _ref = _step.value; + + var _ref2 = _slicedToArray(_ref, 2); + + var key = _ref2[0]; + var value = _ref2[1]; + + var cyNode = options.cy.getElementById(key); + if (cyNode) { + var nodeBB = cyNode.boundingBox(); + var leftX = componentResult.xCoords[value] - nodeBB.w / 2; + var rightX = componentResult.xCoords[value] + nodeBB.w / 2; + var topY = componentResult.yCoords[value] - nodeBB.h / 2; + var bottomY = componentResult.yCoords[value] + nodeBB.h / 2; + + if (leftX < minXCoord) minXCoord = leftX; + if (rightX > maxXCoord) maxXCoord = rightX; + if (topY < minYCoord) minYCoord = topY; + if (bottomY > maxYCoord) maxYCoord = bottomY; + } + } + // find difference between current and original center + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2; + var diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2; + // move component to original center + componentResult.xCoords = componentResult.xCoords.map(function (x) { + return x + diffOnX; + }); + componentResult.yCoords = componentResult.yCoords.map(function (y) { + return y + diffOnY; + }); + } else { + // calculate current bounding box + Object.keys(componentResult).forEach(function (item) { + var node = componentResult[item]; + var leftX = node.getRect().x; + var rightX = node.getRect().x + node.getRect().width; + var topY = node.getRect().y; + var bottomY = node.getRect().y + node.getRect().height; + + if (leftX < minXCoord) minXCoord = leftX; + if (rightX > maxXCoord) maxXCoord = rightX; + if (topY < minYCoord) minYCoord = topY; + if (bottomY > maxYCoord) maxYCoord = bottomY; + }); + // find difference between current and original center + var _diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2; + var _diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2; + // move component to original center + Object.keys(componentResult).forEach(function (item) { + var node = componentResult[item]; + node.setCenter(node.getCenterX() + _diffOnX, node.getCenterY() + _diffOnY); + }); + } + } +}; + +auxiliary.calcBoundingBox = function (parentNode, xCoords, yCoords, nodeIndexes) { + // calculate bounds + var left = Number.MAX_SAFE_INTEGER; + var right = Number.MIN_SAFE_INTEGER; + var top = Number.MAX_SAFE_INTEGER; + var bottom = Number.MIN_SAFE_INTEGER; + var nodeLeft = void 0; + var nodeRight = void 0; + var nodeTop = void 0; + var nodeBottom = void 0; + + var nodes = parentNode.descendants().not(":parent"); + var s = nodes.length; + for (var i = 0; i < s; i++) { + var node = nodes[i]; + + nodeLeft = xCoords[nodeIndexes.get(node.id())] - node.width() / 2; + nodeRight = xCoords[nodeIndexes.get(node.id())] + node.width() / 2; + nodeTop = yCoords[nodeIndexes.get(node.id())] - node.height() / 2; + nodeBottom = yCoords[nodeIndexes.get(node.id())] + node.height() / 2; + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingBox = {}; + boundingBox.topLeftX = left; + boundingBox.topLeftY = top; + boundingBox.width = right - left; + boundingBox.height = bottom - top; + return boundingBox; +}; + +// This function finds and returns parent nodes whose all children are hidden +auxiliary.calcParentsWithoutChildren = function (cy, eles) { + var parentsWithoutChildren = cy.collection(); + eles.nodes(':parent').forEach(function (parent) { + var check = false; + parent.children().forEach(function (child) { + if (child.css('display') != 'none') { + check = true; + } + }); + if (!check) { + parentsWithoutChildren.merge(parent); + } + }); + + return parentsWithoutChildren; +}; + +module.exports = auxiliary; + +/***/ }), + +/***/ 816: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +/** + The implementation of the postprocessing part that applies CoSE layout over the spectral layout +*/ + +var aux = __webpack_require__(548); +var CoSELayout = __webpack_require__(140).CoSELayout; +var CoSENode = __webpack_require__(140).CoSENode; +var PointD = __webpack_require__(140).layoutBase.PointD; +var DimensionD = __webpack_require__(140).layoutBase.DimensionD; +var LayoutConstants = __webpack_require__(140).layoutBase.LayoutConstants; +var FDLayoutConstants = __webpack_require__(140).layoutBase.FDLayoutConstants; +var CoSEConstants = __webpack_require__(140).CoSEConstants; + +// main function that cose layout is processed +var coseLayout = function coseLayout(options, spectralResult) { + + var cy = options.cy; + var eles = options.eles; + var nodes = eles.nodes(); + var edges = eles.edges(); + + var nodeIndexes = void 0; + var xCoords = void 0; + var yCoords = void 0; + var idToLNode = {}; + + if (options.randomize) { + nodeIndexes = spectralResult["nodeIndexes"]; + xCoords = spectralResult["xCoords"]; + yCoords = spectralResult["yCoords"]; + } + + var isFn = function isFn(fn) { + return typeof fn === 'function'; + }; + + var optFn = function optFn(opt, ele) { + if (isFn(opt)) { + return opt(ele); + } else { + return opt; + } + }; + + /**** Postprocessing functions ****/ + + var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles); + + // transfer cytoscape nodes to cose nodes + var processChildrenList = function processChildrenList(parent, children, layout, options) { + var size = children.length; + for (var i = 0; i < size; i++) { + var theChild = children[i]; + var children_of_children = null; + if (theChild.intersection(parentsWithoutChildren).length == 0) { + children_of_children = theChild.children(); + } + var theNode = void 0; + + var dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: options.nodeDimensionsIncludeLabels + }); + + if (theChild.outerWidth() != null && theChild.outerHeight() != null) { + if (options.randomize) { + if (!theChild.isParent()) { + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(xCoords[nodeIndexes.get(theChild.id())] - dimensions.w / 2, yCoords[nodeIndexes.get(theChild.id())] - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } else { + var parentInfo = aux.calcBoundingBox(theChild, xCoords, yCoords, nodeIndexes); + if (theChild.intersection(parentsWithoutChildren).length == 0) { + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parentInfo.width, parentInfo.height))); + } else { + // for the parentsWithoutChildren + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } + } + } else { + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } + } else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + // Attach id to the layout node and repulsion value + theNode.id = theChild.data("id"); + theNode.nodeRepulsion = optFn(options.nodeRepulsion, theChild); + // Attach the paddings of cy node to layout node + theNode.paddingLeft = parseInt(theChild.css('padding')); + theNode.paddingTop = parseInt(theChild.css('padding')); + theNode.paddingRight = parseInt(theChild.css('padding')); + theNode.paddingBottom = parseInt(theChild.css('padding')); + + //Attach the label properties to both compound and simple nodes if labels will be included in node dimensions + //These properties will be used while updating bounds of compounds during iterations or tiling + //and will be used for simple nodes while transferring final positions to cytoscape + if (options.nodeDimensionsIncludeLabels) { + theNode.labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).w; + theNode.labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).h; + theNode.labelPosVertical = theChild.css("text-valign"); + theNode.labelPosHorizontal = theChild.css("text-halign"); + } + + // Map the layout node + idToLNode[theChild.data("id")] = theNode; + + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + + if (children_of_children != null && children_of_children.length > 0) { + var theNewGraph = void 0; + theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); + processChildrenList(theNewGraph, children_of_children, layout, options); + } + } + }; + + // transfer cytoscape edges to cose edges + var processEdges = function processEdges(layout, gm, edges) { + var idealLengthTotal = 0; + var edgeCount = 0; + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var sourceNode = idToLNode[edge.data("source")]; + var targetNode = idToLNode[edge.data("target")]; + if (sourceNode && targetNode && sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { + var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + e1.idealLength = optFn(options.idealEdgeLength, edge); + e1.edgeElasticity = optFn(options.edgeElasticity, edge); + idealLengthTotal += e1.idealLength; + edgeCount++; + } + } + // we need to update the ideal edge length constant with the avg. ideal length value after processing edges + // in case there is no edge, use other options + if (options.idealEdgeLength != null) { + if (edgeCount > 0) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = idealLengthTotal / edgeCount;else if (!isFn(options.idealEdgeLength)) // in case there is no edge, but option gives a value to use + CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;else // in case there is no edge and we cannot get a value from option (because it's a function) + CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; + // we need to update these constant values based on the ideal edge length constant + CoSEConstants.MIN_REPULSION_DIST = FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; + CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + } + }; + + // transfer cytoscape constraints to cose layout + var processConstraints = function processConstraints(layout, options) { + // get nodes to be fixed + if (options.fixedNodeConstraint) { + layout.constraints["fixedNodeConstraint"] = options.fixedNodeConstraint; + } + // get nodes to be aligned + if (options.alignmentConstraint) { + layout.constraints["alignmentConstraint"] = options.alignmentConstraint; + } + // get nodes to be relatively placed + if (options.relativePlacementConstraint) { + layout.constraints["relativePlacementConstraint"] = options.relativePlacementConstraint; + } + }; + + /**** Apply postprocessing ****/ + if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; + if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; + if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; + if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; + if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; + if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; + if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; + + if (options.tilingCompareBy != null) CoSEConstants.TILING_COMPARE_BY = options.tilingCompareBy; + + if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 0; + + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize; + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; + CoSEConstants.TILE = options.tile; + CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; + + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = true; + CoSEConstants.PURE_INCREMENTAL = !options.randomize; + LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = options.uniformNodeDimensions; + + // This part is for debug/demo purpose + if (options.step == "transformed") { + CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true; + CoSEConstants.ENFORCE_CONSTRAINTS = false; + CoSEConstants.APPLY_LAYOUT = false; + } + if (options.step == "enforced") { + CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; + CoSEConstants.ENFORCE_CONSTRAINTS = true; + CoSEConstants.APPLY_LAYOUT = false; + } + if (options.step == "cose") { + CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; + CoSEConstants.ENFORCE_CONSTRAINTS = false; + CoSEConstants.APPLY_LAYOUT = true; + } + if (options.step == "all") { + if (options.randomize) CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;else CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; + CoSEConstants.ENFORCE_CONSTRAINTS = true; + CoSEConstants.APPLY_LAYOUT = true; + } + + if (options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint) { + CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; + } else { + CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; + } + + var coseLayout = new CoSELayout(); + var gm = coseLayout.newGraphManager(); + + processChildrenList(gm.addRoot(), aux.getTopMostNodes(nodes), coseLayout, options); + processEdges(coseLayout, gm, edges); + processConstraints(coseLayout, options); + + coseLayout.runLayout(); + + return idToLNode; +}; + +module.exports = { coseLayout: coseLayout }; + +/***/ }), + +/***/ 212: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + The implementation of the fcose layout algorithm +*/ + +var assign = __webpack_require__(658); +var aux = __webpack_require__(548); + +var _require = __webpack_require__(657), + spectralLayout = _require.spectralLayout; + +var _require2 = __webpack_require__(816), + coseLayout = _require2.coseLayout; + +var defaults = Object.freeze({ + + // 'draft', 'default' or 'proof' + // - 'draft' only applies spectral layout + // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate) + // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate) + quality: "default", + // Use random node positions at beginning of layout + // if this is set to false, then quality option must be "proof" + randomize: true, + // Whether or not to animate the layout + animate: true, + // Duration of animation in ms, if enabled + animationDuration: 1000, + // Easing of animation, if enabled + animationEasing: undefined, + // Fit the viewport to the repositioned nodes + fit: true, + // Padding around layout + padding: 30, + // Whether to include labels in node dimensions. Valid in "proof" quality + nodeDimensionsIncludeLabels: false, + // Whether or not simple nodes (non-compound nodes) are of uniform dimensions + uniformNodeDimensions: false, + // Whether to pack disconnected components - valid only if randomize: true + packComponents: true, + // Layout step - all, transformed, enforced, cose - for debug purpose only + step: "all", + + /* spectral layout options */ + + // False for random, true for greedy + samplingType: true, + // Sample size to construct distance matrix + sampleSize: 25, + // Separation amount between nodes + nodeSeparation: 75, + // Power iteration tolerance + piTol: 0.0000001, + + /* CoSE layout options */ + + // Node repulsion (non overlapping) multiplier + nodeRepulsion: function nodeRepulsion(node) { + return 4500; + }, + // Ideal edge (non nested) length + idealEdgeLength: function idealEdgeLength(edge) { + return 50; + }, + // Divisor to compute edge forces + edgeElasticity: function edgeElasticity(edge) { + return 0.45; + }, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // The function that specifies the criteria for comparing nodes while sorting them during tiling operation. + // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set. + tilingCompareBy: undefined, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.3, + + /* constraint options */ + + // Fix required nodes to predefined positions + // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}] + fixedNodeConstraint: undefined, + // Align required nodes in vertical/horizontal direction + // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']} + alignmentConstraint: undefined, + // Place two nodes relatively in vertical/horizontal direction + // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}] + relativePlacementConstraint: undefined, + + /* layout event callbacks */ + ready: function ready() {}, // on layoutready + stop: function stop() {} // on layoutstop +}); + +var Layout = function () { + function Layout(options) { + _classCallCheck(this, Layout); + + this.options = assign({}, defaults, options); + } + + _createClass(Layout, [{ + key: 'run', + value: function run() { + var layout = this; + var options = this.options; + var cy = options.cy; + var eles = options.eles; + + var spectralResult = []; + var xCoords = void 0; + var yCoords = void 0; + var coseResult = []; + var components = void 0; + var componentCenters = []; + + // basic validity check for constraint inputs + if (options.fixedNodeConstraint && (!Array.isArray(options.fixedNodeConstraint) || options.fixedNodeConstraint.length == 0)) { + options.fixedNodeConstraint = undefined; + } + + if (options.alignmentConstraint) { + if (options.alignmentConstraint.vertical && (!Array.isArray(options.alignmentConstraint.vertical) || options.alignmentConstraint.vertical.length == 0)) { + options.alignmentConstraint.vertical = undefined; + } + if (options.alignmentConstraint.horizontal && (!Array.isArray(options.alignmentConstraint.horizontal) || options.alignmentConstraint.horizontal.length == 0)) { + options.alignmentConstraint.horizontal = undefined; + } + } + + if (options.relativePlacementConstraint && (!Array.isArray(options.relativePlacementConstraint) || options.relativePlacementConstraint.length == 0)) { + options.relativePlacementConstraint = undefined; + } + + // if any constraint exists, set some options + var constraintExist = options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint; + if (constraintExist) { + // constraints work with these options + options.tile = false; + options.packComponents = false; + } + + // decide component packing is enabled or not + var layUtil = void 0; + var packingEnabled = false; + if (cy.layoutUtilities && options.packComponents) { + layUtil = cy.layoutUtilities("get"); + if (!layUtil) layUtil = cy.layoutUtilities(); + packingEnabled = true; + } + + if (eles.nodes().length > 0) { + // if packing is not enabled, perform layout on the whole graph + if (!packingEnabled) { + // store component center + var boundingBox = options.eles.boundingBox(); + componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 }); + // apply spectral layout + if (options.randomize) { + var result = spectralLayout(options); + spectralResult.push(result); + } + // apply cose layout as postprocessing + if (options.quality == "default" || options.quality == "proof") { + coseResult.push(coseLayout(options, spectralResult[0])); + aux.relocateComponent(componentCenters[0], coseResult[0], options); // relocate center to original position + } else { + aux.relocateComponent(componentCenters[0], spectralResult[0], options); // relocate center to original position + } + } else { + // packing is enabled + var topMostNodes = aux.getTopMostNodes(options.eles.nodes()); + components = aux.connectComponents(cy, options.eles, topMostNodes); + // store component centers + components.forEach(function (component) { + var boundingBox = component.boundingBox(); + componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 }); + }); + + //send each component to spectral layout if randomized + if (options.randomize) { + components.forEach(function (component) { + options.eles = component; + spectralResult.push(spectralLayout(options)); + }); + } + + if (options.quality == "default" || options.quality == "proof") { + var toBeTiledNodes = cy.collection(); + if (options.tile) { + // behave nodes to be tiled as one component + var nodeIndexes = new Map(); + var _xCoords = []; + var _yCoords = []; + var count = 0; + var tempSpectralResult = { nodeIndexes: nodeIndexes, xCoords: _xCoords, yCoords: _yCoords }; + var indexesToBeDeleted = []; + components.forEach(function (component, index) { + if (component.edges().length == 0) { + component.nodes().forEach(function (node, i) { + toBeTiledNodes.merge(component.nodes()[i]); + if (!node.isParent()) { + tempSpectralResult.nodeIndexes.set(component.nodes()[i].id(), count++); + tempSpectralResult.xCoords.push(component.nodes()[0].position().x); + tempSpectralResult.yCoords.push(component.nodes()[0].position().y); + } + }); + indexesToBeDeleted.push(index); + } + }); + if (toBeTiledNodes.length > 1) { + var _boundingBox = toBeTiledNodes.boundingBox(); + componentCenters.push({ x: _boundingBox.x1 + _boundingBox.w / 2, y: _boundingBox.y1 + _boundingBox.h / 2 }); + components.push(toBeTiledNodes); + spectralResult.push(tempSpectralResult); + for (var i = indexesToBeDeleted.length - 1; i >= 0; i--) { + components.splice(indexesToBeDeleted[i], 1); + spectralResult.splice(indexesToBeDeleted[i], 1); + componentCenters.splice(indexesToBeDeleted[i], 1); + }; + } + } + components.forEach(function (component, index) { + // send each component to cose layout + options.eles = component; + coseResult.push(coseLayout(options, spectralResult[index])); + aux.relocateComponent(componentCenters[index], coseResult[index], options); // relocate center to original position + }); + } else { + components.forEach(function (component, index) { + aux.relocateComponent(componentCenters[index], spectralResult[index], options); // relocate center to original position + }); + } + + // packing + var componentsEvaluated = new Set(); + if (components.length > 1) { + var subgraphs = []; + var hiddenEles = eles.filter(function (ele) { + return ele.css('display') == 'none'; + }); + components.forEach(function (component, index) { + var nodeIndexes = void 0; + if (options.quality == "draft") { + nodeIndexes = spectralResult[index].nodeIndexes; + } + + if (component.nodes().not(hiddenEles).length > 0) { + var subgraph = {}; + subgraph.edges = []; + subgraph.nodes = []; + var nodeIndex = void 0; + component.nodes().not(hiddenEles).forEach(function (node) { + if (options.quality == "draft") { + if (!node.isParent()) { + nodeIndex = nodeIndexes.get(node.id()); + subgraph.nodes.push({ x: spectralResult[index].xCoords[nodeIndex] - node.boundingbox().w / 2, y: spectralResult[index].yCoords[nodeIndex] - node.boundingbox().h / 2, width: node.boundingbox().w, height: node.boundingbox().h }); + } else { + var parentInfo = aux.calcBoundingBox(node, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); + subgraph.nodes.push({ x: parentInfo.topLeftX, y: parentInfo.topLeftY, width: parentInfo.width, height: parentInfo.height }); + } + } else { + if (coseResult[index][node.id()]) { + subgraph.nodes.push({ x: coseResult[index][node.id()].getLeft(), y: coseResult[index][node.id()].getTop(), width: coseResult[index][node.id()].getWidth(), height: coseResult[index][node.id()].getHeight() }); + } + } + }); + component.edges().forEach(function (edge) { + var source = edge.source(); + var target = edge.target(); + if (source.css("display") != "none" && target.css("display") != "none") { + if (options.quality == "draft") { + var sourceNodeIndex = nodeIndexes.get(source.id()); + var targetNodeIndex = nodeIndexes.get(target.id()); + var sourceCenter = []; + var targetCenter = []; + if (source.isParent()) { + var parentInfo = aux.calcBoundingBox(source, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); + sourceCenter.push(parentInfo.topLeftX + parentInfo.width / 2); + sourceCenter.push(parentInfo.topLeftY + parentInfo.height / 2); + } else { + sourceCenter.push(spectralResult[index].xCoords[sourceNodeIndex]); + sourceCenter.push(spectralResult[index].yCoords[sourceNodeIndex]); + } + if (target.isParent()) { + var _parentInfo = aux.calcBoundingBox(target, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); + targetCenter.push(_parentInfo.topLeftX + _parentInfo.width / 2); + targetCenter.push(_parentInfo.topLeftY + _parentInfo.height / 2); + } else { + targetCenter.push(spectralResult[index].xCoords[targetNodeIndex]); + targetCenter.push(spectralResult[index].yCoords[targetNodeIndex]); + } + subgraph.edges.push({ startX: sourceCenter[0], startY: sourceCenter[1], endX: targetCenter[0], endY: targetCenter[1] }); + } else { + if (coseResult[index][source.id()] && coseResult[index][target.id()]) { + subgraph.edges.push({ startX: coseResult[index][source.id()].getCenterX(), startY: coseResult[index][source.id()].getCenterY(), endX: coseResult[index][target.id()].getCenterX(), endY: coseResult[index][target.id()].getCenterY() }); + } + } + } + }); + if (subgraph.nodes.length > 0) { + subgraphs.push(subgraph); + componentsEvaluated.add(index); + } + } + }); + var shiftResult = layUtil.packComponents(subgraphs, options.randomize).shifts; + if (options.quality == "draft") { + spectralResult.forEach(function (result, index) { + var newXCoords = result.xCoords.map(function (x) { + return x + shiftResult[index].dx; + }); + var newYCoords = result.yCoords.map(function (y) { + return y + shiftResult[index].dy; + }); + result.xCoords = newXCoords; + result.yCoords = newYCoords; + }); + } else { + var _count = 0; + componentsEvaluated.forEach(function (index) { + Object.keys(coseResult[index]).forEach(function (item) { + var nodeRectangle = coseResult[index][item]; + nodeRectangle.setCenter(nodeRectangle.getCenterX() + shiftResult[_count].dx, nodeRectangle.getCenterY() + shiftResult[_count].dy); + }); + _count++; + }); + } + } + } + } + + // get each element's calculated position + var getPositions = function getPositions(ele, i) { + if (options.quality == "default" || options.quality == "proof") { + if (typeof ele === "number") { + ele = i; + } + var pos = void 0; + var node = void 0; + var theId = ele.data('id'); + coseResult.forEach(function (result) { + if (theId in result) { + pos = { x: result[theId].getRect().getCenterX(), y: result[theId].getRect().getCenterY() }; + node = result[theId]; + } + }); + if (options.nodeDimensionsIncludeLabels) { + if (node.labelWidth) { + if (node.labelPosHorizontal == "left") { + pos.x += node.labelWidth / 2; + } else if (node.labelPosHorizontal == "right") { + pos.x -= node.labelWidth / 2; + } + } + if (node.labelHeight) { + if (node.labelPosVertical == "top") { + pos.y += node.labelHeight / 2; + } else if (node.labelPosVertical == "bottom") { + pos.y -= node.labelHeight / 2; + } + } + } + if (pos == undefined) pos = { x: ele.position("x"), y: ele.position("y") }; + return { + x: pos.x, + y: pos.y + }; + } else { + var _pos = void 0; + spectralResult.forEach(function (result) { + var index = result.nodeIndexes.get(ele.id()); + if (index != undefined) { + _pos = { x: result.xCoords[index], y: result.yCoords[index] }; + } + }); + if (_pos == undefined) _pos = { x: ele.position("x"), y: ele.position("y") }; + return { + x: _pos.x, + y: _pos.y + }; + } + }; + + // quality = "draft" and randomize = false are contradictive so in that case positions don't change + if (options.quality == "default" || options.quality == "proof" || options.randomize) { + // transfer calculated positions to nodes (positions of only simple nodes are evaluated, compounds are positioned automatically) + var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles); + var _hiddenEles = eles.filter(function (ele) { + return ele.css('display') == 'none'; + }); + options.eles = eles.not(_hiddenEles); + + eles.nodes().not(":parent").not(_hiddenEles).layoutPositions(layout, options, getPositions); + + if (parentsWithoutChildren.length > 0) { + parentsWithoutChildren.forEach(function (ele) { + ele.position(getPositions(ele)); + }); + } + } else { + console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'."); + } + } + }]); + + return Layout; +}(); + +module.exports = Layout; + +/***/ }), + +/***/ 657: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +/** + The implementation of the spectral layout that is the first part of the fcose layout algorithm +*/ + +var aux = __webpack_require__(548); +var Matrix = __webpack_require__(140).layoutBase.Matrix; +var SVD = __webpack_require__(140).layoutBase.SVD; + +// main function that spectral layout is processed +var spectralLayout = function spectralLayout(options) { + + var cy = options.cy; + var eles = options.eles; + var nodes = eles.nodes(); + var parentNodes = eles.nodes(":parent"); + + var dummyNodes = new Map(); // map to keep dummy nodes and their neighbors + var nodeIndexes = new Map(); // map to keep indexes to nodes + var parentChildMap = new Map(); // mapping btw. compound and its representative node + var allNodesNeighborhood = []; // array to keep neighborhood of all nodes + var xCoords = []; + var yCoords = []; + + var samplesColumn = []; // sampled vertices + var minDistancesColumn = []; + var C = []; // column sampling matrix + var PHI = []; // intersection of column and row sampling matrices + var INV = []; // inverse of PHI + + var firstSample = void 0; // the first sampled node + var nodeSize = void 0; + + var infinity = 100000000; + var small = 0.000000001; + + var piTol = options.piTol; + var samplingType = options.samplingType; // false for random, true for greedy + var nodeSeparation = options.nodeSeparation; + var sampleSize = void 0; + + /**** Spectral-preprocessing functions ****/ + + /**** Spectral layout functions ****/ + + // determine which columns to be sampled + var randomSampleCR = function randomSampleCR() { + var sample = 0; + var count = 0; + var flag = false; + + while (count < sampleSize) { + sample = Math.floor(Math.random() * nodeSize); + + flag = false; + for (var i = 0; i < count; i++) { + if (samplesColumn[i] == sample) { + flag = true; + break; + } + } + + if (!flag) { + samplesColumn[count] = sample; + count++; + } else { + continue; + } + } + }; + + // takes the index of the node(pivot) to initiate BFS as a parameter + var BFS = function BFS(pivot, index, samplingMethod) { + var path = []; // the front of the path + var front = 0; // the back of the path + var back = 0; + var current = 0; + var temp = void 0; + var distance = []; + + var max_dist = 0; // the furthest node to be returned + var max_ind = 1; + + for (var i = 0; i < nodeSize; i++) { + distance[i] = infinity; + } + + path[back] = pivot; + distance[pivot] = 0; + + while (back >= front) { + current = path[front++]; + var neighbors = allNodesNeighborhood[current]; + for (var _i = 0; _i < neighbors.length; _i++) { + temp = nodeIndexes.get(neighbors[_i]); + if (distance[temp] == infinity) { + distance[temp] = distance[current] + 1; + path[++back] = temp; + } + } + C[current][index] = distance[current] * nodeSeparation; + } + + if (samplingMethod) { + for (var _i2 = 0; _i2 < nodeSize; _i2++) { + if (C[_i2][index] < minDistancesColumn[_i2]) minDistancesColumn[_i2] = C[_i2][index]; + } + + for (var _i3 = 0; _i3 < nodeSize; _i3++) { + if (minDistancesColumn[_i3] > max_dist) { + max_dist = minDistancesColumn[_i3]; + max_ind = _i3; + } + } + } + return max_ind; + }; + + // apply BFS to all nodes or selected samples + var allBFS = function allBFS(samplingMethod) { + + var sample = void 0; + + if (!samplingMethod) { + randomSampleCR(); + + // call BFS + for (var i = 0; i < sampleSize; i++) { + BFS(samplesColumn[i], i, samplingMethod, false); + } + } else { + sample = Math.floor(Math.random() * nodeSize); + firstSample = sample; + + for (var _i4 = 0; _i4 < nodeSize; _i4++) { + minDistancesColumn[_i4] = infinity; + } + + for (var _i5 = 0; _i5 < sampleSize; _i5++) { + samplesColumn[_i5] = sample; + sample = BFS(sample, _i5, samplingMethod); + } + } + + // form the squared distances for C + for (var _i6 = 0; _i6 < nodeSize; _i6++) { + for (var j = 0; j < sampleSize; j++) { + C[_i6][j] *= C[_i6][j]; + } + } + + // form PHI + for (var _i7 = 0; _i7 < sampleSize; _i7++) { + PHI[_i7] = []; + } + + for (var _i8 = 0; _i8 < sampleSize; _i8++) { + for (var _j = 0; _j < sampleSize; _j++) { + PHI[_i8][_j] = C[samplesColumn[_j]][_i8]; + } + } + }; + + // perform the SVD algorithm and apply a regularization step + var sample = function sample() { + + var SVDResult = SVD.svd(PHI); + + var a_q = SVDResult.S; + var a_u = SVDResult.U; + var a_v = SVDResult.V; + + var max_s = a_q[0] * a_q[0] * a_q[0]; + + var a_Sig = []; + + // regularization + for (var i = 0; i < sampleSize; i++) { + a_Sig[i] = []; + for (var j = 0; j < sampleSize; j++) { + a_Sig[i][j] = 0; + if (i == j) { + a_Sig[i][j] = a_q[i] / (a_q[i] * a_q[i] + max_s / (a_q[i] * a_q[i])); + } + } + } + + INV = Matrix.multMat(Matrix.multMat(a_v, a_Sig), Matrix.transpose(a_u)); + }; + + // calculate final coordinates + var powerIteration = function powerIteration() { + // two largest eigenvalues + var theta1 = void 0; + var theta2 = void 0; + + // initial guesses for eigenvectors + var Y1 = []; + var Y2 = []; + + var V1 = []; + var V2 = []; + + for (var i = 0; i < nodeSize; i++) { + Y1[i] = Math.random(); + Y2[i] = Math.random(); + } + + Y1 = Matrix.normalize(Y1); + Y2 = Matrix.normalize(Y2); + + var count = 0; + // to keep track of the improvement ratio in power iteration + var current = small; + var previous = small; + + var temp = void 0; + + while (true) { + count++; + + for (var _i9 = 0; _i9 < nodeSize; _i9++) { + V1[_i9] = Y1[_i9]; + } + + Y1 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V1), C, INV)); + theta1 = Matrix.dotProduct(V1, Y1); + Y1 = Matrix.normalize(Y1); + + current = Matrix.dotProduct(V1, Y1); + + temp = Math.abs(current / previous); + + if (temp <= 1 + piTol && temp >= 1) { + break; + } + + previous = current; + } + + for (var _i10 = 0; _i10 < nodeSize; _i10++) { + V1[_i10] = Y1[_i10]; + } + + count = 0; + previous = small; + while (true) { + count++; + + for (var _i11 = 0; _i11 < nodeSize; _i11++) { + V2[_i11] = Y2[_i11]; + } + + V2 = Matrix.minusOp(V2, Matrix.multCons(V1, Matrix.dotProduct(V1, V2))); + Y2 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V2), C, INV)); + theta2 = Matrix.dotProduct(V2, Y2); + Y2 = Matrix.normalize(Y2); + + current = Matrix.dotProduct(V2, Y2); + + temp = Math.abs(current / previous); + + if (temp <= 1 + piTol && temp >= 1) { + break; + } + + previous = current; + } + + for (var _i12 = 0; _i12 < nodeSize; _i12++) { + V2[_i12] = Y2[_i12]; + } + + // theta1 now contains dominant eigenvalue + // theta2 now contains the second-largest eigenvalue + // V1 now contains theta1's eigenvector + // V2 now contains theta2's eigenvector + + //populate the two vectors + xCoords = Matrix.multCons(V1, Math.sqrt(Math.abs(theta1))); + yCoords = Matrix.multCons(V2, Math.sqrt(Math.abs(theta2))); + }; + + /**** Preparation for spectral layout (Preprocessing) ****/ + + // connect disconnected components (first top level, then inside of each compound node) + aux.connectComponents(cy, eles, aux.getTopMostNodes(nodes), dummyNodes); + + parentNodes.forEach(function (ele) { + aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants().intersection(eles)), dummyNodes); + }); + + // assign indexes to nodes (first real, then dummy nodes) + var index = 0; + for (var i = 0; i < nodes.length; i++) { + if (!nodes[i].isParent()) { + nodeIndexes.set(nodes[i].id(), index++); + } + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = dummyNodes.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var key = _step.value; + + nodeIndexes.set(key, index++); + } + + // instantiate the neighborhood matrix + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + for (var _i13 = 0; _i13 < nodeIndexes.size; _i13++) { + allNodesNeighborhood[_i13] = []; + } + + // form a parent-child map to keep representative node of each compound node + parentNodes.forEach(function (ele) { + var children = ele.children().intersection(eles); + + // let random = 0; + while (children.nodes(":childless").length == 0) { + // random = Math.floor(Math.random() * children.nodes().length); // if all children are compound then proceed randomly + children = children.nodes()[0].children().intersection(eles); + } + // select the representative node - we can apply different methods here + // random = Math.floor(Math.random() * children.nodes(":childless").length); + var index = 0; + var min = children.nodes(":childless")[0].connectedEdges().length; + children.nodes(":childless").forEach(function (ele2, i) { + if (ele2.connectedEdges().length < min) { + min = ele2.connectedEdges().length; + index = i; + } + }); + parentChildMap.set(ele.id(), children.nodes(":childless")[index].id()); + }); + + // add neighborhood relations (first real, then dummy nodes) + nodes.forEach(function (ele) { + var eleIndex = void 0; + + if (ele.isParent()) eleIndex = nodeIndexes.get(parentChildMap.get(ele.id()));else eleIndex = nodeIndexes.get(ele.id()); + + ele.neighborhood().nodes().forEach(function (node) { + if (eles.intersection(ele.edgesWith(node)).length > 0) { + if (node.isParent()) allNodesNeighborhood[eleIndex].push(parentChildMap.get(node.id()));else allNodesNeighborhood[eleIndex].push(node.id()); + } + }); + }); + + var _loop = function _loop(_key) { + var eleIndex = nodeIndexes.get(_key); + var disconnectedId = void 0; + dummyNodes.get(_key).forEach(function (id) { + if (cy.getElementById(id).isParent()) disconnectedId = parentChildMap.get(id);else disconnectedId = id; + + allNodesNeighborhood[eleIndex].push(disconnectedId); + allNodesNeighborhood[nodeIndexes.get(disconnectedId)].push(_key); + }); + }; + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = dummyNodes.keys()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var _key = _step2.value; + + _loop(_key); + } + + // nodeSize now only considers the size of transformed graph + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + nodeSize = nodeIndexes.size; + + var spectralResult = void 0; + + // If number of nodes in transformed graph is 1 or 2, either SVD or powerIteration causes problem + // So skip spectral and layout the graph with cose + if (nodeSize > 2) { + // if # of nodes in transformed graph is smaller than sample size, + // then use # of nodes as sample size + sampleSize = nodeSize < options.sampleSize ? nodeSize : options.sampleSize; + + // instantiates the partial matrices that will be used in spectral layout + for (var _i14 = 0; _i14 < nodeSize; _i14++) { + C[_i14] = []; + } + for (var _i15 = 0; _i15 < sampleSize; _i15++) { + INV[_i15] = []; + } + + /**** Apply spectral layout ****/ + + if (options.quality == "draft" || options.step == "all") { + allBFS(samplingType); + sample(); + powerIteration(); + + spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; + } else { + nodeIndexes.forEach(function (value, key) { + xCoords.push(cy.getElementById(key).position("x")); + yCoords.push(cy.getElementById(key).position("y")); + }); + spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; + } + return spectralResult; + } else { + var iterator = nodeIndexes.keys(); + var firstNode = cy.getElementById(iterator.next().value); + var firstNodePos = firstNode.position(); + var firstNodeWidth = firstNode.outerWidth(); + xCoords.push(firstNodePos.x); + yCoords.push(firstNodePos.y); + if (nodeSize == 2) { + var secondNode = cy.getElementById(iterator.next().value); + var secondNodeWidth = secondNode.outerWidth(); + xCoords.push(firstNodePos.x + firstNodeWidth / 2 + secondNodeWidth / 2 + options.idealEdgeLength); + yCoords.push(firstNodePos.y); + } + + spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; + return spectralResult; + } +}; + +module.exports = { spectralLayout: spectralLayout }; + +/***/ }), + +/***/ 579: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var impl = __webpack_require__(212); + +// registers the extension on a cytoscape lib ref +var register = function register(cytoscape) { + if (!cytoscape) { + return; + } // can't register if cytoscape unspecified + + cytoscape('layout', 'fcose', impl); // register with cytoscape.js +}; + +if (typeof cytoscape !== 'undefined') { + // expose to global cytoscape (i.e. window.cytoscape) + register(cytoscape); +} + +module.exports = register; + +/***/ }), + +/***/ 140: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_MODULE__140__; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __webpack_require__(579); +/******/ +/******/ return __webpack_exports__; +/******/ })() +; +}); \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/demo-compound.html b/tools/ui/node_modules/cytoscape-fcose/demo/demo-compound.html new file mode 100644 index 0000000000000000000000000000000000000000..ed6edfef0accc4c0f1dab6148a88c8ffa7f7feb2 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/demo-compound.html @@ -0,0 +1,465 @@ + + + + + + cytoscape-fcose.js demo + + + + + + + + + + + + + + + + + + + + + + + + + +

cytoscape-fcose demo (compound)

+
+     + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Quality + +
Incremental +
+ + +
+
Animate +
+ + +
+
Fit +
+ + +
+
Uniform Node Dimensions +
+ + +
+
Pack Components to Window +
+ + +
+
Tile Disconnected +
+ + +
+
Node Repulsion
Ideal Edge Length
Edge Elasticity
Nesting Factor
Gravity
Gravity Range
Compound Gravity
Compound Gravity Range
Number of Iterations
Tiling Vertical Padding
Tiling Horizontal Padding
Incremental Cooling Factor
+ +
+
+
+ + + + diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/demo-constraint-control.js b/tools/ui/node_modules/cytoscape-fcose/demo/demo-constraint-control.js new file mode 100644 index 0000000000000000000000000000000000000000..aefb41a3a145b9f2e0523432fe0e5d137c07fbae --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/demo-constraint-control.js @@ -0,0 +1,1482 @@ +// define default stylesheet +let defaultStylesheet = [ + { + selector: 'node', + style: { + 'background-color': '#bdd3d4', + 'label': 'data(id)', + 'text-valign': 'center', + 'background-opacity': 0.7 + } + }, + + { + selector: ':parent', + style: { +// 'background-opacity': 0.333, + 'background-color': '#e8e8e8', + 'border-color': '#DADADA', +// 'border-width': 3, + 'text-valign': 'bottom' + } + }, + + { + selector: 'edge', + style: { + 'curve-style': 'straight', + 'line-color': '#bdd3d4' + } + }, + + { + selector: 'node:selected', + style: { + 'background-color': '#33ff00', + 'border-color': '#22ee00' + } + }, + + { + selector: 'node.fixed', + style: { + 'shape': 'diamond', + 'background-color': '#9D9696', + } + }, + + { + selector: 'node.fixed:selected', + style: { + 'background-color': '#33ff00', + } + }, + + { + selector: 'node.alignment', + style: { + 'shape': 'round-heptagon', + 'background-color': '#fef2d1', + } + }, + + { + selector: 'node.alignment:selected', + style: { + 'background-color': '#33ff00', + } + }, + + { + selector: 'node.relative', + style: { + 'shape': 'rectangle', + 'background-color': '#fed3d1', + } + }, + + { + selector: 'node.relative:selected', + style: { + 'background-color': '#33ff00', + } + }, + + { + selector: 'edge:selected', + style: { + 'line-color': '#33ff00' + } + } +]; + +let cy = window.cy = cytoscape({ + container: document.getElementById('cy'), + ready: function(){ + let layoutUtilities = this.layoutUtilities({ + desiredAspectRatio: this.width()/this.height() + }); + + this.nodes().forEach(function(node){ + let size = Math.random()*40+30; + node.css("width", size); + node.css("height", size); + }); + + let initialLayout = this.layout({name: 'fcose', step: 'all', animationEasing: 'ease-out'}); + initialLayout.pon('layoutstart').then(function( event ){ + constraints.fixedNodeConstraint = JSON.parse(JSON.stringify(sample1_constraints.fixedNodeConstraint)); + clearConstraintListTable(); + fillConstraintListTableFromConstraints(); + }); + initialLayout.run(); + }, + layout: {name: 'preset'}, + style: defaultStylesheet, + elements: { + nodes: [ + {data: {id: 'n1'}}, + {data: {id: 'n2'}}, + {data: {id: 'n3', parent: 'n8'}}, + {data: {id: 'n5'}}, + {data: {id: 'n6', parent: 'n8'}}, + {data: {id: 'n7', parent: 'n8'}}, + {data: {id: 'n8'}}, + {data: {id: 'f1'}, classes: ['fixed']}, + {data: {id: 'f2'}, classes: ['fixed']}, + {data: {id: 'f3', parent: 'n8'}, classes: ['fixed']}, + ], + edges: [ + {data: {source: 'n1', target: 'f1'}}, + {data: {source: 'n1', target: 'n3'}}, + {data: {source: 'f1', target: 'n2'}}, + {data: {source: 'f1', target: 'n3'}}, + {data: {source: 'n3', target: 'f2'}}, + {data: {source: 'f2', target: 'n5'}}, + {data: {source: 'n5', target: 'n8'}}, + {data: {source: 'n6', target: 'n3'}}, + {data: {source: 'n6', target: 'n7'}}, + {data: {source: 'n6', target: 'f3'}} + ] + }, + wheelSensitivity: 0.3 +}); + +let constraints = { + fixedNodeConstraint: undefined, + alignmentConstraint: undefined, + relativePlacementConstraint: undefined +}; + +// Handle Menu ------------------------------------------ + +// Graph file input +document.getElementById("openFile").addEventListener("click", function () { + document.getElementById("inputFile").click(); +}); + +$("body").on("change", "#inputFile", function (e, fileObject) { + var inputFile = this.files[0] || fileObject; + + if (inputFile) { + var fileExtension = inputFile.name.split('.').pop(); + var r = new FileReader(); + r.onload = function (e) { + cy.remove(cy.elements()); + var content = e.target.result; + if (fileExtension == "graphml" || fileExtension == "xml") { + cy.graphml({layoutBy: 'null'}); + cy.graphml(content); +// updateGraphStyle(); + } else if (fileExtension == "json") { + cy.json({elements: JSON.parse(content)}); +// updateGraphStyle(); + } else { + var tsv = cy.tsv(); + tsv.importTo(content); + } + }; + r.addEventListener('loadend', function () { + onLoad(); + clearConstraintListTable(); + constraints.fixedNodeConstraint = undefined; + constraints.alignmentConstraint = undefined; + constraints.relativePlacementConstraint = undefined; + + document.getElementById("nodeList").addEventListener("change", function(){ + document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x")); + document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y")); + }); + +// if (inputFile.name == "samples/sample1.graphml") { +// cy.nodes().forEach(function (node, i) { +// let width = [30, 70, 110]; +// let size = width[i % 3]; +// node.css("width", size); +// node.css("height", size); +// }); +// } + + }); + r.readAsText(inputFile); + } else { + alert("Failed to load file"); + } + $("#inputFile").val(null); +}); + +let updateGraphStyle = function () { + cy.nodes().forEach(function (node) { + node.style({ + 'background-image': node.data('background-image'), + 'width': node.data('bbox').w, + 'height': node.data('bbox').h, + "border-width": node.data('border-width'), + "border-color": node.data('border-color'), + "background-color": node.data('background-color'), + "background-opacity": node.data('background-opacity'), + "background-fit": "cover", + "background-position-x": "50%", + "background-position-y": "50%", + "text-wrap": "wrap", + "font-size": node.data('font-size'), + "color": node.data('color') + }); + + if (node.data('label')) { + node.style({ + 'label': node.data('label') + }); + } + }); + + cy.edges().forEach(function (edge) { + edge.style({ + 'width': edge.data('width'), + "line-color": edge.data('line-color') + }); + }); +}; + +$("body").on("change", "#inputConstraint", function (e, fileObject) { + var inputFile = this.files[0] || fileObject; + + if (inputFile) { + var fileExtension = inputFile.name.split('.').pop(); + var r = new FileReader(); + r.onload = function (e) { + var content = e.target.result; + if (fileExtension == "json") { + constraints.fixedNodeConstraint = undefined; + constraints.alignmentConstraint = undefined; + constraints.relativePlacementConstraint = undefined; + let constraintObject = JSON.parse( content ); + if(constraintObject.fixedNodeConstraint) + constraints.fixedNodeConstraint = constraintObject.fixedNodeConstraint; + if(constraintObject.alignmentConstraint) + constraints.alignmentConstraint = constraintObject.alignmentConstraint; + if(constraintObject.relativePlacementConstraint) + constraints.relativePlacementConstraint = constraintObject.relativePlacementConstraint; + clearConstraintListTable(); + fillConstraintListTableFromConstraints(); + } + }; + r.addEventListener('loadend', function () { + }); + r.readAsText(inputFile); + } else { + alert("Failed to load file"); + } + $("#inputFile").val(null); +}); + +document.getElementById("exportConstraint").addEventListener("click", function(){ + let constraintString = JSON.stringify(constraints, null, 2); + download('constraint.json', constraintString); +}); + +let download = function(filename, text) { + var pom = document.createElement('a'); + pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); + pom.setAttribute('download', filename); + + if (document.createEvent) { + var event = document.createEvent('MouseEvents'); + event.initEvent('click', true, true); + pom.dispatchEvent(event); + } + else { + pom.click(); + } +}; + +/* +// SVG +document.getElementById("saveAsSVG").addEventListener("click", function(){ + let svgContent = cy.svg({scale: 1, full: true}); + let blob = new Blob([svgContent], {type:"image/svg+xml;charset=utf-8"}); + saveAs(blob, "graph.svg"); +}); + +// see http://stackoverflow.com/questions/16245767/creating-a-blob-from-a-base64-string-in-javascript +let b64toBlob = function(b64Data, contentType, sliceSize) { + contentType = contentType || ''; + sliceSize = sliceSize || 512; + + var byteCharacters = atob(b64Data); + var byteArrays = []; + + for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) { + var slice = byteCharacters.slice(offset, offset + sliceSize); + + var byteNumbers = new Array(slice.length); + for (var i = 0; i < slice.length; i++) { + byteNumbers[i] = slice.charCodeAt(i); + } + + var byteArray = new Uint8Array(byteNumbers); + + byteArrays.push(byteArray); + } + + var blob = new Blob(byteArrays, {type: contentType}); + return blob; +} +*/ + +// Sample File Changer +let sampleFileNames = { + "sample5" : unix, + "sample5_constraints" : unix_constraints, + "sample6" : chalk, + "sample6_constraints" : chalk_constraints, + "sample7" : uwsn, + "sample7_constraints" : uwsn_constraints, + "sample8" : call_graph, + "sample8_constraints" : callGraph_constraints, + "sample9" : wsn, + "sample9_constraints" : wsn_constraints, +}; + +document.getElementById("sample").addEventListener("change", function(){ + cy.startBatch(); + cy.elements().remove(); + cy.style().clear(); + + var selectionObject = document.getElementById("sample"); + + var selected = selectionObject.options[selectionObject.selectedIndex].index; + if(selected == 0){ + cy.add(elements1); + applyPostLoadOperations(selected); + } + else if(selected == 1){ + cy.add(elements2); + applyPostLoadOperations(selected); + } + else if(selected == 2){ + cy.add(elements3); + applyPostLoadOperations(selected); + } + else if(selected == 3){ + cy.add(elements4); + applyPostLoadOperations(selected); + } + else if(selected == 4){ + cy.add(elements5); + applyPostLoadOperations(selected); + } + + function applyPostLoadOperations(selected){ + cy.nodes().forEach(function(node){ + let size = Math.random()*40+30; + node.css("width", size); + node.css("height", size); + }); + cy.style(defaultStylesheet); + + clearConstraintListTable(); + constraints.fixedNodeConstraint = undefined; + constraints.alignmentConstraint = undefined; + constraints.relativePlacementConstraint = undefined; + + if(selected == 0){ + if(sample1_constraints.fixedNodeConstraint) + constraints.fixedNodeConstraint = JSON.parse(JSON.stringify(sample1_constraints.fixedNodeConstraint)); + clearConstraintListTable(); + fillConstraintListTableFromConstraints(); + } + if(selected == 1){ + if(sample2_constraints.alignmentConstraint) + constraints.alignmentConstraint = JSON.parse(JSON.stringify(sample2_constraints.alignmentConstraint)); + clearConstraintListTable(); + fillConstraintListTableFromConstraints(); + } + if(selected == 2){ + if(sample3_constraints.relativePlacementConstraint) + constraints.relativePlacementConstraint = JSON.parse(JSON.stringify(sample3_constraints.relativePlacementConstraint)); + clearConstraintListTable(); + fillConstraintListTableFromConstraints(); + } + if(selected == 3){ + if(sample4_constraints.fixedNodeConstraint) + constraints.fixedNodeConstraint = JSON.parse(JSON.stringify(sample4_constraints.fixedNodeConstraint)); + if(sample4_constraints.alignmentConstraint) + constraints.alignmentConstraint = JSON.parse(JSON.stringify(sample4_constraints.alignmentConstraint)); + if(sample4_constraints.relativePlacementConstraint) + constraints.relativePlacementConstraint = JSON.parse(JSON.stringify(sample4_constraints.relativePlacementConstraint)); + clearConstraintListTable(); + fillConstraintListTableFromConstraints(); + } + } + + if (sampleFileNames[selectionObject.value]) { + //$.getJSON("samples/" + sampleFileNames[selectionObject.value] + ".json", function(json) { + let json = sampleFileNames[selectionObject.value]; + cy.json(json); + cy.nodes().forEach(function (node) { + node.style({ + 'width': node.data('bbox').w, + 'height': node.data('bbox').h, + "border-width": node.data('border-width'), +// "border-color": node.data('border-color'), + }); + + if (node.data('class') === 'process' || node.data('class') === 'association' || node.data('class') === "dissociation") { + node.style({ + 'background-color': node.data('background-color'), + 'background-opacity': 0.3 + }); + } else { + node.style({ + 'background-image': node.data('background-image'), +// 'background-color': node.data('background-color'), + 'background-opacity': node.data('background-opacity'), + 'background-fit': 'contain', + 'background-position-x': '50%', + 'background-position-y': '50%', + }); + } + + if (node.data('label')) { + node.style({ + 'label': node.data('label'), + 'text-wrap': 'wrap', + 'font-size': node.data('font-size'), + 'color': node.data('color') + }); + } + }); + + constraints.fixedNodeConstraint = undefined; + constraints.alignmentConstraint = undefined; + constraints.relativePlacementConstraint = undefined; + + let constraintObject = sampleFileNames[selectionObject.value + "_constraints"]; + if(constraintObject.fixedNodeConstraint) + constraints.fixedNodeConstraint = JSON.parse(JSON.stringify(constraintObject.fixedNodeConstraint)); + if(constraintObject.alignmentConstraint) + constraints.alignmentConstraint = JSON.parse(JSON.stringify(constraintObject.alignmentConstraint)); + if(constraintObject.relativePlacementConstraint) + constraints.relativePlacementConstraint = JSON.parse(JSON.stringify(constraintObject.relativePlacementConstraint)); + clearConstraintListTable(); + fillConstraintListTableFromConstraints(); + // }); + + } + cy.endBatch(); + + if(selected == 4){ + cy.nodes().not(":parent").positions(function(node, i){ + return { + x: elements5_positions[i].x, + y: elements5_positions[i].y + }; + }); + cy.layout({name: "preset", fit:true, animate:true, animationDuration: 1000, animationEasing: undefined}).run(); + } + else { + let finalOptions = Object.assign({}, options); + finalOptions.step = "all"; + cy.layout(finalOptions).run(); + } +// cy.layout({name: 'random', padding: 100}).run(); + onLoad(); + + document.getElementById("nodeList").addEventListener("change", function(){ + document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x")); + document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y")); + }); +}); + +// Layout buttons + +let options = { + name: 'fcose', + quality: "default", + randomize: true, + animate: true, + animationDuration: 1000, + animationEasing: undefined, + fit: true, + padding: 30, + nestingFactor: 0.1, + gravityRangeCompound: 1.5, + gravityCompound: 1.0 +}; + +// Randomize +document.getElementById("randomizeButton").addEventListener("click", function () { + var layout = cy.layout({ + name: 'random', + animate: true + }); + + layout.run(); +}); + +// Fcose +document.getElementById("fcoseButton").addEventListener("click", function(){ + let finalOptions = Object.assign({}, options); + finalOptions.step = "all"; + finalOptions.randomize = !(document.getElementById("incremental").checked); + + if(document.getElementById("sample").value == "sample6"){ + finalOptions.nestingFactor = 0.4; + finalOptions.gravityRangeCompound = 0; + finalOptions.gravityCompound = 3.0; + } + + if(document.getElementById("sample").value == "sample8"){ + finalOptions.idealEdgeLength = 70; + } + + finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined; + finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined; + finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined; + let layout = cy.layout(finalOptions); + layout.one("layoutstop", function( event ){ + document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x")); + document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y")); + }); + cy.layoutUtilities("get").setOption("randomize", finalOptions.randomize); +// let start = performance.now(); + layout.run(); +// console.log((performance.now() - start) + " ms" ); +}); + +/* +// CoLa +document.getElementById("colaButton").addEventListener("click", function(){ + + if(constraints.fixedNodeConstraint) { + constraints.fixedNodeConstraint.forEach(function(constraint){ + cy.getElementById(constraint.nodeId).position({x: constraint.position.x, y: constraint.position.y}); + cy.getElementById(constraint.nodeId).lock(); + }); + } + + let gapInequalities = []; + if(constraints.relativePlacementConstraint) { + constraints.relativePlacementConstraint.forEach(function(constraint){ + if(constraint.left) { + gapInequalities.push({"axis": "x", "left": cy.getElementById(constraint.left), "right": cy.getElementById(constraint.right), "gap": constraint.gap}); + } + else { + gapInequalities.push({"axis": "y", "left": cy.getElementById(constraint.top), "right": cy.getElementById(constraint.bottom), "gap": constraint.gap}); + } + }); + } + + let options = { + name: 'cola', + animate: false, + maxSimulationTime: 20000, + randomize: true, + unconstrIter: 10, + userConstIter: 15, + allConstIter: 20, + handleDisconnected: false, + edgeLength: 50, + alignment: constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined, + gapInequalities: gapInequalities + }; + + let layout = cy.layout(options); + layout.one("layoutstop", function( event ){ + document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x")); + document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y")); + }); + + let start = performance.now(); + layout.run(); + console.log((performance.now() - start) + " ms" ); + + cy.nodes().unlock(); +}); +*/ + +// Draft +document.getElementById("draftButton").addEventListener("click", function(){ + let finalOptions = Object.assign({}, options); + finalOptions.quality = "draft"; + finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined; + finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined; + finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined; + let layout = cy.layout(finalOptions); + layout.one("layoutstop", function( event ){ + document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x")); + document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y")); + }); + cy.layoutUtilities("get").setOption("randomize", true); + layout.run(); +}); + +// Transform +document.getElementById("transformButton").addEventListener("click", function(){ + let finalOptions = Object.assign({}, options); + finalOptions.step = "transformed"; + finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined; + finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined; + finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined; + + let layout = cy.layout(finalOptions); + layout.one("layoutstop", function( event ){ + document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x")); + document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y")); + }); + layout.run(); +}); + +// Enforce +document.getElementById("enforceButton").addEventListener("click", function(){ + let finalOptions = Object.assign({}, options); + finalOptions.step = "enforced"; + + finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined; + finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined; + finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined; + + let layout = cy.layout(finalOptions); + layout.one("layoutstop", function( event ){ + document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x")); + document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y")); + }); + layout.run(); +}); + +document.getElementById("coseButton").addEventListener("click", function(){ + let finalOptions = Object.assign({}, options); + + if(document.getElementById("sample").value == "sample6"){ + finalOptions.nestingFactor = 0.4; + finalOptions.gravityRangeCompound = 0; + finalOptions.gravityCompound = 3.0; + } + + if(document.getElementById("sample").value == "sample8"){ + finalOptions.idealEdgeLength = 70; + } + + finalOptions.fixedNodeConstraint = constraints.fixedNodeConstraint ? constraints.fixedNodeConstraint : undefined; + finalOptions.alignmentConstraint = constraints.alignmentConstraint ? constraints.alignmentConstraint : undefined; + finalOptions.relativePlacementConstraint = constraints.relativePlacementConstraint ? constraints.relativePlacementConstraint : undefined; + + finalOptions.randomize = false; + finalOptions.step = "cose"; + let layout = cy.layout(finalOptions); + layout.one("layoutstop", function( event ){ + document.getElementById("fixedNodeX").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("x")); + document.getElementById("fixedNodeY").value = Math.round(cy.getElementById(document.getElementById("nodeList").value).position("y")); + }); + cy.layoutUtilities("get").setOption("randomize", finalOptions.randomize); + layout.run(); +}); + +// Handle Constraints ---------------------------- + +let onLoad = function(){ + let nodeList = ""; + for(let i = 0; i < simpleNodes.length; i++){ + let node = simpleNodes[i]; + let label = (node.data('label'))?(node.data('label')):(node.id()); + if(label.length > 15) + label = label.substring(0, 12).concat("..."); + nodeListRP1 += ""; + } + + let nodeListRP2 = " +   + + + +
+ + +   +   + +
+ + +

+   +   +   +
+ + +
+
+ + + + + + + + +
Constraints +
+ +
+ + + +
+
+
+ Fixed Node Constraint +
+
+
+
+
+
+ + + + +
+
+ +
+
+
+ +
+ + +
+
+
+ Alignment Constraint +
+
+
+
+ Selected Nodes Vertically +
+
+ +
+
+
+
+ Selected Nodes Horizontally +
+
+ +
+
+
+
+ Click on a node for selecting. Shift + click for extending selection. +
+
+
+ +
+ + +
+
+
+ Relative Placement Constraint +
+
+
+
+
+
+
+ +
+
+ + +
+
+ +
+
+
+
+
+
+ +
+ + +
+ Hover a constraint row to see involved nodes. +
+ + + + + + +
TypeNodesInfo
+
+ + +
+ + + diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/demo.gif b/tools/ui/node_modules/cytoscape-fcose/demo/demo.gif new file mode 100644 index 0000000000000000000000000000000000000000..70a2dc9d537e4da4e40909148a799780cbfbfcd8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/demo.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32ccf57a67f9ad911a0d5402de10e2aaf7a9024ae920fafb618d1f6fdf9d5c07 +size 4631886 diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/demo.html b/tools/ui/node_modules/cytoscape-fcose/demo/demo.html new file mode 100644 index 0000000000000000000000000000000000000000..0ba21eb7e89cd6478bf3679f48573ac63656bb18 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/demo.html @@ -0,0 +1,457 @@ + + + + + + cytoscape-fcose.js demo + + + + + + + + + + + + + + + + + + + + + + + + + +

cytoscape-fcose demo

+
+   +   + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Quality + +
Incremental +
+ + +
+
Animate +
+ + +
+
Fit +
+ + +
+
Uniform Node Dimensions +
+ + +
+
Pack Components to Window +
+ + +
+
Tile Disconnected +
+ + +
+
Node Repulsion
Ideal Edge Length
Edge Elasticity
Nesting Factor
Gravity
Gravity Range
Compound Gravity
Compound Gravity Range
Number of Iterations
Tiling Vertical Padding
Tiling Horizontal Padding
Incremental Cooling Factor
+ +
+
+
+ + + + diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/incrementalConstraints.gif b/tools/ui/node_modules/cytoscape-fcose/demo/incrementalConstraints.gif new file mode 100644 index 0000000000000000000000000000000000000000..3badcabba668322a5fe2dcb9ee12fbac42c0ab69 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/incrementalConstraints.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4ccc47d99e7f7801353c372ab17331643dc374831e557b673547d75437ec203 +size 3175063 diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/callGraph.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/callGraph.js new file mode 100644 index 0000000000000000000000000000000000000000..b871f9fb4455703457ae3ad8d2fd96fdb393a270 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/callGraph.js @@ -0,0 +1,1616 @@ +call_graph = { + "elements": { + "nodes": [ + { + "data": { + "id": "nwtN_6edbfba5-6884-4f26-868f-18bc2481616e", + "bbox": { + "x": 1048.6375489786594, + "y": 153.7561581259744, + "w": 91.52294921875, + "h": 50.25 + }, + "minWidth": 91.52294921875, + "minWidthBiasLeft": 0.00005, + "minWidthBiasRight": 0.00005, + "minHeight": 50.25, + "minHeightBiasTop": 0.00005, + "minHeightBiasBottom": 0.00005, + "originalW": 119.52294921875, + "originalH": 78.25, + "class": "compartment", + "label": "__main__", + "statesandinfos": [], + "language": "PD", + "border-width": 3.25, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1048.6375489786594, + "y": 153.7561581259744 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae", + "bbox": { + "x": 1048.6375489786594, + "y": 153.7561581259744, + "w": 88.27294921875, + "h": 47 + }, + "class": "macromolecule", + "label": "main\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6edbfba5-6884-4f26-868f-18bc2481616e", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1048.6375489786594, + "y": 153.7561581259744 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_e872ccff-fb1a-4264-a66a-cbc72d1e9711", + "bbox": { + "x": 832.2602245209991, + "y": 267.2349457952003, + "w": 203.3974609375, + "h": 50.25 + }, + "minWidth": 155.5302734375, + "minWidthBiasLeft": 0.00005, + "minWidthBiasRight": 0.00005, + "minHeight": 50.25, + "minHeightBiasTop": 0.00005, + "minHeightBiasBottom": 0.00005, + "originalW": 231.3974609375, + "originalH": 78.25, + "class": "compartment", + "label": "communications", + "statesandinfos": [], + "language": "PD", + "border-width": 3.25, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 832.2602245209991, + "y": 267.2349457952003 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "bbox": { + "x": 832.2602245209991, + "y": 267.2349457952003, + "w": 200.1474609375, + "h": 47 + }, + "class": "macromolecule", + "label": "communications.ServerSocket.__init__\ncalls: 1\ntime: 0.001029s", + "statesandinfos": [], + "parent": "nwtN_e872ccff-fb1a-4264-a66a-cbc72d1e9711", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 832.2602245209991, + "y": 267.2349457952003 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "d1f240af-7520-fb1b-19f9-e5e92eab909e", + "bbox": { + "x": 461.06847268925367, + "y": 406.7278918574187, + "w": 121.4775390625, + "h": 50.25 + }, + "minWidth": 109.640625, + "minWidthBiasLeft": 0.00005, + "minWidthBiasRight": 0.00005, + "minHeight": 50.25, + "minHeightBiasTop": 0.00005, + "minHeightBiasBottom": 0.00005, + "originalW": 149.4775390625, + "originalH": 78.25, + "class": "compartment", + "label": "socket", + "statesandinfos": [], + "language": "PD", + "border-width": 3.25, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 461.06847268925367, + "y": 406.7278918574187 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "288a2f9b-2930-701e-c68e-400307fbffd4", + "bbox": { + "x": 461.06847268925367, + "y": 406.7278918574187, + "w": 118.2275390625, + "h": 47 + }, + "class": "macromolecule", + "label": "socket.socket.__init__\ncalls: 1\ntime: 0.001029s", + "statesandinfos": [], + "parent": "d1f240af-7520-fb1b-19f9-e5e92eab909e", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 461.06847268925367, + "y": 406.7278918574187 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "bbox": { + "x": 973.1536617161887, + "y": 562.1987962172685, + "w": 808.9722624959013, + "h": 380.90672838617974 + }, + "minWidth": 205.5387290927216, + "minWidthBiasLeft": 0.00005, + "minWidthBiasRight": 0.00005, + "minHeight": 128.27786926084235, + "minHeightBiasTop": 0.00005, + "minHeightBiasBottom": 0.00005, + "originalW": 836.9722624959013, + "originalH": 408.90672838617974, + "class": "compartment", + "label": "threading", + "statesandinfos": [], + "language": "PD", + "border-width": 3.25, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 973.1536617161887, + "y": 562.1987962172685 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "bbox": { + "x": 1186.3610894421433, + "y": 396.8704320241787, + "w": 149.4013671875, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.ServerSocket.start\ncalls: 1\ntime: 0.001969s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1186.3610894421433, + "y": 396.8704320241787 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "bbox": { + "x": 785.3451019915435, + "y": 399.3027259948305, + "w": 166.54052734375, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.ServerSocket.__init__\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 785.3451019915435, + "y": 399.3027259948305 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_550a66a2-1061-45cc-9f78-14570daaff94", + "bbox": { + "x": 1171.6884552852318, + "y": 501.00617333218474, + "w": 112.7275390625, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Event.isset\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1171.6884552852318, + "y": 501.00617333218474 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "82181180-e275-b004-243e-eb4383e1e72f", + "bbox": { + "x": 623.602833202613, + "y": 504.26049930822586, + "w": 106.62060546875, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.newname\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 623.602833202613, + "y": 504.26049930822586 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "359e920c-52a4-459e-2262-4ec90824f21e", + "bbox": { + "x": 774.4147292170284, + "y": 501.6751525194074, + "w": 124.3505859375, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.currentthread\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 774.4147292170284, + "y": 501.6751525194074 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "5a34dca5-646c-cae7-affe-ef4142c5ad73", + "bbox": { + "x": 883.8610766103469, + "y": 509.431192885863, + "w": 160.42822265625, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.MainThread.daemon\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 883.8610766103469, + "y": 509.431192885863 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47", + "bbox": { + "x": 1012.9044451633454, + "y": 510.2832319234375, + "w": 104.17138671875, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Event.init\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1012.9044451633454, + "y": 510.2832319234375 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "bbox": { + "x": 1321.1790996047644, + "y": 501.0665091727607, + "w": 109.67138671875, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Event.wait\ncalls: 1\ntime: 0.001005s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1321.1790996047644, + "y": 501.0665091727607 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "1f64237f-dd15-2d5f-18f0-02a0d0338f44", + "bbox": { + "x": 810.9249008712393, + "y": 629.4880484917272, + "w": 146.98974609375, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Condition.__init__\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 810.9249008712393, + "y": 629.4880484917272 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "bbox": { + "x": 976.5020676671496, + "y": 615.3268434368138, + "w": 128.01904296875, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Condition.wait\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 976.5020676671496, + "y": 615.3268434368138 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "d6768356-8772-a49a-c2f7-c3b9802c954b", + "bbox": { + "x": 1161.3313010713127, + "y": 621.0949598234208, + "w": 150.0458984375, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Condition.__exit__\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1161.3313010713127, + "y": 621.0949598234208 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "05b42313-71a4-e1a9-383b-6b4be641e69d", + "bbox": { + "x": 1285.8699319437194, + "y": 616.4161669025763, + "w": 158.00048828125, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Condition.__enter__\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1285.8699319437194, + "y": 616.4161669025763 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "3c161178-1fca-ec7e-3fc7-425ce940fe1a", + "bbox": { + "x": 842.5152813783538, + "y": 727.5271604103584, + "w": 161.05126953125, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Condition._is_owned\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 842.5152813783538, + "y": 727.5271604103584 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa", + "bbox": { + "x": 981.9486849959626, + "y": 712.2766318896824, + "w": 180.005859375, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Condition._release_save\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 981.9486849959626, + "y": 712.2766318896824 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "a0d92978-e6e9-6d87-9a06-567d139d15af", + "bbox": { + "x": 1170.401644572887, + "y": 717.7232492184953, + "w": 191.005859375, + "h": 47 + }, + "class": "macromolecule", + "label": "threading.Condition._acquire_restore\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_6f2f14d2-4d5d-4582-8555-9ce01b4f769f", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1170.401644572887, + "y": 717.7232492184953 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_e8ac41f5-45d0-4855-bcc9-623f16e77889", + "bbox": { + "x": 1473.2018438500227, + "y": 504.2598166908556, + "w": 135.3349609375, + "h": 50.25 + }, + "minWidth": 91.52294921875, + "minWidthBiasLeft": 0.00005, + "minWidthBiasRight": 0.00005, + "minHeight": 50.25, + "minHeightBiasTop": 0.00005, + "minHeightBiasBottom": 0.00005, + "originalW": 163.3349609375, + "originalH": 78.25, + "class": "compartment", + "label": "_weakrefset", + "statesandinfos": [], + "language": "PD", + "border-width": 3.25, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1473.2018438500227, + "y": 504.2598166908556 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "912c0f08-87fb-c746-18cb-19909a2b41c8", + "bbox": { + "x": 1473.2018438500227, + "y": 504.2598166908556, + "w": 132.0849609375, + "h": 47 + }, + "class": "macromolecule", + "label": "weakrefset.WeakSet.add\ncalls: 1\ntime: 0.000000s", + "statesandinfos": [], + "parent": "nwtN_e8ac41f5-45d0-4855-bcc9-623f16e77889", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#9999e5", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1473.2018438500227, + "y": 504.2598166908556 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ], + "edges": [ + { + "data": { + "id": "nwtE_8b2b6e86-b5c9-4d80-99d6-fba6d10c340f", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "target": "288a2f9b-2930-701e-c68e-400307fbffd4", + "portsource": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "porttarget": "288a2f9b-2930-701e-c68e-400307fbffd4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_618ca0aa-0c62-42ea-ad5a-1c399335a913", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae", + "target": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "portsource": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae", + "porttarget": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c5861902-d6ee-4657-88e7-d57ab0de2b93", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "target": "nwtN_550a66a2-1061-45cc-9f78-14570daaff94", + "portsource": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "porttarget": "nwtN_550a66a2-1061-45cc-9f78-14570daaff94" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_93cf0fe2-8c29-44f4-95af-5e687ee44c2b", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "target": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "portsource": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "porttarget": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_cc55cbc0-61dc-41d3-bb2f-d6b55caeab9a", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "target": "82181180-e275-b004-243e-eb4383e1e72f", + "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "porttarget": "82181180-e275-b004-243e-eb4383e1e72f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a3d7bd9b-7c21-49a8-a6bb-1c7a4ebd7eb7", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "target": "359e920c-52a4-459e-2262-4ec90824f21e", + "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "porttarget": "359e920c-52a4-459e-2262-4ec90824f21e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_15d4f487-636c-4374-99c1-ae754989862d", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "target": "5a34dca5-646c-cae7-affe-ef4142c5ad73", + "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "porttarget": "5a34dca5-646c-cae7-affe-ef4142c5ad73" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_e4fc0a9f-6f88-4a20-8f21-00149e7ed87a", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "target": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47", + "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "porttarget": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_bf434941-04cf-4b18-9caf-577fac1c27f7", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "target": "912c0f08-87fb-c746-18cb-19909a2b41c8", + "portsource": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "porttarget": "912c0f08-87fb-c746-18cb-19909a2b41c8" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d2680712-4bc6-40b7-86b0-4af7052d069c", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "target": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "portsource": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "porttarget": "d07ee031-2818-7c9c-5589-e8a161b9946c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_445c17cc-894b-4833-81da-9d573e6c3c25", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47", + "target": "1f64237f-dd15-2d5f-18f0-02a0d0338f44", + "portsource": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47", + "porttarget": "1f64237f-dd15-2d5f-18f0-02a0d0338f44" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_1e925488-3584-4b09-b716-ba6f14379838", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "target": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "portsource": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "porttarget": "63edffef-16cf-a216-5ace-a27a4290e3d8" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d748d6aa-f386-4ced-bac6-d2587064d47b", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "target": "d6768356-8772-a49a-c2f7-c3b9802c954b", + "portsource": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "porttarget": "d6768356-8772-a49a-c2f7-c3b9802c954b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c71d9e10-11c4-4e9a-baf7-fa043282103c", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "target": "05b42313-71a4-e1a9-383b-6b4be641e69d", + "portsource": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "porttarget": "05b42313-71a4-e1a9-383b-6b4be641e69d" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_55f140c5-f99c-4bc5-b8ef-e7c808ae8d66", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "target": "3c161178-1fca-ec7e-3fc7-425ce940fe1a", + "portsource": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "porttarget": "3c161178-1fca-ec7e-3fc7-425ce940fe1a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_741a21e2-6999-4d7f-8f01-bc7fecbbc41b", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "target": "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa", + "portsource": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "porttarget": "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_790b1a2d-2b2c-481a-967f-e696d23e6824", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "target": "a0d92978-e6e9-6d87-9a06-567d139d15af", + "portsource": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "porttarget": "a0d92978-e6e9-6d87-9a06-567d139d15af" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_664a54ae-b07a-4c85-a503-349ca4edf006", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "label": 1, + "source": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae", + "target": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "portsource": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae", + "porttarget": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ] + }, + "style": [ + { + "selector": "node", + "style": { + "shape": "rectangle", + "text-halign": "center", + "text-valign": "center", + "font-weight" : "normal", + "background-color": "#ffffff", + "opacity": "1", + "border-color": "#555555" + } + }, + { + "selector": "node[class = 'simple chemical']", + "style": { + "shape": "ellipse", + "font-size": 14, + "background-color": "#fddbc7" + } + }, + { + "selector": "node[class = 'macromolecule']", + "style": { + "shape": "roundrectangle", + "background-color": "#9999e5" + } + }, + { + "selector": "node[class = 'unspecified entity']", + "style": { + "shape": "ellipse", + "background-color": "#f7f7f7" + } + }, + { + "selector": "node[class = 'nucleic acid feature']", + "style": { + "shape": "rectangle", + "background-color": "#f4a582", + } + }, + { + "selector": ":parent", + "style": { + "background-opacity": "0.333", + "text-valign": "bottom", + "shape": "barrel", + "text-margin-y": "2px", + "font-weight" : "normal", + "border-color": "#555555" + } + }, + { + "selector": "node:selected", + "style": { + "background-color": "#33ff00", + "border-color": "#22ee00" + } + }, + { + "selector": "edge", + "style": { + "curve-style": "bezier", + "width": "2px", + "line-color": "rgb(58,126,207)", + "opacity": "1" + } + }, + { + "selector": "edge:selected", + "style": { + "line-color": "#33ff00", + "font-size": "13px", + "text-opacity": "1", + "text-rotation": "autorotate", + "color": "#33ff00", + "font-weight": "bold", + "text-background-shape": "roundrectangle", + "text-background-opacity": "1", + "text-background-padding": "2px" + } + }, + { + "selector": "edge[class = 'production']", + "style": { + "target-arrow-shape": "triangle", + "target-arrow-color": "rgb(58,126,207)" + } + }, + { + "selector": "edge:selected[class = 'production']", + "style": { + "target-arrow-shape": "triangle", + "target-arrow-color": "#33ff00" + } + }, + ], + "zoomingEnabled": true, + "userZoomingEnabled": true, + "zoom": 0.9387299878673792, + "minZoom": 0.125, + "maxZoom": 16, + "panningEnabled": true, + "userPanningEnabled": true, + "pan": { + "x": -275.1308697557213, + "y": -85.14353945866765 + }, + "boxSelectionEnabled": true, + "renderer": { + "name": "canvas" + }, + "wheelSensitivity": 0.1, + "motionBlur": true +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/callGraph_constraints.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/callGraph_constraints.js new file mode 100644 index 0000000000000000000000000000000000000000..aae3aed9c0d1781772a9159c9123c57732a636f1 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/callGraph_constraints.js @@ -0,0 +1,123 @@ +callGraph_constraints = { + "alignmentConstraint": { + "horizontal": [ + [ + "288a2f9b-2930-701e-c68e-400307fbffd4", + "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066" + ], + [ + "nwtN_550a66a2-1061-45cc-9f78-14570daaff94", + "82181180-e275-b004-243e-eb4383e1e72f", + "359e920c-52a4-459e-2262-4ec90824f21e", + "5a34dca5-646c-cae7-affe-ef4142c5ad73", + "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47", + "d07ee031-2818-7c9c-5589-e8a161b9946c", + "912c0f08-87fb-c746-18cb-19909a2b41c8" + ], + [ + "1f64237f-dd15-2d5f-18f0-02a0d0338f44", + "63edffef-16cf-a216-5ace-a27a4290e3d8", + "d6768356-8772-a49a-c2f7-c3b9802c954b", + "05b42313-71a4-e1a9-383b-6b4be641e69d" + ], + [ + "3c161178-1fca-ec7e-3fc7-425ce940fe1a", + "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa", + "a0d92978-e6e9-6d87-9a06-567d139d15af" + ] + ] + }, + "relativePlacementConstraint": [ + { + "top": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae", + "bottom": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "gap": 98.25 + }, + { + "top": "nwtN_6e27959a-ae83-4cb0-898f-9a1e6c5cafae", + "bottom": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "gap": 98.25 + }, + { + "top": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "bottom": "288a2f9b-2930-701e-c68e-400307fbffd4", + "gap": 98.25 + }, + { + "top": "d2f78da5-fbd3-fe91-4046-3b5aea0648f6", + "bottom": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "gap": 98.25 + }, + { + "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "bottom": "912c0f08-87fb-c746-18cb-19909a2b41c8", + "gap": 98.25 + }, + { + "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "bottom": "82181180-e275-b004-243e-eb4383e1e72f", + "gap": 98.25 + }, + { + "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "bottom": "359e920c-52a4-459e-2262-4ec90824f21e", + "gap": 98.25 + }, + { + "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "bottom": "5a34dca5-646c-cae7-affe-ef4142c5ad73", + "gap": 98.25 + }, + { + "top": "nwtN_ac02fa71-2428-47ad-8c3c-80bb5659a066", + "bottom": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47", + "gap": 98.25 + }, + { + "top": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "bottom": "nwtN_550a66a2-1061-45cc-9f78-14570daaff94", + "gap": 98.25 + }, + { + "top": "nwtN_a44ad134-4c47-4cf5-b244-9d9fc0804e93", + "bottom": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "gap": 98.25 + }, + { + "top": "2f560d5b-bb1b-cc3f-d5b5-a69e6fab8d47", + "bottom": "1f64237f-dd15-2d5f-18f0-02a0d0338f44", + "gap": 98.25 + }, + { + "top": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "bottom": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "gap": 98.25 + }, + { + "top": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "bottom": "d6768356-8772-a49a-c2f7-c3b9802c954b", + "gap": 98.25 + }, + { + "top": "d07ee031-2818-7c9c-5589-e8a161b9946c", + "bottom": "05b42313-71a4-e1a9-383b-6b4be641e69d", + "gap": 98.25 + }, + { + "top": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "bottom": "3c161178-1fca-ec7e-3fc7-425ce940fe1a", + "gap": 98.25 + }, + { + "top": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "bottom": "bab5c8a0-0f39-66d4-eaca-7f9160ef25fa", + "gap": 98.25 + }, + { + "top": "63edffef-16cf-a216-5ace-a27a4290e3d8", + "bottom": "a0d92978-e6e9-6d87-9a06-567d139d15af", + "gap": 98.25 + } + ] +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/chalk.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/chalk.js new file mode 100644 index 0000000000000000000000000000000000000000..92c5704464beb1c6665de82bc6ba39c8d5fc1c10 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/chalk.js @@ -0,0 +1,1305 @@ +chalk = { + "elements": { + "nodes": [ + { + "data": { + "id": "nwtN_00dcd31b-2631-4af1-980b-4493dc7d43f7", + "bbox": { + "x": 506.4608860015869, + "y": 105.05675506591797, + "w": 60.3330078125, + "h": 28.25 + }, + "originalW": 88.3330078125, + "originalH": 56.25, + "class": "compartment", + "label": "types", + "statesandinfos": [], + "parent": "nwtN_80eb137f-5cd7-4584-9acc-87cc5698d255", + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 0.5, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 506.4608860015869, + "y": 105.05675506591797 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_80eb137f-5cd7-4584-9acc-87cc5698d255", + "bbox": { + "x": 503.796484757312, + "y": 149.75074733690965, + "w": 141.2687438947998, + "h": 150.88798454198337 + }, + "originalW": 169.2687438947998, + "originalH": 178.88798454198337, + "class": "compartment", + "label": "chalk", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 0.5, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 503.796484757312, + "y": 149.75074733690965 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_23452b85-7855-413f-a03d-26412ed87bfc", + "bbox": { + "x": 506.4608860015869, + "y": 105.05675506591797, + "w": 57.0830078125, + "h": 25 + }, + "class": "simple chemical", + "label": "index.d.ts", + "statesandinfos": [], + "parent": "nwtN_00dcd31b-2631-4af1-980b-4493dc7d43f7", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#c7eae5", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 506.4608860015869, + "y": 105.05675506591797 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "bbox": { + "x": 458.4355503099121, + "y": 211.06973960790134, + "w": 47.296875, + "h": 25 + }, + "class": "macromolecule", + "label": "index.js", + "statesandinfos": [], + "parent": "nwtN_80eb137f-5cd7-4584-9acc-87cc5698d255", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 458.4355503099121, + "y": 211.06973960790134 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64", + "bbox": { + "x": 538.4608860015869, + "y": 205.05675506591797, + "w": 68.68994140625, + "h": 25 + }, + "class": "macromolecule", + "label": "templates.js", + "statesandinfos": [], + "parent": "nwtN_80eb137f-5cd7-4584-9acc-87cc5698d255", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 538.4608860015869, + "y": 205.05675506591797 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_c50c8570-f7bd-46c3-b7c2-66857746b854", + "bbox": { + "x": 457.4608860015869, + "y": 305.05675506591797, + "w": 50.546875, + "h": 28.25 + }, + "originalW": 78.546875, + "originalH": 56.25, + "class": "compartment", + "label": "ansi-styles", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 0.5, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 457.4608860015869, + "y": 305.05675506591797 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3", + "bbox": { + "x": 457.4608860015869, + "y": 305.05675506591797, + "w": 47.296875, + "h": 25 + }, + "class": "macromolecule", + "label": "index.js", + "statesandinfos": [], + "parent": "nwtN_c50c8570-f7bd-46c3-b7c2-66857746b854", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 457.4608860015869, + "y": 305.05675506591797 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_cafd8043-b744-474c-99d0-7f33deb415ac", + "bbox": { + "x": 451.6038619242243, + "y": 380.17711757548415, + "w": 50.546875, + "h": 28.25 + }, + "originalW": 78.546875, + "originalH": 56.25, + "class": "compartment", + "label": "escape-string-regexp", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 0.5, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 451.6038619242243, + "y": 380.17711757548415 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7", + "bbox": { + "x": 451.6038619242243, + "y": 380.17711757548415, + "w": 47.296875, + "h": 25 + }, + "class": "macromolecule", + "label": "index.js", + "statesandinfos": [], + "parent": "nwtN_cafd8043-b744-474c-99d0-7f33deb415ac", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 451.6038619242243, + "y": 380.17711757548415 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_e99db3a7-4249-47e7-84cf-b61676393dc8", + "bbox": { + "x": 467.6089290625593, + "y": 476.207520405494, + "w": 50.546875, + "h": 28.25 + }, + "originalW": 78.546875, + "originalH": 56.25, + "class": "compartment", + "label": "supports-color", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 0.5, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 467.6089290625593, + "y": 476.207520405494 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "bbox": { + "x": 467.6089290625593, + "y": 476.207520405494, + "w": 47.296875, + "h": 25 + }, + "class": "macromolecule", + "label": "index.js", + "statesandinfos": [], + "parent": "nwtN_e99db3a7-4249-47e7-84cf-b61676393dc8", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 467.6089290625593, + "y": 476.207520405494 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_641f76bc-059e-4885-9e58-8bc08b26765d", + "bbox": { + "x": 663.6710015071626, + "y": 439.19580264809434, + "w": 50.546875, + "h": 28.25 + }, + "originalW": 78.546875, + "originalH": 56.25, + "class": "compartment", + "label": "has-flag", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 0.5, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 663.6710015071626, + "y": 439.19580264809434 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f", + "bbox": { + "x": 663.6710015071626, + "y": 439.19580264809434, + "w": 47.296875, + "h": 25 + }, + "class": "macromolecule", + "label": "index.js", + "statesandinfos": [], + "parent": "nwtN_641f76bc-059e-4885-9e58-8bc08b26765d", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 663.6710015071626, + "y": 439.19580264809434 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_e4a59b7b-986f-40c1-8211-07ecd7bd4a85", + "bbox": { + "x": 769.0413352597577, + "y": 155.046620789248, + "w": 209.7825138067825, + "h": 76.26330123812932 + }, + "originalW": 237.7825138067825, + "originalH": 104.26330123812932, + "class": "compartment", + "label": "color-convert", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 0.5, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 769.0413352597577, + "y": 155.046620789248 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "bbox": { + "x": 689.4235158563665, + "y": 179.05327140831267, + "w": 47.296875, + "h": 25 + }, + "class": "macromolecule", + "label": "index.js", + "statesandinfos": [], + "parent": "nwtN_e4a59b7b-986f-40c1-8211-07ecd7bd4a85", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 689.4235158563665, + "y": 179.05327140831267 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37", + "bbox": { + "x": 832.459935913149, + "y": 174.05612167362608, + "w": 79.6953125, + "h": 25 + }, + "class": "macromolecule", + "label": "conversions.js", + "statesandinfos": [], + "parent": "nwtN_e4a59b7b-986f-40c1-8211-07ecd7bd4a85", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 832.459935913149, + "y": 174.05612167362608 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946", + "bbox": { + "x": 761.4273162101177, + "y": 131.03997017018335, + "w": 46.072265625, + "h": 25 + }, + "class": "macromolecule", + "label": "route.js", + "statesandinfos": [], + "parent": "nwtN_e4a59b7b-986f-40c1-8211-07ecd7bd4a85", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 761.4273162101177, + "y": 131.03997017018335 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_bc39472b-e95f-4e5c-955e-eb6fd7fe0cdf", + "bbox": { + "x": 914.4608860015869, + "y": 275.05675506591797, + "w": 50.546875, + "h": 28.25 + }, + "originalW": 78.546875, + "originalH": 56.25, + "class": "compartment", + "label": "color-name", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 0.5, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 914.4608860015869, + "y": 275.05675506591797 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_2f088c82-aac6-4e48-8fde-8574a3390d24", + "bbox": { + "x": 914.4608860015869, + "y": 275.05675506591797, + "w": 47.296875, + "h": 25 + }, + "class": "macromolecule", + "label": "index.js", + "statesandinfos": [], + "parent": "nwtN_bc39472b-e95f-4e5c-955e-eb6fd7fe0cdf", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#dfc27d", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 914.4608860015869, + "y": 275.05675506591797 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_88c73829-9d76-4b03-ab27-335fd9581531", + "bbox": { + "x": 638.6630841035143, + "y": 555.2325394010229, + "w": 30, + "h": 25 + }, + "class": "unspecified entity", + "label": "os", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#f5f5f5", + "background-opacity": 1, + "background-image-opacity": "", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "background-image": "", + "background-fit": "", + "background-position-x": "", + "background-position-y": "", + "background-width": "", + "background-height": "", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 638.6630841035143, + "y": 555.2325394010229 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ], + "edges": [ + { + "data": { + "id": "nwtE_d1ae8562-bb81-4d93-ac24-78b9def385a2", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "target": "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64", + "portsource": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "porttarget": "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_925bc3d3-7dac-4ef3-b0d7-875c78be8fbe", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "target": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3", + "portsource": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "porttarget": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d32f598b-4b96-4403-87c4-870e99ee6bc1", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "target": "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7", + "portsource": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "porttarget": "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_0f92d3d4-1849-4f4c-97f0-6504eb9831ac", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "target": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "portsource": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "porttarget": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_2b21b38a-8443-45ea-b067-d626a731fc32", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3", + "target": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "portsource": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3", + "porttarget": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_cc83602e-928e-4d47-b60e-9ec94b93f9bd", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "target": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946", + "portsource": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "porttarget": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_66f2d0d1-0542-450a-b6ae-f1c8bfa19e23", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946", + "target": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37", + "portsource": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946", + "porttarget": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_83bd7195-5e2f-49c8-87f1-b54d74309928", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "target": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37", + "portsource": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "porttarget": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_5e327bfd-b03d-440c-8825-0f03c01c7426", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37", + "target": "nwtN_2f088c82-aac6-4e48-8fde-8574a3390d24", + "portsource": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37", + "porttarget": "nwtN_2f088c82-aac6-4e48-8fde-8574a3390d24" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_93128cfa-29d1-4669-8496-85227b119c1f", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "target": "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f", + "portsource": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "porttarget": "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_95f18b40-fe6a-482c-9ff2-5296ad1923c0", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#a8a8a8", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "target": "nwtN_88c73829-9d76-4b03-ab27-335fd9581531", + "portsource": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "porttarget": "nwtN_88c73829-9d76-4b03-ab27-335fd9581531" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ] + }, + "style": [ + { + "selector": "node", + "style": { + "shape": "rectangle", + "text-halign": "center", + "text-valign": "center", + "background-color": "#ffffff", + "opacity": "1", + "border-color": "#555555" + } + }, + { + "selector": "node[class = 'simple chemical']", + "style": { + "shape": "ellipse", + "background-color": "#c7eae5" + } + }, + { + "selector": "node[class = 'macromolecule']", + "style": { + "shape": "roundrectangle", + "background-color": "#dfc27d" + } + }, + { + "selector": "node[class = 'unspecified entity']", + "style": { + "shape": "ellipse", + "background-color": "#f5f5f5" + } + }, + { + "selector": ":parent", + "style": { + "background-opacity": "0.333", + "text-valign": "bottom", + "shape": "barrel", + "text-margin-y": "2px", + "font-weight" : "bold", + "border-color": "#555555" + } + }, + { + "selector": "node:selected", + "style": { + "background-color": "#33ff00", + "border-color": "#22ee00" + } + }, + { + "selector": "edge", + "style": { + "curve-style": "bezier", + "width": "2px", + "line-color": "rgb(58,126,207)", + "opacity": "1", + "target-arrow-shape": "triangle", + "target-arrow-color": "rgb(58,126,207)", + } + }, + { + "selector": "edge:selected", + "style": { + "line-color": "#33ff00", + "font-size": "13px", + "text-opacity": "1", + "text-rotation": "autorotate", + "color": "#33ff00", + "font-weight": "bold", + "text-background-shape": "roundrectangle", + "text-background-opacity": "1", + "text-background-padding": "2px", + "target-arrow-color": "#33ff00", + "target-arrow-shape": "triangle", + } + } + ], + "zoomingEnabled": true, + "userZoomingEnabled": true, + "zoom": 1.7784699371350863, + "minZoom": 0.125, + "maxZoom": 16, + "panningEnabled": true, + "userPanningEnabled": true, + "pan": { + "x": -246.2736846361503, + "y": -69.57913264371261 + }, + "boxSelectionEnabled": true, + "renderer": { + "name": "canvas" + }, + "wheelSensitivity": 0.1, + "motionBlur": true +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/chalk_constraints.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/chalk_constraints.js new file mode 100644 index 0000000000000000000000000000000000000000..d5ae06d955eed4acaf4a3ecfddf1235ad7dba661 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/chalk_constraints.js @@ -0,0 +1,78 @@ +chalk_constraints = { + "alignmentConstraint": { + "vertical": [ + [ + "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64", + "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3", + "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7", + "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607" + ], + [ + "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f", + "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "nwtN_88c73829-9d76-4b03-ab27-335fd9581531" + ], + [ + "nwtN_23452b85-7855-413f-a03d-26412ed87bfc", + "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059" + ] + ] + }, + "relativePlacementConstraint": [ + { + "left": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "right": "nwtN_c152aeef-01df-49fc-9539-9e022e8d4c64", + "gap": 180 + }, + { + "left": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "right": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3", + "gap": 180 + }, + { + "left": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "right": "nwtN_6442ea6c-8a74-4948-ab60-2a2fc6b904f7", + "gap": 180 + }, + { + "left": "nwtN_6ffc1fdf-602f-4395-89b5-666b383a5059", + "right": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "gap": 180 + }, + { + "left": "nwtN_fa99aac7-9500-4ead-82c3-90c72e9837f3", + "right": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "gap": 120 + }, + { + "left": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "right": "nwtN_fc4a5aa8-171f-41bd-8ab3-5eee343c4f9f", + "gap": 120 + }, + { + "left": "nwtN_395e3fed-fcd4-427a-909a-c01a7fc94607", + "right": "nwtN_88c73829-9d76-4b03-ab27-335fd9581531", + "gap": 120 + }, + { + "left": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "right": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946", + "gap": 100 + }, + { + "left": "nwtN_10cd6cfc-6d2a-48b1-82e1-29d16dadd069", + "right": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37", + "gap": 120 + }, + { + "left": "nwtN_ec240627-f567-42b4-a9c6-4564450e9946", + "right": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37", + "gap": 120 + }, + { + "left": "nwtN_da2a2f8c-a185-4ffd-b577-f2c5a7680a37", + "right": "nwtN_2f088c82-aac6-4e48-8fde-8574a3390d24", + "gap": 120 + } + ] +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/unix.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/unix.js new file mode 100644 index 0000000000000000000000000000000000000000..b2d6ca6d0643a3c90917e197ce37cb86ce2b5287 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/unix.js @@ -0,0 +1,2868 @@ +unix = { + "elements": { + "nodes": [ + { + "data": { + "id": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06", + "bbox": { + "x": 745.4608860015869, + "y": 224.05675506591797, + "w": 61.9814453125, + "h": 25 + }, + "class": "unspecified entity", + "label": "5th Edition", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 745.4608860015869, + "y": 224.05675506591797 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "bbox": { + "x": 873.3539436491809, + "y": 263.5835504727236, + "w": 53.40380859375, + "h": 25 + }, + "class": "unspecified entity", + "label": "PWB 1.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 873.3539436491809, + "y": 263.5835504727236 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "bbox": { + "x": 614.9885135227565, + "y": 265.72104900772746, + "w": 61.9814453125, + "h": 25 + }, + "class": "unspecified entity", + "label": "6th Edition", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 614.9885135227565, + "y": 265.72104900772746 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470", + "bbox": { + "x": 480.36757192398835, + "y": 363.24391403339195, + "w": 41.79150390625, + "h": 25 + }, + "class": "unspecified entity", + "label": "1 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 480.36757192398835, + "y": 363.24391403339195 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "bbox": { + "x": 570.464197497224, + "y": 359.0206347096466, + "w": 53.419921875, + "h": 25 + }, + "class": "unspecified entity", + "label": "Interdata", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 570.464197497224, + "y": 359.0206347096466 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_3f3b6234-e449-44bb-9ba8-059d1f843c98", + "bbox": { + "x": 675.1503958677858, + "y": 361.09076288085635, + "w": 55.22998046875, + "h": 25 + }, + "class": "unspecified entity", + "label": "Mini Unix", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 675.1503958677858, + "y": 361.09076288085635 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_d7bbe746-9028-4268-a642-70544788d687", + "bbox": { + "x": 754.5642886596697, + "y": 359.6830031062747, + "w": 67.89501953125, + "h": 25 + }, + "class": "unspecified entity", + "label": "Wollongong", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 754.5642886596697, + "y": 359.6830031062747 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_5bb0a938-c7ee-42d8-85c8-17bdc1ff0ade", + "bbox": { + "x": 830.680176631967, + "y": 356.14976650626585, + "w": 30.79150390625, + "h": 25 + }, + "class": "unspecified entity", + "label": "LSX", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 830.680176631967, + "y": 356.14976650626585 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f", + "bbox": { + "x": 897.0524434906262, + "y": 351.8849756918575, + "w": 53.40380859375, + "h": 25 + }, + "class": "unspecified entity", + "label": "PWB 1.2", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 897.0524434906262, + "y": 351.8849756918575 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "bbox": { + "x": 975.1139251621452, + "y": 363.24391403339195, + "w": 52.1845703125, + "h": 25 + }, + "class": "unspecified entity", + "label": "USG 1.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 975.1139251621452, + "y": 363.24391403339195 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "bbox": { + "x": 575.2306358130835, + "y": 432.33043568527285, + "w": 61.9814453125, + "h": 25 + }, + "class": "unspecified entity", + "label": "7th Edition", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 575.2306358130835, + "y": 432.33043568527285 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a", + "bbox": { + "x": 714.3514898595155, + "y": 437.0837204997799, + "w": 53.40380859375, + "h": 25 + }, + "class": "unspecified entity", + "label": "PWB 2.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 714.3514898595155, + "y": 437.0837204997799 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586", + "bbox": { + "x": 830.1394421526015, + "y": 445.43869045232054, + "w": 52.1845703125, + "h": 25 + }, + "class": "unspecified entity", + "label": "USG 2.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 830.1394421526015, + "y": 445.43869045232054 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_26c73172-708d-45cc-8ba5-f29671089767", + "bbox": { + "x": 971.488441986689, + "y": 450.36938877369727, + "w": 59.51611328125, + "h": 25 + }, + "class": "unspecified entity", + "label": "CB Unix 1", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 971.488441986689, + "y": 450.36938877369727 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_2d9c1f24-1482-46fb-a0f4-f963ba454710", + "bbox": { + "x": 489.09801948657775, + "y": 530.0434239414329, + "w": 37.51611328125, + "h": 25 + }, + "class": "unspecified entity", + "label": "Xenix", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 489.09801948657775, + "y": 530.0434239414329 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_15fb1e74-6b08-4914-95ac-ee4ecb1b7f17", + "bbox": { + "x": 605.5402906403156, + "y": 534.3179790370807, + "w": 54.32763671875, + "h": 25 + }, + "class": "unspecified entity", + "label": "UniPlus+", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 605.5402906403156, + "y": 534.3179790370807 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef", + "bbox": { + "x": 722.9845503897996, + "y": 534.3179790370807, + "w": 30, + "h": 25 + }, + "class": "unspecified entity", + "label": "32V", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 722.9845503897996, + "y": 534.3179790370807 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52", + "bbox": { + "x": 819.9650376071766, + "y": 534.3179790370807, + "w": 52.1845703125, + "h": 25 + }, + "class": "unspecified entity", + "label": "USG 3.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 819.9650376071766, + "y": 534.3179790370807 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_cc15f875-f4dd-4df8-a09e-a4f2e6c8a3f5", + "bbox": { + "x": 901.8201277356048, + "y": 534.3179790370807, + "w": 67.46533203125, + "h": 25 + }, + "class": "unspecified entity", + "label": "Unix/TS 1.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 901.8201277356048, + "y": 534.3179790370807 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718", + "bbox": { + "x": 978.3368424208749, + "y": 528.0898743533959, + "w": 59.51611328125, + "h": 25 + }, + "class": "unspecified entity", + "label": "CB Unix 2", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 978.3368424208749, + "y": 528.0898743533959 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78", + "bbox": { + "x": 528.1338467145192, + "y": 609.9449644818243, + "w": 32.61767578125, + "h": 25 + }, + "class": "unspecified entity", + "label": "V7M", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 528.1338467145192, + "y": 609.9449644818243 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf", + "bbox": { + "x": 623.3348754508435, + "y": 607.2757767602452, + "w": 41.79150390625, + "h": 25 + }, + "class": "unspecified entity", + "label": "3 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 623.3348754508435, + "y": 607.2757767602452 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "bbox": { + "x": 755.9045322892762, + "y": 607.2757767602452, + "w": 67.46533203125, + "h": 25 + }, + "class": "unspecified entity", + "label": "Unix/TS 3.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 755.9045322892762, + "y": 607.2757767602452 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "bbox": { + "x": 891.1433768492882, + "y": 603.7168597981396, + "w": 59.51611328125, + "h": 25 + }, + "class": "unspecified entity", + "label": "CB Unix 3", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 891.1433768492882, + "y": 603.7168597981396 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e", + "bbox": { + "x": 702.3447390464235, + "y": 667.8736577760533, + "w": 41.79150390625, + "h": 25 + }, + "class": "unspecified entity", + "label": "4 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 702.3447390464235, + "y": 667.8736577760533 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1", + "bbox": { + "x": 795.6906426110786, + "y": 666.7490083355151, + "w": 61.96533203125, + "h": 25 + }, + "class": "unspecified entity", + "label": "Unix/TS++", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 795.6906426110786, + "y": 666.7490083355151 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_e55d29c7-89bc-4aa0-b599-3637e141f17f", + "bbox": { + "x": 934.0225237972543, + "y": 664.4997094544391, + "w": 79.48583984375, + "h": 25 + }, + "class": "unspecified entity", + "label": "PDP-11 Sys V", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 934.0225237972543, + "y": 664.4997094544391 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1", + "bbox": { + "x": 484.16274758204827, + "y": 744.3498197326381, + "w": 41.79150390625, + "h": 25 + }, + "class": "unspecified entity", + "label": "2 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 484.16274758204827, + "y": 744.3498197326381 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "bbox": { + "x": 606.7495366006917, + "y": 739.8512219704861, + "w": 50.96533203125, + "h": 25 + }, + "class": "unspecified entity", + "label": "4.1 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 606.7495366006917, + "y": 739.8512219704861 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "bbox": { + "x": 795.6906426110781, + "y": 735.3526242083341, + "w": 42.40380859375, + "h": 25 + }, + "class": "unspecified entity", + "label": "TS 4.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 795.6906426110781, + "y": 735.3526242083341 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "bbox": { + "x": 589.8797949926216, + "y": 806.2055389622288, + "w": 50.96533203125, + "h": 25 + }, + "class": "unspecified entity", + "label": "2.8 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 589.8797949926216, + "y": 806.2055389622288 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "bbox": { + "x": 713.5912334518031, + "y": 805.0808895216909, + "w": 50.96533203125, + "h": 25 + }, + "class": "unspecified entity", + "label": "4.2 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 713.5912334518031, + "y": 805.0808895216909 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70", + "bbox": { + "x": 811.4357347786103, + "y": 803.9562400811528, + "w": 61.9814453125, + "h": 25 + }, + "class": "unspecified entity", + "label": "8th Edition", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 811.4357347786103, + "y": 803.9562400811528 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c", + "bbox": { + "x": 962.138759810704, + "y": 801.7069412000769, + "w": 65.23095703125, + "h": 25 + }, + "class": "unspecified entity", + "label": "System V.0", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 962.138759810704, + "y": 801.7069412000769 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6", + "bbox": { + "x": 553.5602026296802, + "y": 881.6602158726629, + "w": 50.1328125, + "h": 25 + }, + "class": "unspecified entity", + "label": "Ultrix-11", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 553.5602026296802, + "y": 881.6602158726629 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_8489a816-b7af-452f-a722-04d06226341c", + "bbox": { + "x": 677.1635290742751, + "y": 881.6602158726629, + "w": 50.96533203125, + "h": 25 + }, + "class": "unspecified entity", + "label": "2.9 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 677.1635290742751, + "y": 881.6602158726629 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_d4bf8470-416d-4387-a563-3c9cccf55079", + "bbox": { + "x": 785.6932791231874, + "y": 881.6602158726629, + "w": 50.94921875, + "h": 25 + }, + "class": "unspecified entity", + "label": "Ultrix-32", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 785.6932791231874, + "y": 881.6602158726629 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_e48d9732-8ee0-4714-8b62-8de8238ec9c2", + "bbox": { + "x": 867.0905916598717, + "y": 880.1528582330947, + "w": 50.96533203125, + "h": 25 + }, + "class": "unspecified entity", + "label": "4.3 BSD", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 867.0905916598717, + "y": 880.1528582330947 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_103a9105-ef50-47a4-b501-840a431fcbdd", + "bbox": { + "x": 986.1718451857619, + "y": 877.1381429539582, + "w": 61.9814453125, + "h": 25 + }, + "class": "unspecified entity", + "label": "9th Edition", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 986.1718451857619, + "y": 877.1381429539582 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42", + "bbox": { + "x": 1075.1059459202875, + "y": 875.6307853143899, + "w": 65.23095703125, + "h": 25 + }, + "class": "unspecified entity", + "label": "System V.2", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1075.1059459202875, + "y": 875.6307853143899 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_88e20782-9221-4b12-9b62-6a6c7116a70f", + "bbox": { + "x": 948.4879041965561, + "y": 935.925090897119, + "w": 65.23095703125, + "h": 25 + }, + "class": "unspecified entity", + "label": "System V.3", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#b2dfee", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 948.4879041965561, + "y": 935.925090897119 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ], + "edges": [ + { + "data": { + "id": "nwtE_d28e1f77-50d0-4dd8-83cc-9aa7753ec703", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06", + "target": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "portsource": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06", + "porttarget": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_45a21af1-4dec-41c7-ba69-dafcff42a64e", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06", + "target": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "portsource": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06", + "porttarget": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f13cb629-066b-4348-a85f-17f46f76323d", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "target": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470", + "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "porttarget": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_4cc00776-906f-4046-b334-ef8ef88c561f", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "target": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "porttarget": "nwtN_c1880331-8411-443e-9218-87e78c057b22" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_0d73b351-586f-44dd-b35a-f402831234ef", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "target": "nwtN_3f3b6234-e449-44bb-9ba8-059d1f843c98", + "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "porttarget": "nwtN_3f3b6234-e449-44bb-9ba8-059d1f843c98" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f4b01e10-3d6f-484e-9af8-b2190fba1f76", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "target": "nwtN_d7bbe746-9028-4268-a642-70544788d687", + "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "porttarget": "nwtN_d7bbe746-9028-4268-a642-70544788d687" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b6aef58e-28af-4c84-9cc0-9207baf031b6", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "target": "nwtN_5bb0a938-c7ee-42d8-85c8-17bdc1ff0ade", + "portsource": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "porttarget": "nwtN_5bb0a938-c7ee-42d8-85c8-17bdc1ff0ade" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_201fa31f-cc64-4e2c-af7d-346da494f7fc", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "target": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f", + "portsource": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "porttarget": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_723aa506-a82c-4aed-835f-84fa3be00e95", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "target": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "portsource": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "porttarget": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_2194eb93-f987-4f54-af50-8f4324deecab", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "target": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "portsource": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "porttarget": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3b3ed0dd-5dd6-4b90-8bdb-6096cd66bc8c", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "target": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a", + "portsource": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "porttarget": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_2c364c9e-3c36-4b0f-ac5a-359bc463643d", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f", + "target": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a", + "portsource": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f", + "porttarget": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d2f4f0c5-7301-44ac-8a63-09488b5eed93", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "target": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586", + "portsource": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "porttarget": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a9a4c0b1-f8be-4215-9f5e-0eb70fe30552", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "target": "nwtN_26c73172-708d-45cc-8ba5-f29671089767", + "portsource": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "porttarget": "nwtN_26c73172-708d-45cc-8ba5-f29671089767" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_383d100e-2e81-4ecd-9f3f-6d89b49ebb5e", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470", + "target": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1", + "portsource": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470", + "porttarget": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_417a4c87-3c4c-4edd-aed0-6d5f31454e74", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "target": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "portsource": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "porttarget": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_99ccd06d-3749-4f8d-9708-c6f68f4efeb2", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "target": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78", + "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "porttarget": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7c66928a-9c8d-47f2-9eaa-a5c9ba7c3da2", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "target": "nwtN_2d9c1f24-1482-46fb-a0f4-f963ba454710", + "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "porttarget": "nwtN_2d9c1f24-1482-46fb-a0f4-f963ba454710" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_46f1e73b-7bc3-4971-ac8c-62bb1941feed", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "target": "nwtN_15fb1e74-6b08-4914-95ac-ee4ecb1b7f17", + "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "porttarget": "nwtN_15fb1e74-6b08-4914-95ac-ee4ecb1b7f17" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7611ab43-2d00-4a76-a079-265d6c61f492", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "target": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef", + "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "porttarget": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d2c109ec-1629-4dee-9558-36a6eb048d03", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "target": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6", + "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "porttarget": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_79e002ad-b447-47db-b5d4-813b991d5b25", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "target": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70", + "portsource": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "porttarget": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_2c2e8c31-e1de-4d37-bdef-bd87bae7ba3c", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a", + "target": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "portsource": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a", + "porttarget": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a075ae00-35d6-45a9-a1ea-83155e04cb60", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586", + "target": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52", + "portsource": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586", + "porttarget": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7fa9dabf-6d40-403c-9b90-114047190327", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_26c73172-708d-45cc-8ba5-f29671089767", + "target": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718", + "portsource": "nwtN_26c73172-708d-45cc-8ba5-f29671089767", + "porttarget": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_e2edca17-82fd-4b4d-84ff-e4207e6c8e3a", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef", + "target": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf", + "portsource": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef", + "porttarget": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d3627874-c499-40ea-b0e1-27412c1371f7", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52", + "target": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "portsource": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52", + "porttarget": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_4970b017-04ed-46db-9da2-2997f72bc077", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_cc15f875-f4dd-4df8-a09e-a4f2e6c8a3f5", + "target": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "portsource": "nwtN_cc15f875-f4dd-4df8-a09e-a4f2e6c8a3f5", + "porttarget": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_83dfef9b-2bb5-4dff-806c-ba14770d18ff", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718", + "target": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "portsource": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718", + "porttarget": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_dccf2dd2-7e3d-4494-a350-44e93d208aca", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78", + "target": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6", + "portsource": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78", + "porttarget": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_e73c56ef-3c0d-4204-90bd-c655f24611d8", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf", + "target": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e", + "portsource": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf", + "porttarget": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_33545b94-a307-4857-b98a-da966e4bafea", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "target": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "portsource": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "porttarget": "nwtN_a68571c0-2669-4894-aa53-332555f625a2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_5fc7ce04-7148-494b-9149-01369f6a6540", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "target": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "portsource": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "porttarget": "nwtN_a68571c0-2669-4894-aa53-332555f625a2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c4634dd2-0836-4233-aac6-682115595ae0", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "target": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1", + "portsource": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "porttarget": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_68a9509d-915d-4383-9130-7bc54ba793e1", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "target": "nwtN_e55d29c7-89bc-4aa0-b599-3637e141f17f", + "portsource": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "porttarget": "nwtN_e55d29c7-89bc-4aa0-b599-3637e141f17f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_92776f19-3134-4507-9e3e-25ee1f13ed31", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1", + "target": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "portsource": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1", + "porttarget": "nwtN_a68571c0-2669-4894-aa53-332555f625a2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_ad40e7b6-663f-47fd-bd71-9f62a69e150f", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e", + "target": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "portsource": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e", + "porttarget": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_53912bce-3324-4ebc-b546-811274f6241b", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1", + "target": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "portsource": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1", + "porttarget": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_6f66b3a9-e004-44c0-a4c7-181bf848f589", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "target": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "portsource": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "porttarget": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_34095a70-144b-4a4f-a4e2-af92648e3232", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "target": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "portsource": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "porttarget": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f3b6782d-688f-4109-b46f-02a81c999820", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "target": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70", + "portsource": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "porttarget": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b0eb5b9b-e0be-46a1-a449-42fb67bfb0bd", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "target": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c", + "portsource": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "porttarget": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_94d8d0fa-0a5e-4c77-95f1-fb220cc0a2c0", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "target": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6", + "portsource": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "porttarget": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_220574ce-1557-4fd7-991b-7fb957d4dc23", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "target": "nwtN_8489a816-b7af-452f-a722-04d06226341c", + "portsource": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "porttarget": "nwtN_8489a816-b7af-452f-a722-04d06226341c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_ea01de09-12e1-4d7f-9199-c5d500e03156", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "target": "nwtN_d4bf8470-416d-4387-a563-3c9cccf55079", + "portsource": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "porttarget": "nwtN_d4bf8470-416d-4387-a563-3c9cccf55079" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_ae8ff556-7256-4524-aaa7-544077572cd4", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "target": "nwtN_e48d9732-8ee0-4714-8b62-8de8238ec9c2", + "portsource": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "porttarget": "nwtN_e48d9732-8ee0-4714-8b62-8de8238ec9c2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_94b09aad-22ef-42a3-ae0e-58dde4cae4ee", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70", + "target": "nwtN_103a9105-ef50-47a4-b501-840a431fcbdd", + "portsource": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70", + "porttarget": "nwtN_103a9105-ef50-47a4-b501-840a431fcbdd" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_80ab6732-05f6-498b-8ce0-6502661e49b0", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c", + "target": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42", + "portsource": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c", + "porttarget": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_1b3ef389-19ea-4bf6-b664-ec393b397649", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "cardinality": 0, + "source": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42", + "target": "nwtN_88e20782-9221-4b12-9b62-6a6c7116a70f", + "portsource": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42", + "porttarget": "nwtN_88e20782-9221-4b12-9b62-6a6c7116a70f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ] + }, + "style": [ + { + "selector": "node", + "style": { + "shape": "rectangle", + "text-halign": "center", + "text-valign": "center", + "background-color": "#b2dfee", + "opacity": "1", + "border-color": "#555555" + } + }, + { + "selector": "node[class = 'simple chemical']", + "style": { + "shape": "ellipse" + } + }, + { + "selector": "node[class = 'macromolecule']", + "style": { + "shape": "roundrectangle" + } + }, + { + "selector": "node[class = 'unspecified entity']", + "style": { + "shape": "ellipse" + } + }, + { + "selector": ":parent", + "style": { + "background-opacity": "0.333", + "text-valign": "bottom", + "shape": "barrel", + "text-margin-y": "2px", + "font-weight" : "bold", + "border-color": "#555555" + } + }, + { + "selector": "node:selected", + "style": { + "background-color": "#33ff00", + "border-color": "#22ee00" + } + }, + { + "selector": "edge", + "style": { + "curve-style": "bezier", + "width": "2px", + "line-color": "rgb(58,126,207)", + "opacity": "1", + "target-arrow-shape": "triangle", + "target-arrow-color": "rgb(58,126,207)" + } + }, + { + "selector": "edge:selected", + "style": { + "line-color": "#33ff00", + "font-size": "13px", + "text-opacity": "1", + "text-rotation": "autorotate", + "color": "#33ff00", + "font-weight": "bold", + "text-background-shape": "roundrectangle", + "text-background-opacity": "1", + "text-background-padding": "2px", + "target-arrow-shape": "triangle", + "target-arrow-color": "#33ff00" + } + } + ], + "zoomingEnabled": true, + "userZoomingEnabled": true, + "zoom": 0.8336504719979256, + "minZoom": 0.125, + "maxZoom": 16, + "panningEnabled": true, + "userPanningEnabled": true, + "pan": { + "x": -17.245693955834554, + "y": -155.00970669805537 + }, + "boxSelectionEnabled": true, + "renderer": { + "name": "canvas" + }, + "wheelSensitivity": 0.1, + "motionBlur": true +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/unix_constraints.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/unix_constraints.js new file mode 100644 index 0000000000000000000000000000000000000000..286d2da85cc6850fa2aadcea519d2e86aacf9852 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/unix_constraints.js @@ -0,0 +1,249 @@ +unix_constraints = { + "relativePlacementConstraint": [ + { + "top": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06", + "bottom": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "gap": 76.25 + }, + { + "top": "nwtN_4451c335-4668-4f8d-9f71-274aa2e6ab06", + "bottom": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "gap": 76.25 + }, + { + "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "bottom": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470", + "gap": 76.25 + }, + { + "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "bottom": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "gap": 76.25 + }, + { + "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "bottom": "nwtN_3f3b6234-e449-44bb-9ba8-059d1f843c98", + "gap": 76.25 + }, + { + "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "bottom": "nwtN_d7bbe746-9028-4268-a642-70544788d687", + "gap": 76.25 + }, + { + "top": "nwtN_8d99e7af-1b2f-4605-a381-ce3127b6199a", + "bottom": "nwtN_5bb0a938-c7ee-42d8-85c8-17bdc1ff0ade", + "gap": 76.25 + }, + { + "top": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "bottom": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f", + "gap": 76.25 + }, + { + "top": "nwtN_37220ed2-0cbe-4d1f-9cac-07dfb11d6eda", + "bottom": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "gap": 76.25 + }, + { + "top": "nwtN_020b84b2-717f-4465-b716-7520e5c9c470", + "bottom": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1", + "gap": 76.25 + }, + { + "top": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "bottom": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "gap": 76.25 + }, + { + "top": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "bottom": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "gap": 76.25 + }, + { + "top": "nwtN_c1880331-8411-443e-9218-87e78c057b22", + "bottom": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a", + "gap": 76.25 + }, + { + "top": "nwtN_8227939a-5dc0-433e-8c4d-987ec44a1f8f", + "bottom": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a", + "gap": 76.25 + }, + { + "top": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "bottom": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586", + "gap": 76.25 + }, + { + "top": "nwtN_3f7d61be-a016-4383-9b8d-8c1db26192f2", + "bottom": "nwtN_26c73172-708d-45cc-8ba5-f29671089767", + "gap": 76.25 + }, + { + "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "bottom": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78", + "gap": 76.25 + }, + { + "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "bottom": "nwtN_2d9c1f24-1482-46fb-a0f4-f963ba454710", + "gap": 76.25 + }, + { + "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "bottom": "nwtN_15fb1e74-6b08-4914-95ac-ee4ecb1b7f17", + "gap": 76.25 + }, + { + "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "bottom": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef", + "gap": 76.25 + }, + { + "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "bottom": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70", + "gap": 76.25 + }, + { + "top": "nwtN_9dfde51e-a410-4e3b-a472-9061ae4fae7a", + "bottom": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "gap": 76.25 + }, + { + "top": "nwtN_a186f2a4-524e-4a84-95c0-66d41dbda586", + "bottom": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52", + "gap": 76.25 + }, + { + "top": "nwtN_26c73172-708d-45cc-8ba5-f29671089767", + "bottom": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718", + "gap": 76.25 + }, + { + "top": "nwtN_a2bfb9bd-8b13-43a5-87a5-d88b0137bd78", + "bottom": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6", + "gap": 76.25 + }, + { + "top": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf", + "bottom": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e", + "gap": 76.25 + }, + { + "top": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "bottom": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "gap": 76.25 + }, + { + "top": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "bottom": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1", + "gap": 76.25 + }, + { + "top": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "bottom": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "gap": 76.25 + }, + { + "top": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "bottom": "nwtN_e55d29c7-89bc-4aa0-b599-3637e141f17f", + "gap": 76.25 + }, + { + "top": "nwtN_c261ca93-6060-49c1-8286-2a98900c3b9e", + "bottom": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "gap": 76.25 + }, + { + "top": "nwtN_2f175f07-154a-4873-98cc-bc4e4d6d13a1", + "bottom": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "gap": 76.25 + }, + { + "top": "nwtN_166d8364-fd55-499e-9098-0a48db6615c1", + "bottom": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "gap": 76.25 + }, + { + "top": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "bottom": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "gap": 76.25 + }, + { + "top": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "bottom": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "gap": 76.25 + }, + { + "top": "nwtN_02a50d8b-3939-492a-ac5b-1f356cd514f6", + "bottom": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70", + "gap": 76.25 + }, + { + "top": "nwtN_a68571c0-2669-4894-aa53-332555f625a2", + "bottom": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c", + "gap": 76.25 + }, + { + "top": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "bottom": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6", + "gap": 76.25 + }, + { + "top": "nwtN_205680d2-dc98-4faf-baf4-21e27e8585e4", + "bottom": "nwtN_8489a816-b7af-452f-a722-04d06226341c", + "gap": 76.25 + }, + { + "top": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "bottom": "nwtN_d4bf8470-416d-4387-a563-3c9cccf55079", + "gap": 76.25 + }, + { + "top": "nwtN_75318a95-e179-40fc-b6e1-e01fcd66cd8c", + "bottom": "nwtN_e48d9732-8ee0-4714-8b62-8de8238ec9c2", + "gap": 76.25 + }, + { + "top": "nwtN_bce869d1-7c58-4489-81aa-e87e9418ab70", + "bottom": "nwtN_103a9105-ef50-47a4-b501-840a431fcbdd", + "gap": 76.25 + }, + { + "top": "nwtN_8ed84db0-02da-43c6-847c-6b33f657f52c", + "bottom": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42", + "gap": 76.25 + }, + { + "top": "nwtN_6385f491-0d09-4d53-a34c-781a861e8b42", + "bottom": "nwtN_88e20782-9221-4b12-9b62-6a6c7116a70f", + "gap": 76.25 + }, + { + "top": "nwtN_167a075d-9d93-49d0-b5be-446efebec06c", + "bottom": "nwtN_be8097dc-4a84-4d3f-ade9-e80221f86dd6", + "gap": 76.25 + }, + { + "top": "nwtN_485d980b-dc42-48ca-9ada-3c1b754cc2ef", + "bottom": "nwtN_d53ea35c-4609-4051-917a-8a183e5976cf", + "gap": 76.25 + }, + { + "top": "nwtN_2cf0c5aa-67eb-4394-85e3-dc84f4b1cd52", + "bottom": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "gap": 76.25 + }, + { + "top": "nwtN_cc15f875-f4dd-4df8-a09e-a4f2e6c8a3f5", + "bottom": "nwtN_db35fc70-2b89-4857-acb2-9dd545e61447", + "gap": 76.25 + }, + { + "top": "nwtN_2b6ef682-26c7-48d7-9fd8-09fa76c7b718", + "bottom": "nwtN_eed8fc62-a21d-4677-85f2-f1244e3abf00", + "gap": 76.25 + } + ] +} diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/uwsn.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/uwsn.js new file mode 100644 index 0000000000000000000000000000000000000000..11a0f5e6503d11d2fb497c6484d74e77b1749bcf --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/uwsn.js @@ -0,0 +1,2303 @@ +uwsn = { + "elements": { + "nodes": [ + { + "data": { + "id": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54", + "bbox": { + "x": 155.38677910343796, + "y": 230.06625595029607, + "w": 140, + "h": 75 + }, + "class": "nucleic acid feature", + "label": "Surface\nBuoy 1", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#f4a582", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 155.38677910343796, + "y": 230.06625595029607 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd", + "bbox": { + "x": 584.0229153054016, + "y": 223.74407633970037, + "w": 140, + "h": 75 + }, + "class": "nucleic acid feature", + "label": "Surface\nBuoy 2", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#f4a582", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 584.0229153054016, + "y": 223.74407633970037 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66", + "bbox": { + "x": 964.8261492755391, + "y": 225.00851226181948, + "w": 140, + "h": 75 + }, + "class": "nucleic acid feature", + "label": "Surface\nBuoy 3", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#f4a582", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 964.8261492755391, + "y": 225.00851226181948 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134", + "bbox": { + "x": 149.1895292305374, + "y": 445.5622580973788, + "w": 140, + "h": 75 + }, + "class": "unspecified entity", + "label": "UW Sink 1", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 149.1895292305374, + "y": 445.5622580973788 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "661498c7-ace9-bd34-0289-7c9931d3e1ba", + "bbox": { + "x": 586.7621909195482, + "y": 383.25228042246914, + "w": 140, + "h": 75 + }, + "class": "unspecified entity", + "label": "UW Sink 2", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 586.7621909195482, + "y": 383.25228042246914 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c", + "bbox": { + "x": 966.963391645274, + "y": 484.473671607378, + "w": 140, + "h": 75 + }, + "class": "unspecified entity", + "label": "UW Sink 3", + "statesandinfos": [], + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 966.963391645274, + "y": 484.473671607378 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6", + "bbox": { + "x": -18.820589676794867, + "y": 580.4283573759083, + "w": 172.45719865368562, + "h": 192.7296338070105 + }, + "originalW": 200.45719865368562, + "originalH": 220.7296338070105, + "class": "submap", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": -18.82058967679486, + "y": 580.4283573759083 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_cbc5909d-c0a3-4be5-9c36-988ca48a9d30", + "bbox": { + "x": -65.92418900363768, + "y": 613.8182505696195, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s3", + "statesandinfos": [], + "parent": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": -65.92418900363768, + "y": 613.8182505696195 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_4a12169f-f588-4c76-bc39-2ae07f77d7c4", + "bbox": { + "x": -30.1493034389469, + "y": 523.188540472403, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s2", + "statesandinfos": [], + "parent": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": -30.1493034389469, + "y": 523.188540472403 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5", + "bbox": { + "x": -8.684372100132464, + "y": 578.043365004929, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s1", + "statesandinfos": [], + "parent": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": -8.684372100132464, + "y": 578.043365004929 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_48d663f4-edd0-4706-a5ca-5a87f77edf8e", + "bbox": { + "x": 28.28300965004796, + "y": 637.6681742794135, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s4", + "statesandinfos": [], + "parent": "nwtN_9ad406e1-da86-489d-84aa-627c8f5898e6", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 28.28300965004796, + "y": 637.6681742794135 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe", + "bbox": { + "x": 211.78152237753034, + "y": 586.7225735218967, + "w": 186.76715287956208, + "h": 162.91722916976835 + }, + "originalW": 214.76715287956208, + "originalH": 190.91722916976835, + "class": "submap", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 211.78152237753034, + "y": 586.7225735218967 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_2ecfaa1e-8dd3-4008-ac3d-6d4207f518b4", + "bbox": { + "x": 157.5229459377493, + "y": 544.3889589370125, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s7", + "statesandinfos": [], + "parent": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 157.5229459377493, + "y": 544.3889589370125 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086", + "bbox": { + "x": 209.99277809929575, + "y": 568.2388826468066, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s5", + "statesandinfos": [], + "parent": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 209.99277809929575, + "y": 568.2388826468066 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_1c41d32b-42f9-4e9f-a609-91c2eebbf28a", + "bbox": { + "x": 266.0400988173114, + "y": 550.3514398644611, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s6", + "statesandinfos": [], + "parent": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 266.0400988173114, + "y": 550.3514398644611 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_8af34100-fdea-4636-a978-fe75c7a38fb1", + "bbox": { + "x": 198.0678162443988, + "y": 629.0561881067808, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s8", + "statesandinfos": [], + "parent": "nwtN_a892743e-a23c-48b7-8d64-c6e77ca26bbe", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 198.0678162443988, + "y": 629.0561881067808 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae", + "bbox": { + "x": 463.24537734506043, + "y": 632.6006814534348, + "w": 178.41967958113423, + "h": 165.30222154074738 + }, + "originalW": 206.41967958113423, + "originalH": 193.30222154074738, + "class": "submap", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 463.24537734506043, + "y": 632.6006814534348 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661", + "bbox": { + "x": 458.47539260310174, + "y": 632.00443336069, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s9", + "statesandinfos": [], + "parent": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 458.47539260310174, + "y": 632.00443336069 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_78116f70-d871-4b8e-83cf-7b3a684067a7", + "bbox": { + "x": 413.1605375544933, + "y": 589.0745706830611, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s11", + "statesandinfos": [], + "parent": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 413.1605375544933, + "y": 589.0745706830611 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_348778d0-85d5-442f-b73a-9dd9f5d9f2b3", + "bbox": { + "x": 415.5455299254728, + "y": 676.1267922238085, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s12", + "statesandinfos": [], + "parent": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 415.5455299254728, + "y": 676.1267922238085 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_5c29f820-d40e-4c85-b7b6-c7b8a378b49d", + "bbox": { + "x": 513.3302171356275, + "y": 641.5444028446076, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s10", + "statesandinfos": [], + "parent": "nwtN_7a108aac-2ff5-4012-abc4-1f8418ef91ae", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 513.3302171356275, + "y": 641.5444028446076 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_13b19118-54eb-4400-a949-ca664386ec06", + "bbox": { + "x": 680.3516228408145, + "y": 630.668057701942, + "w": 185.57465669407202, + "h": 140.25980164546388 + }, + "originalW": 213.57465669407202, + "originalH": 168.25980164546388, + "class": "submap", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 680.3516228408145, + "y": 630.668057701942 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_c5547527-64c5-4e4d-acb8-e3f7e6b0a9a5", + "bbox": { + "x": 734.0139511878505, + "y": 661.6729585246738, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s15", + "statesandinfos": [], + "parent": "nwtN_13b19118-54eb-4400-a949-ca664386ec06", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 734.0139511878505, + "y": 661.6729585246738 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_6bf42b3c-579e-4187-8299-cb314373c278", + "bbox": { + "x": 626.6892944937784, + "y": 627.0905691454727, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s16", + "statesandinfos": [], + "parent": "nwtN_13b19118-54eb-4400-a949-ca664386ec06", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 626.6892944937784, + "y": 627.0905691454727 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_4d424656-f0bb-4154-9a51-1d15429c8f71", + "bbox": { + "x": 726.8589740749126, + "y": 599.66315687921, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s14", + "statesandinfos": [], + "parent": "nwtN_13b19118-54eb-4400-a949-ca664386ec06", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 726.8589740749126, + "y": 599.66315687921 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9", + "bbox": { + "x": 681.5441190263043, + "y": 631.8605538874315, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s13", + "statesandinfos": [], + "parent": "nwtN_13b19118-54eb-4400-a949-ca664386ec06", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 681.5441190263043, + "y": 631.8605538874315 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "0fcd19b1-d058-1326-c349-64cc1fce6569", + "bbox": { + "x": 880.0889730362344, + "y": 655.0860634639737, + "w": 178.41967958113423, + "h": 165.30222154074738 + }, + "originalW": 206.41967958113423, + "originalH": 193.30222154074738, + "class": "submap", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 880.0889730362344, + "y": 655.0860634639737 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "3aa07735-3104-5ae3-5b94-16be7319a912", + "bbox": { + "x": 930.1738128268015, + "y": 664.0297848551465, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s18", + "statesandinfos": [], + "parent": "0fcd19b1-d058-1326-c349-64cc1fce6569", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 930.1738128268015, + "y": 664.0297848551465 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "212adf44-8401-5b11-c49a-b43b67369698", + "bbox": { + "x": 832.3891256166468, + "y": 698.6121742343474, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s20", + "statesandinfos": [], + "parent": "0fcd19b1-d058-1326-c349-64cc1fce6569", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 832.3891256166468, + "y": 698.6121742343474 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "4f9485a2-a66f-2cf1-cc4e-126f7889fcd0", + "bbox": { + "x": 830.0041332456673, + "y": 611.5599526936, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s19", + "statesandinfos": [], + "parent": "0fcd19b1-d058-1326-c349-64cc1fce6569", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 830.0041332456673, + "y": 611.5599526936 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "5c108d5c-88e4-7b97-95a8-67238c33d283", + "bbox": { + "x": 875.3189882942758, + "y": 654.4898153712289, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s17", + "statesandinfos": [], + "parent": "0fcd19b1-d058-1326-c349-64cc1fce6569", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 875.3189882942758, + "y": 654.4898153712289 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "b4dac823-ff22-5ee3-02f8-825fcda40038", + "bbox": { + "x": 1150.256078598176, + "y": 628.0465159213652, + "w": 185.57465669407156, + "h": 140.25980164546388 + }, + "originalW": 213.57465669407156, + "originalH": 168.25980164546388, + "class": "submap", + "statesandinfos": [], + "language": "PD", + "border-width": 2.25, + "border-color": "#555555", + "background-color": "#f7f7f7", + "background-opacity": 0.5, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 14, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1150.256078598176, + "y": 628.0465159213652 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "f1bf3c87-1357-3ce2-4645-8cb4ed59ac9b", + "bbox": { + "x": 1203.9184069452117, + "y": 659.0514167440972, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s23", + "statesandinfos": [], + "parent": "b4dac823-ff22-5ee3-02f8-825fcda40038", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1203.9184069452117, + "y": 659.0514167440972 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "2f96a4e1-9767-4df9-6ad7-a4010baa376b", + "bbox": { + "x": 1096.5937502511401, + "y": 624.4690273648961, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s24", + "statesandinfos": [], + "parent": "b4dac823-ff22-5ee3-02f8-825fcda40038", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1096.5937502511401, + "y": 624.4690273648961 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "cae247cf-9ad9-695c-4042-09cfd4f23475", + "bbox": { + "x": 1196.7634298322737, + "y": 597.0416150986333, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s22", + "statesandinfos": [], + "parent": "b4dac823-ff22-5ee3-02f8-825fcda40038", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1196.7634298322737, + "y": 597.0416150986333 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "3ea6020e-8918-8abf-a8e5-62427070f84f", + "bbox": { + "x": 1151.4485747836657, + "y": 629.2390121068548, + "w": 75, + "h": 75 + }, + "class": "simple chemical", + "label": "s21", + "statesandinfos": [], + "parent": "b4dac823-ff22-5ee3-02f8-825fcda40038", + "language": "PD", + "border-width": 1.25, + "border-color": "#555555", + "background-color": "#fddbc7", + "background-opacity": 1, + "background-image-opacity": 1, + "text-wrap": "wrap", + "font-size": 26, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "bold", + "color": "#000000", + "background-image": "", + "ports": [], + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 1151.4485747836657, + "y": 629.2390121068548 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ], + "edges": [ + { + "data": { + "id": "nwtE_506a6914-916d-4822-ad99-2417ef62f8cd", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5c108d5c-88e4-7b97-95a8-67238c33d283", + "target": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c", + "portsource": "5c108d5c-88e4-7b97-95a8-67238c33d283", + "porttarget": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "dc17f173-0623-8bac-2b1f-edac5f91ccef", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "cae247cf-9ad9-695c-4042-09cfd4f23475", + "target": "3ea6020e-8918-8abf-a8e5-62427070f84f", + "portsource": "cae247cf-9ad9-695c-4042-09cfd4f23475", + "porttarget": "3ea6020e-8918-8abf-a8e5-62427070f84f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_fb874a56-2ff6-4ad3-862f-0cabfda9fbbe", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54", + "target": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134", + "portsource": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54", + "porttarget": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c9636997-63c2-4bee-ae9f-d07ea6e2cb43", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd", + "target": "661498c7-ace9-bd34-0289-7c9931d3e1ba", + "portsource": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd", + "porttarget": "661498c7-ace9-bd34-0289-7c9931d3e1ba" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_9d07cf77-da86-48b4-9626-9bc6f90143b5", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66", + "target": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c", + "portsource": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66", + "porttarget": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_800ad693-8319-44d5-b92a-2b6ec4e4e8fa", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3ea6020e-8918-8abf-a8e5-62427070f84f", + "target": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c", + "portsource": "3ea6020e-8918-8abf-a8e5-62427070f84f", + "porttarget": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7c04db5c-d599-40e2-830f-bd36c28457f1", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_5c29f820-d40e-4c85-b7b6-c7b8a378b49d", + "target": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661", + "portsource": "nwtN_5c29f820-d40e-4c85-b7b6-c7b8a378b49d", + "porttarget": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_4aa3c2db-45bc-4058-91ea-acefd5b0e2bd", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_348778d0-85d5-442f-b73a-9dd9f5d9f2b3", + "target": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661", + "portsource": "nwtN_348778d0-85d5-442f-b73a-9dd9f5d9f2b3", + "porttarget": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_0abb0b43-af9c-4579-823d-47b3acefb54b", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_78116f70-d871-4b8e-83cf-7b3a684067a7", + "target": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661", + "portsource": "nwtN_78116f70-d871-4b8e-83cf-7b3a684067a7", + "porttarget": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_52d8b99f-3024-4c79-8f34-b74276f3a3ed", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_4a12169f-f588-4c76-bc39-2ae07f77d7c4", + "target": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5", + "portsource": "nwtN_4a12169f-f588-4c76-bc39-2ae07f77d7c4", + "porttarget": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_906e4f53-8ebe-4246-bd59-88b38a7071f0", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_cbc5909d-c0a3-4be5-9c36-988ca48a9d30", + "target": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5", + "portsource": "nwtN_cbc5909d-c0a3-4be5-9c36-988ca48a9d30", + "porttarget": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3e77a1b5-2418-4dfc-b77d-b6280a5ea798", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_48d663f4-edd0-4706-a5ca-5a87f77edf8e", + "target": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5", + "portsource": "nwtN_48d663f4-edd0-4706-a5ca-5a87f77edf8e", + "porttarget": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a3959383-0737-483f-a751-6bf0d2b78896", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_2ecfaa1e-8dd3-4008-ac3d-6d4207f518b4", + "target": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086", + "portsource": "nwtN_2ecfaa1e-8dd3-4008-ac3d-6d4207f518b4", + "porttarget": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c7945a01-b5ed-4fc6-a3c9-f80c5ee23dda", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_8af34100-fdea-4636-a978-fe75c7a38fb1", + "target": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086", + "portsource": "nwtN_8af34100-fdea-4636-a978-fe75c7a38fb1", + "porttarget": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c2945754-dd7e-4947-95cd-b66c3dd776df", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_1c41d32b-42f9-4e9f-a609-91c2eebbf28a", + "target": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086", + "portsource": "nwtN_1c41d32b-42f9-4e9f-a609-91c2eebbf28a", + "porttarget": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_49b115c1-d8f4-4f9f-80f2-da43dec66241", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_c5547527-64c5-4e4d-acb8-e3f7e6b0a9a5", + "target": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9", + "portsource": "nwtN_c5547527-64c5-4e4d-acb8-e3f7e6b0a9a5", + "porttarget": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_17eb1da9-aaf4-463a-896c-a1ec8f37a6f2", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_6bf42b3c-579e-4187-8299-cb314373c278", + "target": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9", + "portsource": "nwtN_6bf42b3c-579e-4187-8299-cb314373c278", + "porttarget": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_2d6fbdec-29c8-46af-9fee-090c2fb9bc75", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_4d424656-f0bb-4154-9a51-1d15429c8f71", + "target": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9", + "portsource": "nwtN_4d424656-f0bb-4154-9a51-1d15429c8f71", + "porttarget": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_8b26c6e4-8035-4465-a038-a6219ba54bee", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5", + "target": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134", + "portsource": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5", + "porttarget": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a6d29cf3-24a6-4b0c-88b3-df08fda0825c", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086", + "target": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134", + "portsource": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086", + "porttarget": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_cb84a698-6aee-4c1a-a9d8-e5eb87797a59", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661", + "target": "661498c7-ace9-bd34-0289-7c9931d3e1ba", + "portsource": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661", + "porttarget": "661498c7-ace9-bd34-0289-7c9931d3e1ba" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_bf55af04-2f1f-432d-8d32-60486b9c5d08", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9", + "target": "661498c7-ace9-bd34-0289-7c9931d3e1ba", + "portsource": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9", + "porttarget": "661498c7-ace9-bd34-0289-7c9931d3e1ba" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "cae87ba6-1f44-b148-a8fa-e9b93fca71dd", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3aa07735-3104-5ae3-5b94-16be7319a912", + "target": "5c108d5c-88e4-7b97-95a8-67238c33d283", + "portsource": "3aa07735-3104-5ae3-5b94-16be7319a912", + "porttarget": "5c108d5c-88e4-7b97-95a8-67238c33d283" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "cba4c2db-9aa8-2429-37b7-ef58e51ccef5", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "212adf44-8401-5b11-c49a-b43b67369698", + "target": "5c108d5c-88e4-7b97-95a8-67238c33d283", + "portsource": "212adf44-8401-5b11-c49a-b43b67369698", + "porttarget": "5c108d5c-88e4-7b97-95a8-67238c33d283" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "75e10cd7-b168-147e-9842-dd6859a94e61", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "4f9485a2-a66f-2cf1-cc4e-126f7889fcd0", + "target": "5c108d5c-88e4-7b97-95a8-67238c33d283", + "portsource": "4f9485a2-a66f-2cf1-cc4e-126f7889fcd0", + "porttarget": "5c108d5c-88e4-7b97-95a8-67238c33d283" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "20b1d70b-c88f-acaf-0ced-07374db84055", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "f1bf3c87-1357-3ce2-4645-8cb4ed59ac9b", + "target": "3ea6020e-8918-8abf-a8e5-62427070f84f", + "portsource": "f1bf3c87-1357-3ce2-4645-8cb4ed59ac9b", + "porttarget": "3ea6020e-8918-8abf-a8e5-62427070f84f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "1fefa878-d380-55e4-4d18-ec760fc294f4", + "class": "production", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "2f96a4e1-9767-4df9-6ad7-a4010baa376b", + "target": "3ea6020e-8918-8abf-a8e5-62427070f84f", + "portsource": "2f96a4e1-9767-4df9-6ad7-a4010baa376b", + "porttarget": "3ea6020e-8918-8abf-a8e5-62427070f84f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ] + }, + "style": [ + { + "selector": "node", + "style": { + "shape": "rectangle", + "text-halign": "center", + "text-valign": "center", + "font-weight" : "normal", + "background-color": "#ffffff", + "opacity": "1", + "border-color": "#555555" + } + }, + { + "selector": "node[class = 'simple chemical']", + "style": { + "shape": "ellipse", + "font-size": 14, + "background-color": "#fddbc7" + } + }, + { + "selector": "node[class = 'macromolecule']", + "style": { + "shape": "roundrectangle" + } + }, + { + "selector": "node[class = 'unspecified entity']", + "style": { + "shape": "ellipse", + "background-color": "#f7f7f7" + } + }, + { + "selector": "node[class = 'nucleic acid feature']", + "style": { + "shape": "rectangle", + "background-color": "#f4a582", + } + }, + { + "selector": ":parent", + "style": { + "background-opacity": "0.333", + "text-valign": "bottom", + "shape": "barrel", + "text-margin-y": "2px", + "font-weight" : "normal", + "border-color": "#555555" + } + }, + { + "selector": "node:selected", + "style": { + "background-color": "#33ff00", + "border-color": "#22ee00" + } + }, + { + "selector": "edge", + "style": { + "curve-style": "bezier", + "width": "2px", + "line-color": "rgb(58,126,207)", + "opacity": "1" + } + }, + { + "selector": "edge:selected", + "style": { + "line-color": "#33ff00", + "font-size": "13px", + "text-opacity": "1", + "text-rotation": "autorotate", + "color": "#33ff00", + "font-weight": "bold", + "text-background-shape": "roundrectangle", + "text-background-opacity": "1", + "text-background-padding": "2px" + } + }, + { + "selector": "edge[class = 'production']", + "style": { + "target-arrow-shape": "triangle", + "target-arrow-color": "rgb(58,126,207)" + } + }, + { + "selector": "edge:selected[class = 'production']", + "style": { + "target-arrow-shape": "triangle", + "target-arrow-color": "#33ff00" + } + }, + ], + "zoomingEnabled": true, + "userZoomingEnabled": true, + "zoom": 0.8925320450269244, + "minZoom": 0.125, + "maxZoom": 16, + "panningEnabled": true, + "userPanningEnabled": true, + "pan": { + "x": 128.15184671589566, + "y": -93.65929006599106 + }, + "boxSelectionEnabled": true, + "renderer": { + "name": "canvas" + }, + "wheelSensitivity": 0.1, + "motionBlur": true +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/uwsn_constraints.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/uwsn_constraints.js new file mode 100644 index 0000000000000000000000000000000000000000..0231cb3f8f14009d9dbd83cc2de340cfee4195c3 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/uwsn_constraints.js @@ -0,0 +1,88 @@ +uwsn_constraints = { + "fixedNodeConstraint": [ + { + "nodeId": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54", + "position": { + "x": -650, + "y": -230 + } + }, + { + "nodeId": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd", + "position": { + "x": 0, + "y": -230 + } + }, + { + "nodeId": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66", + "position": { + "x": 650, + "y": -230 + } + } + ], + "alignmentConstraint": { + "vertical": [ + [ + "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54", + "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134" + ], + [ + "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd", + "661498c7-ace9-bd34-0289-7c9931d3e1ba" + ], + [ + "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66", + "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c" + ] + ] + }, + "relativePlacementConstraint": [ + { + "top": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134", + "bottom": "nwtN_be627c29-b885-460c-bf92-8f9bb7b8c8c5", + "gap": 100 + }, + { + "top": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134", + "bottom": "nwtN_64abed47-d1b1-474c-b944-b9ad6354c086", + "gap": 100 + }, + { + "top": "661498c7-ace9-bd34-0289-7c9931d3e1ba", + "bottom": "nwtN_0185dada-235a-4b51-bce7-e8bd3b8ee661", + "gap": 100 + }, + { + "top": "661498c7-ace9-bd34-0289-7c9931d3e1ba", + "bottom": "nwtN_273f6927-f05a-425b-aa2b-92de2be06bd9", + "gap": 100 + }, + { + "top": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c", + "bottom": "5c108d5c-88e4-7b97-95a8-67238c33d283", + "gap": 100 + }, + { + "top": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c", + "bottom": "3ea6020e-8918-8abf-a8e5-62427070f84f", + "gap": 100 + }, + { + "top": "nwtN_5d6f7198-03e4-48e5-9004-919221f87e66", + "bottom": "aeee80bf-8280-f4ec-c1f3-26f3a7a0651c", + "gap": 250 + }, + { + "top": "nwtN_b20cc3f4-dc9c-4031-ac79-df665d4c53cd", + "bottom": "661498c7-ace9-bd34-0289-7c9931d3e1ba", + "gap": 250 + }, + { + "top": "nwtN_91cff953-5f55-4626-96fa-e2f675e13e54", + "bottom": "nwtN_7e09bf9e-a4da-4618-baba-60a2b3a0b134", + "gap": 250 + } + ] +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/wsn.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/wsn.js new file mode 100644 index 0000000000000000000000000000000000000000..ca2e615cae2703b9eb615ec21e8df51c5ec8f8f3 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/wsn.js @@ -0,0 +1,7640 @@ +wsn = { + "elements": { + "nodes": [ + { + "data": { + "id": "86f48f58-145d-92cc-0d33-aaf639984733", + "bbox": { + "x": 918.6946839627489, + "y": 268.1553060642376, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a6", + "statesandinfos": [], + "language": "PD", + "border-width": 0.000, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 918.6946839627489, + "y": 268.1553060642376 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "67add58f-1a8c-17d9-8cfa-ff468527f6c9", + "bbox": { + "x": 910.624263262373, + "y": 209.60764253071486, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u1", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABw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vN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 910.624263262373, + "y": 209.60764253071486 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "bbox": { + "x": 777.4499113106275, + "y": 242.69847222540457, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u2", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAA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r1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 777.4499113106275, + "y": 242.69847222540457 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "9bf069c9-034b-1bee-35e5-2d2addaeaf38", + "bbox": { + "x": 779.0933397934479, + "y": 279.18258454401627, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u3", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAA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JAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 779.0933397934479, + "y": 279.18258454401627 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "bbox": { + "x": 728.8044282191453, + "y": 278.85389884745223, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u4", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCS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gaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 728.8044282191453, + "y": 278.85389884745223 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "7435cbfb-9e49-d44e-4357-c413a22e188a", + "bbox": { + "x": 727.4896854328889, + "y": 324.2125249732938, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u5", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/g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VJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 727.4896854328889, + "y": 324.2125249732938 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "bbox": { + "x": 648.8383670046286, + "y": 373.40718335288847, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a9", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5J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IJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 648.8383670046286, + "y": 373.40718335288847 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4", + "bbox": { + "x": 829.3822513677504, + "y": 328.15675333206264, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u6", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBf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C4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 829.3822513677504, + "y": 328.15675333206264 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7", + "bbox": { + "x": 831.3543655471349, + "y": 295.94555506878385, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u7", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQh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wjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 831.3543655471349, + "y": 295.94555506878385 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "bbox": { + "x": 826.7527657952379, + "y": 258.804071357044, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u8", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhG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U66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 826.7527657952379, + "y": 258.804071357044 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "1eee479d-d3a1-44d9-316e-b70bc4556169", + "bbox": { + "x": 614.0181970745487, + "y": 498.44324810181206, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u9", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaL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of9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 614.0181970745487, + "y": 498.44324810181206 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "96f4c006-33d1-a00e-a389-782f23c38a65", + "bbox": { + "x": 777.1212256140635, + "y": 374.1727508510323, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u10", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6Gl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z09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 777.1212256140635, + "y": 374.1727508510323 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8", + "bbox": { + "x": 833.9838511196474, + "y": 373.1866937613401, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u11", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDv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dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 833.9838511196474, + "y": 373.1866937613401 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "267b649b-6d09-255c-67b4-46bd2c40375e", + "bbox": { + "x": 735.3781421504267, + "y": 375.8161793338527, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u12", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsix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ZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 735.3781421504267, + "y": 375.8161793338527 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b", + "bbox": { + "x": 689.3621446314569, + "y": 372.529322368212, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u13", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+a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6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 689.3621446314569, + "y": 372.529322368212 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "33f80abd-028e-ad1c-068b-33d5b40d9a93", + "bbox": { + "x": 564.9534121730723, + "y": 455.709403187623, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a12", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KU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X/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 564.9534121730723, + "y": 455.709403187623 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "d036dd9f-8368-bfac-a080-87b82544be20", + "bbox": { + "x": 696.9219156524304, + "y": 326.8420105458064, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u14", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6Oz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zvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 696.9219156524304, + "y": 326.8420105458064 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "b45bf870-2439-dc1d-38f2-fc491752ff05", + "bbox": { + "x": 655.1788321887938, + "y": 324.8698963664219, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u15", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKys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ElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 655.1788321887938, + "y": 324.8698963664219 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1", + "bbox": { + "x": 692.9776872936616, + "y": 277.5391560611959, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u16", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7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SuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 692.9776872936616, + "y": 277.5391560611959 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "2b855d36-0c89-996d-9281-ea54f711cc8e", + "bbox": { + "x": 723.2269118552542, + "y": 156.5724887882993, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a1", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 723.2269118552542, + "y": 156.5724887882993 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb", + "bbox": { + "x": 701.8522011008915, + "y": 242.04110083227644, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u17", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKp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ZIAgGQyyTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 701.8522011008915, + "y": 242.04110083227644 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d", + "bbox": { + "x": 659.1230605475625, + "y": 239.4116152597639, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u18", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pS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yTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 659.1230605475625, + "y": 239.4116152597639 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "16102c94-c326-51c3-8636-3ae19b603483", + "bbox": { + "x": 827.5998410823756, + "y": 419.9455390609479, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u19", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnb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aVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 827.5998410823756, + "y": 419.9455390609479 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "e833b238-0bb7-c5d2-ebec-aa0604bcd484", + "bbox": { + "x": 772.0136740057479, + "y": 420.8797603563535, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u20", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkM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ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 772.0136740057479, + "y": 420.8797603563535 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "7e30e3e1-7f31-1080-0970-22d019957584", + "bbox": { + "x": 735.3590911745005, + "y": 465.98770776577527, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u21", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVK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y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 735.3590911745005, + "y": 465.98770776577527 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "11284cd9-d716-52f7-20c7-5d1750de5309", + "bbox": { + "x": 693.0719745439824, + "y": 417.60998582243417, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u22", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n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3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 693.0719745439824, + "y": 417.60998582243417 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "b386ca2b-81a7-e365-4706-f955f13db03f", + "bbox": { + "x": 830.061524140727, + "y": 500.0259830986339, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a14", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 830.061524140727, + "y": 500.0259830986339 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "db182fe4-ce6c-7869-72ce-7a4b11327e3a", + "bbox": { + "x": 606.6565047189728, + "y": 416.67576452702866, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u23", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAAN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4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 606.6565047189728, + "y": 416.67576452702866 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "97d3df31-9033-96c4-359d-08ed397b29c4", + "bbox": { + "x": 608.5249473097838, + "y": 367.16203587053667, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u24", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwA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N8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 608.5249473097838, + "y": 367.16203587053667 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "91966017-4d7f-7634-6823-1a405da45139", + "bbox": { + "x": 597.7814024126204, + "y": 327.9247414635053, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u25", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPA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KJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 597.7814024126204, + "y": 327.9247414635053 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "1998dad6-f944-21b8-11dc-05d4cebd39e6", + "bbox": { + "x": 612.2618324914058, + "y": 289.6216683518794, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u26", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSV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aIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 612.2618324914058, + "y": 289.6216683518794 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "45d5101e-e0a1-821c-37d6-378cbd632d55", + "bbox": { + "x": 605.2551727758645, + "y": 246.64748876322597, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u27", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gA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JpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 605.2551727758645, + "y": 246.64748876322597 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "97f86367-eafd-54f7-4951-8360862b846f", + "bbox": { + "x": 825.2642878438619, + "y": 461.9854973541959, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u28", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2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r11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 825.2642878438619, + "y": 461.9854973541959 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "bbox": { + "x": 777.619001778181, + "y": 461.9854973541959, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u29", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQ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AgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 777.619001778181, + "y": 461.9854973541959 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "8edd562b-196b-4f7e-37bf-a9e2072917b0", + "bbox": { + "x": 918.3078371044154, + "y": 397.88472998291235, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u30", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1z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ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 918.3078371044154, + "y": 397.88472998291235 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "f3fc754e-1421-a039-0ef0-c2d989db228e", + "bbox": { + "x": 701.0128555549292, + "y": 461.5183867064931, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u31", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG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/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 701.0128555549292, + "y": 461.5183867064931 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "3a85e050-463c-f484-c100-9d39adb1a23e", + "bbox": { + "x": 656.6373440231675, + "y": 459.1828334679793, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u32", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8d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fLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 656.6373440231675, + "y": 459.1828334679793 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "bbox": { + "x": 608.5249473097838, + "y": 457.7815015248711, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u33", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUW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HivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 608.5249473097838, + "y": 457.7815015248711 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "c54786e2-bbea-d15b-3e21-7cf32b9338ca", + "bbox": { + "x": 773.5200858791309, + "y": 200.08021628162345, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u34", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE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VdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 773.5200858791309, + "y": 200.08021628162345 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2", + "bbox": { + "x": 724.4863719898078, + "y": 199.08963620305127, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u35", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+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ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 724.4863719898078, + "y": 199.08963620305127 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "25f4cc48-4e4e-e80e-174f-fa4ba64616da", + "bbox": { + "x": 699.226579986217, + "y": 195.12731588876252, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u36", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9O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qD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 699.226579986217, + "y": 195.12731588876252 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "bbox": { + "x": 656.1363465683271, + "y": 199.58492624233736, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u37", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlg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6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 656.1363465683271, + "y": 199.58492624233736 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921", + "bbox": { + "x": 869.6298990612723, + "y": 402.68778079409213, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a11", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3R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o9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 869.6298990612723, + "y": 402.68778079409213 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "bbox": { + "x": 871.8902896484761, + "y": 237.60001383886802, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u38", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjC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gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 871.8902896484761, + "y": 237.60001383886802 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a", + "bbox": { + "x": 868.5711254822504, + "y": 279.42148233331346, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u39", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0P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nThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 868.5711254822504, + "y": 279.42148233331346 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "e98b25fb-7352-b78a-de16-240d09bda830", + "bbox": { + "x": 870.562623981986, + "y": 315.2684553285524, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u40", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSA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6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 870.562623981986, + "y": 315.2684553285524 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "bbox": { + "x": 871.8902896484761, + "y": 359.0814223227333, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u41", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaO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IJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 871.8902896484761, + "y": 359.0814223227333 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da", + "bbox": { + "x": 918.3259027243886, + "y": 342.9041536102673, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u42", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj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NZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 918.3259027243886, + "y": 342.9041536102673 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "06fddad6-2abd-3413-6e24-a955f0763c53", + "bbox": { + "x": 871.2264568152311, + "y": 449.36268764407583, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u43", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMz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X19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 871.2264568152311, + "y": 449.36268764407583 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "99f5cbe5-2c57-75ff-52b8-99e2baad068b", + "bbox": { + "x": 918.1656828079734, + "y": 444.6994869196927, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u44", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVS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pcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 918.1656828079734, + "y": 444.6994869196927 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "30c49899-09d0-818a-a71d-fd15346f65e5", + "bbox": { + "x": 776.2983616611724, + "y": 501.1416486371987, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u45", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjz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5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 776.2983616611724, + "y": 501.1416486371987 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "ed36ef56-dd89-40e1-251c-09f13686eb66", + "bbox": { + "x": 731.8215618337465, + "y": 499.15015013746324, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u46", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBY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9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 731.8215618337465, + "y": 499.15015013746324 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "7078c4e8-4b4c-0563-9938-8af2c753f92c", + "bbox": { + "x": 690.000093339301, + "y": 496.4948188044825, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u47", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZW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0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 690.000093339301, + "y": 496.4948188044825 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "115069e9-e7e3-51e4-da42-481b318e5f1f", + "bbox": { + "x": 646.4945146902844, + "y": 421.97873928869126, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u48", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+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VRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 646.4945146902844, + "y": 421.97873928869126 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "bbox": { + "x": 733.5146893345959, + "y": 417.7237632638994, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a10", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 733.5146893345959, + "y": 417.7237632638994 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "979162a0-08fc-54e2-0ba2-b54b2eb59266", + "bbox": { + "x": 569.8463505219261, + "y": 491.18415613852125, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u49", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfU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7XRCERCLxG5byPB8Oh3me1+v1er2+5hRSq9U4jsuynMvllNrrTFCGYRYXF3meVyqJ2gkwjGGYEqrpdPpkbV4fWi6X19bWeJ43GAwEQZwcgGEYSZIAgGQyyTDMmaAcx4VCIaVMpCjq5ACNRmMwGMA/Y/lMUEEQdnd3RVE0m80n3QcAEATR2toKANjb22NZ9qzQdDqtQOtaSpKkUuYlEomzui+KYi6XkySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 569.8463505219261, + "y": 491.18415613852125 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "bbox": { + "x": 780.2053717408396, + "y": 327.5078684450557, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a7", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 780.2053717408396, + "y": 327.5078684450557 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "73cc39db-10c0-542a-7d9f-198fa3e0975e", + "bbox": { + "x": 567.8548520221906, + "y": 416.1710459818175, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u50", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6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ySp0ZpSFNXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 567.8548520221906, + "y": 416.1710459818175 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc", + "bbox": { + "x": 565.19952068921, + "y": 371.0304133211462, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u51", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg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NXV1aVYWi6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 565.19952068921, + "y": 371.0304133211462 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "bbox": { + "x": 563.2080221894744, + "y": 319.91528516126857, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u52", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b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i6X/xyq/OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 563.2080221894744, + "y": 319.91528516126857 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "fb9ad239-d112-d0f9-ed9e-90db5f147e54", + "bbox": { + "x": 563.8718550227195, + "y": 282.7406464995393, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u53", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5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OAsyyIIYjAYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 563.8718550227195, + "y": 282.7406464995393 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "bbox": { + "x": 557.2335266902679, + "y": 246.89367350430035, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u54", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQA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AYaoJUkV6vdzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 557.2335266902679, + "y": 246.89367350430035 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "0998ddcc-de7b-792a-5b2e-c53317128a7c", + "bbox": { + "x": 565.19952068921, + "y": 193.12321401144197, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u55", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQAtLW1NYR6PB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dzgcAIDd3d1sNsuybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 565.19952068921, + "y": 193.12321401144197 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "b51264f6-8497-2eff-8d96-1264b5650804", + "bbox": { + "x": 524.8916916534773, + "y": 432.64343313504395, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u56", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLMzMzVq1dTqVSlUlleXg4EAjzPV4/JZrPBYHBra0uW5ZWVlXv37r148UL+Vb+4v7q6GovFJiYmTCZTMpl89erV9+/fAQAsywaDwWg0qqzJ8vLys2fPOI5zu92dnZ3pdHp9fb2h+4lEIpfLDQ0NoSg6OzuL43h7e/vKysrs7Oz29rZKpert7b1y5YrVatVoNG/evLl27ZrD4QiHw7FYrL+/vz40nU6XSqXu7m4AwPv376empsxms8/nm56epmlakqTFxUUURScnJz0ez9u3bycmJhRoIpGo5vzLfUmSaJoWBMFisYiimEqlSJJkWTYcDudyOYIgNBrN3t5eMBikadpisUQiEUEQzGYzACCTydR3XxRFAIBKpZJluVKpVG86DMNqtVqWZUEQIAj6x27AMARBKpVKMai+pSiKWiwWDMN2dnbUarXD4chkMkaj8eLFiyqVKpVKZbNZnU7n9XpbWlri8fiFCxcwDItGowCAmpD6ZfetVitBEKFQCABw9+7dQCCwuro6Pj7+6NEjAABJkg8fPrx58+b29rbf779//z5Jkj9//gQAtLW1NYR6PB6LxTI/Py8IwvD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suybE3A1kIZhtnf35dlmSRJkiTrJiFlo2AYPjg4SKfTJ7m10IODA+VSZDKZGlVUx6EqiuLR0dHBwUEul2MYRkn7daD5fD4WiwEAbDabRqOpC1W4FEXBMKxYyvN8oVAolUr1oblcLhKJAACam5tPgaIoarPZVCpVJpOhaRoAIAiCsr11oMViMZlMAgDsdrtWq20ERRCkBirLMs/zgiBIklQLLZfLh4eHivunQNVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 524.8916916534773, + "y": 432.64343313504395 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4", + "bbox": { + "x": 737.4715268266505, + "y": 237.29197362621204, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a4", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 737.4715268266505, + "y": 237.29197362621204 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "f6ded9c4-6e94-ee99-6d4e-aebba05882db", + "bbox": { + "x": 513.3252115266342, + "y": 268.0435236376609, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u57", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtm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NVqdVdXF4Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 513.3252115266342, + "y": 268.0435236376609 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "3b233452-0a1c-6c51-703a-b62ca9951f2b", + "bbox": { + "x": 603.1878648198002, + "y": 156.82736857186146, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u58", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9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Ig2WxWgSqqD+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 603.1878648198002, + "y": 156.82736857186146 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "8e47cd39-5258-1c70-06ab-96f28782e065", + "bbox": { + "x": 680.5943087455965, + "y": 151.4889931287031, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u59", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9Oh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D+U4TnkXUC6gjaAajaavrw9F0aOjo2po/TWVJEnJZhaL5ZR6GsMwh8OBIMjh4WE+nz9uV66BtVAURZWAZxhGuVieLo7jqlOqclOohR7/gjMzMxsbG3XzBcuyoVDo+fPnNE27XC4lD8AwjOO4cqOtPU66u7tv3LgRDof9fr8gCEtLSz09PR0dHa2trZIkZbPZSCSyvr6+sbGxsLCAIMjIyIjb7YYgSEmyivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 680.5943087455965, + "y": 151.4889931287031 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "bbox": { + "x": 826.8960541470833, + "y": 210.3854786802411, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a3", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXj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vw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 826.8960541470833, + "y": 210.3854786802411 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "7b23c6ae-4256-a918-0c9b-0254d83a908b", + "bbox": { + "x": 782.0234421656056, + "y": 162.16574401501987, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u60", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDs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ivtQzWOX8gjx9OnThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 782.0234421656056, + "y": 162.16574401501987 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "3f913ee3-7737-5405-968d-312653a7c318", + "bbox": { + "x": 847.8634059645589, + "y": 177.29114110396856, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u61", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0P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nThYWFVCpFUZTT6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 847.8634059645589, + "y": 177.29114110396856 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "9190744c-1571-616b-e75e-1c00d977a78d", + "bbox": { + "x": 816.7228825461351, + "y": 548.3082344034754, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u62", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiS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T6VSgyltHJBIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 816.7228825461351, + "y": 548.3082344034754 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "aed099f2-5b0a-d59c-c297-9bac5ded0736", + "bbox": { + "x": 740.2061678608651, + "y": 545.6390466818962, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u63", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRa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BIJBALZbNZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 740.2061678608651, + "y": 545.6390466818962 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628", + "bbox": { + "x": 686.8224134292814, + "y": 548.3082344034754, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u64", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj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NZutw8PD09NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 686.8224134292814, + "y": 548.3082344034754 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "67ff3c4c-e646-5c50-0e37-16e9a39da28a", + "bbox": { + "x": 611.1954279845379, + "y": 543.8595882008434, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "u65", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAABACAIAAACGI4BPAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAB8dJREFUWIXtmMtPE+8ax9+ZzkwvM9OhN9pyK5jSlgCNgsRAICYQw8LoQl2gKxcmLv0HjDFu3bhz4YYYVhJjTEyoJpqI0WC5JYCU0gu1NC3l0tu007l0Zn6LOYdTS8sPz/mdk/yS812+l888z/s+87zP+0KyLIO/WvBfTvwfQhmGWVpaYhhGkqRG00RRLBaLW1tbhULhz6GlUikcDvt8vlKpdIotsixzHOfz+aLRKMdxNb1IzdB4PP7x48dkMgnDsCAIMAwjCAJB0PEYSZJEUZQkiSAIv99PEITRaOzo6Kj95rHK5fLM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NTfX19eE4rtPpcByHFJ18QeN5fm9v7+XLl9++fUskEjRNl0olJRthGIbjOEVRdrt9dHT09u3bZrMZRVEEQapDpQ70WIlEYmNjY3Fx8cePH8FgEABgs9n6+/vHxsYGBweVuqquToP+2/r7XCT+K9A/AN6eWQAzvN+SAAAAAElFTkSuQmCC", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 611.1954279845379, + "y": 543.8595882008434 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "bbox": { + "x": 653.5865719950941, + "y": 498.4432481018122, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a13", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 653.5865719950941, + "y": 498.4432481018122 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "bd77a77c-4627-ad77-1c5a-2c390ba21959", + "bbox": { + "x": 515.097259773185, + "y": 349.6661584005612, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a8", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 515.097259773185, + "y": 349.6661584005612 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "bbox": { + "x": 657.5434094871487, + "y": 283.19128853404476, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a5", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAyCAYAAABYiSsbAAAABHNCSVQICAgIfAhkiAAABA5JREFUWIXtmM9LI2cYxz9KCOlWcOpqjew2zYK1Uy00tLDMoTShFISePOptLwvpf5C7B28rCCVKDwUv8b6H4M01oBEPsXjQ6iFx3RqruA4eHAkl3x6aGYyZSWLZFgr9wsv78j7zfvLM+zzvj0mPJPEPqNevs1KpsL+/3xWgWCxi23arQXfkOI7i8bgsy7prapHjOAI0PT3dYmsBp9NpAcrn83IcR3t7e77Qzc1NSVImkxGgXC4XDC6VSk0epFIpGYbRAnWfm5ub894wGo3KcRx/8NzcnADt7e0pm80KUCaTkSTNzs5qcnJShUJBkmRZliKRiMrlsubn5wWoVCr5g6empjwP3bbjOJqZmRHglZWVFW1ubgrQ/Py8185ms/5g0zS9oN1u9/X1KQz6qQGenJz0ApdOp5varprSLRqNcnp6CoBhGF4axWIxasAPjefGxsY8m2EY3pjh4WH/PE4kElQqFWzbxrIs9vf3WVtbY2lpiXA4zB/AxMQECwsLLC4uApBMJtnZ2fHG++ZxLpfz5q1arcowDJmmKUlKJpMCVCgUVC6XFYlElEqlvHgAqlar/nPsOI5M0/Sinc/nvay4Db68vFQ6nVa5XPacuT2/LWBJXoSnpqaa+m+DbzsSjUYVj8ebcrgleACWZZHNZjFNs3X9+yiRSJDL5YhEIs2Gux4Hyc/jdvLd3d6F/gf/h8Ed0y2fzyuVSnlb5sjIiKanpwNPFldtwevr6wqFQvpwaEifPX4sQNb4uAD19/e3rLauwe7m8olh6EdQBPQr6NHAgAAtLy8Hjm07x0dHRwAc2jazQ0NYiQRfhMP89vYtANvb24Fj24KPj48JAT8D5vk57OyQqtV40bDv7u7+veCFw2ENguRTekCjo6P3nwrbtqnVanwUYH/Q00O1Wr3/VGxsbADwcYD9Awnn+vr+4EKhAMBXAfY4UJc4ODi4H9i9FH4ZYP+0UW9tbd0P7HryfYDd/UF3yroGn52dEQ4yAt816sDrbmC69PZqJCDVbqdcLBbrPt1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 657.5434094871487, + "y": 283.19128853404476 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "bbox": { + "x": 606.1045220904394, + "y": 197.72359870566655, + "w": 20, + "h": 40 + }, + "class": "macromolecule", + "label": "a2", + "statesandinfos": [], + "language": "PD", + "border-width": 0.001, + "border-color": "#555555", + "background-color": "#ffffff", + "background-opacity": 1, + "background-image-opacity": "1 1", + "text-wrap": "wrap", + "font-size": 11, + "font-family": "Helvetica", + "font-style": "normal", + "font-weight": "normal", + "color": "#000", + "background-image": "data:image/png;base64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1s26ZerxNt4zHAA+Di4sLX5gteXV0FoNM5/RC4Dkg5X7B7ZRrvAI4Bknj98iXUap3BpVIJgFQH8OeNevfFCwg3h9oXfHx8DMDXHcDu4lktFuHmpjP45OSkbaq5+qZRl25uoFjsDL66uuJhF+AxoAd4DfDqVXvw0dER9Xo9cPO5q/eBc4A3b9qDi41XetIleAC4AXj+vKk/dPfBw8NDoHOquXoCfPvsGTx92my4uxRXVlb+Oo07LGe3PDKMppu8K9+9wjAMAUqCKgHAX0Cjjc8KP/mCK5WK+vr6vEuK0XiDZKO81+hPJBJBe1j7e0Umk9Hg4KBCoVDTB2Rvb6/G43H9XqkEju2R/sX/K96F/gTllaEEcp1NCgAAAABJRU5ErkJggg==", + "ports": [], + "background-fit": "none", + "background-position-x": "50%", + "background-position-y": "50%", + "background-width": "100%", + "background-height": "100%", + "infoboxCalculated": true, + "auxunitlayouts": {} + }, + "position": { + "x": 606.1045220904394, + "y": 197.72359870566655 + }, + "group": "nodes", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ], + "edges": [ + { + "data": { + "id": "nwtE_1c1c1ca1-decb-4ebd-854c-90fe60be467c", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "0998ddcc-de7b-792a-5b2e-c53317128a7c", + "target": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "portsource": "0998ddcc-de7b-792a-5b2e-c53317128a7c", + "porttarget": "3c910e69-2f8b-7beb-159c-da99ed4f6907" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_96d9570f-b273-4050-a646-82af79f255d9", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "target": "f6ded9c4-6e94-ee99-6d4e-aebba05882db", + "portsource": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "porttarget": "f6ded9c4-6e94-ee99-6d4e-aebba05882db" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d65ce814-8761-42a2-a662-c254e827ea42", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "f6ded9c4-6e94-ee99-6d4e-aebba05882db", + "target": "fb9ad239-d112-d0f9-ed9e-90db5f147e54", + "portsource": "f6ded9c4-6e94-ee99-6d4e-aebba05882db", + "porttarget": "fb9ad239-d112-d0f9-ed9e-90db5f147e54" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_2c491a02-a8b4-4f6b-bfa3-fd05e1a2338d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "0998ddcc-de7b-792a-5b2e-c53317128a7c", + "target": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "portsource": "0998ddcc-de7b-792a-5b2e-c53317128a7c", + "porttarget": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_6d445ac6-5105-493d-9632-e56b7a9d374d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "target": "3b233452-0a1c-6c51-703a-b62ca9951f2b", + "portsource": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "porttarget": "3b233452-0a1c-6c51-703a-b62ca9951f2b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_8c77c946-7d52-4ce2-90d1-12b56ae4a0a0", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3b233452-0a1c-6c51-703a-b62ca9951f2b", + "target": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "portsource": "3b233452-0a1c-6c51-703a-b62ca9951f2b", + "porttarget": "73eceeb1-0069-9139-4398-5dffeb19bddf" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b0373815-c68f-4510-a26d-92a6035a8dae", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "target": "8e47cd39-5258-1c70-06ab-96f28782e065", + "portsource": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "porttarget": "8e47cd39-5258-1c70-06ab-96f28782e065" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_8d4eb83c-7880-41b9-b0ba-67e879a820e1", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "8e47cd39-5258-1c70-06ab-96f28782e065", + "target": "25f4cc48-4e4e-e80e-174f-fa4ba64616da", + "portsource": "8e47cd39-5258-1c70-06ab-96f28782e065", + "porttarget": "25f4cc48-4e4e-e80e-174f-fa4ba64616da" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_8a0abf51-ca91-4211-ab18-551c485ef634", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "25f4cc48-4e4e-e80e-174f-fa4ba64616da", + "target": "2b855d36-0c89-996d-9281-ea54f711cc8e", + "portsource": "25f4cc48-4e4e-e80e-174f-fa4ba64616da", + "porttarget": "2b855d36-0c89-996d-9281-ea54f711cc8e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_4be2fe1d-18da-4e5a-bb19-9731c5fd536c", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "target": "25f4cc48-4e4e-e80e-174f-fa4ba64616da", + "portsource": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "porttarget": "25f4cc48-4e4e-e80e-174f-fa4ba64616da" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_8da7756e-963f-4d2d-8eaf-7397cfbf354e", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "target": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d", + "portsource": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "porttarget": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_89863f47-0f02-40f4-b1ff-b355a4e9f1d7", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d", + "target": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb", + "portsource": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d", + "porttarget": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_2f53a32d-4059-423e-8396-85d542b20085", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb", + "target": "25f4cc48-4e4e-e80e-174f-fa4ba64616da", + "portsource": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb", + "porttarget": "25f4cc48-4e4e-e80e-174f-fa4ba64616da" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3d6bb730-cf78-48a7-b832-28eb2bce2b80", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "25f4cc48-4e4e-e80e-174f-fa4ba64616da", + "target": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2", + "portsource": "25f4cc48-4e4e-e80e-174f-fa4ba64616da", + "porttarget": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_30435d07-810b-4899-8fc3-8f4ba0d01b3c", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb", + "target": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4", + "portsource": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb", + "porttarget": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_bf58b874-f1dc-4198-bc72-34105cd2b746", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2", + "target": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4", + "portsource": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2", + "porttarget": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_35a97b29-458f-4388-95e5-8bb61ed547ff", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2", + "target": "c54786e2-bbea-d15b-3e21-7cf32b9338ca", + "portsource": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2", + "porttarget": "c54786e2-bbea-d15b-3e21-7cf32b9338ca" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_da45116e-91b9-473b-872f-b9004fad988b", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "2b855d36-0c89-996d-9281-ea54f711cc8e", + "target": "c54786e2-bbea-d15b-3e21-7cf32b9338ca", + "portsource": "2b855d36-0c89-996d-9281-ea54f711cc8e", + "porttarget": "c54786e2-bbea-d15b-3e21-7cf32b9338ca" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3526eb14-26ce-4a67-b14f-a9fab2460e9f", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2", + "target": "2b855d36-0c89-996d-9281-ea54f711cc8e", + "portsource": "d4e4f860-ffb4-cbf6-80b7-675c821ed4d2", + "porttarget": "2b855d36-0c89-996d-9281-ea54f711cc8e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a7e27295-8c9c-48dc-b801-35c2f89ae1de", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "c54786e2-bbea-d15b-3e21-7cf32b9338ca", + "target": "7b23c6ae-4256-a918-0c9b-0254d83a908b", + "portsource": "c54786e2-bbea-d15b-3e21-7cf32b9338ca", + "porttarget": "7b23c6ae-4256-a918-0c9b-0254d83a908b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_5ddca385-5164-4157-bcdf-9f4d7ee9b877", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7b23c6ae-4256-a918-0c9b-0254d83a908b", + "target": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "portsource": "7b23c6ae-4256-a918-0c9b-0254d83a908b", + "porttarget": "a97f8f48-6652-7e09-8eda-2d87eae7d20b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c6cae78a-29c8-47ac-a95f-ef0db67c5f34", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "target": "3f913ee3-7737-5405-968d-312653a7c318", + "portsource": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "porttarget": "3f913ee3-7737-5405-968d-312653a7c318" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3a301c6b-2f56-42a1-985e-5476cf722c9f", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "target": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "portsource": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "porttarget": "97a17094-822f-fc65-78f3-fc5b8aca0b23" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_fec71d1a-e60b-4433-87b0-f7542007c560", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "target": "67add58f-1a8c-17d9-8cfa-ff468527f6c9", + "portsource": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "porttarget": "67add58f-1a8c-17d9-8cfa-ff468527f6c9" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c52a213f-22d9-49b6-9032-c0fdd99c373a", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "target": "86f48f58-145d-92cc-0d33-aaf639984733", + "portsource": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "porttarget": "86f48f58-145d-92cc-0d33-aaf639984733" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_58b3a3d1-e717-4247-b980-0a57dd715b02", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "target": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a", + "portsource": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "porttarget": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c79340a6-bdbd-438f-8838-57735eff5329", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a", + "target": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "portsource": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a", + "porttarget": "c21a716f-9ce2-4976-bdc3-320395e5ed97" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_8550f45c-f84b-45c8-8f8e-57ad32a1fe31", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "target": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7", + "portsource": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "porttarget": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_e8176741-3adc-48e4-8cf2-344b1353a5d9", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7", + "target": "e98b25fb-7352-b78a-de16-240d09bda830", + "portsource": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7", + "porttarget": "e98b25fb-7352-b78a-de16-240d09bda830" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_dd78df2c-4e48-466e-a19e-baea9c58ee7e", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "e98b25fb-7352-b78a-de16-240d09bda830", + "target": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a", + "portsource": "e98b25fb-7352-b78a-de16-240d09bda830", + "porttarget": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c94b7aa8-c93c-453d-8c4d-b2212b3beafc", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "target": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "portsource": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "porttarget": "a97f8f48-6652-7e09-8eda-2d87eae7d20b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f7483a56-4f02-4ec3-9109-eadddc4f887b", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7", + "target": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4", + "portsource": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7", + "porttarget": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_4bbf5c50-af52-4ac2-b36a-5ef9a3192fb7", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "target": "97a17094-822f-fc65-78f3-fc5b8aca0b23", + "portsource": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "porttarget": "97a17094-822f-fc65-78f3-fc5b8aca0b23" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7ec7f0fb-f15a-4501-a802-2c9006f76f7e", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4", + "target": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8", + "portsource": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4", + "porttarget": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_278001ac-9e8f-4bc5-a968-9773c8b1caf1", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "target": "e98b25fb-7352-b78a-de16-240d09bda830", + "portsource": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "porttarget": "e98b25fb-7352-b78a-de16-240d09bda830" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3d13ccc4-4960-4e1b-a11a-3d9f517d736d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "target": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8", + "portsource": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "porttarget": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_397654f0-801f-4bda-8f03-a988121e7550", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4", + "target": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "portsource": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4", + "porttarget": "5678f1a3-0919-aecd-fb70-613a8a55c4d7" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c666ca08-8e52-4832-8722-c0ba56a947f3", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "target": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da", + "portsource": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "porttarget": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_e678ea21-1b85-4871-bcdd-db372711f8a1", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da", + "target": "e98b25fb-7352-b78a-de16-240d09bda830", + "portsource": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da", + "porttarget": "e98b25fb-7352-b78a-de16-240d09bda830" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_6a4d0bec-0139-46e0-89ec-ae98eeed3683", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "86f48f58-145d-92cc-0d33-aaf639984733", + "target": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a", + "portsource": "86f48f58-145d-92cc-0d33-aaf639984733", + "porttarget": "8c9ccb35-a1e8-1772-cbad-6e5f46b95b8a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c85cd9be-301b-4b00-96b0-0b74923ab35c", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "86f48f58-145d-92cc-0d33-aaf639984733", + "target": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da", + "portsource": "86f48f58-145d-92cc-0d33-aaf639984733", + "porttarget": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_569f5cbc-6f04-45c3-8c78-84cd6692ff00", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "8edd562b-196b-4f7e-37bf-a9e2072917b0", + "target": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da", + "portsource": "8edd562b-196b-4f7e-37bf-a9e2072917b0", + "porttarget": "1ebc687b-0b6a-eb35-4ac7-9b6d57a784da" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b4a8f16b-9be5-4a2f-a397-660346cd5095", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "8edd562b-196b-4f7e-37bf-a9e2072917b0", + "target": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921", + "portsource": "8edd562b-196b-4f7e-37bf-a9e2072917b0", + "porttarget": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_163e8ac8-9a4f-4441-a596-3583fc3a77cc", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921", + "target": "5678f1a3-0919-aecd-fb70-613a8a55c4d7", + "portsource": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921", + "porttarget": "5678f1a3-0919-aecd-fb70-613a8a55c4d7" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_5812454f-3b40-49eb-a9e3-cafa29ecd0be", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "target": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4", + "portsource": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "porttarget": "3ffdee99-d217-2dc6-5b0e-1229ee1d1bd4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c6f3a512-0f2b-4b19-8032-402945881d9b", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "target": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7", + "portsource": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "porttarget": "88642a3e-3f7a-60a3-9c61-425f1f3cf2d7" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_5a673304-468c-4227-beca-a7677a68b478", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "target": "9bf069c9-034b-1bee-35e5-2d2addaeaf38", + "portsource": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "porttarget": "9bf069c9-034b-1bee-35e5-2d2addaeaf38" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7263b061-b6c0-454a-a47c-22f9cd4ddf7f", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "9bf069c9-034b-1bee-35e5-2d2addaeaf38", + "target": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "portsource": "9bf069c9-034b-1bee-35e5-2d2addaeaf38", + "porttarget": "c21a716f-9ce2-4976-bdc3-320395e5ed97" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_ca069b99-e61c-42c9-a1ee-33287f5ca637", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "target": "c21a716f-9ce2-4976-bdc3-320395e5ed97", + "portsource": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "porttarget": "c21a716f-9ce2-4976-bdc3-320395e5ed97" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_af287463-cdbb-47c8-af68-0ebd1ea7774a", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "9bf069c9-034b-1bee-35e5-2d2addaeaf38", + "target": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "portsource": "9bf069c9-034b-1bee-35e5-2d2addaeaf38", + "porttarget": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c20aa39b-d909-4e3a-ac16-0fb2d059c730", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "target": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "portsource": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "porttarget": "a97f8f48-6652-7e09-8eda-2d87eae7d20b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c63d2aab-281f-483b-89de-ea2a764cb437", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "target": "c54786e2-bbea-d15b-3e21-7cf32b9338ca", + "portsource": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "porttarget": "c54786e2-bbea-d15b-3e21-7cf32b9338ca" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_cdb68f09-3b2b-4456-bff4-48694b6006bf", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "67add58f-1a8c-17d9-8cfa-ff468527f6c9", + "target": "3f913ee3-7737-5405-968d-312653a7c318", + "portsource": "67add58f-1a8c-17d9-8cfa-ff468527f6c9", + "porttarget": "3f913ee3-7737-5405-968d-312653a7c318" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a70317b5-2004-49e9-8e42-f79016235b49", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921", + "target": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8", + "portsource": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921", + "porttarget": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_74d7b89b-8f5b-424f-af0f-095a417db95a", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8", + "target": "16102c94-c326-51c3-8636-3ae19b603483", + "portsource": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8", + "porttarget": "16102c94-c326-51c3-8636-3ae19b603483" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_59de5fb2-3115-4cb2-aac6-a0df1f5f7099", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "16102c94-c326-51c3-8636-3ae19b603483", + "target": "e833b238-0bb7-c5d2-ebec-aa0604bcd484", + "portsource": "16102c94-c326-51c3-8636-3ae19b603483", + "porttarget": "e833b238-0bb7-c5d2-ebec-aa0604bcd484" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d543d912-04d7-4f9f-9222-2b9d6c46ff16", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "target": "e833b238-0bb7-c5d2-ebec-aa0604bcd484", + "portsource": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "porttarget": "e833b238-0bb7-c5d2-ebec-aa0604bcd484" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_aa30b478-2606-47e0-82c5-16a930978b86", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "target": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b", + "portsource": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "porttarget": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_07786f94-90f4-43e9-90e8-b5c8392b0edc", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "267b649b-6d09-255c-67b4-46bd2c40375e", + "target": "7435cbfb-9e49-d44e-4357-c413a22e188a", + "portsource": "267b649b-6d09-255c-67b4-46bd2c40375e", + "porttarget": "7435cbfb-9e49-d44e-4357-c413a22e188a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_831e41d3-c942-4973-ac4a-f80514230710", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7435cbfb-9e49-d44e-4357-c413a22e188a", + "target": "d036dd9f-8368-bfac-a080-87b82544be20", + "portsource": "7435cbfb-9e49-d44e-4357-c413a22e188a", + "porttarget": "d036dd9f-8368-bfac-a080-87b82544be20" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d3adddc0-7f9e-4ffa-a6a2-499e8185517c", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d036dd9f-8368-bfac-a080-87b82544be20", + "target": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b", + "portsource": "d036dd9f-8368-bfac-a080-87b82544be20", + "porttarget": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f83afce6-0c18-4b03-b8d5-eb4e52be3634", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b", + "target": "267b649b-6d09-255c-67b4-46bd2c40375e", + "portsource": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b", + "porttarget": "267b649b-6d09-255c-67b4-46bd2c40375e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_260554e5-bc2f-4e71-b1a0-5331b19fcf76", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7435cbfb-9e49-d44e-4357-c413a22e188a", + "target": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "portsource": "7435cbfb-9e49-d44e-4357-c413a22e188a", + "porttarget": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7874e5ca-6fcc-4cb5-b011-7a37bbc88099", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "target": "96f4c006-33d1-a00e-a389-782f23c38a65", + "portsource": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "porttarget": "96f4c006-33d1-a00e-a389-782f23c38a65" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_1bc5bd7a-5f0d-46aa-8e52-563e3e8eb1c9", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "267b649b-6d09-255c-67b4-46bd2c40375e", + "target": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "portsource": "267b649b-6d09-255c-67b4-46bd2c40375e", + "porttarget": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d0645132-bc57-4a6e-8ae2-d7b85975063d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "96f4c006-33d1-a00e-a389-782f23c38a65", + "target": "267b649b-6d09-255c-67b4-46bd2c40375e", + "portsource": "96f4c006-33d1-a00e-a389-782f23c38a65", + "porttarget": "267b649b-6d09-255c-67b4-46bd2c40375e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_062dc392-a570-4473-9b2b-052b207ec261", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7435cbfb-9e49-d44e-4357-c413a22e188a", + "target": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "portsource": "7435cbfb-9e49-d44e-4357-c413a22e188a", + "porttarget": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f48bbc29-fbcd-4de8-a35b-2b06f8af7a20", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "target": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1", + "portsource": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "porttarget": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f410ba16-544f-4ec1-b371-3d14e0faee2b", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb", + "target": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1", + "portsource": "464bae1c-0c35-3b4a-3af2-371ef03a0dcb", + "porttarget": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_82b407d2-5559-4386-8e97-44f4dbb184df", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "target": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4", + "portsource": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "porttarget": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_318fb561-4823-430e-91eb-f533134f3f1a", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "target": "9bf069c9-034b-1bee-35e5-2d2addaeaf38", + "portsource": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "porttarget": "9bf069c9-034b-1bee-35e5-2d2addaeaf38" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_468b8322-a6fe-432d-aca2-ae3a921618d5", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "target": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "portsource": "d64b38d9-db3d-4128-1ec4-ddf1e5648c72", + "porttarget": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c0707117-f935-4c11-8d01-1bcb52e21f5d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4", + "target": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3", + "portsource": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4", + "porttarget": "7c1292d7-1feb-63b9-65a6-fb9db2547eb3" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_31ff41b0-99eb-4e4e-9a72-a6fa5df61284", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1", + "target": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "portsource": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1", + "porttarget": "ffbd69bf-481f-faa8-73db-1489f3175b75" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_900bd3fc-60d1-4c1b-82b7-8f73cad5536d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "target": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d", + "portsource": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "porttarget": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a88789b7-9e4e-4c68-b863-76b180feb28e", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "target": "d036dd9f-8368-bfac-a080-87b82544be20", + "portsource": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "porttarget": "d036dd9f-8368-bfac-a080-87b82544be20" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a1558907-c8d7-42c2-af07-a1005a6ca545", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1", + "target": "d036dd9f-8368-bfac-a080-87b82544be20", + "portsource": "a44fe57b-d4e6-a062-6b2a-bf6f5f92c5f1", + "porttarget": "d036dd9f-8368-bfac-a080-87b82544be20" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_ac395be3-d2fd-4521-8b51-5f4a19863afa", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d036dd9f-8368-bfac-a080-87b82544be20", + "target": "b45bf870-2439-dc1d-38f2-fc491752ff05", + "portsource": "d036dd9f-8368-bfac-a080-87b82544be20", + "porttarget": "b45bf870-2439-dc1d-38f2-fc491752ff05" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_ce0a1ca9-9045-4bfe-a1a3-2bfe070b8116", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "b45bf870-2439-dc1d-38f2-fc491752ff05", + "target": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "portsource": "b45bf870-2439-dc1d-38f2-fc491752ff05", + "porttarget": "ffbd69bf-481f-faa8-73db-1489f3175b75" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b110eb00-eb99-4ccc-8946-820f05bcef96", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "b45bf870-2439-dc1d-38f2-fc491752ff05", + "target": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "portsource": "b45bf870-2439-dc1d-38f2-fc491752ff05", + "porttarget": "f91d914e-6ab7-92cf-b16d-b9a7661e0044" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7036a59b-4088-4edc-a28f-82a6ce94d08f", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "target": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b", + "portsource": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "porttarget": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_5a4167be-8239-4509-b96b-0c51fa5a6c8c", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "target": "115069e9-e7e3-51e4-da42-481b318e5f1f", + "portsource": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "porttarget": "115069e9-e7e3-51e4-da42-481b318e5f1f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_197e0fc8-374e-444e-a24f-605d72b7d145", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "115069e9-e7e3-51e4-da42-481b318e5f1f", + "target": "11284cd9-d716-52f7-20c7-5d1750de5309", + "portsource": "115069e9-e7e3-51e4-da42-481b318e5f1f", + "porttarget": "11284cd9-d716-52f7-20c7-5d1750de5309" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_da383a68-b3a3-4c42-b317-022669976139", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "11284cd9-d716-52f7-20c7-5d1750de5309", + "target": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b", + "portsource": "11284cd9-d716-52f7-20c7-5d1750de5309", + "porttarget": "a1be056e-0b97-5a8e-56e9-8c3e08e9c24b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b7093d0f-e49d-4f84-9d12-70959ce71588", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "11284cd9-d716-52f7-20c7-5d1750de5309", + "target": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "portsource": "11284cd9-d716-52f7-20c7-5d1750de5309", + "porttarget": "e53126c9-70fe-ca8a-3b85-bab123a93d70" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_6aad44bb-dc1b-4737-8334-8a853e9896a9", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "267b649b-6d09-255c-67b4-46bd2c40375e", + "target": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "portsource": "267b649b-6d09-255c-67b4-46bd2c40375e", + "porttarget": "e53126c9-70fe-ca8a-3b85-bab123a93d70" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b5c6a24d-c270-4b63-82d9-f658997e671f", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "96f4c006-33d1-a00e-a389-782f23c38a65", + "target": "e833b238-0bb7-c5d2-ebec-aa0604bcd484", + "portsource": "96f4c006-33d1-a00e-a389-782f23c38a65", + "porttarget": "e833b238-0bb7-c5d2-ebec-aa0604bcd484" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_5c62e3d8-1514-4e67-ba16-6bf7dfa520e0", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "96f4c006-33d1-a00e-a389-782f23c38a65", + "target": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8", + "portsource": "96f4c006-33d1-a00e-a389-782f23c38a65", + "porttarget": "a3218cf9-fd48-f0b4-4c45-99cf2e52a0e8" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_0b3510cf-51a5-45cf-8d28-2f5ffcba2edf", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "target": "16102c94-c326-51c3-8636-3ae19b603483", + "portsource": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "porttarget": "16102c94-c326-51c3-8636-3ae19b603483" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_234d2bc5-727b-4214-a288-bca488a8ac11", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "e833b238-0bb7-c5d2-ebec-aa0604bcd484", + "target": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "portsource": "e833b238-0bb7-c5d2-ebec-aa0604bcd484", + "porttarget": "5ea74092-08ec-6937-33c9-9f6fbe9226a2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_227dea7e-9867-47d8-abb3-d5e6520daefb", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "target": "97f86367-eafd-54f7-4951-8360862b846f", + "portsource": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "porttarget": "97f86367-eafd-54f7-4951-8360862b846f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a6dcf746-0421-403a-a2c2-422b46f496e8", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "97f86367-eafd-54f7-4951-8360862b846f", + "target": "06fddad6-2abd-3413-6e24-a955f0763c53", + "portsource": "97f86367-eafd-54f7-4951-8360862b846f", + "porttarget": "06fddad6-2abd-3413-6e24-a955f0763c53" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_74fc39e5-e3a6-4d45-aba3-47a4f3ebefdd", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "06fddad6-2abd-3413-6e24-a955f0763c53", + "target": "16102c94-c326-51c3-8636-3ae19b603483", + "portsource": "06fddad6-2abd-3413-6e24-a955f0763c53", + "porttarget": "16102c94-c326-51c3-8636-3ae19b603483" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_babcc71d-a57d-4eab-8a7d-00ed3ebace4d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "06fddad6-2abd-3413-6e24-a955f0763c53", + "target": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921", + "portsource": "06fddad6-2abd-3413-6e24-a955f0763c53", + "porttarget": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_4748dd11-8b9e-4711-ad2c-559fa08b434c", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "06fddad6-2abd-3413-6e24-a955f0763c53", + "target": "99f5cbe5-2c57-75ff-52b8-99e2baad068b", + "portsource": "06fddad6-2abd-3413-6e24-a955f0763c53", + "porttarget": "99f5cbe5-2c57-75ff-52b8-99e2baad068b" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3d6abac3-210b-4911-b611-c4da62eac373", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "99f5cbe5-2c57-75ff-52b8-99e2baad068b", + "target": "8edd562b-196b-4f7e-37bf-a9e2072917b0", + "portsource": "99f5cbe5-2c57-75ff-52b8-99e2baad068b", + "porttarget": "8edd562b-196b-4f7e-37bf-a9e2072917b0" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b1c1226d-07a8-430b-b51e-ff5acc6b31b9", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "06fddad6-2abd-3413-6e24-a955f0763c53", + "target": "b386ca2b-81a7-e365-4706-f955f13db03f", + "portsource": "06fddad6-2abd-3413-6e24-a955f0763c53", + "porttarget": "b386ca2b-81a7-e365-4706-f955f13db03f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_64aacce4-61c0-4fb0-ae2c-98ac16b7a1ba", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "b386ca2b-81a7-e365-4706-f955f13db03f", + "target": "9190744c-1571-616b-e75e-1c00d977a78d", + "portsource": "b386ca2b-81a7-e365-4706-f955f13db03f", + "porttarget": "9190744c-1571-616b-e75e-1c00d977a78d" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_140f3876-d51d-49a0-8264-77916172591e", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "b386ca2b-81a7-e365-4706-f955f13db03f", + "target": "97f86367-eafd-54f7-4951-8360862b846f", + "portsource": "b386ca2b-81a7-e365-4706-f955f13db03f", + "porttarget": "97f86367-eafd-54f7-4951-8360862b846f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c24786d8-4a57-4381-91dd-33a4f6f4bc75", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "b386ca2b-81a7-e365-4706-f955f13db03f", + "target": "30c49899-09d0-818a-a71d-fd15346f65e5", + "portsource": "b386ca2b-81a7-e365-4706-f955f13db03f", + "porttarget": "30c49899-09d0-818a-a71d-fd15346f65e5" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_046f7232-2034-4cb4-867a-944e7f49cb33", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "30c49899-09d0-818a-a71d-fd15346f65e5", + "target": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "portsource": "30c49899-09d0-818a-a71d-fd15346f65e5", + "porttarget": "5ea74092-08ec-6937-33c9-9f6fbe9226a2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_848bd96f-a552-4328-a00b-507a4306e45a", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "30c49899-09d0-818a-a71d-fd15346f65e5", + "target": "9190744c-1571-616b-e75e-1c00d977a78d", + "portsource": "30c49899-09d0-818a-a71d-fd15346f65e5", + "porttarget": "9190744c-1571-616b-e75e-1c00d977a78d" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3cf7fd91-0f93-419c-9282-53057b8e54b2", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "9190744c-1571-616b-e75e-1c00d977a78d", + "target": "aed099f2-5b0a-d59c-c297-9bac5ded0736", + "portsource": "9190744c-1571-616b-e75e-1c00d977a78d", + "porttarget": "aed099f2-5b0a-d59c-c297-9bac5ded0736" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_772832b9-1911-4c87-9aae-9223c893cd6b", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "aed099f2-5b0a-d59c-c297-9bac5ded0736", + "target": "ed36ef56-dd89-40e1-251c-09f13686eb66", + "portsource": "aed099f2-5b0a-d59c-c297-9bac5ded0736", + "porttarget": "ed36ef56-dd89-40e1-251c-09f13686eb66" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_cc0e8a61-15b5-42d9-a802-df79315915b2", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "ed36ef56-dd89-40e1-251c-09f13686eb66", + "target": "30c49899-09d0-818a-a71d-fd15346f65e5", + "portsource": "ed36ef56-dd89-40e1-251c-09f13686eb66", + "porttarget": "30c49899-09d0-818a-a71d-fd15346f65e5" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b9a3e640-3adb-4dee-90b7-e55daa281fe1", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "ed36ef56-dd89-40e1-251c-09f13686eb66", + "target": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "portsource": "ed36ef56-dd89-40e1-251c-09f13686eb66", + "porttarget": "5ea74092-08ec-6937-33c9-9f6fbe9226a2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_ee5e0e03-9a31-4295-80fe-89e84be54c8d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "target": "7e30e3e1-7f31-1080-0970-22d019957584", + "portsource": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "porttarget": "7e30e3e1-7f31-1080-0970-22d019957584" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_895891e6-a989-41d8-b68f-98b569265445", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7e30e3e1-7f31-1080-0970-22d019957584", + "target": "5ea74092-08ec-6937-33c9-9f6fbe9226a2", + "portsource": "7e30e3e1-7f31-1080-0970-22d019957584", + "porttarget": "5ea74092-08ec-6937-33c9-9f6fbe9226a2" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b467800e-59de-4641-bf6a-be3961bef494", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7e30e3e1-7f31-1080-0970-22d019957584", + "target": "ed36ef56-dd89-40e1-251c-09f13686eb66", + "portsource": "7e30e3e1-7f31-1080-0970-22d019957584", + "porttarget": "ed36ef56-dd89-40e1-251c-09f13686eb66" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b7b70e38-ed91-4617-9348-e8876326415d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628", + "target": "aed099f2-5b0a-d59c-c297-9bac5ded0736", + "portsource": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628", + "porttarget": "aed099f2-5b0a-d59c-c297-9bac5ded0736" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_55c5a1f9-a0f3-4b6d-b503-e6b1dadfd9e1", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628", + "target": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "portsource": "d9eeb201-2c9a-5afb-82a7-bc583b0f6628", + "porttarget": "889eedb3-8cb8-b906-8beb-904cd499c4f6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_7cd42c50-3ab0-4b02-b0f5-47195320cbc0", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "target": "67ff3c4c-e646-5c50-0e37-16e9a39da28a", + "portsource": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "porttarget": "67ff3c4c-e646-5c50-0e37-16e9a39da28a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b510951f-f195-49f5-bc4b-581d44254fd2", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "67ff3c4c-e646-5c50-0e37-16e9a39da28a", + "target": "1eee479d-d3a1-44d9-316e-b70bc4556169", + "portsource": "67ff3c4c-e646-5c50-0e37-16e9a39da28a", + "porttarget": "1eee479d-d3a1-44d9-316e-b70bc4556169" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_6f43cab5-aa77-4014-9ca7-38f3c90022c3", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "1eee479d-d3a1-44d9-316e-b70bc4556169", + "target": "979162a0-08fc-54e2-0ba2-b54b2eb59266", + "portsource": "1eee479d-d3a1-44d9-316e-b70bc4556169", + "porttarget": "979162a0-08fc-54e2-0ba2-b54b2eb59266" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_9c9b7b95-2e0e-4b27-a512-8241a7248d0a", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "979162a0-08fc-54e2-0ba2-b54b2eb59266", + "target": "33f80abd-028e-ad1c-068b-33d5b40d9a93", + "portsource": "979162a0-08fc-54e2-0ba2-b54b2eb59266", + "porttarget": "33f80abd-028e-ad1c-068b-33d5b40d9a93" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_5791e1d8-3177-475b-81be-421244e2b109", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "33f80abd-028e-ad1c-068b-33d5b40d9a93", + "target": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "portsource": "33f80abd-028e-ad1c-068b-33d5b40d9a93", + "porttarget": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_3c041c55-63f9-493e-93df-a6cbf152df7a", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "target": "1eee479d-d3a1-44d9-316e-b70bc4556169", + "portsource": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "porttarget": "1eee479d-d3a1-44d9-316e-b70bc4556169" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_fca7681c-7e66-4ba9-a221-bb5b5c1eb1d4", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "target": "3a85e050-463c-f484-c100-9d39adb1a23e", + "portsource": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "porttarget": "3a85e050-463c-f484-c100-9d39adb1a23e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_161660fb-270a-4504-b7af-e9b51ccb2ee7", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3a85e050-463c-f484-c100-9d39adb1a23e", + "target": "f3fc754e-1421-a039-0ef0-c2d989db228e", + "portsource": "3a85e050-463c-f484-c100-9d39adb1a23e", + "porttarget": "f3fc754e-1421-a039-0ef0-c2d989db228e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_e5c036c9-ecb1-49c4-ac47-60e35191eda0", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "f3fc754e-1421-a039-0ef0-c2d989db228e", + "target": "11284cd9-d716-52f7-20c7-5d1750de5309", + "portsource": "f3fc754e-1421-a039-0ef0-c2d989db228e", + "porttarget": "11284cd9-d716-52f7-20c7-5d1750de5309" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c169a1c3-79a2-4f5c-91d2-87f193fa7fa4", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "f3fc754e-1421-a039-0ef0-c2d989db228e", + "target": "7078c4e8-4b4c-0563-9938-8af2c753f92c", + "portsource": "f3fc754e-1421-a039-0ef0-c2d989db228e", + "porttarget": "7078c4e8-4b4c-0563-9938-8af2c753f92c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_e999105a-c621-46f5-a581-472950b8ec1f", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "target": "7078c4e8-4b4c-0563-9938-8af2c753f92c", + "portsource": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "porttarget": "7078c4e8-4b4c-0563-9938-8af2c753f92c" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f04db46d-e7cf-4a54-9534-085e72b3c60e", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7078c4e8-4b4c-0563-9938-8af2c753f92c", + "target": "ed36ef56-dd89-40e1-251c-09f13686eb66", + "portsource": "7078c4e8-4b4c-0563-9938-8af2c753f92c", + "porttarget": "ed36ef56-dd89-40e1-251c-09f13686eb66" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d3d7497f-a491-4f6a-8210-247cdd620d14", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "f3fc754e-1421-a039-0ef0-c2d989db228e", + "target": "7e30e3e1-7f31-1080-0970-22d019957584", + "portsource": "f3fc754e-1421-a039-0ef0-c2d989db228e", + "porttarget": "7e30e3e1-7f31-1080-0970-22d019957584" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_e87f1864-d675-4727-ae5c-2c03f411a895", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "115069e9-e7e3-51e4-da42-481b318e5f1f", + "target": "3a85e050-463c-f484-c100-9d39adb1a23e", + "portsource": "115069e9-e7e3-51e4-da42-481b318e5f1f", + "porttarget": "3a85e050-463c-f484-c100-9d39adb1a23e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c0293968-50cc-481a-8bc3-746d199ea0cc", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3a85e050-463c-f484-c100-9d39adb1a23e", + "target": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "portsource": "3a85e050-463c-f484-c100-9d39adb1a23e", + "porttarget": "889eedb3-8cb8-b906-8beb-904cd499c4f6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_4a31fca3-37cd-4ba4-820b-29995b074d4a", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "1eee479d-d3a1-44d9-316e-b70bc4556169", + "target": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "portsource": "1eee479d-d3a1-44d9-316e-b70bc4556169", + "porttarget": "889eedb3-8cb8-b906-8beb-904cd499c4f6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_907db6cd-a798-4053-93e1-7ff0542248eb", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "target": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "portsource": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "porttarget": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_be712e1f-3214-44c9-85ad-d7c6fb8388f3", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "target": "db182fe4-ce6c-7869-72ce-7a4b11327e3a", + "portsource": "607d3097-a2d2-ed9d-39dc-b5c8a12ea7eb", + "porttarget": "db182fe4-ce6c-7869-72ce-7a4b11327e3a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_824318ef-7b9d-41a5-acbe-2c606b22b933", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "db182fe4-ce6c-7869-72ce-7a4b11327e3a", + "target": "115069e9-e7e3-51e4-da42-481b318e5f1f", + "portsource": "db182fe4-ce6c-7869-72ce-7a4b11327e3a", + "porttarget": "115069e9-e7e3-51e4-da42-481b318e5f1f" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_8bdc25c9-1298-4f43-bf00-0eefa7248efb", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "target": "db182fe4-ce6c-7869-72ce-7a4b11327e3a", + "portsource": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "porttarget": "db182fe4-ce6c-7869-72ce-7a4b11327e3a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_42f52cd8-e4da-4678-9177-31f68e58e475", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "97d3df31-9033-96c4-359d-08ed397b29c4", + "target": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "portsource": "97d3df31-9033-96c4-359d-08ed397b29c4", + "porttarget": "f91d914e-6ab7-92cf-b16d-b9a7661e0044" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_a075cf09-86b4-4f2f-a74e-b43f71d63e45", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "97d3df31-9033-96c4-359d-08ed397b29c4", + "target": "db182fe4-ce6c-7869-72ce-7a4b11327e3a", + "portsource": "97d3df31-9033-96c4-359d-08ed397b29c4", + "porttarget": "db182fe4-ce6c-7869-72ce-7a4b11327e3a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_d8916a24-67a2-47c1-826d-c2b1c5420891", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "97d3df31-9033-96c4-359d-08ed397b29c4", + "target": "91966017-4d7f-7634-6823-1a405da45139", + "portsource": "97d3df31-9033-96c4-359d-08ed397b29c4", + "porttarget": "91966017-4d7f-7634-6823-1a405da45139" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_da3e69d1-815a-43af-b58c-29b6c553a2cc", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "91966017-4d7f-7634-6823-1a405da45139", + "target": "b45bf870-2439-dc1d-38f2-fc491752ff05", + "portsource": "91966017-4d7f-7634-6823-1a405da45139", + "porttarget": "b45bf870-2439-dc1d-38f2-fc491752ff05" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_293d250e-a942-4989-8b0e-e2ca124d7ada", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "91966017-4d7f-7634-6823-1a405da45139", + "target": "1998dad6-f944-21b8-11dc-05d4cebd39e6", + "portsource": "91966017-4d7f-7634-6823-1a405da45139", + "porttarget": "1998dad6-f944-21b8-11dc-05d4cebd39e6" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_9907d7b9-5c4d-4f76-81b0-1046a894669f", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "1998dad6-f944-21b8-11dc-05d4cebd39e6", + "target": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "portsource": "1998dad6-f944-21b8-11dc-05d4cebd39e6", + "porttarget": "ffbd69bf-481f-faa8-73db-1489f3175b75" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_15a2f86b-c8be-42c1-b386-1a4a5a5b66d3", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "1998dad6-f944-21b8-11dc-05d4cebd39e6", + "target": "b45bf870-2439-dc1d-38f2-fc491752ff05", + "portsource": "1998dad6-f944-21b8-11dc-05d4cebd39e6", + "porttarget": "b45bf870-2439-dc1d-38f2-fc491752ff05" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_0e0092c8-cd77-440f-9c5c-4dfa34cf8cf5", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "1998dad6-f944-21b8-11dc-05d4cebd39e6", + "target": "45d5101e-e0a1-821c-37d6-378cbd632d55", + "portsource": "1998dad6-f944-21b8-11dc-05d4cebd39e6", + "porttarget": "45d5101e-e0a1-821c-37d6-378cbd632d55" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_18097a11-63cb-4cbb-bda4-49680f5e4784", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "45d5101e-e0a1-821c-37d6-378cbd632d55", + "target": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d", + "portsource": "45d5101e-e0a1-821c-37d6-378cbd632d55", + "porttarget": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_0abf1634-c437-4682-8134-a97c8eebc475", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d", + "target": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "portsource": "9e04da58-86d5-7fc8-e79e-3883f25b5c2d", + "porttarget": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_70230b02-a73a-409f-902e-25781ffb57b8", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "target": "45d5101e-e0a1-821c-37d6-378cbd632d55", + "portsource": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "porttarget": "45d5101e-e0a1-821c-37d6-378cbd632d55" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_af0dc488-8a4b-4832-8fc1-82e1bdaaeba7", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "target": "73eceeb1-0069-9139-4398-5dffeb19bddf", + "portsource": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "porttarget": "73eceeb1-0069-9139-4398-5dffeb19bddf" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_aa962f4e-be54-4257-a0f1-69bcaa641958", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "target": "45d5101e-e0a1-821c-37d6-378cbd632d55", + "portsource": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "porttarget": "45d5101e-e0a1-821c-37d6-378cbd632d55" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_6586f863-5bc9-4fd6-b6b8-786959eb8d0d", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "target": "fb9ad239-d112-d0f9-ed9e-90db5f147e54", + "portsource": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "porttarget": "fb9ad239-d112-d0f9-ed9e-90db5f147e54" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_c4e0504c-890b-4d69-a54e-c28b0dbc8cd4", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "target": "91966017-4d7f-7634-6823-1a405da45139", + "portsource": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "porttarget": "91966017-4d7f-7634-6823-1a405da45139" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_77b1eba9-d238-4e19-ab36-4e9c08189d1e", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "target": "fb9ad239-d112-d0f9-ed9e-90db5f147e54", + "portsource": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "porttarget": "fb9ad239-d112-d0f9-ed9e-90db5f147e54" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_417e01b9-9d65-4e48-8b08-40237628227e", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "target": "bd77a77c-4627-ad77-1c5a-2c390ba21959", + "portsource": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "porttarget": "bd77a77c-4627-ad77-1c5a-2c390ba21959" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_15a8b27e-0ae6-46ed-8c52-ecb79c67195c", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "bd77a77c-4627-ad77-1c5a-2c390ba21959", + "target": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc", + "portsource": "bd77a77c-4627-ad77-1c5a-2c390ba21959", + "porttarget": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_0ab4d935-2d6c-4ae0-b758-9dbe91d0dfdb", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc", + "target": "73cc39db-10c0-542a-7d9f-198fa3e0975e", + "portsource": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc", + "porttarget": "73cc39db-10c0-542a-7d9f-198fa3e0975e" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_afbff892-f334-4740-95cd-3a8ff0b7b2a4", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "73cc39db-10c0-542a-7d9f-198fa3e0975e", + "target": "b51264f6-8497-2eff-8d96-1264b5650804", + "portsource": "73cc39db-10c0-542a-7d9f-198fa3e0975e", + "porttarget": "b51264f6-8497-2eff-8d96-1264b5650804" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b21ae3b2-0961-47e6-a915-c135932e11fa", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "b51264f6-8497-2eff-8d96-1264b5650804", + "target": "33f80abd-028e-ad1c-068b-33d5b40d9a93", + "portsource": "b51264f6-8497-2eff-8d96-1264b5650804", + "porttarget": "33f80abd-028e-ad1c-068b-33d5b40d9a93" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_9532405c-b438-4875-bbb2-70a4fcc3ef05", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "73cc39db-10c0-542a-7d9f-198fa3e0975e", + "target": "db182fe4-ce6c-7869-72ce-7a4b11327e3a", + "portsource": "73cc39db-10c0-542a-7d9f-198fa3e0975e", + "porttarget": "db182fe4-ce6c-7869-72ce-7a4b11327e3a" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_f15382bf-899f-46f0-894b-a00ce4c30dcd", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "target": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc", + "portsource": "039bc70a-1d3c-4274-f0fa-dbf75aede9b7", + "porttarget": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b6679629-6f08-49ef-b35f-c71cbf1e72b0", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc", + "target": "97d3df31-9033-96c4-359d-08ed397b29c4", + "portsource": "7c4ed529-4da9-7eed-59fe-4590b57b2dfc", + "porttarget": "97d3df31-9033-96c4-359d-08ed397b29c4" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + }, + { + "data": { + "id": "nwtE_b6679629-6f08-49ef-b35f-c71cbf7b8er5", + "class": "consumption", + "bendPointPositions": [], + "language": "PD", + "line-color": "#555555", + "width": 1.25, + "background-image": "", + "background-color": "#ffffff", + "cardinality": 0, + "source": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "target": "91966017-4d7f-7634-6823-1a405da45139", + "portsource": "3c910e69-2f8b-7beb-159c-da99ed4f6907", + "porttarget": "91966017-4d7f-7634-6823-1a405da45139" + }, + "position": {}, + "group": "edges", + "removed": false, + "selected": false, + "selectable": true, + "locked": false, + "grabbable": true, + "classes": "" + } + ] + }, + "style": [ + { + "selector": "node", + "style": { + "shape": "rectangle", + "text-halign": "center", + "text-valign": "bottom", + "background-color": "#ffffff", + "opacity": "1", + "border-color": "#ffffff", + "border-width": "0px" + } + }, + { + "selector": "node[class = 'simple chemical']", + "style": { + "shape": "ellipse", + "background-color": "#c7eae5" + } + }, + { + "selector": "node[class = 'macromolecule']", + "style": { + "shape": "roundrectangle", + } + }, + { + "selector": "node[class = 'unspecified entity']", + "style": { + "shape": "ellipse", + "background-color": "#f5f5f5" + } + }, + { + "selector": ":parent", + "style": { + "background-opacity": "0.333", + "text-valign": "bottom", + "shape": "barrel", + "text-margin-y": "2px", + "font-weight" : "bold", + "border-color": "#555555" + } + }, + { + "selector": "node:selected", + "style": { + "background-color": "#33ff00", + "border-color": "#22ee00" + } + }, + { + "selector": "edge", + "style": { + "curve-style": "bezier", + "width": "2px", + "line-color": "rgb(0,0,0)", + "opacity": "1", + "target-arrow-shape": "triangle", + "target-arrow-color": "rgb(0,0,0)", + "source-arrow-shape": "triangle", + "source-arrow-color": "rgb(0,0,0)", + } + }, + { + "selector": "edge:selected", + "style": { + "line-color": "#33ff00", + "font-size": "13px", + "text-opacity": "1", + "text-rotation": "autorotate", + "color": "#33ff00", + "font-weight": "bold", + "text-background-shape": "roundrectangle", + "text-background-opacity": "1", + "text-background-padding": "2px", + "target-arrow-color": "#33ff00", + "target-arrow-shape": "triangle", + } + } + ], + "zoomingEnabled": true, + "userZoomingEnabled": true, + "zoom": 1.4731857231207923, + "minZoom": 0.125, + "maxZoom": 16, + "panningEnabled": true, + "userPanningEnabled": true, + "pan": { + "x": -419.9201536258538, + "y": -186.965642339959 + }, + "boxSelectionEnabled": true, + "renderer": { + "name": "canvas" + }, + "wheelSensitivity": 0.1, + "motionBlur": true +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/demo/samples/wsn_constraints.js b/tools/ui/node_modules/cytoscape-fcose/demo/samples/wsn_constraints.js new file mode 100644 index 0000000000000000000000000000000000000000..f1471301c317ead2fb93e1112907d61e221e899c --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/demo/samples/wsn_constraints.js @@ -0,0 +1,102 @@ +wsn_constraints = { + "fixedNodeConstraint": [ + { + "nodeId": "86f48f58-145d-92cc-0d33-aaf639984733", + "position": { + "x": 399, + "y": 139 + } + }, + { + "nodeId": "f91d914e-6ab7-92cf-b16d-b9a7661e0044", + "position": { + "x": 857, + "y": 340 + } + }, + { + "nodeId": "33f80abd-028e-ad1c-068b-33d5b40d9a93", + "position": { + "x": 1068, + "y": 288 + } + }, + { + "nodeId": "2b855d36-0c89-996d-9281-ea54f711cc8e", + "position": { + "x": 520, + "y": 518 + } + }, + { + "nodeId": "0ddcc98c-7b7c-ac2e-2207-081c5ffc9921", + "position": { + "x": 533, + "y": -37 + } + }, + { + "nodeId": "e53126c9-70fe-ca8a-3b85-bab123a93d70", + "position": { + "x": 816, + "y": 280 + } + }, + { + "nodeId": "4ca3044f-9b82-020b-e1cb-bbb45e4b0088", + "position": { + "x": 630, + "y": 205 + } + }, + { + "nodeId": "bc0420e3-9b6e-4c97-74c6-61278dbc18d4", + "position": { + "x": 507, + "y": 407 + } + }, + { + "nodeId": "a97f8f48-6652-7e09-8eda-2d87eae7d20b", + "position": { + "x": 323, + "y": 330 + } + }, + { + "nodeId": "889eedb3-8cb8-b906-8beb-904cd499c4f6", + "position": { + "x": 892, + "y": -55 + } + }, + { + "nodeId": "bd77a77c-4627-ad77-1c5a-2c390ba21959", + "position": { + "x": 1114, + "y": 570 + } + }, + { + "nodeId": "ffbd69bf-481f-faa8-73db-1489f3175b75", + "position": { + "x": 666, + "y": 533 + } + }, + { + "nodeId": "5fdc6150-63bb-18e8-1f03-33bb8d6b7529", + "position": { + "x": 726, + "y": 670 + } + }, + { + "nodeId": "b386ca2b-81a7-e365-4706-f955f13db03f", + "position": { + "x": 721, + "y": -36 + } + } + ] +} \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/.babelrc b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/.babelrc new file mode 100644 index 0000000000000000000000000000000000000000..002b4aa0d58ec481a2688d3c0b66e9069e5d6adb --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["env"] +} diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/LICENSE b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..0c3c5fc6b45c755a707d26eca6274306f2e664dd --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 - present, iVis@Bilkent. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/README.md b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/README.md new file mode 100644 index 0000000000000000000000000000000000000000..12d045fb0d788c83baca9b926f842aea7fc59769 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/README.md @@ -0,0 +1,26 @@ +cose-base +================================================================================ + +## Description + +This is a core module for compound spring embedder based layout styles such as CoSE-Bilkent, fCoSE, and CiSE. + +## Dependencies + + * layout-base ^2.0.0 + +## Usage instructions + +Add `cose-base` as a dependecy to your layout extension. + +`require()` in the extension to reach functionality: + + * `var CoSEConstants = require('cose-base').CoSEConstants`, + * `var CoSELayout = require('cose-base').CoSELayout`, + * `...` + +To reach functionality of `layout-base`: + + * `var Integer = require('cose-base').layoutBase.Integer`, + * `var Layout = require('cose-base').layoutBase.Layout`, + * `...` diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/bower.json b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/bower.json new file mode 100644 index 0000000000000000000000000000000000000000..0eae1f6daccab2ceebf98203c82f9fc88f282054 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/bower.json @@ -0,0 +1,23 @@ +{ + "name": "cose-base", + "description": "Core module for compound spring embedder based layout styles", + "main": "cose-base.js", + "dependencies": { + "layout-base": "^1.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/iVis-at-Bilkent/cose-base.git" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "keywords": [ + "layout" + ], + "license": "MIT" +} diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js new file mode 100644 index 0000000000000000000000000000000000000000..49ccc6601d1fd74e29bb832c444a15c70aaa7c83 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js @@ -0,0 +1,3214 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("layout-base")); + else if(typeof define === 'function' && define.amd) + define(["layout-base"], factory); + else if(typeof exports === 'object') + exports["coseBase"] = factory(require("layout-base")); + else + root["coseBase"] = factory(root["layoutBase"]); +})(this, function(__WEBPACK_EXTERNAL_MODULE__551__) { +return /******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 45: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var coseBase = {}; + +coseBase.layoutBase = __webpack_require__(551); +coseBase.CoSEConstants = __webpack_require__(806); +coseBase.CoSEEdge = __webpack_require__(767); +coseBase.CoSEGraph = __webpack_require__(880); +coseBase.CoSEGraphManager = __webpack_require__(578); +coseBase.CoSELayout = __webpack_require__(765); +coseBase.CoSENode = __webpack_require__(991); +coseBase.ConstraintHandler = __webpack_require__(902); + +module.exports = coseBase; + +/***/ }), + +/***/ 806: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var FDLayoutConstants = __webpack_require__(551).FDLayoutConstants; + +function CoSEConstants() {} + +//CoSEConstants inherits static props in FDLayoutConstants +for (var prop in FDLayoutConstants) { + CoSEConstants[prop] = FDLayoutConstants[prop]; +} + +CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; +CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; +CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; +CoSEConstants.TILE = true; +CoSEConstants.TILING_PADDING_VERTICAL = 10; +CoSEConstants.TILING_PADDING_HORIZONTAL = 10; +CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true; +CoSEConstants.ENFORCE_CONSTRAINTS = true; +CoSEConstants.APPLY_LAYOUT = true; +CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS = true; +CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; // this should be set to false if there will be a constraint +// This constant is for differentiating whether actual layout algorithm that uses cose-base wants to apply only incremental layout or +// an incremental layout on top of a randomized layout. If it is only incremental layout, then this constant should be true. +CoSEConstants.PURE_INCREMENTAL = CoSEConstants.DEFAULT_INCREMENTAL; + +module.exports = CoSEConstants; + +/***/ }), + +/***/ 767: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var FDLayoutEdge = __webpack_require__(551).FDLayoutEdge; + +function CoSEEdge(source, target, vEdge) { + FDLayoutEdge.call(this, source, target, vEdge); +} + +CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); +for (var prop in FDLayoutEdge) { + CoSEEdge[prop] = FDLayoutEdge[prop]; +} + +module.exports = CoSEEdge; + +/***/ }), + +/***/ 880: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var LGraph = __webpack_require__(551).LGraph; + +function CoSEGraph(parent, graphMgr, vGraph) { + LGraph.call(this, parent, graphMgr, vGraph); +} + +CoSEGraph.prototype = Object.create(LGraph.prototype); +for (var prop in LGraph) { + CoSEGraph[prop] = LGraph[prop]; +} + +module.exports = CoSEGraph; + +/***/ }), + +/***/ 578: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var LGraphManager = __webpack_require__(551).LGraphManager; + +function CoSEGraphManager(layout) { + LGraphManager.call(this, layout); +} + +CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); +for (var prop in LGraphManager) { + CoSEGraphManager[prop] = LGraphManager[prop]; +} + +module.exports = CoSEGraphManager; + +/***/ }), + +/***/ 765: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var FDLayout = __webpack_require__(551).FDLayout; +var CoSEGraphManager = __webpack_require__(578); +var CoSEGraph = __webpack_require__(880); +var CoSENode = __webpack_require__(991); +var CoSEEdge = __webpack_require__(767); +var CoSEConstants = __webpack_require__(806); +var ConstraintHandler = __webpack_require__(902); +var FDLayoutConstants = __webpack_require__(551).FDLayoutConstants; +var LayoutConstants = __webpack_require__(551).LayoutConstants; +var Point = __webpack_require__(551).Point; +var PointD = __webpack_require__(551).PointD; +var DimensionD = __webpack_require__(551).DimensionD; +var Layout = __webpack_require__(551).Layout; +var Integer = __webpack_require__(551).Integer; +var IGeometry = __webpack_require__(551).IGeometry; +var LGraph = __webpack_require__(551).LGraph; +var Transform = __webpack_require__(551).Transform; +var LinkedList = __webpack_require__(551).LinkedList; + +function CoSELayout() { + FDLayout.call(this); + + this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled + this.constraints = {}; // keep layout constraints +} + +CoSELayout.prototype = Object.create(FDLayout.prototype); + +for (var prop in FDLayout) { + CoSELayout[prop] = FDLayout[prop]; +} + +CoSELayout.prototype.newGraphManager = function () { + var gm = new CoSEGraphManager(this); + this.graphManager = gm; + return gm; +}; + +CoSELayout.prototype.newGraph = function (vGraph) { + return new CoSEGraph(null, this.graphManager, vGraph); +}; + +CoSELayout.prototype.newNode = function (vNode) { + return new CoSENode(this.graphManager, vNode); +}; + +CoSELayout.prototype.newEdge = function (vEdge) { + return new CoSEEdge(null, null, vEdge); +}; + +CoSELayout.prototype.initParameters = function () { + FDLayout.prototype.initParameters.call(this, arguments); + if (!this.isSubLayout) { + if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) { + this.idealEdgeLength = 10; + } else { + this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; + } + + this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + + // variables for tree reduction support + this.prunedNodesAll = []; + this.growTreeIterations = 0; + this.afterGrowthIterations = 0; + this.isTreeGrowing = false; + this.isGrowthFinished = false; + } +}; + +// This method is used to set CoSE related parameters used by spring embedder. +CoSELayout.prototype.initSpringEmbedder = function () { + FDLayout.prototype.initSpringEmbedder.call(this); + + // variables for cooling + this.coolingCycle = 0; + this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; + this.finalTemperature = 0.04; + this.coolingAdjuster = 1; +}; + +CoSELayout.prototype.layout = function () { + var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + if (createBendsAsNeeded) { + this.createBendpoints(); + this.graphManager.resetAllEdges(); + } + + this.level = 0; + return this.classicLayout(); +}; + +CoSELayout.prototype.classicLayout = function () { + this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); + this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); + this.calcNoOfChildrenForAllNodes(); + this.graphManager.calcLowestCommonAncestors(); + this.graphManager.calcInclusionTreeDepths(); + this.graphManager.getRoot().calcEstimatedSize(); + this.calcIdealEdgeLengths(); + + if (!this.incremental) { + var forest = this.getFlatForest(); + + // The graph associated with this layout is flat and a forest + if (forest.length > 0) { + this.positionNodesRadially(forest); + } + // The graph associated with this layout is not flat or a forest + else { + // Reduce the trees when incremental mode is not enabled and graph is not a forest + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.positionNodesRandomly(); + } + } else { + if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) { + // Reduce the trees in incremental mode if only this constant is set to true + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + } + } + + if (Object.keys(this.constraints).length > 0) { + ConstraintHandler.handleConstraints(this); + this.initConstraintVariables(); + } + + this.initSpringEmbedder(); + if (CoSEConstants.APPLY_LAYOUT) { + this.runSpringEmbedder(); + } + + return true; +}; + +CoSELayout.prototype.tick = function () { + this.totalIterations++; + + if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + + if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.isConverged()) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + + this.coolingCycle++; + + if (this.layoutQuality == 0) { + // quality - "draft" + this.coolingAdjuster = this.coolingCycle; + } else if (this.layoutQuality == 1) { + // quality - "default" + this.coolingAdjuster = this.coolingCycle / 3; + } + + // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3 + this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature); + this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); + } + // Operations while tree is growing again + if (this.isTreeGrowing) { + if (this.growTreeIterations % 10 == 0) { + if (this.prunedNodesAll.length > 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + this.growTree(this.prunedNodesAll); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.graphManager.updateBounds(); + this.updateGrid(); + if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2;else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + } else { + this.isTreeGrowing = false; + this.isGrowthFinished = true; + } + } + this.growTreeIterations++; + } + // Operations after growth is finished + if (this.isGrowthFinished) { + if (this.isConverged()) { + return true; + } + if (this.afterGrowthIterations % 10 == 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + } + if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100);else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); + this.afterGrowthIterations++; + } + + var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; + var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; + + this.totalDisplacement = 0; + this.graphManager.updateBounds(); + this.calcSpringForces(); + this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); + this.calcGravitationalForces(); + this.moveNodes(); + this.animate(); + + return false; // Layout is not ended yet return false +}; + +CoSELayout.prototype.getPositionsData = function () { + var allNodes = this.graphManager.getAllNodes(); + var pData = {}; + for (var i = 0; i < allNodes.length; i++) { + var rect = allNodes[i].rect; + var id = allNodes[i].id; + pData[id] = { + id: id, + x: rect.getCenterX(), + y: rect.getCenterY(), + w: rect.width, + h: rect.height + }; + } + + return pData; +}; + +CoSELayout.prototype.runSpringEmbedder = function () { + this.initialAnimationPeriod = 25; + this.animationPeriod = this.initialAnimationPeriod; + var layoutEnded = false; + + // If aminate option is 'during' signal that layout is supposed to start iterating + if (FDLayoutConstants.ANIMATE === 'during') { + this.emit('layoutstarted'); + } else { + // If aminate option is 'during' tick() function will be called on index.js + while (!layoutEnded) { + layoutEnded = this.tick(); + } + + this.graphManager.updateBounds(); + } +}; + +// overrides moveNodes method in FDLayout +CoSELayout.prototype.moveNodes = function () { + var lNodes = this.getAllNodes(); + var node; + + // calculate displacement for each node + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + node.calculateDisplacement(); + } + + if (Object.keys(this.constraints).length > 0) { + this.updateDisplacements(); + } + + // move each node + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + node.move(); + } +}; + +// constraint related methods: initConstraintVariables and updateDisplacements + +// initialize constraint related variables +CoSELayout.prototype.initConstraintVariables = function () { + var self = this; + this.idToNodeMap = new Map(); + this.fixedNodeSet = new Set(); + + var allNodes = this.graphManager.getAllNodes(); + + // fill idToNodeMap + for (var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + this.idToNodeMap.set(node.id, node); + } + + // calculate fixed node weight for given compound node + var calculateCompoundWeight = function calculateCompoundWeight(compoundNode) { + var nodes = compoundNode.getChild().getNodes(); + var node; + var fixedNodeWeight = 0; + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + if (node.getChild() == null) { + if (self.fixedNodeSet.has(node.id)) { + fixedNodeWeight += 100; + } + } else { + fixedNodeWeight += calculateCompoundWeight(node); + } + } + return fixedNodeWeight; + }; + + if (this.constraints.fixedNodeConstraint) { + // fill fixedNodeSet + this.constraints.fixedNodeConstraint.forEach(function (nodeData) { + self.fixedNodeSet.add(nodeData.nodeId); + }); + + // assign fixed node weights to compounds if they contain fixed nodes + var allNodes = this.graphManager.getAllNodes(); + var node; + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + if (node.getChild() != null) { + var fixedNodeWeight = calculateCompoundWeight(node); + if (fixedNodeWeight > 0) { + node.fixedNodeWeight = fixedNodeWeight; + } + } + } + } + + if (this.constraints.relativePlacementConstraint) { + var nodeToDummyForVerticalAlignment = new Map(); + var nodeToDummyForHorizontalAlignment = new Map(); + this.dummyToNodeForVerticalAlignment = new Map(); + this.dummyToNodeForHorizontalAlignment = new Map(); + this.fixedNodesOnHorizontal = new Set(); + this.fixedNodesOnVertical = new Set(); + + // fill maps and sets + this.fixedNodeSet.forEach(function (nodeId) { + self.fixedNodesOnHorizontal.add(nodeId); + self.fixedNodesOnVertical.add(nodeId); + }); + + if (this.constraints.alignmentConstraint) { + if (this.constraints.alignmentConstraint.vertical) { + var verticalAlignment = this.constraints.alignmentConstraint.vertical; + for (var i = 0; i < verticalAlignment.length; i++) { + this.dummyToNodeForVerticalAlignment.set("dummy" + i, []); + verticalAlignment[i].forEach(function (nodeId) { + nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + i); + self.dummyToNodeForVerticalAlignment.get("dummy" + i).push(nodeId); + if (self.fixedNodeSet.has(nodeId)) { + self.fixedNodesOnHorizontal.add("dummy" + i); + } + }); + } + } + if (this.constraints.alignmentConstraint.horizontal) { + var horizontalAlignment = this.constraints.alignmentConstraint.horizontal; + for (var i = 0; i < horizontalAlignment.length; i++) { + this.dummyToNodeForHorizontalAlignment.set("dummy" + i, []); + horizontalAlignment[i].forEach(function (nodeId) { + nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + i); + self.dummyToNodeForHorizontalAlignment.get("dummy" + i).push(nodeId); + if (self.fixedNodeSet.has(nodeId)) { + self.fixedNodesOnVertical.add("dummy" + i); + } + }); + } + } + } + + if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) { + + this.shuffle = function (array) { + var j, x, i; + for (i = array.length - 1; i >= 2 * array.length / 3; i--) { + j = Math.floor(Math.random() * (i + 1)); + x = array[i]; + array[i] = array[j]; + array[j] = x; + } + return array; + }; + + this.nodesInRelativeHorizontal = []; + this.nodesInRelativeVertical = []; + this.nodeToRelativeConstraintMapHorizontal = new Map(); + this.nodeToRelativeConstraintMapVertical = new Map(); + this.nodeToTempPositionMapHorizontal = new Map(); + this.nodeToTempPositionMapVertical = new Map(); + + // fill arrays and maps + this.constraints.relativePlacementConstraint.forEach(function (constraint) { + if (constraint.left) { + var nodeIdLeft = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left; + var nodeIdRight = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right; + + if (!self.nodesInRelativeHorizontal.includes(nodeIdLeft)) { + self.nodesInRelativeHorizontal.push(nodeIdLeft); + self.nodeToRelativeConstraintMapHorizontal.set(nodeIdLeft, []); + if (self.dummyToNodeForVerticalAlignment.has(nodeIdLeft)) { + self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdLeft)[0]).getCenterX()); + } else { + self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(nodeIdLeft).getCenterX()); + } + } + if (!self.nodesInRelativeHorizontal.includes(nodeIdRight)) { + self.nodesInRelativeHorizontal.push(nodeIdRight); + self.nodeToRelativeConstraintMapHorizontal.set(nodeIdRight, []); + if (self.dummyToNodeForVerticalAlignment.has(nodeIdRight)) { + self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdRight)[0]).getCenterX()); + } else { + self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(nodeIdRight).getCenterX()); + } + } + + self.nodeToRelativeConstraintMapHorizontal.get(nodeIdLeft).push({ right: nodeIdRight, gap: constraint.gap }); + self.nodeToRelativeConstraintMapHorizontal.get(nodeIdRight).push({ left: nodeIdLeft, gap: constraint.gap }); + } else { + var nodeIdTop = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top; + var nodeIdBottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom; + + if (!self.nodesInRelativeVertical.includes(nodeIdTop)) { + self.nodesInRelativeVertical.push(nodeIdTop); + self.nodeToRelativeConstraintMapVertical.set(nodeIdTop, []); + if (self.dummyToNodeForHorizontalAlignment.has(nodeIdTop)) { + self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdTop)[0]).getCenterY()); + } else { + self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(nodeIdTop).getCenterY()); + } + } + if (!self.nodesInRelativeVertical.includes(nodeIdBottom)) { + self.nodesInRelativeVertical.push(nodeIdBottom); + self.nodeToRelativeConstraintMapVertical.set(nodeIdBottom, []); + if (self.dummyToNodeForHorizontalAlignment.has(nodeIdBottom)) { + self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdBottom)[0]).getCenterY()); + } else { + self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(nodeIdBottom).getCenterY()); + } + } + self.nodeToRelativeConstraintMapVertical.get(nodeIdTop).push({ bottom: nodeIdBottom, gap: constraint.gap }); + self.nodeToRelativeConstraintMapVertical.get(nodeIdBottom).push({ top: nodeIdTop, gap: constraint.gap }); + } + }); + } else { + var subGraphOnHorizontal = new Map(); // subgraph from vertical RP constraints + var subGraphOnVertical = new Map(); // subgraph from vertical RP constraints + + // construct subgraphs from relative placement constraints + this.constraints.relativePlacementConstraint.forEach(function (constraint) { + if (constraint.left) { + var left = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left; + var right = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right; + if (subGraphOnHorizontal.has(left)) { + subGraphOnHorizontal.get(left).push(right); + } else { + subGraphOnHorizontal.set(left, [right]); + } + if (subGraphOnHorizontal.has(right)) { + subGraphOnHorizontal.get(right).push(left); + } else { + subGraphOnHorizontal.set(right, [left]); + } + } else { + var top = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top; + var bottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom; + if (subGraphOnVertical.has(top)) { + subGraphOnVertical.get(top).push(bottom); + } else { + subGraphOnVertical.set(top, [bottom]); + } + if (subGraphOnVertical.has(bottom)) { + subGraphOnVertical.get(bottom).push(top); + } else { + subGraphOnVertical.set(bottom, [top]); + } + } + }); + + // function to construct components from a given graph + // also returns an array that keeps whether each component contains fixed node + var constructComponents = function constructComponents(graph, fixedNodes) { + var components = []; + var isFixed = []; + var queue = new LinkedList(); + var visited = new Set(); + var count = 0; + + graph.forEach(function (value, key) { + if (!visited.has(key)) { + components[count] = []; + isFixed[count] = false; + var currentNode = key; + queue.push(currentNode); + visited.add(currentNode); + components[count].push(currentNode); + + while (queue.length != 0) { + currentNode = queue.shift(); + if (fixedNodes.has(currentNode)) { + isFixed[count] = true; + } + var neighbors = graph.get(currentNode); + neighbors.forEach(function (neighbor) { + if (!visited.has(neighbor)) { + queue.push(neighbor); + visited.add(neighbor); + components[count].push(neighbor); + } + }); + } + count++; + } + }); + + return { components: components, isFixed: isFixed }; + }; + + var resultOnHorizontal = constructComponents(subGraphOnHorizontal, self.fixedNodesOnHorizontal); + this.componentsOnHorizontal = resultOnHorizontal.components; + this.fixedComponentsOnHorizontal = resultOnHorizontal.isFixed; + var resultOnVertical = constructComponents(subGraphOnVertical, self.fixedNodesOnVertical); + this.componentsOnVertical = resultOnVertical.components; + this.fixedComponentsOnVertical = resultOnVertical.isFixed; + } + } +}; + +// updates node displacements based on constraints +CoSELayout.prototype.updateDisplacements = function () { + var self = this; + if (this.constraints.fixedNodeConstraint) { + this.constraints.fixedNodeConstraint.forEach(function (nodeData) { + var fixedNode = self.idToNodeMap.get(nodeData.nodeId); + fixedNode.displacementX = 0; + fixedNode.displacementY = 0; + }); + } + + if (this.constraints.alignmentConstraint) { + if (this.constraints.alignmentConstraint.vertical) { + var allVerticalAlignments = this.constraints.alignmentConstraint.vertical; + for (var i = 0; i < allVerticalAlignments.length; i++) { + var totalDisplacementX = 0; + for (var j = 0; j < allVerticalAlignments[i].length; j++) { + if (this.fixedNodeSet.has(allVerticalAlignments[i][j])) { + totalDisplacementX = 0; + break; + } + totalDisplacementX += this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX; + } + var averageDisplacementX = totalDisplacementX / allVerticalAlignments[i].length; + for (var j = 0; j < allVerticalAlignments[i].length; j++) { + this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX = averageDisplacementX; + } + } + } + if (this.constraints.alignmentConstraint.horizontal) { + var allHorizontalAlignments = this.constraints.alignmentConstraint.horizontal; + for (var i = 0; i < allHorizontalAlignments.length; i++) { + var totalDisplacementY = 0; + for (var j = 0; j < allHorizontalAlignments[i].length; j++) { + if (this.fixedNodeSet.has(allHorizontalAlignments[i][j])) { + totalDisplacementY = 0; + break; + } + totalDisplacementY += this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY; + } + var averageDisplacementY = totalDisplacementY / allHorizontalAlignments[i].length; + for (var j = 0; j < allHorizontalAlignments[i].length; j++) { + this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY = averageDisplacementY; + } + } + } + } + + if (this.constraints.relativePlacementConstraint) { + + if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) { + // shuffle array to randomize node processing order + if (this.totalIterations % 10 == 0) { + this.shuffle(this.nodesInRelativeHorizontal); + this.shuffle(this.nodesInRelativeVertical); + } + + this.nodesInRelativeHorizontal.forEach(function (nodeId) { + if (!self.fixedNodesOnHorizontal.has(nodeId)) { + var displacement = 0; + if (self.dummyToNodeForVerticalAlignment.has(nodeId)) { + displacement = self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeId)[0]).displacementX; + } else { + displacement = self.idToNodeMap.get(nodeId).displacementX; + } + self.nodeToRelativeConstraintMapHorizontal.get(nodeId).forEach(function (constraint) { + if (constraint.right) { + var diff = self.nodeToTempPositionMapHorizontal.get(constraint.right) - self.nodeToTempPositionMapHorizontal.get(nodeId) - displacement; + if (diff < constraint.gap) { + displacement -= constraint.gap - diff; + } + } else { + var diff = self.nodeToTempPositionMapHorizontal.get(nodeId) - self.nodeToTempPositionMapHorizontal.get(constraint.left) + displacement; + if (diff < constraint.gap) { + displacement += constraint.gap - diff; + } + } + }); + self.nodeToTempPositionMapHorizontal.set(nodeId, self.nodeToTempPositionMapHorizontal.get(nodeId) + displacement); + if (self.dummyToNodeForVerticalAlignment.has(nodeId)) { + self.dummyToNodeForVerticalAlignment.get(nodeId).forEach(function (nodeId) { + self.idToNodeMap.get(nodeId).displacementX = displacement; + }); + } else { + self.idToNodeMap.get(nodeId).displacementX = displacement; + } + } + }); + + this.nodesInRelativeVertical.forEach(function (nodeId) { + if (!self.fixedNodesOnHorizontal.has(nodeId)) { + var displacement = 0; + if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) { + displacement = self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeId)[0]).displacementY; + } else { + displacement = self.idToNodeMap.get(nodeId).displacementY; + } + self.nodeToRelativeConstraintMapVertical.get(nodeId).forEach(function (constraint) { + if (constraint.bottom) { + var diff = self.nodeToTempPositionMapVertical.get(constraint.bottom) - self.nodeToTempPositionMapVertical.get(nodeId) - displacement; + if (diff < constraint.gap) { + displacement -= constraint.gap - diff; + } + } else { + var diff = self.nodeToTempPositionMapVertical.get(nodeId) - self.nodeToTempPositionMapVertical.get(constraint.top) + displacement; + if (diff < constraint.gap) { + displacement += constraint.gap - diff; + } + } + }); + self.nodeToTempPositionMapVertical.set(nodeId, self.nodeToTempPositionMapVertical.get(nodeId) + displacement); + if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) { + self.dummyToNodeForHorizontalAlignment.get(nodeId).forEach(function (nodeId) { + self.idToNodeMap.get(nodeId).displacementY = displacement; + }); + } else { + self.idToNodeMap.get(nodeId).displacementY = displacement; + } + } + }); + } else { + for (var i = 0; i < this.componentsOnHorizontal.length; i++) { + var component = this.componentsOnHorizontal[i]; + if (this.fixedComponentsOnHorizontal[i]) { + for (var j = 0; j < component.length; j++) { + if (this.dummyToNodeForVerticalAlignment.has(component[j])) { + this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) { + self.idToNodeMap.get(nodeId).displacementX = 0; + }); + } else { + this.idToNodeMap.get(component[j]).displacementX = 0; + } + } + } else { + var sum = 0; + var count = 0; + for (var j = 0; j < component.length; j++) { + if (this.dummyToNodeForVerticalAlignment.has(component[j])) { + var actualNodes = this.dummyToNodeForVerticalAlignment.get(component[j]); + sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementX; + count += actualNodes.length; + } else { + sum += this.idToNodeMap.get(component[j]).displacementX; + count++; + } + } + var averageDisplacement = sum / count; + for (var j = 0; j < component.length; j++) { + if (this.dummyToNodeForVerticalAlignment.has(component[j])) { + this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) { + self.idToNodeMap.get(nodeId).displacementX = averageDisplacement; + }); + } else { + this.idToNodeMap.get(component[j]).displacementX = averageDisplacement; + } + } + } + } + + for (var i = 0; i < this.componentsOnVertical.length; i++) { + var component = this.componentsOnVertical[i]; + if (this.fixedComponentsOnVertical[i]) { + for (var j = 0; j < component.length; j++) { + if (this.dummyToNodeForHorizontalAlignment.has(component[j])) { + this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) { + self.idToNodeMap.get(nodeId).displacementY = 0; + }); + } else { + this.idToNodeMap.get(component[j]).displacementY = 0; + } + } + } else { + var sum = 0; + var count = 0; + for (var j = 0; j < component.length; j++) { + if (this.dummyToNodeForHorizontalAlignment.has(component[j])) { + var actualNodes = this.dummyToNodeForHorizontalAlignment.get(component[j]); + sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementY; + count += actualNodes.length; + } else { + sum += this.idToNodeMap.get(component[j]).displacementY; + count++; + } + } + var averageDisplacement = sum / count; + for (var j = 0; j < component.length; j++) { + if (this.dummyToNodeForHorizontalAlignment.has(component[j])) { + this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) { + self.idToNodeMap.get(nodeId).displacementY = averageDisplacement; + }); + } else { + this.idToNodeMap.get(component[j]).displacementY = averageDisplacement; + } + } + } + } + } + } +}; + +CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () { + var nodeList = []; + var graph; + + var graphs = this.graphManager.getGraphs(); + var size = graphs.length; + var i; + for (i = 0; i < size; i++) { + graph = graphs[i]; + + graph.updateConnected(); + + if (!graph.isConnected) { + nodeList = nodeList.concat(graph.getNodes()); + } + } + + return nodeList; +}; + +CoSELayout.prototype.createBendpoints = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + var visited = new Set(); + var i; + for (i = 0; i < edges.length; i++) { + var edge = edges[i]; + + if (!visited.has(edge)) { + var source = edge.getSource(); + var target = edge.getTarget(); + + if (source == target) { + edge.getBendpoints().push(new PointD()); + edge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(edge); + visited.add(edge); + } else { + var edgeList = []; + + edgeList = edgeList.concat(source.getEdgeListToNode(target)); + edgeList = edgeList.concat(target.getEdgeListToNode(source)); + + if (!visited.has(edgeList[0])) { + if (edgeList.length > 1) { + var k; + for (k = 0; k < edgeList.length; k++) { + var multiEdge = edgeList[k]; + multiEdge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(multiEdge); + } + } + edgeList.forEach(function (edge) { + visited.add(edge); + }); + } + } + } + + if (visited.size == edges.length) { + break; + } + } +}; + +CoSELayout.prototype.positionNodesRadially = function (forest) { + // We tile the trees to a grid row by row; first tree starts at (0,0) + var currentStartingPoint = new Point(0, 0); + var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); + var height = 0; + var currentY = 0; + var currentX = 0; + var point = new PointD(0, 0); + + for (var i = 0; i < forest.length; i++) { + if (i % numberOfColumns == 0) { + // Start of a new row, make the x coordinate 0, increment the + // y coordinate with the max height of the previous row + currentX = 0; + currentY = height; + + if (i != 0) { + currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; + } + + height = 0; + } + + var tree = forest[i]; + + // Find the center of the tree + var centerNode = Layout.findCenterOfTree(tree); + + // Set the staring point of the next tree + currentStartingPoint.x = currentX; + currentStartingPoint.y = currentY; + + // Do a radial layout starting with the center + point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); + + if (point.y > height) { + height = Math.floor(point.y); + } + + currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); + } + + this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2)); +}; + +CoSELayout.radialLayout = function (tree, centerNode, startingPoint) { + var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION); + CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); + var bounds = LGraph.calculateBounds(tree); + + var transform = new Transform(); + transform.setDeviceOrgX(bounds.getMinX()); + transform.setDeviceOrgY(bounds.getMinY()); + transform.setWorldOrgX(startingPoint.x); + transform.setWorldOrgY(startingPoint.y); + + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + node.transform(transform); + } + + var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY()); + + return transform.inverseTransformPoint(bottomRight); +}; + +CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) { + // First, position this node by finding its angle. + var halfInterval = (endAngle - startAngle + 1) / 2; + + if (halfInterval < 0) { + halfInterval += 180; + } + + var nodeAngle = (halfInterval + startAngle) % 360; + var teta = nodeAngle * IGeometry.TWO_PI / 360; + + // Make polar to java cordinate conversion. + var cos_teta = Math.cos(teta); + var x_ = distance * Math.cos(teta); + var y_ = distance * Math.sin(teta); + + node.setCenter(x_, y_); + + // Traverse all neighbors of this node and recursively call this + // function. + var neighborEdges = []; + neighborEdges = neighborEdges.concat(node.getEdges()); + var childCount = neighborEdges.length; + + if (parentOfNode != null) { + childCount--; + } + + var branchCount = 0; + + var incEdgesCount = neighborEdges.length; + var startIndex; + + var edges = node.getEdgesBetween(parentOfNode); + + // If there are multiple edges, prune them until there remains only one + // edge. + while (edges.length > 1) { + //neighborEdges.remove(edges.remove(0)); + var temp = edges[0]; + edges.splice(0, 1); + var index = neighborEdges.indexOf(temp); + if (index >= 0) { + neighborEdges.splice(index, 1); + } + incEdgesCount--; + childCount--; + } + + if (parentOfNode != null) { + //assert edges.length == 1; + startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount; + } else { + startIndex = 0; + } + + var stepAngle = Math.abs(endAngle - startAngle) / childCount; + + for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) { + var currentNeighbor = neighborEdges[i].getOtherEnd(node); + + // Don't back traverse to root node in current tree. + if (currentNeighbor == parentOfNode) { + continue; + } + + var childStartAngle = (startAngle + branchCount * stepAngle) % 360; + var childEndAngle = (childStartAngle + stepAngle) % 360; + + CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation); + + branchCount++; + } +}; + +CoSELayout.maxDiagonalInTree = function (tree) { + var maxDiagonal = Integer.MIN_VALUE; + + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + var diagonal = node.getDiagonal(); + + if (diagonal > maxDiagonal) { + maxDiagonal = diagonal; + } + } + + return maxDiagonal; +}; + +CoSELayout.prototype.calcRepulsionRange = function () { + // formula is 2 x (level + 1) x idealEdgeLength + return 2 * (this.level + 1) * this.idealEdgeLength; +}; + +// Tiling methods + +// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's +CoSELayout.prototype.groupZeroDegreeMembers = function () { + var self = this; + // array of [parent_id x oneDegreeNode_id] + var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members + this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled + this.idToDummyNode = {}; // A map of id to dummy node + + var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled + var allNodes = this.graphManager.getAllNodes(); + + // Fill zero degree list + for (var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + var parent = node.getParent(); + // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list + if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) { + zeroDegree.push(node); + } + } + + // Create a map of parent node and its zero degree members + for (var i = 0; i < zeroDegree.length; i++) { + var node = zeroDegree[i]; // Zero degree node itself + var p_id = node.getParent().id; // Parent id + + if (typeof tempMemberGroups[p_id] === "undefined") tempMemberGroups[p_id] = []; + + tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups + } + + // If there are at least two nodes at a level, create a dummy compound for them + Object.keys(tempMemberGroups).forEach(function (p_id) { + if (tempMemberGroups[p_id].length > 1) { + var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon + self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups + + var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound + + // Create a dummy compound with calculated id + var dummyCompound = new CoSENode(self.graphManager); + dummyCompound.id = dummyCompoundId; + dummyCompound.paddingLeft = parent.paddingLeft || 0; + dummyCompound.paddingRight = parent.paddingRight || 0; + dummyCompound.paddingBottom = parent.paddingBottom || 0; + dummyCompound.paddingTop = parent.paddingTop || 0; + + self.idToDummyNode[dummyCompoundId] = dummyCompound; + + var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound); + var parentGraph = parent.getChild(); + + // Add dummy compound to parent the graph + parentGraph.add(dummyCompound); + + // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent + for (var i = 0; i < tempMemberGroups[p_id].length; i++) { + var node = tempMemberGroups[p_id][i]; + + parentGraph.remove(node); + dummyParentGraph.add(node); + } + } + }); +}; + +CoSELayout.prototype.clearCompounds = function () { + var childGraphMap = {}; + var idToNode = {}; + + // Get compound ordering by finding the inner one first + this.performDFSOnCompounds(); + + for (var i = 0; i < this.compoundOrder.length; i++) { + + idToNode[this.compoundOrder[i].id] = this.compoundOrder[i]; + childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes()); + + // Remove children of compounds + this.graphManager.remove(this.compoundOrder[i].getChild()); + this.compoundOrder[i].child = null; + } + + this.graphManager.resetAllNodes(); + + // Tile the removed children + this.tileCompoundMembers(childGraphMap, idToNode); +}; + +CoSELayout.prototype.clearZeroDegreeMembers = function () { + var self = this; + var tiledZeroDegreePack = this.tiledZeroDegreePack = []; + + Object.keys(this.memberGroups).forEach(function (id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound + + tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + // Set the width and height of the dummy compound as calculated + compoundNode.rect.width = tiledZeroDegreePack[id].width; + compoundNode.rect.height = tiledZeroDegreePack[id].height; + compoundNode.setCenter(tiledZeroDegreePack[id].centerX, tiledZeroDegreePack[id].centerY); + + // compound left and top margings for labels + // when node labels are included, these values may be set to different values below and are used in tilingPostLayout, + // otherwise they stay as zero + compoundNode.labelMarginLeft = 0; + compoundNode.labelMarginTop = 0; + + // Update compound bounds considering its label properties and set label margins for left and top + if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { + + var width = compoundNode.rect.width; + var height = compoundNode.rect.height; + + if (compoundNode.labelWidth) { + if (compoundNode.labelPosHorizontal == "left") { + compoundNode.rect.x -= compoundNode.labelWidth; + compoundNode.setWidth(width + compoundNode.labelWidth); + compoundNode.labelMarginLeft = compoundNode.labelWidth; + } else if (compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width) { + compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2; + compoundNode.setWidth(compoundNode.labelWidth); + compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2; + } else if (compoundNode.labelPosHorizontal == "right") { + compoundNode.setWidth(width + compoundNode.labelWidth); + } + } + + if (compoundNode.labelHeight) { + if (compoundNode.labelPosVertical == "top") { + compoundNode.rect.y -= compoundNode.labelHeight; + compoundNode.setHeight(height + compoundNode.labelHeight); + compoundNode.labelMarginTop = compoundNode.labelHeight; + } else if (compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height) { + compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2; + compoundNode.setHeight(compoundNode.labelHeight); + compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2; + } else if (compoundNode.labelPosVertical == "bottom") { + compoundNode.setHeight(height + compoundNode.labelHeight); + } + } + } + }); +}; + +CoSELayout.prototype.repopulateCompounds = function () { + for (var i = this.compoundOrder.length - 1; i >= 0; i--) { + var lCompoundNode = this.compoundOrder[i]; + var id = lCompoundNode.id; + var horizontalMargin = lCompoundNode.paddingLeft; + var verticalMargin = lCompoundNode.paddingTop; + var labelMarginLeft = lCompoundNode.labelMarginLeft; + var labelMarginTop = lCompoundNode.labelMarginTop; + + this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop); + } +}; + +CoSELayout.prototype.repopulateZeroDegreeMembers = function () { + var self = this; + var tiledPack = this.tiledZeroDegreePack; + + Object.keys(tiledPack).forEach(function (id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id + var horizontalMargin = compoundNode.paddingLeft; + var verticalMargin = compoundNode.paddingTop; + var labelMarginLeft = compoundNode.labelMarginLeft; + var labelMarginTop = compoundNode.labelMarginTop; + + // Adjust the positions of nodes wrt its compound + self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop); + }); +}; + +CoSELayout.prototype.getToBeTiled = function (node) { + var id = node.id; + //firstly check the previous results + if (this.toBeTiled[id] != null) { + return this.toBeTiled[id]; + } + + //only compound nodes are to be tiled + var childGraph = node.getChild(); + if (childGraph == null) { + this.toBeTiled[id] = false; + return false; + } + + var children = childGraph.getNodes(); // Get the children nodes + + //a compound node is not to be tiled if all of its compound children are not to be tiled + for (var i = 0; i < children.length; i++) { + var theChild = children[i]; + + if (this.getNodeDegree(theChild) > 0) { + this.toBeTiled[id] = false; + return false; + } + + //pass the children not having the compound structure + if (theChild.getChild() == null) { + this.toBeTiled[theChild.id] = false; + continue; + } + + if (!this.getToBeTiled(theChild)) { + this.toBeTiled[id] = false; + return false; + } + } + this.toBeTiled[id] = true; + return true; +}; + +// Get degree of a node depending of its edges and independent of its children +CoSELayout.prototype.getNodeDegree = function (node) { + var id = node.id; + var edges = node.getEdges(); + var degree = 0; + + // For the edges connected + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + if (edge.getSource().id !== edge.getTarget().id) { + degree = degree + 1; + } + } + return degree; +}; + +// Get degree of a node with its children +CoSELayout.prototype.getNodeDegreeWithChildren = function (node) { + var degree = this.getNodeDegree(node); + if (node.getChild() == null) { + return degree; + } + var children = node.getChild().getNodes(); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + degree += this.getNodeDegreeWithChildren(child); + } + return degree; +}; + +CoSELayout.prototype.performDFSOnCompounds = function () { + this.compoundOrder = []; + this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); +}; + +CoSELayout.prototype.fillCompexOrderByDFS = function (children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (child.getChild() != null) { + this.fillCompexOrderByDFS(child.getChild().getNodes()); + } + if (this.getToBeTiled(child)) { + this.compoundOrder.push(child); + } + } +}; + +/** +* This method places each zero degree member wrt given (x,y) coordinates (top left). +*/ +CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin, compoundLabelMarginLeft, compoundLabelMarginTop) { + x += compoundHorizontalMargin + compoundLabelMarginLeft; + y += compoundVerticalMargin + compoundLabelMarginTop; + + var left = x; + + for (var i = 0; i < organization.rows.length; i++) { + var row = organization.rows[i]; + x = left; + var maxHeight = 0; + + for (var j = 0; j < row.length; j++) { + var lnode = row[j]; + + lnode.rect.x = x; // + lnode.rect.width / 2; + lnode.rect.y = y; // + lnode.rect.height / 2; + + x += lnode.rect.width + organization.horizontalPadding; + + if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height; + } + + y += maxHeight + organization.verticalPadding; + } +}; + +CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) { + var self = this; + this.tiledMemberPack = []; + + Object.keys(childGraphMap).forEach(function (id) { + // Get the compound node + var compoundNode = idToNode[id]; + + self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + compoundNode.rect.width = self.tiledMemberPack[id].width; + compoundNode.rect.height = self.tiledMemberPack[id].height; + compoundNode.setCenter(self.tiledMemberPack[id].centerX, self.tiledMemberPack[id].centerY); + + // compound left and top margings for labels + // when node labels are included, these values may be set to different values below and are used in tilingPostLayout, + // otherwise they stay as zero + compoundNode.labelMarginLeft = 0; + compoundNode.labelMarginTop = 0; + + // Update compound bounds considering its label properties and set label margins for left and top + if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { + + var width = compoundNode.rect.width; + var height = compoundNode.rect.height; + + if (compoundNode.labelWidth) { + if (compoundNode.labelPosHorizontal == "left") { + compoundNode.rect.x -= compoundNode.labelWidth; + compoundNode.setWidth(width + compoundNode.labelWidth); + compoundNode.labelMarginLeft = compoundNode.labelWidth; + } else if (compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width) { + compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2; + compoundNode.setWidth(compoundNode.labelWidth); + compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2; + } else if (compoundNode.labelPosHorizontal == "right") { + compoundNode.setWidth(width + compoundNode.labelWidth); + } + } + + if (compoundNode.labelHeight) { + if (compoundNode.labelPosVertical == "top") { + compoundNode.rect.y -= compoundNode.labelHeight; + compoundNode.setHeight(height + compoundNode.labelHeight); + compoundNode.labelMarginTop = compoundNode.labelHeight; + } else if (compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height) { + compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2; + compoundNode.setHeight(compoundNode.labelHeight); + compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2; + } else if (compoundNode.labelPosVertical == "bottom") { + compoundNode.setHeight(height + compoundNode.labelHeight); + } + } + } + }); +}; + +CoSELayout.prototype.tileNodes = function (nodes, minWidth) { + var horizontalOrg = this.tileNodesByFavoringDim(nodes, minWidth, true); + var verticalOrg = this.tileNodesByFavoringDim(nodes, minWidth, false); + + var horizontalRatio = this.getOrgRatio(horizontalOrg); + var verticalRatio = this.getOrgRatio(verticalOrg); + var bestOrg; + + // the best ratio is the one that is closer to 1 since the ratios are already normalized + // and the best organization is the one that has the best ratio + if (verticalRatio < horizontalRatio) { + bestOrg = verticalOrg; + } else { + bestOrg = horizontalOrg; + } + + return bestOrg; +}; + +// get the width/height ratio of the organization that is normalized so that it will not be less than 1 +CoSELayout.prototype.getOrgRatio = function (organization) { + // get dimensions and calculate the initial ratio + var width = organization.width; + var height = organization.height; + var ratio = width / height; + + // if the initial ratio is less then 1 then inverse it + if (ratio < 1) { + ratio = 1 / ratio; + } + + // return the normalized ratio + return ratio; +}; + +/* + * Calculates the ideal width for the rows. This method assumes that + * each node has the same sizes and calculates the ideal row width that + * approximates a square shaped complex accordingly. However, since nodes would + * have different sizes some rows would have different sizes and the resulting + * shape would not be an exact square. + */ +CoSELayout.prototype.calcIdealRowWidth = function (members, favorHorizontalDim) { + // To approximate a square shaped complex we need to make complex width equal to complex height. + // To achieve this we need to solve the following equation system for hc: + // (x + bx) * hc - bx = (y + by) * vc - by, hc * vc = n + // where x is the avarage width of the nodes, y is the avarage height of nodes + // bx and by are the buffer sizes in horizontal and vertical dimensions accordingly, + // hc and vc are the number of rows in horizontal and vertical dimensions + // n is number of members. + + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + + // number of members + var membersSize = members.length; + + // sum of the width of all members + var totalWidth = 0; + + // sum of the height of all members + var totalHeight = 0; + + var maxWidth = 0; + + // traverse all members to calculate total width and total height and get the maximum members width + members.forEach(function (node) { + totalWidth += node.getWidth(); + totalHeight += node.getHeight(); + + if (node.getWidth() > maxWidth) { + maxWidth = node.getWidth(); + } + }); + + // average width of the members + var averageWidth = totalWidth / membersSize; + + // average height of the members + var averageHeight = totalHeight / membersSize; + + // solving the initial equation system for the hc yields the following second degree equation: + // hc^2 * (x+bx) + hc * (by - bx) - n * (y + by) = 0 + + // the delta value to solve the equation above for hc + var delta = Math.pow(verticalPadding - horizontalPadding, 2) + 4 * (averageWidth + horizontalPadding) * (averageHeight + verticalPadding) * membersSize; + + // solve the equation using delta value to calculate the horizontal count + // that represents the number of nodes in an ideal row + var horizontalCountDouble = (horizontalPadding - verticalPadding + Math.sqrt(delta)) / (2 * (averageWidth + horizontalPadding)); + // round the calculated horizontal count up or down according to the favored dimension + var horizontalCount; + + if (favorHorizontalDim) { + horizontalCount = Math.ceil(horizontalCountDouble); + // if horizontalCount count is not a float value then both of rounding to floor and ceil + // will yield the same values. Instead of repeating the same calculation try going up + // while favoring horizontal dimension in such cases + if (horizontalCount == horizontalCountDouble) { + horizontalCount++; + } + } else { + horizontalCount = Math.floor(horizontalCountDouble); + } + + // ideal width to be calculated + var idealWidth = horizontalCount * (averageWidth + horizontalPadding) - horizontalPadding; + + // if max width is bigger than calculated ideal width reset ideal width to it + if (maxWidth > idealWidth) { + idealWidth = maxWidth; + } + + // add the left-right margins to the ideal row width + idealWidth += horizontalPadding * 2; + + // return the ideal row width1 + return idealWidth; +}; + +CoSELayout.prototype.tileNodesByFavoringDim = function (nodes, minWidth, favorHorizontalDim) { + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + var tilingCompareBy = CoSEConstants.TILING_COMPARE_BY; + var organization = { + rows: [], + rowWidth: [], + rowHeight: [], + width: 0, + height: minWidth, // assume minHeight equals to minWidth + verticalPadding: verticalPadding, + horizontalPadding: horizontalPadding, + centerX: 0, + centerY: 0 + }; + + if (tilingCompareBy) { + organization.idealRowWidth = this.calcIdealRowWidth(nodes, favorHorizontalDim); + } + + var getNodeArea = function getNodeArea(n) { + return n.rect.width * n.rect.height; + }; + + var areaCompareFcn = function areaCompareFcn(n1, n2) { + return getNodeArea(n2) - getNodeArea(n1); + }; + + // Sort the nodes in descending order of their areas + nodes.sort(function (n1, n2) { + var cmpBy = areaCompareFcn; + if (organization.idealRowWidth) { + cmpBy = tilingCompareBy; + return cmpBy(n1.id, n2.id); + } + return cmpBy(n1, n2); + }); + + // Create the organization -> calculate compound center + var sumCenterX = 0; + var sumCenterY = 0; + for (var i = 0; i < nodes.length; i++) { + var lNode = nodes[i]; + + sumCenterX += lNode.getCenterX(); + sumCenterY += lNode.getCenterY(); + } + + organization.centerX = sumCenterX / nodes.length; + organization.centerY = sumCenterY / nodes.length; + + // Create the organization -> tile members + for (var i = 0; i < nodes.length; i++) { + var lNode = nodes[i]; + + if (organization.rows.length == 0) { + this.insertNodeToRow(organization, lNode, 0, minWidth); + } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { + var rowIndex = organization.rows.length - 1; + if (!organization.idealRowWidth) { + rowIndex = this.getShortestRowIndex(organization); + } + this.insertNodeToRow(organization, lNode, rowIndex, minWidth); + } else { + this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); + } + + this.shiftToLastRow(organization); + } + + return organization; +}; + +CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) { + var minCompoundSize = minWidth; + + // Add new row if needed + if (rowIndex == organization.rows.length) { + var secondDimension = []; + + organization.rows.push(secondDimension); + organization.rowWidth.push(minCompoundSize); + organization.rowHeight.push(0); + } + + // Update row width + var w = organization.rowWidth[rowIndex] + node.rect.width; + + if (organization.rows[rowIndex].length > 0) { + w += organization.horizontalPadding; + } + + organization.rowWidth[rowIndex] = w; + // Update compound width + if (organization.width < w) { + organization.width = w; + } + + // Update height + var h = node.rect.height; + if (rowIndex > 0) h += organization.verticalPadding; + + var extraHeight = 0; + if (h > organization.rowHeight[rowIndex]) { + extraHeight = organization.rowHeight[rowIndex]; + organization.rowHeight[rowIndex] = h; + extraHeight = organization.rowHeight[rowIndex] - extraHeight; + } + + organization.height += extraHeight; + + // Insert node + organization.rows[rowIndex].push(node); +}; + +//Scans the rows of an organization and returns the one with the min width +CoSELayout.prototype.getShortestRowIndex = function (organization) { + var r = -1; + var min = Number.MAX_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + if (organization.rowWidth[i] < min) { + r = i; + min = organization.rowWidth[i]; + } + } + return r; +}; + +//Scans the rows of an organization and returns the one with the max width +CoSELayout.prototype.getLongestRowIndex = function (organization) { + var r = -1; + var max = Number.MIN_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + + if (organization.rowWidth[i] > max) { + r = i; + max = organization.rowWidth[i]; + } + } + + return r; +}; + +/** +* This method checks whether adding extra width to the organization violates +* the aspect ratio(1) or not. +*/ +CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) { + + // if there is an ideal row width specified use it instead of checking the aspect ratio + if (organization.idealRowWidth) { + var lastRowIndex = organization.rows.length - 1; + var lastRowWidth = organization.rowWidth[lastRowIndex]; + + // check and return if ideal row width will be exceed if the node is added to the row + return lastRowWidth + extraWidth + organization.horizontalPadding <= organization.idealRowWidth; + } + + var sri = this.getShortestRowIndex(organization); + + if (sri < 0) { + return true; + } + + var min = organization.rowWidth[sri]; + + if (min + organization.horizontalPadding + extraWidth <= organization.width) return true; + + var hDiff = 0; + + // Adding to an existing row + if (organization.rowHeight[sri] < extraHeight) { + if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; + } + + var add_to_row_ratio; + if (organization.width - min >= extraWidth + organization.horizontalPadding) { + add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding); + } else { + add_to_row_ratio = (organization.height + hDiff) / organization.width; + } + + // Adding a new row for this node + hDiff = extraHeight + organization.verticalPadding; + var add_new_row_ratio; + if (organization.width < extraWidth) { + add_new_row_ratio = (organization.height + hDiff) / extraWidth; + } else { + add_new_row_ratio = (organization.height + hDiff) / organization.width; + } + + if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio; + + if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio; + + return add_to_row_ratio < add_new_row_ratio; +}; + +//If moving the last node from the longest row and adding it to the last +//row makes the bounding box smaller, do it. +CoSELayout.prototype.shiftToLastRow = function (organization) { + var longest = this.getLongestRowIndex(organization); + var last = organization.rowWidth.length - 1; + var row = organization.rows[longest]; + var node = row[row.length - 1]; + + var diff = node.width + organization.horizontalPadding; + + // Check if there is enough space on the last row + if (organization.width - organization.rowWidth[last] > diff && longest != last) { + // Remove the last element of the longest row + row.splice(-1, 1); + + // Push it to the last row + organization.rows[last].push(node); + + organization.rowWidth[longest] = organization.rowWidth[longest] - diff; + organization.rowWidth[last] = organization.rowWidth[last] + diff; + organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; + + // Update heights of the organization + var maxHeight = Number.MIN_VALUE; + for (var i = 0; i < row.length; i++) { + if (row[i].height > maxHeight) maxHeight = row[i].height; + } + if (longest > 0) maxHeight += organization.verticalPadding; + + var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + + organization.rowHeight[longest] = maxHeight; + if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding; + + var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + organization.height += finalTotal - prevTotal; + + this.shiftToLastRow(organization); + } +}; + +CoSELayout.prototype.tilingPreLayout = function () { + if (CoSEConstants.TILE) { + // Find zero degree nodes and create a compound for each level + this.groupZeroDegreeMembers(); + // Tile and clear children of each compound + this.clearCompounds(); + // Separately tile and clear zero degree nodes for each level + this.clearZeroDegreeMembers(); + } +}; + +CoSELayout.prototype.tilingPostLayout = function () { + if (CoSEConstants.TILE) { + this.repopulateZeroDegreeMembers(); + this.repopulateCompounds(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: Tree Reduction methods +// ----------------------------------------------------------------------------- +// Reduce trees +CoSELayout.prototype.reduceTrees = function () { + var prunedNodesAll = []; + var containsLeaf = true; + var node; + + while (containsLeaf) { + var allNodes = this.graphManager.getAllNodes(); + var prunedNodesInStepTemp = []; + containsLeaf = false; + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) { + if (CoSEConstants.PURE_INCREMENTAL) { + var otherEnd = node.getEdges()[0].getOtherEnd(node); + var relativePosition = new DimensionD(node.getCenterX() - otherEnd.getCenterX(), node.getCenterY() - otherEnd.getCenterY()); + prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner(), relativePosition]); + } else { + prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]); + } + containsLeaf = true; + } + } + if (containsLeaf == true) { + var prunedNodesInStep = []; + for (var j = 0; j < prunedNodesInStepTemp.length; j++) { + if (prunedNodesInStepTemp[j][0].getEdges().length == 1) { + prunedNodesInStep.push(prunedNodesInStepTemp[j]); + prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); + } + } + prunedNodesAll.push(prunedNodesInStep); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + } + } + this.prunedNodesAll = prunedNodesAll; +}; + +// Grow tree one step +CoSELayout.prototype.growTree = function (prunedNodesAll) { + var lengthOfPrunedNodesInStep = prunedNodesAll.length; + var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; + + var nodeData; + for (var i = 0; i < prunedNodesInStep.length; i++) { + nodeData = prunedNodesInStep[i]; + + this.findPlaceforPrunedNode(nodeData); + + nodeData[2].add(nodeData[0]); + nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); + } + + prunedNodesAll.splice(prunedNodesAll.length - 1, 1); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); +}; + +// Find an appropriate position to replace pruned node, this method can be improved +CoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) { + + var gridForPrunedNode; + var nodeToConnect; + var prunedNode = nodeData[0]; + if (prunedNode == nodeData[1].source) { + nodeToConnect = nodeData[1].target; + } else { + nodeToConnect = nodeData[1].source; + } + + if (CoSEConstants.PURE_INCREMENTAL) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeData[3].getWidth(), nodeToConnect.getCenterY() + nodeData[3].getHeight()); + } else { + var startGridX = nodeToConnect.startX; + var finishGridX = nodeToConnect.finishX; + var startGridY = nodeToConnect.startY; + var finishGridY = nodeToConnect.finishY; + + var upNodeCount = 0; + var downNodeCount = 0; + var rightNodeCount = 0; + var leftNodeCount = 0; + var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]; + + if (startGridY > 0) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1; + } + } + if (finishGridX < this.grid.length - 1) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1; + } + } + if (finishGridY < this.grid[0].length - 1) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1; + } + } + if (startGridX > 0) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1; + } + } + var min = Integer.MAX_VALUE; + var minCount; + var minIndex; + for (var j = 0; j < controlRegions.length; j++) { + if (controlRegions[j] < min) { + min = controlRegions[j]; + minCount = 1; + minIndex = j; + } else if (controlRegions[j] == min) { + minCount++; + } + } + + if (minCount == 3 && min == 0) { + if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) { + gridForPrunedNode = 1; + } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 0; + } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 3; + } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 2; + } + } else if (minCount == 2 && min == 0) { + var random = Math.floor(Math.random() * 2); + if (controlRegions[0] == 0 && controlRegions[1] == 0) { + ; + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 1; + } + } else if (controlRegions[0] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[0] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 3; + } + } else if (controlRegions[1] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[1] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 3; + } + } else { + if (random == 0) { + gridForPrunedNode = 2; + } else { + gridForPrunedNode = 3; + } + } + } else if (minCount == 4 && min == 0) { + var random = Math.floor(Math.random() * 4); + gridForPrunedNode = random; + } else { + gridForPrunedNode = minIndex; + } + + if (gridForPrunedNode == 0) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2); + } else if (gridForPrunedNode == 1) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } else if (gridForPrunedNode == 2) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2); + } else { + prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } + } +}; + +module.exports = CoSELayout; + +/***/ }), + +/***/ 991: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var FDLayoutNode = __webpack_require__(551).FDLayoutNode; +var IMath = __webpack_require__(551).IMath; + +function CoSENode(gm, loc, size, vNode) { + FDLayoutNode.call(this, gm, loc, size, vNode); +} + +CoSENode.prototype = Object.create(FDLayoutNode.prototype); +for (var prop in FDLayoutNode) { + CoSENode[prop] = FDLayoutNode[prop]; +} + +CoSENode.prototype.calculateDisplacement = function () { + var layout = this.graphManager.getLayout(); + // this check is for compound nodes that contain fixed nodes + if (this.getChild() != null && this.fixedNodeWeight) { + this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight; + this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight; + } else { + this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; + this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; + } + + if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX); + } + + if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY); + } + + // non-empty compound node, propogate movement to children as well + if (this.child && this.child.getNodes().length > 0) { + this.propogateDisplacementToChildren(this.displacementX, this.displacementY); + } +}; + +CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) { + var nodes = this.getChild().getNodes(); + var node; + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + if (node.getChild() == null) { + node.displacementX += dX; + node.displacementY += dY; + } else { + node.propogateDisplacementToChildren(dX, dY); + } + } +}; + +CoSENode.prototype.move = function () { + var layout = this.graphManager.getLayout(); + + // a simple node or an empty compound node, move it + if (this.child == null || this.child.getNodes().length == 0) { + this.moveBy(this.displacementX, this.displacementY); + + layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY); + } + + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + this.displacementX = 0; + this.displacementY = 0; +}; + +CoSENode.prototype.setPred1 = function (pred1) { + this.pred1 = pred1; +}; + +CoSENode.prototype.getPred1 = function () { + return pred1; +}; + +CoSENode.prototype.getPred2 = function () { + return pred2; +}; + +CoSENode.prototype.setNext = function (next) { + this.next = next; +}; + +CoSENode.prototype.getNext = function () { + return next; +}; + +CoSENode.prototype.setProcessed = function (processed) { + this.processed = processed; +}; + +CoSENode.prototype.isProcessed = function () { + return processed; +}; + +module.exports = CoSENode; + +/***/ }), + +/***/ 902: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var CoSEConstants = __webpack_require__(806); +var LinkedList = __webpack_require__(551).LinkedList; +var Matrix = __webpack_require__(551).Matrix; +var SVD = __webpack_require__(551).SVD; + +function ConstraintHandler() {} + +ConstraintHandler.handleConstraints = function (layout) { + // let layout = this.graphManager.getLayout(); + + // get constraints from layout + var constraints = {}; + constraints.fixedNodeConstraint = layout.constraints.fixedNodeConstraint; + constraints.alignmentConstraint = layout.constraints.alignmentConstraint; + constraints.relativePlacementConstraint = layout.constraints.relativePlacementConstraint; + + var idToNodeMap = new Map(); + var nodeIndexes = new Map(); + var xCoords = []; + var yCoords = []; + + var allNodes = layout.getAllNodes(); + var index = 0; + // fill index map and coordinates + for (var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + if (node.getChild() == null) { + nodeIndexes.set(node.id, index++); + xCoords.push(node.getCenterX()); + yCoords.push(node.getCenterY()); + idToNodeMap.set(node.id, node); + } + } + + // if there exists relative placement constraint without gap value, set it to default + if (constraints.relativePlacementConstraint) { + constraints.relativePlacementConstraint.forEach(function (constraint) { + if (!constraint.gap && constraint.gap != 0) { + if (constraint.left) { + constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.left).getWidth() / 2 + idToNodeMap.get(constraint.right).getWidth() / 2; + } else { + constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.top).getHeight() / 2 + idToNodeMap.get(constraint.bottom).getHeight() / 2; + } + } + }); + } + + /* auxiliary functions */ + + // calculate difference between two position objects + var calculatePositionDiff = function calculatePositionDiff(pos1, pos2) { + return { x: pos1.x - pos2.x, y: pos1.y - pos2.y }; + }; + + // calculate average position of the nodes + var calculateAvgPosition = function calculateAvgPosition(nodeIdSet) { + var xPosSum = 0; + var yPosSum = 0; + nodeIdSet.forEach(function (nodeId) { + xPosSum += xCoords[nodeIndexes.get(nodeId)]; + yPosSum += yCoords[nodeIndexes.get(nodeId)]; + }); + + return { x: xPosSum / nodeIdSet.size, y: yPosSum / nodeIdSet.size }; + }; + + // find an appropriate positioning for the nodes in a given graph according to relative placement constraints + // this function also takes the fixed nodes and alignment constraints into account + // graph: dag to be evaluated, direction: "horizontal" or "vertical", + // fixedNodes: set of fixed nodes to consider during evaluation, dummyPositions: appropriate coordinates of the dummy nodes + var findAppropriatePositionForRelativePlacement = function findAppropriatePositionForRelativePlacement(graph, direction, fixedNodes, dummyPositions, componentSources) { + + // find union of two sets + function setUnion(setA, setB) { + var union = new Set(setA); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = setB[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var elem = _step.value; + + union.add(elem); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return union; + } + + // find indegree count for each node + var inDegrees = new Map(); + + graph.forEach(function (value, key) { + inDegrees.set(key, 0); + }); + graph.forEach(function (value, key) { + value.forEach(function (adjacent) { + inDegrees.set(adjacent.id, inDegrees.get(adjacent.id) + 1); + }); + }); + + var positionMap = new Map(); // keeps the position for each node + var pastMap = new Map(); // keeps the predecessors(past) of a node + var queue = new LinkedList(); + inDegrees.forEach(function (value, key) { + if (value == 0) { + queue.push(key); + if (!fixedNodes) { + if (direction == "horizontal") { + positionMap.set(key, nodeIndexes.has(key) ? xCoords[nodeIndexes.get(key)] : dummyPositions.get(key)); + } else { + positionMap.set(key, nodeIndexes.has(key) ? yCoords[nodeIndexes.get(key)] : dummyPositions.get(key)); + } + } + } else { + positionMap.set(key, Number.NEGATIVE_INFINITY); + } + if (fixedNodes) { + pastMap.set(key, new Set([key])); + } + }); + + // align sources of each component in enforcement phase + if (fixedNodes) { + componentSources.forEach(function (component) { + var fixedIds = []; + component.forEach(function (nodeId) { + if (fixedNodes.has(nodeId)) { + fixedIds.push(nodeId); + } + }); + if (fixedIds.length > 0) { + var position = 0; + fixedIds.forEach(function (fixedId) { + if (direction == "horizontal") { + positionMap.set(fixedId, nodeIndexes.has(fixedId) ? xCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId)); + position += positionMap.get(fixedId); + } else { + positionMap.set(fixedId, nodeIndexes.has(fixedId) ? yCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId)); + position += positionMap.get(fixedId); + } + }); + position = position / fixedIds.length; + component.forEach(function (nodeId) { + if (!fixedNodes.has(nodeId)) { + positionMap.set(nodeId, position); + } + }); + } else { + var _position = 0; + component.forEach(function (nodeId) { + if (direction == "horizontal") { + _position += nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); + } else { + _position += nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); + } + }); + _position = _position / component.length; + component.forEach(function (nodeId) { + positionMap.set(nodeId, _position); + }); + } + }); + } + + // calculate positions of the nodes + + var _loop = function _loop() { + var currentNode = queue.shift(); + var neighbors = graph.get(currentNode); + neighbors.forEach(function (neighbor) { + if (positionMap.get(neighbor.id) < positionMap.get(currentNode) + neighbor.gap) { + if (fixedNodes && fixedNodes.has(neighbor.id)) { + var fixedPosition = void 0; + if (direction == "horizontal") { + fixedPosition = nodeIndexes.has(neighbor.id) ? xCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id); + } else { + fixedPosition = nodeIndexes.has(neighbor.id) ? yCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id); + } + positionMap.set(neighbor.id, fixedPosition); // TODO: may do unnecessary work + if (fixedPosition < positionMap.get(currentNode) + neighbor.gap) { + var diff = positionMap.get(currentNode) + neighbor.gap - fixedPosition; + pastMap.get(currentNode).forEach(function (nodeId) { + positionMap.set(nodeId, positionMap.get(nodeId) - diff); + }); + } + } else { + positionMap.set(neighbor.id, positionMap.get(currentNode) + neighbor.gap); + } + } + inDegrees.set(neighbor.id, inDegrees.get(neighbor.id) - 1); + if (inDegrees.get(neighbor.id) == 0) { + queue.push(neighbor.id); + } + if (fixedNodes) { + pastMap.set(neighbor.id, setUnion(pastMap.get(currentNode), pastMap.get(neighbor.id))); + } + }); + }; + + while (queue.length != 0) { + _loop(); + } + + // readjust position of the nodes after enforcement + if (fixedNodes) { + // find indegree count for each node + var sinkNodes = new Set(); + + graph.forEach(function (value, key) { + if (value.length == 0) { + sinkNodes.add(key); + } + }); + + var _components = []; + pastMap.forEach(function (value, key) { + if (sinkNodes.has(key)) { + var isFixedComponent = false; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var nodeId = _step2.value; + + if (fixedNodes.has(nodeId)) { + isFixedComponent = true; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + if (!isFixedComponent) { + var isExist = false; + var existAt = void 0; + _components.forEach(function (component, index) { + if (component.has([].concat(_toConsumableArray(value))[0])) { + isExist = true; + existAt = index; + } + }); + if (!isExist) { + _components.push(new Set(value)); + } else { + value.forEach(function (ele) { + _components[existAt].add(ele); + }); + } + } + } + }); + + _components.forEach(function (component, index) { + var minBefore = Number.POSITIVE_INFINITY; + var minAfter = Number.POSITIVE_INFINITY; + var maxBefore = Number.NEGATIVE_INFINITY; + var maxAfter = Number.NEGATIVE_INFINITY; + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = component[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var nodeId = _step3.value; + + var posBefore = void 0; + if (direction == "horizontal") { + posBefore = nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); + } else { + posBefore = nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); + } + var posAfter = positionMap.get(nodeId); + if (posBefore < minBefore) { + minBefore = posBefore; + } + if (posBefore > maxBefore) { + maxBefore = posBefore; + } + if (posAfter < minAfter) { + minAfter = posAfter; + } + if (posAfter > maxAfter) { + maxAfter = posAfter; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + var diff = (minBefore + maxBefore) / 2 - (minAfter + maxAfter) / 2; + + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = component[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var _nodeId = _step4.value; + + positionMap.set(_nodeId, positionMap.get(_nodeId) + diff); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4.return) { + _iterator4.return(); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + }); + } + + return positionMap; + }; + + // find transformation based on rel. placement constraints if there are both alignment and rel. placement constraints + // or if there are only rel. placement contraints where the largest component isn't sufficiently large + var applyReflectionForRelativePlacement = function applyReflectionForRelativePlacement(relativePlacementConstraints) { + // variables to count votes + var reflectOnY = 0, + notReflectOnY = 0; + var reflectOnX = 0, + notReflectOnX = 0; + + relativePlacementConstraints.forEach(function (constraint) { + if (constraint.left) { + xCoords[nodeIndexes.get(constraint.left)] - xCoords[nodeIndexes.get(constraint.right)] >= 0 ? reflectOnY++ : notReflectOnY++; + } else { + yCoords[nodeIndexes.get(constraint.top)] - yCoords[nodeIndexes.get(constraint.bottom)] >= 0 ? reflectOnX++ : notReflectOnX++; + } + }); + + if (reflectOnY > notReflectOnY && reflectOnX > notReflectOnX) { + for (var _i = 0; _i < nodeIndexes.size; _i++) { + xCoords[_i] = -1 * xCoords[_i]; + yCoords[_i] = -1 * yCoords[_i]; + } + } else if (reflectOnY > notReflectOnY) { + for (var _i2 = 0; _i2 < nodeIndexes.size; _i2++) { + xCoords[_i2] = -1 * xCoords[_i2]; + } + } else if (reflectOnX > notReflectOnX) { + for (var _i3 = 0; _i3 < nodeIndexes.size; _i3++) { + yCoords[_i3] = -1 * yCoords[_i3]; + } + } + }; + + // find weakly connected components in undirected graph + var findComponents = function findComponents(graph) { + // find weakly connected components in dag + var components = []; + var queue = new LinkedList(); + var visited = new Set(); + var count = 0; + + graph.forEach(function (value, key) { + if (!visited.has(key)) { + components[count] = []; + var _currentNode = key; + queue.push(_currentNode); + visited.add(_currentNode); + components[count].push(_currentNode); + + while (queue.length != 0) { + _currentNode = queue.shift(); + var neighbors = graph.get(_currentNode); + neighbors.forEach(function (neighbor) { + if (!visited.has(neighbor.id)) { + queue.push(neighbor.id); + visited.add(neighbor.id); + components[count].push(neighbor.id); + } + }); + } + count++; + } + }); + return components; + }; + + // return undirected version of given dag + var dagToUndirected = function dagToUndirected(dag) { + var undirected = new Map(); + + dag.forEach(function (value, key) { + undirected.set(key, []); + }); + + dag.forEach(function (value, key) { + value.forEach(function (adjacent) { + undirected.get(key).push(adjacent); + undirected.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction }); + }); + }); + + return undirected; + }; + + // return reversed (directions inverted) version of given dag + var dagToReversed = function dagToReversed(dag) { + var reversed = new Map(); + + dag.forEach(function (value, key) { + reversed.set(key, []); + }); + + dag.forEach(function (value, key) { + value.forEach(function (adjacent) { + reversed.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction }); + }); + }); + + return reversed; + }; + + /**** apply transformation to the initial draft layout to better align with constrained nodes ****/ + // solve the Orthogonal Procrustean Problem to rotate and/or reflect initial draft layout + // here we follow the solution in Chapter 20.2 of Borg, I. & Groenen, P. (2005) Modern Multidimensional Scaling: Theory and Applications + + /* construct source and target configurations */ + + var targetMatrix = []; // A - target configuration + var sourceMatrix = []; // B - source configuration + var standardTransformation = false; // false for no transformation, true for standart (Procrustes) transformation (rotation and/or reflection) + var reflectionType = false; // false/true for reflection check, 'reflectOnX', 'reflectOnY' or 'reflectOnBoth' for reflection type if necessary + var fixedNodes = new Set(); + var dag = new Map(); // adjacency list to keep directed acyclic graph (dag) that consists of relative placement constraints + var dagUndirected = new Map(); // undirected version of the dag + var components = []; // weakly connected components + + // fill fixedNodes collection to use later + if (constraints.fixedNodeConstraint) { + constraints.fixedNodeConstraint.forEach(function (nodeData) { + fixedNodes.add(nodeData.nodeId); + }); + } + + // construct dag from relative placement constraints + if (constraints.relativePlacementConstraint) { + // construct both directed and undirected version of the dag + constraints.relativePlacementConstraint.forEach(function (constraint) { + if (constraint.left) { + if (dag.has(constraint.left)) { + dag.get(constraint.left).push({ id: constraint.right, gap: constraint.gap, direction: "horizontal" }); + } else { + dag.set(constraint.left, [{ id: constraint.right, gap: constraint.gap, direction: "horizontal" }]); + } + if (!dag.has(constraint.right)) { + dag.set(constraint.right, []); + } + } else { + if (dag.has(constraint.top)) { + dag.get(constraint.top).push({ id: constraint.bottom, gap: constraint.gap, direction: "vertical" }); + } else { + dag.set(constraint.top, [{ id: constraint.bottom, gap: constraint.gap, direction: "vertical" }]); + } + if (!dag.has(constraint.bottom)) { + dag.set(constraint.bottom, []); + } + } + }); + + dagUndirected = dagToUndirected(dag); + components = findComponents(dagUndirected); + } + + if (CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING) { + // first check fixed node constraint + if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 1) { + constraints.fixedNodeConstraint.forEach(function (nodeData, i) { + targetMatrix[i] = [nodeData.position.x, nodeData.position.y]; + sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeData.nodeId)], yCoords[nodeIndexes.get(nodeData.nodeId)]]; + }); + standardTransformation = true; + } else if (constraints.alignmentConstraint) { + (function () { + // then check alignment constraint + var count = 0; + if (constraints.alignmentConstraint.vertical) { + var verticalAlign = constraints.alignmentConstraint.vertical; + + var _loop2 = function _loop2(_i4) { + var alignmentSet = new Set(); + verticalAlign[_i4].forEach(function (nodeId) { + alignmentSet.add(nodeId); + }); + var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) { + return fixedNodes.has(x); + })); + var xPos = void 0; + if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x; + + verticalAlign[_i4].forEach(function (nodeId) { + targetMatrix[count] = [xPos, yCoords[nodeIndexes.get(nodeId)]]; + sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; + count++; + }); + }; + + for (var _i4 = 0; _i4 < verticalAlign.length; _i4++) { + _loop2(_i4); + } + standardTransformation = true; + } + if (constraints.alignmentConstraint.horizontal) { + var horizontalAlign = constraints.alignmentConstraint.horizontal; + + var _loop3 = function _loop3(_i5) { + var alignmentSet = new Set(); + horizontalAlign[_i5].forEach(function (nodeId) { + alignmentSet.add(nodeId); + }); + var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) { + return fixedNodes.has(x); + })); + var yPos = void 0; + if (intersection.size > 0) yPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y; + + horizontalAlign[_i5].forEach(function (nodeId) { + targetMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yPos]; + sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; + count++; + }); + }; + + for (var _i5 = 0; _i5 < horizontalAlign.length; _i5++) { + _loop3(_i5); + } + standardTransformation = true; + } + if (constraints.relativePlacementConstraint) { + reflectionType = true; + } + })(); + } else if (constraints.relativePlacementConstraint) { + // finally check relative placement constraint + // find largest component in dag + var largestComponentSize = 0; + var largestComponentIndex = 0; + for (var _i6 = 0; _i6 < components.length; _i6++) { + if (components[_i6].length > largestComponentSize) { + largestComponentSize = components[_i6].length; + largestComponentIndex = _i6; + } + } + // if largest component isn't dominant, then take the votes for reflection + if (largestComponentSize < dagUndirected.size / 2) { + applyReflectionForRelativePlacement(constraints.relativePlacementConstraint); + standardTransformation = false; + reflectionType = false; + } else { + // use largest component for transformation + // construct horizontal and vertical subgraphs in the largest component + var subGraphOnHorizontal = new Map(); + var subGraphOnVertical = new Map(); + var constraintsInlargestComponent = []; + + components[largestComponentIndex].forEach(function (nodeId) { + dag.get(nodeId).forEach(function (adjacent) { + if (adjacent.direction == "horizontal") { + if (subGraphOnHorizontal.has(nodeId)) { + subGraphOnHorizontal.get(nodeId).push(adjacent); + } else { + subGraphOnHorizontal.set(nodeId, [adjacent]); + } + if (!subGraphOnHorizontal.has(adjacent.id)) { + subGraphOnHorizontal.set(adjacent.id, []); + } + constraintsInlargestComponent.push({ left: nodeId, right: adjacent.id }); + } else { + if (subGraphOnVertical.has(nodeId)) { + subGraphOnVertical.get(nodeId).push(adjacent); + } else { + subGraphOnVertical.set(nodeId, [adjacent]); + } + if (!subGraphOnVertical.has(adjacent.id)) { + subGraphOnVertical.set(adjacent.id, []); + } + constraintsInlargestComponent.push({ top: nodeId, bottom: adjacent.id }); + } + }); + }); + + applyReflectionForRelativePlacement(constraintsInlargestComponent); + reflectionType = false; + + // calculate appropriate positioning for subgraphs + var positionMapHorizontal = findAppropriatePositionForRelativePlacement(subGraphOnHorizontal, "horizontal"); + var positionMapVertical = findAppropriatePositionForRelativePlacement(subGraphOnVertical, "vertical"); + + // construct source and target configuration + components[largestComponentIndex].forEach(function (nodeId, i) { + sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; + targetMatrix[i] = []; + if (positionMapHorizontal.has(nodeId)) { + targetMatrix[i][0] = positionMapHorizontal.get(nodeId); + } else { + targetMatrix[i][0] = xCoords[nodeIndexes.get(nodeId)]; + } + if (positionMapVertical.has(nodeId)) { + targetMatrix[i][1] = positionMapVertical.get(nodeId); + } else { + targetMatrix[i][1] = yCoords[nodeIndexes.get(nodeId)]; + } + }); + + standardTransformation = true; + } + } + + // if transformation is required, then calculate and apply transformation matrix + if (standardTransformation) { + /* calculate transformation matrix */ + var transformationMatrix = void 0; + var targetMatrixTranspose = Matrix.transpose(targetMatrix); // A' + var sourceMatrixTranspose = Matrix.transpose(sourceMatrix); // B' + + // centralize transpose matrices + for (var _i7 = 0; _i7 < targetMatrixTranspose.length; _i7++) { + targetMatrixTranspose[_i7] = Matrix.multGamma(targetMatrixTranspose[_i7]); + sourceMatrixTranspose[_i7] = Matrix.multGamma(sourceMatrixTranspose[_i7]); + } + + // do actual calculation for transformation matrix + var tempMatrix = Matrix.multMat(targetMatrixTranspose, Matrix.transpose(sourceMatrixTranspose)); // tempMatrix = A'B + var SVDResult = SVD.svd(tempMatrix); // SVD(A'B) = USV', svd function returns U, S and V + transformationMatrix = Matrix.multMat(SVDResult.V, Matrix.transpose(SVDResult.U)); // transformationMatrix = T = VU' + + /* apply found transformation matrix to obtain final draft layout */ + for (var _i8 = 0; _i8 < nodeIndexes.size; _i8++) { + var temp1 = [xCoords[_i8], yCoords[_i8]]; + var temp2 = [transformationMatrix[0][0], transformationMatrix[1][0]]; + var temp3 = [transformationMatrix[0][1], transformationMatrix[1][1]]; + xCoords[_i8] = Matrix.dotProduct(temp1, temp2); + yCoords[_i8] = Matrix.dotProduct(temp1, temp3); + } + + // applied only both alignment and rel. placement constraints exist + if (reflectionType) { + applyReflectionForRelativePlacement(constraints.relativePlacementConstraint); + } + } + } + + if (CoSEConstants.ENFORCE_CONSTRAINTS) { + /**** enforce constraints on the transformed draft layout ****/ + + /* first enforce fixed node constraint */ + + if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 0) { + var translationAmount = { x: 0, y: 0 }; + constraints.fixedNodeConstraint.forEach(function (nodeData, i) { + var posInTheory = { x: xCoords[nodeIndexes.get(nodeData.nodeId)], y: yCoords[nodeIndexes.get(nodeData.nodeId)] }; + var posDesired = nodeData.position; + var posDiff = calculatePositionDiff(posDesired, posInTheory); + translationAmount.x += posDiff.x; + translationAmount.y += posDiff.y; + }); + translationAmount.x /= constraints.fixedNodeConstraint.length; + translationAmount.y /= constraints.fixedNodeConstraint.length; + + xCoords.forEach(function (value, i) { + xCoords[i] += translationAmount.x; + }); + + yCoords.forEach(function (value, i) { + yCoords[i] += translationAmount.y; + }); + + constraints.fixedNodeConstraint.forEach(function (nodeData) { + xCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.x; + yCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.y; + }); + } + + /* then enforce alignment constraint */ + + if (constraints.alignmentConstraint) { + if (constraints.alignmentConstraint.vertical) { + var xAlign = constraints.alignmentConstraint.vertical; + + var _loop4 = function _loop4(_i9) { + var alignmentSet = new Set(); + xAlign[_i9].forEach(function (nodeId) { + alignmentSet.add(nodeId); + }); + var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) { + return fixedNodes.has(x); + })); + var xPos = void 0; + if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x; + + alignmentSet.forEach(function (nodeId) { + if (!fixedNodes.has(nodeId)) xCoords[nodeIndexes.get(nodeId)] = xPos; + }); + }; + + for (var _i9 = 0; _i9 < xAlign.length; _i9++) { + _loop4(_i9); + } + } + if (constraints.alignmentConstraint.horizontal) { + var yAlign = constraints.alignmentConstraint.horizontal; + + var _loop5 = function _loop5(_i10) { + var alignmentSet = new Set(); + yAlign[_i10].forEach(function (nodeId) { + alignmentSet.add(nodeId); + }); + var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) { + return fixedNodes.has(x); + })); + var yPos = void 0; + if (intersection.size > 0) yPos = yCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y; + + alignmentSet.forEach(function (nodeId) { + if (!fixedNodes.has(nodeId)) yCoords[nodeIndexes.get(nodeId)] = yPos; + }); + }; + + for (var _i10 = 0; _i10 < yAlign.length; _i10++) { + _loop5(_i10); + } + } + } + + /* finally enforce relative placement constraint */ + + if (constraints.relativePlacementConstraint) { + (function () { + var nodeToDummyForVerticalAlignment = new Map(); + var nodeToDummyForHorizontalAlignment = new Map(); + var dummyToNodeForVerticalAlignment = new Map(); + var dummyToNodeForHorizontalAlignment = new Map(); + var dummyPositionsForVerticalAlignment = new Map(); + var dummyPositionsForHorizontalAlignment = new Map(); + var fixedNodesOnHorizontal = new Set(); + var fixedNodesOnVertical = new Set(); + + // fill maps and sets + fixedNodes.forEach(function (nodeId) { + fixedNodesOnHorizontal.add(nodeId); + fixedNodesOnVertical.add(nodeId); + }); + + if (constraints.alignmentConstraint) { + if (constraints.alignmentConstraint.vertical) { + var verticalAlignment = constraints.alignmentConstraint.vertical; + + var _loop6 = function _loop6(_i11) { + dummyToNodeForVerticalAlignment.set("dummy" + _i11, []); + verticalAlignment[_i11].forEach(function (nodeId) { + nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + _i11); + dummyToNodeForVerticalAlignment.get("dummy" + _i11).push(nodeId); + if (fixedNodes.has(nodeId)) { + fixedNodesOnHorizontal.add("dummy" + _i11); + } + }); + dummyPositionsForVerticalAlignment.set("dummy" + _i11, xCoords[nodeIndexes.get(verticalAlignment[_i11][0])]); + }; + + for (var _i11 = 0; _i11 < verticalAlignment.length; _i11++) { + _loop6(_i11); + } + } + if (constraints.alignmentConstraint.horizontal) { + var horizontalAlignment = constraints.alignmentConstraint.horizontal; + + var _loop7 = function _loop7(_i12) { + dummyToNodeForHorizontalAlignment.set("dummy" + _i12, []); + horizontalAlignment[_i12].forEach(function (nodeId) { + nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + _i12); + dummyToNodeForHorizontalAlignment.get("dummy" + _i12).push(nodeId); + if (fixedNodes.has(nodeId)) { + fixedNodesOnVertical.add("dummy" + _i12); + } + }); + dummyPositionsForHorizontalAlignment.set("dummy" + _i12, yCoords[nodeIndexes.get(horizontalAlignment[_i12][0])]); + }; + + for (var _i12 = 0; _i12 < horizontalAlignment.length; _i12++) { + _loop7(_i12); + } + } + } + + // construct horizontal and vertical dags (subgraphs) from overall dag + var dagOnHorizontal = new Map(); + var dagOnVertical = new Map(); + + var _loop8 = function _loop8(nodeId) { + dag.get(nodeId).forEach(function (adjacent) { + var sourceId = void 0; + var targetNode = void 0; + if (adjacent["direction"] == "horizontal") { + sourceId = nodeToDummyForVerticalAlignment.get(nodeId) ? nodeToDummyForVerticalAlignment.get(nodeId) : nodeId; + if (nodeToDummyForVerticalAlignment.get(adjacent.id)) { + targetNode = { id: nodeToDummyForVerticalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction }; + } else { + targetNode = adjacent; + } + if (dagOnHorizontal.has(sourceId)) { + dagOnHorizontal.get(sourceId).push(targetNode); + } else { + dagOnHorizontal.set(sourceId, [targetNode]); + } + if (!dagOnHorizontal.has(targetNode.id)) { + dagOnHorizontal.set(targetNode.id, []); + } + } else { + sourceId = nodeToDummyForHorizontalAlignment.get(nodeId) ? nodeToDummyForHorizontalAlignment.get(nodeId) : nodeId; + if (nodeToDummyForHorizontalAlignment.get(adjacent.id)) { + targetNode = { id: nodeToDummyForHorizontalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction }; + } else { + targetNode = adjacent; + } + if (dagOnVertical.has(sourceId)) { + dagOnVertical.get(sourceId).push(targetNode); + } else { + dagOnVertical.set(sourceId, [targetNode]); + } + if (!dagOnVertical.has(targetNode.id)) { + dagOnVertical.set(targetNode.id, []); + } + } + }); + }; + + var _iteratorNormalCompletion5 = true; + var _didIteratorError5 = false; + var _iteratorError5 = undefined; + + try { + for (var _iterator5 = dag.keys()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { + var nodeId = _step5.value; + + _loop8(nodeId); + } + + // find source nodes of each component in horizontal and vertical dags + } catch (err) { + _didIteratorError5 = true; + _iteratorError5 = err; + } finally { + try { + if (!_iteratorNormalCompletion5 && _iterator5.return) { + _iterator5.return(); + } + } finally { + if (_didIteratorError5) { + throw _iteratorError5; + } + } + } + + var undirectedOnHorizontal = dagToUndirected(dagOnHorizontal); + var undirectedOnVertical = dagToUndirected(dagOnVertical); + var componentsOnHorizontal = findComponents(undirectedOnHorizontal); + var componentsOnVertical = findComponents(undirectedOnVertical); + var reversedDagOnHorizontal = dagToReversed(dagOnHorizontal); + var reversedDagOnVertical = dagToReversed(dagOnVertical); + var componentSourcesOnHorizontal = []; + var componentSourcesOnVertical = []; + + componentsOnHorizontal.forEach(function (component, index) { + componentSourcesOnHorizontal[index] = []; + component.forEach(function (nodeId) { + if (reversedDagOnHorizontal.get(nodeId).length == 0) { + componentSourcesOnHorizontal[index].push(nodeId); + } + }); + }); + + componentsOnVertical.forEach(function (component, index) { + componentSourcesOnVertical[index] = []; + component.forEach(function (nodeId) { + if (reversedDagOnVertical.get(nodeId).length == 0) { + componentSourcesOnVertical[index].push(nodeId); + } + }); + }); + + // calculate appropriate positioning for subgraphs + var positionMapHorizontal = findAppropriatePositionForRelativePlacement(dagOnHorizontal, "horizontal", fixedNodesOnHorizontal, dummyPositionsForVerticalAlignment, componentSourcesOnHorizontal); + var positionMapVertical = findAppropriatePositionForRelativePlacement(dagOnVertical, "vertical", fixedNodesOnVertical, dummyPositionsForHorizontalAlignment, componentSourcesOnVertical); + + // update positions of the nodes based on relative placement constraints + + var _loop9 = function _loop9(key) { + if (dummyToNodeForVerticalAlignment.get(key)) { + dummyToNodeForVerticalAlignment.get(key).forEach(function (nodeId) { + xCoords[nodeIndexes.get(nodeId)] = positionMapHorizontal.get(key); + }); + } else { + xCoords[nodeIndexes.get(key)] = positionMapHorizontal.get(key); + } + }; + + var _iteratorNormalCompletion6 = true; + var _didIteratorError6 = false; + var _iteratorError6 = undefined; + + try { + for (var _iterator6 = positionMapHorizontal.keys()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) { + var key = _step6.value; + + _loop9(key); + } + } catch (err) { + _didIteratorError6 = true; + _iteratorError6 = err; + } finally { + try { + if (!_iteratorNormalCompletion6 && _iterator6.return) { + _iterator6.return(); + } + } finally { + if (_didIteratorError6) { + throw _iteratorError6; + } + } + } + + var _loop10 = function _loop10(key) { + if (dummyToNodeForHorizontalAlignment.get(key)) { + dummyToNodeForHorizontalAlignment.get(key).forEach(function (nodeId) { + yCoords[nodeIndexes.get(nodeId)] = positionMapVertical.get(key); + }); + } else { + yCoords[nodeIndexes.get(key)] = positionMapVertical.get(key); + } + }; + + var _iteratorNormalCompletion7 = true; + var _didIteratorError7 = false; + var _iteratorError7 = undefined; + + try { + for (var _iterator7 = positionMapVertical.keys()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) { + var key = _step7.value; + + _loop10(key); + } + } catch (err) { + _didIteratorError7 = true; + _iteratorError7 = err; + } finally { + try { + if (!_iteratorNormalCompletion7 && _iterator7.return) { + _iterator7.return(); + } + } finally { + if (_didIteratorError7) { + throw _iteratorError7; + } + } + } + })(); + } + } + + // assign new coordinates to nodes after constraint handling + for (var _i13 = 0; _i13 < allNodes.length; _i13++) { + var _node = allNodes[_i13]; + if (_node.getChild() == null) { + _node.setCenter(xCoords[nodeIndexes.get(_node.id)], yCoords[nodeIndexes.get(_node.id)]); + } + } +}; + +module.exports = ConstraintHandler; + +/***/ }), + +/***/ 551: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_MODULE__551__; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __webpack_require__(45); +/******/ +/******/ return __webpack_exports__; +/******/ })() +; +}); \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/index.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7365a7e1d31bba4a197702b0902835a210dbec7c --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/index.js @@ -0,0 +1,16 @@ +'use strict'; + +let coseBase = {}; + +coseBase.layoutBase = require('layout-base'); +coseBase.CoSEConstants = require('./src/CoSEConstants'); +coseBase.CoSEEdge = require('./src/CoSEEdge'); +coseBase.CoSEGraph = require('./src/CoSEGraph'); +coseBase.CoSEGraphManager = require('./src/CoSEGraphManager'); +coseBase.CoSELayout = require('./src/CoSELayout'); +coseBase.CoSENode = require('./src/CoSENode'); +coseBase.ConstraintHandler = require('./src/ConstraintHandler'); + +module.exports = coseBase; + + diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/package.json b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/package.json new file mode 100644 index 0000000000000000000000000000000000000000..2c21755ce6683c8843d4cd2eae2e2a4e71745c03 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/package.json @@ -0,0 +1,40 @@ +{ + "name": "cose-base", + "version": "2.2.0", + "description": "Core module for compound spring embedder based layout styles", + "main": "cose-base.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "cross-env NODE_ENV=production webpack", + "build:min": "cross-env NODE_ENV=production MIN=true webpack" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/iVis-at-Bilkent/cose-base.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/iVis-at-Bilkent/cose-base/issues" + }, + "homepage": "https://github.com/iVis-at-Bilkent/cose-base#readme", + "devDependencies": { + "babel-core": "^6.24.1", + "babel-loader": "^7.0.0", + "babel-preset-env": "^1.5.1", + "camelcase": "^4.1.0", + "cross-env": "^5.1.6", + "eslint": "^3.19.0", + "gh-pages": "^1.1.0", + "npm-run-all": "^4.1.2", + "rimraf": "^2.6.2", + "update": "^0.7.4", + "updater-license": "^1.0.0", + "webpack": "^5.36.1", + "webpack-cli": "^4.6.0", + "webpack-dev-server": "^3.11.2" + }, + "dependencies": { + "layout-base": "^2.0.0" + } +} diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEConstants.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEConstants.js new file mode 100644 index 0000000000000000000000000000000000000000..aca390c4c14398b9f0246229fbd38fc086d7f73d --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEConstants.js @@ -0,0 +1,26 @@ +var FDLayoutConstants = require('layout-base').FDLayoutConstants; + +function CoSEConstants() { +} + +//CoSEConstants inherits static props in FDLayoutConstants +for (var prop in FDLayoutConstants) { + CoSEConstants[prop] = FDLayoutConstants[prop]; +} + +CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; +CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; +CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; +CoSEConstants.TILE = true; +CoSEConstants.TILING_PADDING_VERTICAL = 10; +CoSEConstants.TILING_PADDING_HORIZONTAL = 10; +CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true; +CoSEConstants.ENFORCE_CONSTRAINTS = true; +CoSEConstants.APPLY_LAYOUT = true; +CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS = true; +CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; // this should be set to false if there will be a constraint +// This constant is for differentiating whether actual layout algorithm that uses cose-base wants to apply only incremental layout or +// an incremental layout on top of a randomized layout. If it is only incremental layout, then this constant should be true. +CoSEConstants.PURE_INCREMENTAL = CoSEConstants.DEFAULT_INCREMENTAL; + +module.exports = CoSEConstants; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEEdge.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEEdge.js new file mode 100644 index 0000000000000000000000000000000000000000..2cb56cbe73479bbb06bc3b7381c712d8866e5868 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEEdge.js @@ -0,0 +1,12 @@ +var FDLayoutEdge = require('layout-base').FDLayoutEdge; + +function CoSEEdge(source, target, vEdge) { + FDLayoutEdge.call(this, source, target, vEdge); +} + +CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); +for (var prop in FDLayoutEdge) { + CoSEEdge[prop] = FDLayoutEdge[prop]; +} + +module.exports = CoSEEdge diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEGraph.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEGraph.js new file mode 100644 index 0000000000000000000000000000000000000000..cc3f1f5992834df6a0c40c8f7798db137fea9b0a --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEGraph.js @@ -0,0 +1,12 @@ +var LGraph = require('layout-base').LGraph; + +function CoSEGraph(parent, graphMgr, vGraph) { + LGraph.call(this, parent, graphMgr, vGraph); +} + +CoSEGraph.prototype = Object.create(LGraph.prototype); +for (var prop in LGraph) { + CoSEGraph[prop] = LGraph[prop]; +} + +module.exports = CoSEGraph; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEGraphManager.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEGraphManager.js new file mode 100644 index 0000000000000000000000000000000000000000..55bb9e4fc5bb6ffb2ab2a1cdc005f4ee44f4ab4e --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSEGraphManager.js @@ -0,0 +1,12 @@ +var LGraphManager = require('layout-base').LGraphManager; + +function CoSEGraphManager(layout) { + LGraphManager.call(this, layout); +} + +CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); +for (var prop in LGraphManager) { + CoSEGraphManager[prop] = LGraphManager[prop]; +} + +module.exports = CoSEGraphManager; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSELayout.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSELayout.js new file mode 100644 index 0000000000000000000000000000000000000000..30490490dbcf778ce2a188be8f7776721eeb4f3c --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSELayout.js @@ -0,0 +1,2037 @@ +var FDLayout = require('layout-base').FDLayout; +var CoSEGraphManager = require('./CoSEGraphManager'); +var CoSEGraph = require('./CoSEGraph'); +var CoSENode = require('./CoSENode'); +var CoSEEdge = require('./CoSEEdge'); +var CoSEConstants = require('./CoSEConstants'); +var ConstraintHandler = require('./ConstraintHandler'); +var FDLayoutConstants = require('layout-base').FDLayoutConstants; +var LayoutConstants = require('layout-base').LayoutConstants; +var Point = require('layout-base').Point; +var PointD = require('layout-base').PointD; +var DimensionD = require('layout-base').DimensionD; +var Layout = require('layout-base').Layout; +var Integer = require('layout-base').Integer; +var IGeometry = require('layout-base').IGeometry; +var LGraph = require('layout-base').LGraph; +var Transform = require('layout-base').Transform; +var LinkedList = require('layout-base').LinkedList; + +function CoSELayout() { + FDLayout.call(this); + + this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled + this.constraints = {}; // keep layout constraints +} + +CoSELayout.prototype = Object.create(FDLayout.prototype); + +for (var prop in FDLayout) { + CoSELayout[prop] = FDLayout[prop]; +} + +CoSELayout.prototype.newGraphManager = function () { + var gm = new CoSEGraphManager(this); + this.graphManager = gm; + return gm; +}; + +CoSELayout.prototype.newGraph = function (vGraph) { + return new CoSEGraph(null, this.graphManager, vGraph); +}; + +CoSELayout.prototype.newNode = function (vNode) { + return new CoSENode(this.graphManager, vNode); +}; + +CoSELayout.prototype.newEdge = function (vEdge) { + return new CoSEEdge(null, null, vEdge); +}; + +CoSELayout.prototype.initParameters = function () { + FDLayout.prototype.initParameters.call(this, arguments); + if (!this.isSubLayout) { + if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) + { + this.idealEdgeLength = 10; + } + else + { + this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; + } + + this.useSmartIdealEdgeLengthCalculation = + CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.gravityConstant = + FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = + FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = + FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = + FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + + // variables for tree reduction support + this.prunedNodesAll = []; + this.growTreeIterations = 0; + this.afterGrowthIterations = 0; + this.isTreeGrowing = false; + this.isGrowthFinished = false; + } +}; + +// This method is used to set CoSE related parameters used by spring embedder. +CoSELayout.prototype.initSpringEmbedder = function () { + FDLayout.prototype.initSpringEmbedder.call(this); + + // variables for cooling + this.coolingCycle = 0; + this.maxCoolingCycle = this.maxIterations/FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; + this.finalTemperature = 0.04; + this.coolingAdjuster = 1; +}; + +CoSELayout.prototype.layout = function () { + var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + if (createBendsAsNeeded) + { + this.createBendpoints(); + this.graphManager.resetAllEdges(); + } + + this.level = 0; + return this.classicLayout(); +}; + +CoSELayout.prototype.classicLayout = function () { + this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); + this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); + this.calcNoOfChildrenForAllNodes(); + this.graphManager.calcLowestCommonAncestors(); + this.graphManager.calcInclusionTreeDepths(); + this.graphManager.getRoot().calcEstimatedSize(); + this.calcIdealEdgeLengths(); + + if (!this.incremental) + { + var forest = this.getFlatForest(); + + // The graph associated with this layout is flat and a forest + if (forest.length > 0) + { + this.positionNodesRadially(forest); + } + // The graph associated with this layout is not flat or a forest + else + { + // Reduce the trees when incremental mode is not enabled and graph is not a forest + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(x => allNodes.has(x)); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.positionNodesRandomly(); + } + } + else { + if(CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL){ + // Reduce the trees in incremental mode if only this constant is set to true + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(x => allNodes.has(x)); + this.graphManager.setAllNodesToApplyGravitation(intersection); + } + } + + if(Object.keys(this.constraints).length > 0){ + ConstraintHandler.handleConstraints(this); + this.initConstraintVariables(); + } + + this.initSpringEmbedder(); + if (CoSEConstants.APPLY_LAYOUT) { + this.runSpringEmbedder(); + } + + return true; +}; + +CoSELayout.prototype.tick = function() { + this.totalIterations++; + + if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { + if(this.prunedNodesAll.length > 0){ + this.isTreeGrowing = true; + } + else { + return true; + } + } + + if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) + { + if (this.isConverged()) + { + if(this.prunedNodesAll.length > 0){ + this.isTreeGrowing = true; + } + else { + return true; + } + } + + this.coolingCycle++; + + if(this.layoutQuality == 0) { + // quality - "draft" + this.coolingAdjuster = this.coolingCycle; + } + else if(this.layoutQuality == 1) { + // quality - "default" + this.coolingAdjuster = this.coolingCycle / 3; + } + + // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3 + this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle))/100 * this.coolingAdjuster, this.finalTemperature); + this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); + } + // Operations while tree is growing again + if(this.isTreeGrowing){ + if(this.growTreeIterations % 10 == 0){ + if(this.prunedNodesAll.length > 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + this.growTree(this.prunedNodesAll); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(x => allNodes.has(x)); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.graphManager.updateBounds(); + this.updateGrid(); + if(CoSEConstants.PURE_INCREMENTAL) + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2; + else + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + } + else { + this.isTreeGrowing = false; + this.isGrowthFinished = true; + } + } + this.growTreeIterations++; + } + // Operations after growth is finished + if(this.isGrowthFinished){ + if (this.isConverged()) + { + return true; + } + if(this.afterGrowthIterations % 10 == 0){ + this.graphManager.updateBounds(); + this.updateGrid(); + } + if(CoSEConstants.PURE_INCREMENTAL) + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100); + else + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); + this.afterGrowthIterations++; + } + + var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; + var forceToNodeSurroundingUpdate = (this.growTreeIterations % 10 == 1 && this.isTreeGrowing) || (this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished); + + this.totalDisplacement = 0; + this.graphManager.updateBounds(); + this.calcSpringForces(); + this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); + this.calcGravitationalForces(); + this.moveNodes(); + this.animate(); + + return false; // Layout is not ended yet return false +}; + +CoSELayout.prototype.getPositionsData = function() { + var allNodes = this.graphManager.getAllNodes(); + var pData = {}; + for (var i = 0; i < allNodes.length; i++) { + var rect = allNodes[i].rect; + var id = allNodes[i].id; + pData[id] = { + id: id, + x: rect.getCenterX(), + y: rect.getCenterY(), + w: rect.width, + h: rect.height + }; + } + + return pData; +}; + +CoSELayout.prototype.runSpringEmbedder = function () { + this.initialAnimationPeriod = 25; + this.animationPeriod = this.initialAnimationPeriod; + var layoutEnded = false; + + // If aminate option is 'during' signal that layout is supposed to start iterating + if ( FDLayoutConstants.ANIMATE === 'during' ) { + this.emit('layoutstarted'); + } + else { + // If aminate option is 'during' tick() function will be called on index.js + while (!layoutEnded) { + layoutEnded = this.tick(); + } + + this.graphManager.updateBounds(); + } +}; + +// overrides moveNodes method in FDLayout +CoSELayout.prototype.moveNodes = function () { + var lNodes = this.getAllNodes(); + var node; + + // calculate displacement for each node + for (var i = 0; i < lNodes.length; i++) + { + node = lNodes[i]; + node.calculateDisplacement(); + } + + if(Object.keys(this.constraints).length > 0){ + this.updateDisplacements(); + } + + // move each node + for (var i = 0; i < lNodes.length; i++) + { + node = lNodes[i]; + node.move(); + } +}; + +// constraint related methods: initConstraintVariables and updateDisplacements + +// initialize constraint related variables +CoSELayout.prototype.initConstraintVariables = function () { + var self = this; + this.idToNodeMap = new Map(); + this.fixedNodeSet = new Set(); + + var allNodes = this.graphManager.getAllNodes(); + + // fill idToNodeMap + for(var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + this.idToNodeMap.set(node.id, node); + } + + // calculate fixed node weight for given compound node + var calculateCompoundWeight = function(compoundNode) { + var nodes = compoundNode.getChild().getNodes(); + var node; + var fixedNodeWeight = 0; + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + if (node.getChild() == null) { + if(self.fixedNodeSet.has(node.id)) { + fixedNodeWeight += 100; + } + } else { + fixedNodeWeight += calculateCompoundWeight(node); + } + } + return fixedNodeWeight; + }; + + if (this.constraints.fixedNodeConstraint) { + // fill fixedNodeSet + this.constraints.fixedNodeConstraint.forEach(function (nodeData) { + self.fixedNodeSet.add(nodeData.nodeId); + }); + + // assign fixed node weights to compounds if they contain fixed nodes + var allNodes = this.graphManager.getAllNodes(); + var node; + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + if (node.getChild() != null) { + let fixedNodeWeight = calculateCompoundWeight(node); + if (fixedNodeWeight > 0) { + node.fixedNodeWeight = fixedNodeWeight; + } + } + } + } + + if(this.constraints.relativePlacementConstraint) { + var nodeToDummyForVerticalAlignment = new Map(); + var nodeToDummyForHorizontalAlignment = new Map(); + this.dummyToNodeForVerticalAlignment = new Map(); + this.dummyToNodeForHorizontalAlignment = new Map(); + this.fixedNodesOnHorizontal = new Set(); + this.fixedNodesOnVertical = new Set(); + + // fill maps and sets + this.fixedNodeSet.forEach(function(nodeId){ + self.fixedNodesOnHorizontal.add(nodeId); + self.fixedNodesOnVertical.add(nodeId); + }); + + if(this.constraints.alignmentConstraint) { + if(this.constraints.alignmentConstraint.vertical) { + var verticalAlignment = this.constraints.alignmentConstraint.vertical; + for(var i = 0; i < verticalAlignment.length; i++) { + this.dummyToNodeForVerticalAlignment.set("dummy" + i, []); + verticalAlignment[i].forEach(function(nodeId){ + nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + i); + self.dummyToNodeForVerticalAlignment.get("dummy" + i).push(nodeId); + if(self.fixedNodeSet.has(nodeId)) { + self.fixedNodesOnHorizontal.add("dummy" + i); + } + }); + } + } + if(this.constraints.alignmentConstraint.horizontal){ + var horizontalAlignment = this.constraints.alignmentConstraint.horizontal; + for(var i = 0; i < horizontalAlignment.length; i++){ + this.dummyToNodeForHorizontalAlignment.set("dummy" + i, []); + horizontalAlignment[i].forEach(function(nodeId){ + nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + i); + self.dummyToNodeForHorizontalAlignment.get("dummy" + i).push(nodeId); + if(self.fixedNodeSet.has(nodeId)){ + self.fixedNodesOnVertical.add("dummy" + i); + } + }); + } + } + } + + if(CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) { + + this.shuffle = function (array) { + var j, x, i; + for (i = array.length - 1; i >= (2 * array.length / 3); i--) { + j = Math.floor(Math.random() * (i + 1)); + x = array[i]; + array[i] = array[j]; + array[j] = x; + } + return array; + }; + + this.nodesInRelativeHorizontal = []; + this.nodesInRelativeVertical = []; + this.nodeToRelativeConstraintMapHorizontal = new Map(); + this.nodeToRelativeConstraintMapVertical = new Map(); + this.nodeToTempPositionMapHorizontal = new Map(); + this.nodeToTempPositionMapVertical = new Map(); + + // fill arrays and maps + this.constraints.relativePlacementConstraint.forEach(function(constraint) { + if(constraint.left) { + let nodeIdLeft = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left; + let nodeIdRight = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right; + + if(!self.nodesInRelativeHorizontal.includes(nodeIdLeft)) { + self.nodesInRelativeHorizontal.push(nodeIdLeft); + self.nodeToRelativeConstraintMapHorizontal.set(nodeIdLeft, []); + if(self.dummyToNodeForVerticalAlignment.has(nodeIdLeft)) { + self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdLeft)[0]).getCenterX()); + } + else { + self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(nodeIdLeft).getCenterX()); + } + } + if(!self.nodesInRelativeHorizontal.includes(nodeIdRight)) { + self.nodesInRelativeHorizontal.push(nodeIdRight); + self.nodeToRelativeConstraintMapHorizontal.set(nodeIdRight, []); + if(self.dummyToNodeForVerticalAlignment.has(nodeIdRight)) { + self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdRight)[0]).getCenterX()); + } + else { + self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(nodeIdRight).getCenterX()); + } + } + + self.nodeToRelativeConstraintMapHorizontal.get(nodeIdLeft).push({right: nodeIdRight, gap: constraint.gap}); + self.nodeToRelativeConstraintMapHorizontal.get(nodeIdRight).push({left: nodeIdLeft, gap: constraint.gap}); + } + else { + let nodeIdTop = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top; + let nodeIdBottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom; + + if(!self.nodesInRelativeVertical.includes(nodeIdTop)) { + self.nodesInRelativeVertical.push(nodeIdTop); + self.nodeToRelativeConstraintMapVertical.set(nodeIdTop, []); + if(self.dummyToNodeForHorizontalAlignment.has(nodeIdTop)) { + self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdTop)[0]).getCenterY()); + } + else { + self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(nodeIdTop).getCenterY()); + } + } + if(!self.nodesInRelativeVertical.includes(nodeIdBottom)) { + self.nodesInRelativeVertical.push(nodeIdBottom); + self.nodeToRelativeConstraintMapVertical.set(nodeIdBottom, []); + if(self.dummyToNodeForHorizontalAlignment.has(nodeIdBottom)) { + self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdBottom)[0]).getCenterY()); + } + else { + self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(nodeIdBottom).getCenterY()); + } + } + self.nodeToRelativeConstraintMapVertical.get(nodeIdTop).push({bottom: nodeIdBottom, gap: constraint.gap}); + self.nodeToRelativeConstraintMapVertical.get(nodeIdBottom).push({top: nodeIdTop, gap: constraint.gap}); + } + }); + } + else { + var subGraphOnHorizontal = new Map(); // subgraph from vertical RP constraints + var subGraphOnVertical = new Map(); // subgraph from vertical RP constraints + + // construct subgraphs from relative placement constraints + this.constraints.relativePlacementConstraint.forEach(function(constraint) { + if(constraint.left) { + var left = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left; + var right = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right; + if(subGraphOnHorizontal.has(left)) { + subGraphOnHorizontal.get(left).push(right); + } + else { + subGraphOnHorizontal.set(left, [right]); + } + if(subGraphOnHorizontal.has(right)) { + subGraphOnHorizontal.get(right).push(left); + } + else { + subGraphOnHorizontal.set(right, [left]); + } + } + else { + var top = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top; + var bottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom; + if(subGraphOnVertical.has(top)) { + subGraphOnVertical.get(top).push(bottom); + } + else { + subGraphOnVertical.set(top, [bottom]); + } + if(subGraphOnVertical.has(bottom)) { + subGraphOnVertical.get(bottom).push(top); + } + else { + subGraphOnVertical.set(bottom, [top]); + } + } + }); + + // function to construct components from a given graph + // also returns an array that keeps whether each component contains fixed node + var constructComponents = function(graph, fixedNodes){ + let components = []; + let isFixed = []; + let queue = new LinkedList(); + let visited = new Set(); + let count = 0; + + graph.forEach(function(value, key){ + if(!visited.has(key)){ + components[count] = []; + isFixed[count] = false; + let currentNode = key; + queue.push(currentNode); + visited.add(currentNode); + components[count].push(currentNode); + + while(queue.length != 0){ + currentNode = queue.shift(); + if(fixedNodes.has(currentNode)) { + isFixed[count] = true; + } + let neighbors = graph.get(currentNode); + neighbors.forEach(function(neighbor){ + if(!visited.has(neighbor)){ + queue.push(neighbor); + visited.add(neighbor); + components[count].push(neighbor); + } + }); + } + count++; + } + }); + + return { components: components, isFixed: isFixed }; + }; + + var resultOnHorizontal = constructComponents(subGraphOnHorizontal, self.fixedNodesOnHorizontal); + this.componentsOnHorizontal = resultOnHorizontal.components; + this.fixedComponentsOnHorizontal = resultOnHorizontal.isFixed; + var resultOnVertical = constructComponents(subGraphOnVertical, self.fixedNodesOnVertical); + this.componentsOnVertical = resultOnVertical.components; + this.fixedComponentsOnVertical = resultOnVertical.isFixed; + } + } +}; + +// updates node displacements based on constraints +CoSELayout.prototype.updateDisplacements = function () { + var self = this; + if(this.constraints.fixedNodeConstraint){ + this.constraints.fixedNodeConstraint.forEach(function(nodeData){ + var fixedNode = self.idToNodeMap.get(nodeData.nodeId); + fixedNode.displacementX = 0; + fixedNode.displacementY = 0; + }); + } + + if(this.constraints.alignmentConstraint){ + if(this.constraints.alignmentConstraint.vertical){ + var allVerticalAlignments = this.constraints.alignmentConstraint.vertical; + for(var i = 0; i < allVerticalAlignments.length; i++){ + var totalDisplacementX = 0; + for(var j = 0; j < allVerticalAlignments[i].length; j++){ + if(this.fixedNodeSet.has(allVerticalAlignments[i][j])){ + totalDisplacementX = 0; + break; + } + totalDisplacementX += this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX; + } + var averageDisplacementX = totalDisplacementX / allVerticalAlignments[i].length; + for(var j = 0; j < allVerticalAlignments[i].length; j++){ + this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX = averageDisplacementX; + } + } + } + if(this.constraints.alignmentConstraint.horizontal){ + var allHorizontalAlignments = this.constraints.alignmentConstraint.horizontal; + for(var i = 0; i < allHorizontalAlignments.length; i++){ + var totalDisplacementY = 0; + for(var j = 0; j < allHorizontalAlignments[i].length; j++){ + if(this.fixedNodeSet.has(allHorizontalAlignments[i][j])){ + totalDisplacementY = 0; + break; + } + totalDisplacementY += this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY; + } + var averageDisplacementY = totalDisplacementY / allHorizontalAlignments[i].length; + for(var j = 0; j < allHorizontalAlignments[i].length; j++){ + this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY = averageDisplacementY; + } + } + } + } + + if(this.constraints.relativePlacementConstraint){ + + if(CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) { + // shuffle array to randomize node processing order + if (this.totalIterations % 10 == 0) { + this.shuffle(this.nodesInRelativeHorizontal); + this.shuffle(this.nodesInRelativeVertical); + } + + this.nodesInRelativeHorizontal.forEach(function(nodeId) { + if(!self.fixedNodesOnHorizontal.has(nodeId)) { + var displacement = 0; + if(self.dummyToNodeForVerticalAlignment.has(nodeId)) { + displacement = self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeId)[0]).displacementX; + } + else { + displacement = self.idToNodeMap.get(nodeId).displacementX; + } + self.nodeToRelativeConstraintMapHorizontal.get(nodeId).forEach(function(constraint) { + if(constraint.right) { + var diff = (self.nodeToTempPositionMapHorizontal.get(constraint.right) - self.nodeToTempPositionMapHorizontal.get(nodeId)) - displacement; + if(diff < constraint.gap) { + displacement -= constraint.gap - diff; + } + } + else { + var diff = (self.nodeToTempPositionMapHorizontal.get(nodeId) - self.nodeToTempPositionMapHorizontal.get(constraint.left)) + displacement; + if(diff < constraint.gap) { + displacement += constraint.gap - diff; + } + } + }); + self.nodeToTempPositionMapHorizontal.set(nodeId, self.nodeToTempPositionMapHorizontal.get(nodeId) + displacement); + if(self.dummyToNodeForVerticalAlignment.has(nodeId)) { + self.dummyToNodeForVerticalAlignment.get(nodeId).forEach(function(nodeId){ + self.idToNodeMap.get(nodeId).displacementX = displacement; + }); + } + else { + self.idToNodeMap.get(nodeId).displacementX = displacement; + } + } + }); + + this.nodesInRelativeVertical.forEach(function(nodeId) { + if(!self.fixedNodesOnHorizontal.has(nodeId)) { + var displacement = 0; + if(self.dummyToNodeForHorizontalAlignment.has(nodeId)) { + displacement = self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeId)[0]).displacementY; + } + else { + displacement = self.idToNodeMap.get(nodeId).displacementY; + } + self.nodeToRelativeConstraintMapVertical.get(nodeId).forEach(function(constraint) { + if(constraint.bottom) { + var diff = (self.nodeToTempPositionMapVertical.get(constraint.bottom) - self.nodeToTempPositionMapVertical.get(nodeId)) - displacement; + if(diff < constraint.gap) { + displacement -= constraint.gap - diff; + } + } + else { + var diff = (self.nodeToTempPositionMapVertical.get(nodeId) - self.nodeToTempPositionMapVertical.get(constraint.top)) + displacement; + if(diff < constraint.gap) { + displacement += constraint.gap - diff; + } + } + }); + self.nodeToTempPositionMapVertical.set(nodeId, self.nodeToTempPositionMapVertical.get(nodeId) + displacement); + if(self.dummyToNodeForHorizontalAlignment.has(nodeId)) { + self.dummyToNodeForHorizontalAlignment.get(nodeId).forEach(function(nodeId){ + self.idToNodeMap.get(nodeId).displacementY = displacement; + }); + } + else { + self.idToNodeMap.get(nodeId).displacementY = displacement; + } + } + }); + } + else { + for(var i = 0; i < this.componentsOnHorizontal.length; i++) { + var component = this.componentsOnHorizontal[i]; + if(this.fixedComponentsOnHorizontal[i]) { + for(var j = 0; j < component.length; j++){ + if(this.dummyToNodeForVerticalAlignment.has(component[j])) { + this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function(nodeId){ + self.idToNodeMap.get(nodeId).displacementX = 0; + }); + } + else { + this.idToNodeMap.get(component[j]).displacementX = 0; + } + } + } + else { + var sum = 0; + var count = 0; + for(var j = 0; j < component.length; j++){ + if(this.dummyToNodeForVerticalAlignment.has(component[j])) { + var actualNodes = this.dummyToNodeForVerticalAlignment.get(component[j]); + sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementX; + count += actualNodes.length; + } + else { + sum += this.idToNodeMap.get(component[j]).displacementX; + count++; + } + } + var averageDisplacement = sum / count; + for(var j = 0; j < component.length; j++){ + if(this.dummyToNodeForVerticalAlignment.has(component[j])) { + this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function(nodeId){ + self.idToNodeMap.get(nodeId).displacementX = averageDisplacement; + }); + } + else { + this.idToNodeMap.get(component[j]).displacementX = averageDisplacement; + } + } + } + } + + for(var i = 0; i < this.componentsOnVertical.length; i++) { + var component = this.componentsOnVertical[i]; + if(this.fixedComponentsOnVertical[i]) { + for(var j = 0; j < component.length; j++){ + if(this.dummyToNodeForHorizontalAlignment.has(component[j])) { + this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function(nodeId){ + self.idToNodeMap.get(nodeId).displacementY = 0; + }); + } + else { + this.idToNodeMap.get(component[j]).displacementY = 0; + } + } + } + else { + var sum = 0; + var count = 0; + for(var j = 0; j < component.length; j++){ + if(this.dummyToNodeForHorizontalAlignment.has(component[j])) { + var actualNodes = this.dummyToNodeForHorizontalAlignment.get(component[j]); + sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementY; + count += actualNodes.length; + } + else { + sum += this.idToNodeMap.get(component[j]).displacementY; + count++; + } + } + var averageDisplacement = sum / count; + for(var j = 0; j < component.length; j++){ + if(this.dummyToNodeForHorizontalAlignment.has(component[j])) { + this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function(nodeId){ + self.idToNodeMap.get(nodeId).displacementY = averageDisplacement; + }); + } + else { + this.idToNodeMap.get(component[j]).displacementY = averageDisplacement; + } + } + } + } + } + } +}; + +CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () { + var nodeList = []; + var graph; + + var graphs = this.graphManager.getGraphs(); + var size = graphs.length; + var i; + for (i = 0; i < size; i++) + { + graph = graphs[i]; + + graph.updateConnected(); + + if (!graph.isConnected) + { + nodeList = nodeList.concat(graph.getNodes()); + } + } + + return nodeList; +}; + +CoSELayout.prototype.createBendpoints = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + var visited = new Set(); + var i; + for (i = 0; i < edges.length; i++) + { + var edge = edges[i]; + + if (!visited.has(edge)) + { + var source = edge.getSource(); + var target = edge.getTarget(); + + if (source == target) + { + edge.getBendpoints().push(new PointD()); + edge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(edge); + visited.add(edge); + } + else + { + var edgeList = []; + + edgeList = edgeList.concat(source.getEdgeListToNode(target)); + edgeList = edgeList.concat(target.getEdgeListToNode(source)); + + if (!visited.has(edgeList[0])) + { + if (edgeList.length > 1) + { + var k; + for (k = 0; k < edgeList.length; k++) + { + var multiEdge = edgeList[k]; + multiEdge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(multiEdge); + } + } + edgeList.forEach(function(edge){ + visited.add(edge); + }); + } + } + } + + if (visited.size == edges.length) + { + break; + } + } +}; + +CoSELayout.prototype.positionNodesRadially = function (forest) { + // We tile the trees to a grid row by row; first tree starts at (0,0) + var currentStartingPoint = new Point(0, 0); + var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); + var height = 0; + var currentY = 0; + var currentX = 0; + var point = new PointD(0, 0); + + for (var i = 0; i < forest.length; i++) + { + if (i % numberOfColumns == 0) + { + // Start of a new row, make the x coordinate 0, increment the + // y coordinate with the max height of the previous row + currentX = 0; + currentY = height; + + if (i != 0) + { + currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; + } + + height = 0; + } + + var tree = forest[i]; + + // Find the center of the tree + var centerNode = Layout.findCenterOfTree(tree); + + // Set the staring point of the next tree + currentStartingPoint.x = currentX; + currentStartingPoint.y = currentY; + + // Do a radial layout starting with the center + point = + CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); + + if (point.y > height) + { + height = Math.floor(point.y); + } + + currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); + } + + this.transform( + new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, + LayoutConstants.WORLD_CENTER_Y - point.y / 2)); +}; + +CoSELayout.radialLayout = function (tree, centerNode, startingPoint) { + var radialSep = Math.max(this.maxDiagonalInTree(tree), + CoSEConstants.DEFAULT_RADIAL_SEPARATION); + CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); + var bounds = LGraph.calculateBounds(tree); + + var transform = new Transform(); + transform.setDeviceOrgX(bounds.getMinX()); + transform.setDeviceOrgY(bounds.getMinY()); + transform.setWorldOrgX(startingPoint.x); + transform.setWorldOrgY(startingPoint.y); + + for (var i = 0; i < tree.length; i++) + { + var node = tree[i]; + node.transform(transform); + } + + var bottomRight = + new PointD(bounds.getMaxX(), bounds.getMaxY()); + + return transform.inverseTransformPoint(bottomRight); +}; + +CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) { + // First, position this node by finding its angle. + var halfInterval = ((endAngle - startAngle) + 1) / 2; + + if (halfInterval < 0) + { + halfInterval += 180; + } + + var nodeAngle = (halfInterval + startAngle) % 360; + var teta = (nodeAngle * IGeometry.TWO_PI) / 360; + + // Make polar to java cordinate conversion. + var cos_teta = Math.cos(teta); + var x_ = distance * Math.cos(teta); + var y_ = distance * Math.sin(teta); + + node.setCenter(x_, y_); + + // Traverse all neighbors of this node and recursively call this + // function. + var neighborEdges = []; + neighborEdges = neighborEdges.concat(node.getEdges()); + var childCount = neighborEdges.length; + + if (parentOfNode != null) + { + childCount--; + } + + var branchCount = 0; + + var incEdgesCount = neighborEdges.length; + var startIndex; + + var edges = node.getEdgesBetween(parentOfNode); + + // If there are multiple edges, prune them until there remains only one + // edge. + while (edges.length > 1) + { + //neighborEdges.remove(edges.remove(0)); + var temp = edges[0]; + edges.splice(0, 1); + var index = neighborEdges.indexOf(temp); + if (index >= 0) { + neighborEdges.splice(index, 1); + } + incEdgesCount--; + childCount--; + } + + if (parentOfNode != null) + { + //assert edges.length == 1; + startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount; + } + else + { + startIndex = 0; + } + + var stepAngle = Math.abs(endAngle - startAngle) / childCount; + + for (var i = startIndex; + branchCount != childCount; + i = (++i) % incEdgesCount) + { + var currentNeighbor = + neighborEdges[i].getOtherEnd(node); + + // Don't back traverse to root node in current tree. + if (currentNeighbor == parentOfNode) + { + continue; + } + + var childStartAngle = + (startAngle + branchCount * stepAngle) % 360; + var childEndAngle = (childStartAngle + stepAngle) % 360; + + CoSELayout.branchRadialLayout(currentNeighbor, + node, + childStartAngle, childEndAngle, + distance + radialSeparation, radialSeparation); + + branchCount++; + } +}; + +CoSELayout.maxDiagonalInTree = function (tree) { + var maxDiagonal = Integer.MIN_VALUE; + + for (var i = 0; i < tree.length; i++) + { + var node = tree[i]; + var diagonal = node.getDiagonal(); + + if (diagonal > maxDiagonal) + { + maxDiagonal = diagonal; + } + } + + return maxDiagonal; +}; + +CoSELayout.prototype.calcRepulsionRange = function () { + // formula is 2 x (level + 1) x idealEdgeLength + return (2 * (this.level + 1) * this.idealEdgeLength); +}; + +// Tiling methods + +// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's +CoSELayout.prototype.groupZeroDegreeMembers = function () { + var self = this; + // array of [parent_id x oneDegreeNode_id] + var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members + this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled + this.idToDummyNode = {}; // A map of id to dummy node + + var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled + var allNodes = this.graphManager.getAllNodes(); + + // Fill zero degree list + for (var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + var parent = node.getParent(); + // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list + if (this.getNodeDegreeWithChildren(node) === 0 && ( parent.id == undefined || !this.getToBeTiled(parent) ) ) { + zeroDegree.push(node); + } + } + + // Create a map of parent node and its zero degree members + for (var i = 0; i < zeroDegree.length; i++) + { + var node = zeroDegree[i]; // Zero degree node itself + var p_id = node.getParent().id; // Parent id + + if (typeof tempMemberGroups[p_id] === "undefined") + tempMemberGroups[p_id] = []; + + tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups + } + + // If there are at least two nodes at a level, create a dummy compound for them + Object.keys(tempMemberGroups).forEach(function(p_id) { + if (tempMemberGroups[p_id].length > 1) { + var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon + self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups + + var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound + + // Create a dummy compound with calculated id + var dummyCompound = new CoSENode(self.graphManager); + dummyCompound.id = dummyCompoundId; + dummyCompound.paddingLeft = parent.paddingLeft || 0; + dummyCompound.paddingRight = parent.paddingRight || 0; + dummyCompound.paddingBottom = parent.paddingBottom || 0; + dummyCompound.paddingTop = parent.paddingTop || 0; + + self.idToDummyNode[dummyCompoundId] = dummyCompound; + + var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound); + var parentGraph = parent.getChild(); + + // Add dummy compound to parent the graph + parentGraph.add(dummyCompound); + + // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent + for (var i = 0; i < tempMemberGroups[p_id].length; i++) { + var node = tempMemberGroups[p_id][i]; + + parentGraph.remove(node); + dummyParentGraph.add(node); + } + } + }); +}; + +CoSELayout.prototype.clearCompounds = function () { + var childGraphMap = {}; + var idToNode = {}; + + // Get compound ordering by finding the inner one first + this.performDFSOnCompounds(); + + for (var i = 0; i < this.compoundOrder.length; i++) { + + idToNode[this.compoundOrder[i].id] = this.compoundOrder[i]; + childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes()); + + // Remove children of compounds + this.graphManager.remove(this.compoundOrder[i].getChild()); + this.compoundOrder[i].child = null; + } + + this.graphManager.resetAllNodes(); + + // Tile the removed children + this.tileCompoundMembers(childGraphMap, idToNode); +}; + +CoSELayout.prototype.clearZeroDegreeMembers = function () { + var self = this; + var tiledZeroDegreePack = this.tiledZeroDegreePack = []; + + Object.keys(this.memberGroups).forEach(function(id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound + + tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + // Set the width and height of the dummy compound as calculated + compoundNode.rect.width = tiledZeroDegreePack[id].width; + compoundNode.rect.height = tiledZeroDegreePack[id].height; + compoundNode.setCenter(tiledZeroDegreePack[id].centerX, tiledZeroDegreePack[id].centerY); + + // compound left and top margings for labels + // when node labels are included, these values may be set to different values below and are used in tilingPostLayout, + // otherwise they stay as zero + compoundNode.labelMarginLeft = 0; + compoundNode.labelMarginTop = 0; + + // Update compound bounds considering its label properties and set label margins for left and top + if(CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS){ + + var width = compoundNode.rect.width; + var height = compoundNode.rect.height; + + if(compoundNode.labelWidth){ + if(compoundNode.labelPosHorizontal == "left"){ + compoundNode.rect.x -= (compoundNode.labelWidth); + compoundNode.setWidth(width + compoundNode.labelWidth); + compoundNode.labelMarginLeft = compoundNode.labelWidth; + } + else if(compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width){ + compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2; + compoundNode.setWidth(compoundNode.labelWidth); + compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2; + } + else if(compoundNode.labelPosHorizontal == "right"){ + compoundNode.setWidth(width + compoundNode.labelWidth); + } + } + + if(compoundNode.labelHeight){ + if(compoundNode.labelPosVertical == "top"){ + compoundNode.rect.y -= (compoundNode.labelHeight); + compoundNode.setHeight(height + compoundNode.labelHeight); + compoundNode.labelMarginTop = compoundNode.labelHeight; + } + else if(compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height){ + compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2; + compoundNode.setHeight(compoundNode.labelHeight); + compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2; + } + else if(compoundNode.labelPosVertical == "bottom"){ + compoundNode.setHeight(height + compoundNode.labelHeight); + } + } + } + }); +}; + +CoSELayout.prototype.repopulateCompounds = function () { + for (var i = this.compoundOrder.length - 1; i >= 0; i--) { + var lCompoundNode = this.compoundOrder[i]; + var id = lCompoundNode.id; + var horizontalMargin = lCompoundNode.paddingLeft; + var verticalMargin = lCompoundNode.paddingTop; + var labelMarginLeft = lCompoundNode.labelMarginLeft; + var labelMarginTop = lCompoundNode.labelMarginTop; + + this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop); + } +}; + +CoSELayout.prototype.repopulateZeroDegreeMembers = function () { + var self = this; + var tiledPack = this.tiledZeroDegreePack; + + Object.keys(tiledPack).forEach(function(id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id + var horizontalMargin = compoundNode.paddingLeft; + var verticalMargin = compoundNode.paddingTop; + var labelMarginLeft = compoundNode.labelMarginLeft; + var labelMarginTop = compoundNode.labelMarginTop; + + // Adjust the positions of nodes wrt its compound + self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop); + }); +}; + +CoSELayout.prototype.getToBeTiled = function (node) { + var id = node.id; + //firstly check the previous results + if (this.toBeTiled[id] != null) { + return this.toBeTiled[id]; + } + + //only compound nodes are to be tiled + var childGraph = node.getChild(); + if (childGraph == null) { + this.toBeTiled[id] = false; + return false; + } + + var children = childGraph.getNodes(); // Get the children nodes + + //a compound node is not to be tiled if all of its compound children are not to be tiled + for (var i = 0; i < children.length; i++) { + var theChild = children[i]; + + if (this.getNodeDegree(theChild) > 0) { + this.toBeTiled[id] = false; + return false; + } + + //pass the children not having the compound structure + if (theChild.getChild() == null) { + this.toBeTiled[theChild.id] = false; + continue; + } + + if (!this.getToBeTiled(theChild)) { + this.toBeTiled[id] = false; + return false; + } + } + this.toBeTiled[id] = true; + return true; +}; + +// Get degree of a node depending of its edges and independent of its children +CoSELayout.prototype.getNodeDegree = function (node) { + var id = node.id; + var edges = node.getEdges(); + var degree = 0; + + // For the edges connected + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + if (edge.getSource().id !== edge.getTarget().id) { + degree = degree + 1; + } + } + return degree; +}; + +// Get degree of a node with its children +CoSELayout.prototype.getNodeDegreeWithChildren = function (node) { + var degree = this.getNodeDegree(node); + if (node.getChild() == null) { + return degree; + } + var children = node.getChild().getNodes(); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + degree += this.getNodeDegreeWithChildren(child); + } + return degree; +}; + +CoSELayout.prototype.performDFSOnCompounds = function () { + this.compoundOrder = []; + this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); +}; + +CoSELayout.prototype.fillCompexOrderByDFS = function (children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (child.getChild() != null) { + this.fillCompexOrderByDFS(child.getChild().getNodes()); + } + if (this.getToBeTiled(child)) { + this.compoundOrder.push(child); + } + } +}; + +/** +* This method places each zero degree member wrt given (x,y) coordinates (top left). +*/ +CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin, compoundLabelMarginLeft, compoundLabelMarginTop) { + x += compoundHorizontalMargin + compoundLabelMarginLeft; + y += compoundVerticalMargin + compoundLabelMarginTop; + + var left = x; + + for (var i = 0; i < organization.rows.length; i++) { + var row = organization.rows[i]; + x = left; + var maxHeight = 0; + + for (var j = 0; j < row.length; j++) { + var lnode = row[j]; + + lnode.rect.x = x;// + lnode.rect.width / 2; + lnode.rect.y = y;// + lnode.rect.height / 2; + + x += lnode.rect.width + organization.horizontalPadding; + + if (lnode.rect.height > maxHeight) + maxHeight = lnode.rect.height; + } + + y += maxHeight + organization.verticalPadding; + } +}; + +CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) { + var self = this; + this.tiledMemberPack = []; + + Object.keys(childGraphMap).forEach(function(id) { + // Get the compound node + var compoundNode = idToNode[id]; + + self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + compoundNode.rect.width = self.tiledMemberPack[id].width; + compoundNode.rect.height = self.tiledMemberPack[id].height; + compoundNode.setCenter(self.tiledMemberPack[id].centerX, self.tiledMemberPack[id].centerY); + + // compound left and top margings for labels + // when node labels are included, these values may be set to different values below and are used in tilingPostLayout, + // otherwise they stay as zero + compoundNode.labelMarginLeft = 0; + compoundNode.labelMarginTop = 0; + + // Update compound bounds considering its label properties and set label margins for left and top + if(CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS){ + + var width = compoundNode.rect.width; + var height = compoundNode.rect.height; + + if(compoundNode.labelWidth){ + if(compoundNode.labelPosHorizontal == "left"){ + compoundNode.rect.x -= (compoundNode.labelWidth); + compoundNode.setWidth(width + compoundNode.labelWidth); + compoundNode.labelMarginLeft = compoundNode.labelWidth; + } + else if(compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width){ + compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2; + compoundNode.setWidth(compoundNode.labelWidth); + compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2; + } + else if(compoundNode.labelPosHorizontal == "right"){ + compoundNode.setWidth(width + compoundNode.labelWidth); + } + } + + if(compoundNode.labelHeight){ + if(compoundNode.labelPosVertical == "top"){ + compoundNode.rect.y -= (compoundNode.labelHeight); + compoundNode.setHeight(height + compoundNode.labelHeight); + compoundNode.labelMarginTop = compoundNode.labelHeight; + } + else if(compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height){ + compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2; + compoundNode.setHeight(compoundNode.labelHeight); + compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2; + } + else if(compoundNode.labelPosVertical == "bottom"){ + compoundNode.setHeight(height + compoundNode.labelHeight); + } + } + } + }); +}; + +CoSELayout.prototype.tileNodes = function (nodes, minWidth) { + var horizontalOrg = this.tileNodesByFavoringDim(nodes, minWidth, true); + var verticalOrg = this.tileNodesByFavoringDim(nodes, minWidth, false); + + var horizontalRatio = this.getOrgRatio(horizontalOrg); + var verticalRatio = this.getOrgRatio(verticalOrg); + var bestOrg; + + // the best ratio is the one that is closer to 1 since the ratios are already normalized + // and the best organization is the one that has the best ratio + if (verticalRatio < horizontalRatio) { + bestOrg = verticalOrg; + } else { + bestOrg = horizontalOrg; + } + + return bestOrg; +}; + +// get the width/height ratio of the organization that is normalized so that it will not be less than 1 +CoSELayout.prototype.getOrgRatio = function (organization) { + // get dimensions and calculate the initial ratio + var width = organization.width; + var height = organization.height; + var ratio = width / height; + + // if the initial ratio is less then 1 then inverse it + if (ratio < 1) { + ratio = 1 / ratio; + } + + // return the normalized ratio + return ratio; +}; + +/* + * Calculates the ideal width for the rows. This method assumes that + * each node has the same sizes and calculates the ideal row width that + * approximates a square shaped complex accordingly. However, since nodes would + * have different sizes some rows would have different sizes and the resulting + * shape would not be an exact square. + */ +CoSELayout.prototype.calcIdealRowWidth = function (members, favorHorizontalDim) { + // To approximate a square shaped complex we need to make complex width equal to complex height. + // To achieve this we need to solve the following equation system for hc: + // (x + bx) * hc - bx = (y + by) * vc - by, hc * vc = n + // where x is the avarage width of the nodes, y is the avarage height of nodes + // bx and by are the buffer sizes in horizontal and vertical dimensions accordingly, + // hc and vc are the number of rows in horizontal and vertical dimensions + // n is number of members. + + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + + // number of members + var membersSize = members.length; + + // sum of the width of all members + var totalWidth = 0; + + // sum of the height of all members + var totalHeight = 0; + + var maxWidth = 0; + + // traverse all members to calculate total width and total height and get the maximum members width + members.forEach(function (node) { + totalWidth += node.getWidth(); + totalHeight += node.getHeight(); + + if (node.getWidth() > maxWidth) { + maxWidth = node.getWidth(); + } + }); + + // average width of the members + var averageWidth = totalWidth / membersSize; + + // average height of the members + var averageHeight = totalHeight / membersSize; + + // solving the initial equation system for the hc yields the following second degree equation: + // hc^2 * (x+bx) + hc * (by - bx) - n * (y + by) = 0 + + // the delta value to solve the equation above for hc + var delta = Math.pow(verticalPadding - horizontalPadding, 2) + 4 * (averageWidth + horizontalPadding) * (averageHeight + verticalPadding) * membersSize; + + // solve the equation using delta value to calculate the horizontal count + // that represents the number of nodes in an ideal row + var horizontalCountDouble = (horizontalPadding - verticalPadding + Math.sqrt(delta)) / (2 * (averageWidth + horizontalPadding)); + // round the calculated horizontal count up or down according to the favored dimension + var horizontalCount; + + if (favorHorizontalDim) { + horizontalCount = Math.ceil(horizontalCountDouble); + // if horizontalCount count is not a float value then both of rounding to floor and ceil + // will yield the same values. Instead of repeating the same calculation try going up + // while favoring horizontal dimension in such cases + if ( horizontalCount == horizontalCountDouble ) { + horizontalCount++; + } + } else { + horizontalCount = Math.floor(horizontalCountDouble); + } + + // ideal width to be calculated + var idealWidth = horizontalCount * (averageWidth + horizontalPadding) - horizontalPadding; + + // if max width is bigger than calculated ideal width reset ideal width to it + if (maxWidth > idealWidth) { + idealWidth = maxWidth; + } + + // add the left-right margins to the ideal row width + idealWidth += horizontalPadding * 2; + + // return the ideal row width1 + return idealWidth; +}; + +CoSELayout.prototype.tileNodesByFavoringDim = function (nodes, minWidth, favorHorizontalDim) { + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + var tilingCompareBy = CoSEConstants.TILING_COMPARE_BY; + var organization = { + rows: [], + rowWidth: [], + rowHeight: [], + width: 0, + height: minWidth, // assume minHeight equals to minWidth + verticalPadding: verticalPadding, + horizontalPadding: horizontalPadding, + centerX: 0, + centerY: 0 + }; + + if (tilingCompareBy) { + organization.idealRowWidth = this.calcIdealRowWidth(nodes, favorHorizontalDim); + } + + var getNodeArea = function( n ) { + return n.rect.width * n.rect.height; + }; + + var areaCompareFcn = function(n1, n2){ + return getNodeArea( n2 ) - getNodeArea( n1 ); + }; + + // Sort the nodes in descending order of their areas + nodes.sort(function (n1, n2) { + var cmpBy = areaCompareFcn; + if ( organization.idealRowWidth ) { + cmpBy = tilingCompareBy; + return cmpBy( n1.id, n2.id ); + } + return cmpBy( n1, n2 ); + }); + + // Create the organization -> calculate compound center + var sumCenterX = 0; + var sumCenterY = 0; + for (var i = 0; i < nodes.length; i++) { + var lNode = nodes[i]; + + sumCenterX += lNode.getCenterX(); + sumCenterY += lNode.getCenterY(); + } + + organization.centerX = sumCenterX / nodes.length; + organization.centerY = sumCenterY / nodes.length; + + // Create the organization -> tile members + for (var i = 0; i < nodes.length; i++) { + var lNode = nodes[i]; + + if (organization.rows.length == 0) { + this.insertNodeToRow(organization, lNode, 0, minWidth); + } + else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { + var rowIndex = organization.rows.length - 1; + if (!organization.idealRowWidth) { + rowIndex = this.getShortestRowIndex(organization); + } + this.insertNodeToRow(organization, lNode, rowIndex, minWidth); + } + else { + this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); + } + + this.shiftToLastRow(organization); + } + + return organization; +}; + +CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) { + var minCompoundSize = minWidth; + + // Add new row if needed + if (rowIndex == organization.rows.length) { + var secondDimension = []; + + organization.rows.push(secondDimension); + organization.rowWidth.push(minCompoundSize); + organization.rowHeight.push(0); + } + + // Update row width + var w = organization.rowWidth[rowIndex] + node.rect.width; + + if (organization.rows[rowIndex].length > 0) { + w += organization.horizontalPadding; + } + + organization.rowWidth[rowIndex] = w; + // Update compound width + if (organization.width < w) { + organization.width = w; + } + + // Update height + var h = node.rect.height; + if (rowIndex > 0) + h += organization.verticalPadding; + + var extraHeight = 0; + if (h > organization.rowHeight[rowIndex]) { + extraHeight = organization.rowHeight[rowIndex]; + organization.rowHeight[rowIndex] = h; + extraHeight = organization.rowHeight[rowIndex] - extraHeight; + } + + organization.height += extraHeight; + + // Insert node + organization.rows[rowIndex].push(node); +}; + +//Scans the rows of an organization and returns the one with the min width +CoSELayout.prototype.getShortestRowIndex = function (organization) { + var r = -1; + var min = Number.MAX_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + if (organization.rowWidth[i] < min) { + r = i; + min = organization.rowWidth[i]; + } + } + return r; +}; + +//Scans the rows of an organization and returns the one with the max width +CoSELayout.prototype.getLongestRowIndex = function (organization) { + var r = -1; + var max = Number.MIN_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + + if (organization.rowWidth[i] > max) { + r = i; + max = organization.rowWidth[i]; + } + } + + return r; +}; + +/** +* This method checks whether adding extra width to the organization violates +* the aspect ratio(1) or not. +*/ +CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) { + + // if there is an ideal row width specified use it instead of checking the aspect ratio + if (organization.idealRowWidth) { + var lastRowIndex = organization.rows.length - 1; + var lastRowWidth = organization.rowWidth[lastRowIndex]; + + // check and return if ideal row width will be exceed if the node is added to the row + return lastRowWidth + extraWidth + organization.horizontalPadding <= organization.idealRowWidth; + } + + var sri = this.getShortestRowIndex(organization); + + if (sri < 0) { + return true; + } + + var min = organization.rowWidth[sri]; + + if (min + organization.horizontalPadding + extraWidth <= organization.width) + return true; + + var hDiff = 0; + + // Adding to an existing row + if (organization.rowHeight[sri] < extraHeight) { + if (sri > 0) + hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; + } + + var add_to_row_ratio; + if (organization.width - min >= extraWidth + organization.horizontalPadding) { + add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding); + } else { + add_to_row_ratio = (organization.height + hDiff) / organization.width; + } + + // Adding a new row for this node + hDiff = extraHeight + organization.verticalPadding; + var add_new_row_ratio; + if (organization.width < extraWidth) { + add_new_row_ratio = (organization.height + hDiff) / extraWidth; + } else { + add_new_row_ratio = (organization.height + hDiff) / organization.width; + } + + if (add_new_row_ratio < 1) + add_new_row_ratio = 1 / add_new_row_ratio; + + if (add_to_row_ratio < 1) + add_to_row_ratio = 1 / add_to_row_ratio; + + return add_to_row_ratio < add_new_row_ratio; +}; + +//If moving the last node from the longest row and adding it to the last +//row makes the bounding box smaller, do it. +CoSELayout.prototype.shiftToLastRow = function (organization) { + var longest = this.getLongestRowIndex(organization); + var last = organization.rowWidth.length - 1; + var row = organization.rows[longest]; + var node = row[row.length - 1]; + + var diff = node.width + organization.horizontalPadding; + + // Check if there is enough space on the last row + if (organization.width - organization.rowWidth[last] > diff && longest != last) { + // Remove the last element of the longest row + row.splice(-1, 1); + + // Push it to the last row + organization.rows[last].push(node); + + organization.rowWidth[longest] = organization.rowWidth[longest] - diff; + organization.rowWidth[last] = organization.rowWidth[last] + diff; + organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; + + // Update heights of the organization + var maxHeight = Number.MIN_VALUE; + for (var i = 0; i < row.length; i++) { + if (row[i].height > maxHeight) + maxHeight = row[i].height; + } + if (longest > 0) + maxHeight += organization.verticalPadding; + + var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + + organization.rowHeight[longest] = maxHeight; + if (organization.rowHeight[last] < node.height + organization.verticalPadding) + organization.rowHeight[last] = node.height + organization.verticalPadding; + + var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + organization.height += (finalTotal - prevTotal); + + this.shiftToLastRow(organization); + } +}; + +CoSELayout.prototype.tilingPreLayout = function() { + if (CoSEConstants.TILE) { + // Find zero degree nodes and create a compound for each level + this.groupZeroDegreeMembers(); + // Tile and clear children of each compound + this.clearCompounds(); + // Separately tile and clear zero degree nodes for each level + this.clearZeroDegreeMembers(); + } +}; + +CoSELayout.prototype.tilingPostLayout = function() { + if (CoSEConstants.TILE) { + this.repopulateZeroDegreeMembers(); + this.repopulateCompounds(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: Tree Reduction methods +// ----------------------------------------------------------------------------- +// Reduce trees +CoSELayout.prototype.reduceTrees = function () +{ + var prunedNodesAll = []; + var containsLeaf = true; + var node; + + while(containsLeaf) { + var allNodes = this.graphManager.getAllNodes(); + var prunedNodesInStepTemp = []; + containsLeaf = false; + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + if(node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null){ + if(CoSEConstants.PURE_INCREMENTAL) { + var otherEnd = node.getEdges()[0].getOtherEnd(node); + var relativePosition = new DimensionD(node.getCenterX() - otherEnd.getCenterX(), node.getCenterY() - otherEnd.getCenterY()); + prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner(), relativePosition]); + } + else { + prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]); + } + containsLeaf = true; + } + } + if(containsLeaf == true){ + var prunedNodesInStep = []; + for(var j = 0; j < prunedNodesInStepTemp.length; j++){ + if(prunedNodesInStepTemp[j][0].getEdges().length == 1){ + prunedNodesInStep.push(prunedNodesInStepTemp[j]); + prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); + } + } + prunedNodesAll.push(prunedNodesInStep); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + } + } + this.prunedNodesAll = prunedNodesAll; +}; + +// Grow tree one step +CoSELayout.prototype.growTree = function(prunedNodesAll) +{ + var lengthOfPrunedNodesInStep = prunedNodesAll.length; + var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; + + var nodeData; + for(var i = 0; i < prunedNodesInStep.length; i++){ + nodeData = prunedNodesInStep[i]; + + this.findPlaceforPrunedNode(nodeData); + + nodeData[2].add(nodeData[0]); + nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); + } + + prunedNodesAll.splice(prunedNodesAll.length-1, 1); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); +}; + +// Find an appropriate position to replace pruned node, this method can be improved +CoSELayout.prototype.findPlaceforPrunedNode = function(nodeData){ + + var gridForPrunedNode; + var nodeToConnect; + var prunedNode = nodeData[0]; + if(prunedNode == nodeData[1].source){ + nodeToConnect = nodeData[1].target; + } + else { + nodeToConnect = nodeData[1].source; + } + + if(CoSEConstants.PURE_INCREMENTAL) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeData[3].getWidth(), + nodeToConnect.getCenterY() + nodeData[3].getHeight()); + } + else { + var startGridX = nodeToConnect.startX; + var finishGridX = nodeToConnect.finishX; + var startGridY = nodeToConnect.startY; + var finishGridY = nodeToConnect.finishY; + + var upNodeCount = 0; + var downNodeCount = 0; + var rightNodeCount = 0; + var leftNodeCount = 0; + var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount] + + if(startGridY > 0){ + for(var i = startGridX; i <= finishGridX; i++ ){ + controlRegions[0] += (this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1); + } + } + if(finishGridX < this.grid.length - 1){ + for(var i = startGridY; i <= finishGridY; i++ ){ + controlRegions[1] += (this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1); + } + } + if(finishGridY < this.grid[0].length - 1){ + for(var i = startGridX; i <= finishGridX; i++ ){ + controlRegions[2] += (this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1); + } + } + if(startGridX > 0){ + for(var i = startGridY; i <= finishGridY; i++ ){ + controlRegions[3] += (this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1); + } + } + var min = Integer.MAX_VALUE; + var minCount; + var minIndex; + for(var j = 0; j < controlRegions.length; j++){ + if(controlRegions[j] < min){ + min = controlRegions[j]; + minCount = 1; + minIndex = j; + } + else if(controlRegions[j] == min){ + minCount++; + } + } + + if(minCount == 3 && min == 0){ + if(controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0){ + gridForPrunedNode = 1; + } + else if(controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0){ + gridForPrunedNode = 0; + } + else if(controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0){ + gridForPrunedNode = 3; + } + else if(controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0){ + gridForPrunedNode = 2; + } + } + else if(minCount == 2 && min == 0){ + var random = Math.floor(Math.random() * 2); + if(controlRegions[0] == 0 && controlRegions[1] == 0){; + if(random == 0){ + gridForPrunedNode = 0; + } + else{ + gridForPrunedNode = 1; + } + } + else if(controlRegions[0] == 0 && controlRegions[2] == 0){ + if(random == 0){ + gridForPrunedNode = 0; + } + else{ + gridForPrunedNode = 2; + } + } + else if(controlRegions[0] == 0 && controlRegions[3] == 0){ + if(random == 0){ + gridForPrunedNode = 0; + } + else{ + gridForPrunedNode = 3; + } + } + else if(controlRegions[1] == 0 && controlRegions[2] == 0){ + if(random == 0){ + gridForPrunedNode = 1; + } + else{ + gridForPrunedNode = 2; + } + } + else if(controlRegions[1] == 0 && controlRegions[3] == 0){ + if(random == 0){ + gridForPrunedNode = 1; + } + else{ + gridForPrunedNode = 3; + } + } + else { + if(random == 0){ + gridForPrunedNode = 2; + } + else{ + gridForPrunedNode = 3; + } + } + } + else if(minCount == 4 && min == 0){ + var random = Math.floor(Math.random() * 4); + gridForPrunedNode = random; + } + else { + gridForPrunedNode = minIndex; + } + + if(gridForPrunedNode == 0) { + prunedNode.setCenter(nodeToConnect.getCenterX(), + nodeToConnect.getCenterY() - nodeToConnect.getHeight()/2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight()/2); + } + else if(gridForPrunedNode == 1) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth()/2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth()/2, + nodeToConnect.getCenterY()); + } + else if(gridForPrunedNode == 2) { + prunedNode.setCenter(nodeToConnect.getCenterX(), + nodeToConnect.getCenterY() + nodeToConnect.getHeight()/2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight()/2); + } + else { + prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth()/2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth()/2, + nodeToConnect.getCenterY()); + } + } +}; + +module.exports = CoSELayout; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSENode.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSENode.js new file mode 100644 index 0000000000000000000000000000000000000000..52e01d15dcf3532c13141977638bdbeae5bbceae --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/CoSENode.js @@ -0,0 +1,127 @@ +var FDLayoutNode = require('layout-base').FDLayoutNode; +var IMath = require('layout-base').IMath; + +function CoSENode(gm, loc, size, vNode) { + FDLayoutNode.call(this, gm, loc, size, vNode); +} + +CoSENode.prototype = Object.create(FDLayoutNode.prototype); +for (var prop in FDLayoutNode) { + CoSENode[prop] = FDLayoutNode[prop]; +} + +CoSENode.prototype.calculateDisplacement = function () +{ + var layout = this.graphManager.getLayout(); + // this check is for compound nodes that contain fixed nodes + if (this.getChild() != null && this.fixedNodeWeight) { + this.displacementX += layout.coolingFactor * + (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight; + this.displacementY += layout.coolingFactor * + (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight; + } + else { + this.displacementX += layout.coolingFactor * + (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; + this.displacementY += layout.coolingFactor * + (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; + } + + if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) + { + this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * + IMath.sign(this.displacementX); + } + + if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) + { + this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * + IMath.sign(this.displacementY); + } + + // non-empty compound node, propogate movement to children as well + if(this.child && this.child.getNodes().length > 0) + { + this.propogateDisplacementToChildren(this.displacementX, + this.displacementY); + } + +}; + +CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) +{ + var nodes = this.getChild().getNodes(); + var node; + for (var i = 0; i < nodes.length; i++) + { + node = nodes[i]; + if (node.getChild() == null) + { + node.displacementX += dX; + node.displacementY += dY; + } + else + { + node.propogateDisplacementToChildren(dX, dY); + } + } +}; + +CoSENode.prototype.move = function () +{ + var layout = this.graphManager.getLayout(); + + // a simple node or an empty compound node, move it + if (this.child == null || this.child.getNodes().length == 0) + { + this.moveBy(this.displacementX, this.displacementY); + + layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY); + } + + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + this.displacementX = 0; + this.displacementY = 0; +}; + +CoSENode.prototype.setPred1 = function (pred1) +{ + this.pred1 = pred1; +}; + +CoSENode.prototype.getPred1 = function () +{ + return pred1; +}; + +CoSENode.prototype.getPred2 = function () +{ + return pred2; +}; + +CoSENode.prototype.setNext = function (next) +{ + this.next = next; +}; + +CoSENode.prototype.getNext = function () +{ + return next; +}; + +CoSENode.prototype.setProcessed = function (processed) +{ + this.processed = processed; +}; + +CoSENode.prototype.isProcessed = function () +{ + return processed; +}; + +module.exports = CoSENode; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/ConstraintHandler.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/ConstraintHandler.js new file mode 100644 index 0000000000000000000000000000000000000000..ee49a7e5bb93416b968611602c719af059e467b8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/src/ConstraintHandler.js @@ -0,0 +1,848 @@ +var CoSEConstants = require('./CoSEConstants'); +var LinkedList = require('layout-base').LinkedList; +var Matrix = require('layout-base').Matrix; +var SVD = require('layout-base').SVD; + +function ConstraintHandler() { +} + +ConstraintHandler.handleConstraints = function (layout) +{ +// let layout = this.graphManager.getLayout(); + + // get constraints from layout + let constraints = {}; + constraints.fixedNodeConstraint = layout.constraints.fixedNodeConstraint; + constraints.alignmentConstraint = layout.constraints.alignmentConstraint; + constraints.relativePlacementConstraint = layout.constraints.relativePlacementConstraint; + + let idToNodeMap = new Map(); + let nodeIndexes = new Map(); + let xCoords = []; + let yCoords = []; + + let allNodes = layout.getAllNodes(); + let index = 0; + // fill index map and coordinates + for (let i = 0; i < allNodes.length; i++) { + let node = allNodes[i]; + if (node.getChild() == null) { + nodeIndexes.set(node.id, index++); + xCoords.push(node.getCenterX()); + yCoords.push(node.getCenterY()); + idToNodeMap.set(node.id, node); + } + } + + // if there exists relative placement constraint without gap value, set it to default + if (constraints.relativePlacementConstraint) { + constraints.relativePlacementConstraint.forEach(function(constraint) { + if (!constraint.gap && constraint.gap != 0) { + if (constraint.left) { + constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.left).getWidth()/2 + idToNodeMap.get(constraint.right).getWidth()/2; + } + else { + constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.top).getHeight()/2 + idToNodeMap.get(constraint.bottom).getHeight()/2; + } + } + }); + } + + /* auxiliary functions */ + + // calculate difference between two position objects + let calculatePositionDiff = function(pos1, pos2) { + return {x: pos1.x - pos2.x, y: pos1.y - pos2.y}; + }; + + // calculate average position of the nodes + let calculateAvgPosition = function(nodeIdSet) { + let xPosSum = 0; + let yPosSum = 0; + nodeIdSet.forEach(function(nodeId) { + xPosSum += xCoords[nodeIndexes.get(nodeId)]; + yPosSum += yCoords[nodeIndexes.get(nodeId)]; + }); + + return {x: xPosSum / nodeIdSet.size, y: yPosSum / nodeIdSet.size}; + }; + + // find an appropriate positioning for the nodes in a given graph according to relative placement constraints + // this function also takes the fixed nodes and alignment constraints into account + // graph: dag to be evaluated, direction: "horizontal" or "vertical", + // fixedNodes: set of fixed nodes to consider during evaluation, dummyPositions: appropriate coordinates of the dummy nodes + let findAppropriatePositionForRelativePlacement = function(graph, direction, fixedNodes, dummyPositions, componentSources) { + + // find union of two sets + function setUnion(setA, setB) { + let union = new Set(setA); + for (let elem of setB) { + union.add(elem); + } + return union; + } + + // find indegree count for each node + let inDegrees = new Map(); + + graph.forEach(function(value, key) { + inDegrees.set(key, 0); + }); + graph.forEach(function(value, key) { + value.forEach(function(adjacent) { + inDegrees.set(adjacent.id, inDegrees.get(adjacent.id) + 1); + }); + }); + + let positionMap = new Map(); // keeps the position for each node + let pastMap = new Map(); // keeps the predecessors(past) of a node + let queue = new LinkedList(); + inDegrees.forEach(function(value, key) { + if (value == 0) { + queue.push(key); + if (!fixedNodes) { + if (direction == "horizontal") { + positionMap.set(key, nodeIndexes.has(key) ? xCoords[nodeIndexes.get(key)] : dummyPositions.get(key)); + } + else { + positionMap.set(key, nodeIndexes.has(key) ? yCoords[nodeIndexes.get(key)] : dummyPositions.get(key)); + } + } + } + else { + positionMap.set(key, Number.NEGATIVE_INFINITY); + } + if (fixedNodes) { + pastMap.set(key, new Set([key])); + } + }); + + // align sources of each component in enforcement phase + if (fixedNodes) { + componentSources.forEach(function(component) { + let fixedIds = []; + component.forEach(function(nodeId) { + if (fixedNodes.has(nodeId)) { + fixedIds.push(nodeId); + } + }); + if (fixedIds.length > 0) { + let position = 0; + fixedIds.forEach(function(fixedId) { + if (direction == "horizontal") { + positionMap.set(fixedId, nodeIndexes.has(fixedId) ? xCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId)); + position += positionMap.get(fixedId); + } + else { + positionMap.set(fixedId, nodeIndexes.has(fixedId) ? yCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId)); + position += positionMap.get(fixedId); + } + }); + position = position / fixedIds.length; + component.forEach(function(nodeId) { + if (!fixedNodes.has(nodeId)) { + positionMap.set(nodeId, position); + } + }); + } + else { + let position = 0; + component.forEach(function(nodeId) { + if (direction == "horizontal") { + position += nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); + } + else { + position += nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); + } + }); + position = position / component.length; + component.forEach(function(nodeId) { + positionMap.set(nodeId, position); + }); + } + }); + } + + // calculate positions of the nodes + while (queue.length != 0) { + let currentNode = queue.shift(); + let neighbors = graph.get(currentNode); + neighbors.forEach(function(neighbor) { + if (positionMap.get(neighbor.id) < (positionMap.get(currentNode) + neighbor.gap)) { + if (fixedNodes && fixedNodes.has(neighbor.id)) { + let fixedPosition; + if (direction == "horizontal") { + fixedPosition = nodeIndexes.has(neighbor.id) ? xCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id); + } + else { + fixedPosition = nodeIndexes.has(neighbor.id) ? yCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id); + } + positionMap.set(neighbor.id, fixedPosition); // TODO: may do unnecessary work + if (fixedPosition < (positionMap.get(currentNode) + neighbor.gap)) { + let diff = (positionMap.get(currentNode) + neighbor.gap) - fixedPosition; + pastMap.get(currentNode).forEach(function(nodeId) { + positionMap.set(nodeId, positionMap.get(nodeId) - diff); + }); + } + } + else { + positionMap.set(neighbor.id, positionMap.get(currentNode) + neighbor.gap); + } + } + inDegrees.set(neighbor.id, inDegrees.get(neighbor.id) - 1); + if (inDegrees.get(neighbor.id) == 0) { + queue.push(neighbor.id); + } + if (fixedNodes) { + pastMap.set(neighbor.id, setUnion(pastMap.get(currentNode), pastMap.get(neighbor.id))); + } + }); + } + + // readjust position of the nodes after enforcement + if (fixedNodes) { + // find indegree count for each node + let sinkNodes = new Set(); + + graph.forEach(function(value, key) { + if (value.length == 0) { + sinkNodes.add(key); + } + }); + + let components = []; + pastMap.forEach(function(value, key) { + if (sinkNodes.has(key)) { + let isFixedComponent = false; + for (let nodeId of value) { + if (fixedNodes.has(nodeId)) { + isFixedComponent = true; + } + } + if (!isFixedComponent) { + let isExist = false; + let existAt; + components.forEach(function(component, index) { + if (component.has([...value][0])) { + isExist = true; + existAt = index; + } + }); + if (!isExist) { + components.push(new Set(value)); + } + else { + value.forEach(function(ele) { + components[existAt].add(ele); + }); + } + } + } + }); + + components.forEach(function(component, index) { + let minBefore = Number.POSITIVE_INFINITY; + let minAfter = Number.POSITIVE_INFINITY; + let maxBefore = Number.NEGATIVE_INFINITY; + let maxAfter = Number.NEGATIVE_INFINITY; + + for (let nodeId of component) { + let posBefore; + if (direction == "horizontal") { + posBefore = nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); + } + else { + posBefore = nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); + } + let posAfter = positionMap.get(nodeId); + if (posBefore < minBefore) { + minBefore = posBefore; + } + if (posBefore > maxBefore) { + maxBefore = posBefore; + } + if (posAfter < minAfter) { + minAfter = posAfter; + } + if (posAfter > maxAfter) { + maxAfter = posAfter; + } + } + let diff = (minBefore + maxBefore) / 2 - (minAfter + maxAfter) / 2; + + for (let nodeId of component) { + positionMap.set(nodeId, positionMap.get(nodeId) + diff); + } + }); + } + + return positionMap; + }; + + // find transformation based on rel. placement constraints if there are both alignment and rel. placement constraints + // or if there are only rel. placement contraints where the largest component isn't sufficiently large + let applyReflectionForRelativePlacement = function (relativePlacementConstraints) { + // variables to count votes + let reflectOnY = 0, notReflectOnY = 0; + let reflectOnX = 0, notReflectOnX = 0; + + relativePlacementConstraints.forEach(function(constraint) { + if (constraint.left) { + (xCoords[nodeIndexes.get(constraint.left)] - xCoords[nodeIndexes.get(constraint.right)] >= 0) ? reflectOnY++ : notReflectOnY++; + } + else { + (yCoords[nodeIndexes.get(constraint.top)] - yCoords[nodeIndexes.get(constraint.bottom)] >= 0) ? reflectOnX++ : notReflectOnX++; + } + }); + + if (reflectOnY > notReflectOnY && reflectOnX > notReflectOnX) { + for (let i = 0; i < nodeIndexes.size; i++) { + xCoords[i] = -1 * xCoords[i]; + yCoords[i] = -1 * yCoords[i]; + } + } + else if (reflectOnY > notReflectOnY) { + for (let i = 0; i < nodeIndexes.size; i++) { + xCoords[i] = -1 * xCoords[i]; + } + } + else if (reflectOnX > notReflectOnX) { + for (let i = 0; i < nodeIndexes.size; i++) { + yCoords[i] = -1 * yCoords[i]; + } + } + }; + + // find weakly connected components in undirected graph + let findComponents = function(graph) { + // find weakly connected components in dag + let components = []; + let queue = new LinkedList(); + let visited = new Set(); + let count = 0; + + graph.forEach(function(value, key) { + if (!visited.has(key)) { + components[count] = []; + let currentNode = key; + queue.push(currentNode); + visited.add(currentNode); + components[count].push(currentNode); + + while (queue.length != 0) { + currentNode = queue.shift(); + let neighbors = graph.get(currentNode); + neighbors.forEach(function(neighbor) { + if (!visited.has(neighbor.id)) { + queue.push(neighbor.id); + visited.add(neighbor.id); + components[count].push(neighbor.id); + } + }); + } + count++; + } + }); + return components; + }; + + // return undirected version of given dag + let dagToUndirected = function(dag) { + let undirected = new Map(); + + dag.forEach(function(value, key) { + undirected.set(key, []); + }); + + dag.forEach(function(value, key) { + value.forEach(function(adjacent) { + undirected.get(key).push(adjacent); + undirected.get(adjacent.id).push({id: key, gap: adjacent.gap, direction: adjacent.direction}); + }); + }); + + return undirected; + }; + + // return reversed (directions inverted) version of given dag + let dagToReversed = function(dag) { + let reversed = new Map(); + + dag.forEach(function(value, key) { + reversed.set(key, []); + }); + + dag.forEach(function(value, key) { + value.forEach(function(adjacent) { + reversed.get(adjacent.id).push({id: key, gap: adjacent.gap, direction: adjacent.direction}); + }); + }); + + return reversed; + }; + + /**** apply transformation to the initial draft layout to better align with constrained nodes ****/ + // solve the Orthogonal Procrustean Problem to rotate and/or reflect initial draft layout + // here we follow the solution in Chapter 20.2 of Borg, I. & Groenen, P. (2005) Modern Multidimensional Scaling: Theory and Applications + + /* construct source and target configurations */ + + let targetMatrix = []; // A - target configuration + let sourceMatrix = []; // B - source configuration + let standardTransformation = false; // false for no transformation, true for standart (Procrustes) transformation (rotation and/or reflection) + let reflectionType = false; // false/true for reflection check, 'reflectOnX', 'reflectOnY' or 'reflectOnBoth' for reflection type if necessary + let fixedNodes = new Set(); + let dag = new Map(); // adjacency list to keep directed acyclic graph (dag) that consists of relative placement constraints + let dagUndirected = new Map(); // undirected version of the dag + let components = []; // weakly connected components + + // fill fixedNodes collection to use later + if (constraints.fixedNodeConstraint) { + constraints.fixedNodeConstraint.forEach(function(nodeData) { + fixedNodes.add(nodeData.nodeId); + }); + } + + // construct dag from relative placement constraints + if (constraints.relativePlacementConstraint) { + // construct both directed and undirected version of the dag + constraints.relativePlacementConstraint.forEach(function(constraint) { + if (constraint.left) { + if (dag.has(constraint.left)) { + dag.get(constraint.left).push({id: constraint.right, gap: constraint.gap, direction: "horizontal"}); + } + else { + dag.set(constraint.left, [{id: constraint.right, gap: constraint.gap, direction: "horizontal"}]); + } + if (!dag.has(constraint.right)) { + dag.set(constraint.right, []); + } + } + else { + if (dag.has(constraint.top)) { + dag.get(constraint.top).push({id: constraint.bottom, gap: constraint.gap, direction: "vertical"}); + } + else { + dag.set(constraint.top, [{id: constraint.bottom, gap: constraint.gap, direction: "vertical"}]); + } + if (!dag.has(constraint.bottom)) { + dag.set(constraint.bottom, []); + } + } + }); + + dagUndirected = dagToUndirected(dag); + components = findComponents(dagUndirected); + } + + if (CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING) { + // first check fixed node constraint + if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 1) { + constraints.fixedNodeConstraint.forEach(function(nodeData, i) { + targetMatrix[i] = [nodeData.position.x, nodeData.position.y]; + sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeData.nodeId)], yCoords[nodeIndexes.get(nodeData.nodeId)]]; + }); + standardTransformation = true; + } + else if (constraints.alignmentConstraint) { // then check alignment constraint + let count = 0; + if (constraints.alignmentConstraint.vertical) { + let verticalAlign = constraints.alignmentConstraint.vertical; + for (let i = 0; i < verticalAlign.length; i++) { + let alignmentSet = new Set(); + verticalAlign[i].forEach(function(nodeId) { + alignmentSet.add(nodeId); + }); + let intersection = new Set([...alignmentSet].filter(x => fixedNodes.has(x))); + let xPos; + if (intersection.size > 0) + xPos = xCoords[nodeIndexes.get(intersection.values().next().value)]; + else + xPos = calculateAvgPosition(alignmentSet).x; + + verticalAlign[i].forEach(function(nodeId) { + targetMatrix[count] = [xPos, yCoords[nodeIndexes.get(nodeId)]]; + sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; + count++; + }); + } + standardTransformation = true; + } + if (constraints.alignmentConstraint.horizontal) { + let horizontalAlign = constraints.alignmentConstraint.horizontal; + for (let i = 0; i < horizontalAlign.length; i++) { + let alignmentSet = new Set(); + horizontalAlign[i].forEach(function(nodeId) { + alignmentSet.add(nodeId); + }); + let intersection = new Set([...alignmentSet].filter(x => fixedNodes.has(x))); + let yPos; + if (intersection.size > 0) + yPos = xCoords[nodeIndexes.get(intersection.values().next().value)]; + else + yPos = calculateAvgPosition(alignmentSet).y; + + horizontalAlign[i].forEach(function(nodeId) { + targetMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yPos]; + sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; + count++; + }); + } + standardTransformation = true; + } + if (constraints.relativePlacementConstraint) { + reflectionType = true; + } + } + else if (constraints.relativePlacementConstraint) { // finally check relative placement constraint + // find largest component in dag + let largestComponentSize = 0; + let largestComponentIndex = 0; + for (let i = 0; i < components.length; i++) { + if (components[i].length > largestComponentSize) { + largestComponentSize = components[i].length; + largestComponentIndex = i; + } + } + // if largest component isn't dominant, then take the votes for reflection + if (largestComponentSize < (dagUndirected.size / 2)) { + applyReflectionForRelativePlacement(constraints.relativePlacementConstraint); + standardTransformation = false; + reflectionType = false; + } + else { // use largest component for transformation + // construct horizontal and vertical subgraphs in the largest component + let subGraphOnHorizontal = new Map(); + let subGraphOnVertical = new Map(); + let constraintsInlargestComponent = []; + + components[largestComponentIndex].forEach(function(nodeId) { + dag.get(nodeId).forEach(function(adjacent) { + if (adjacent.direction == "horizontal") { + if (subGraphOnHorizontal.has(nodeId)) { + subGraphOnHorizontal.get(nodeId).push(adjacent); + } + else { + subGraphOnHorizontal.set(nodeId, [adjacent]); + } + if (!subGraphOnHorizontal.has(adjacent.id)) { + subGraphOnHorizontal.set(adjacent.id, []); + } + constraintsInlargestComponent.push({left: nodeId, right: adjacent.id}); + } + else { + if (subGraphOnVertical.has(nodeId)) { + subGraphOnVertical.get(nodeId).push(adjacent); + } + else { + subGraphOnVertical.set(nodeId, [adjacent]); + } + if (!subGraphOnVertical.has(adjacent.id)) { + subGraphOnVertical.set(adjacent.id, []); + } + constraintsInlargestComponent.push({top: nodeId, bottom: adjacent.id}); + } + }); + }); + + applyReflectionForRelativePlacement(constraintsInlargestComponent); + reflectionType = false; + + // calculate appropriate positioning for subgraphs + let positionMapHorizontal = findAppropriatePositionForRelativePlacement(subGraphOnHorizontal, "horizontal"); + let positionMapVertical = findAppropriatePositionForRelativePlacement(subGraphOnVertical, "vertical"); + + // construct source and target configuration + components[largestComponentIndex].forEach(function(nodeId, i) { + sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; + targetMatrix[i] = []; + if (positionMapHorizontal.has(nodeId)) { + targetMatrix[i][0] = positionMapHorizontal.get(nodeId); + } + else { + targetMatrix[i][0] = xCoords[nodeIndexes.get(nodeId)]; + } + if (positionMapVertical.has(nodeId)) { + targetMatrix[i][1] = positionMapVertical.get(nodeId); + } + else { + targetMatrix[i][1] = yCoords[nodeIndexes.get(nodeId)]; + } + }); + + standardTransformation = true; + } + } + + // if transformation is required, then calculate and apply transformation matrix + if (standardTransformation) { + /* calculate transformation matrix */ + let transformationMatrix; + let targetMatrixTranspose = Matrix.transpose(targetMatrix); // A' + let sourceMatrixTranspose = Matrix.transpose(sourceMatrix); // B' + + // centralize transpose matrices + for (let i = 0; i < targetMatrixTranspose.length; i++) { + targetMatrixTranspose[i] = Matrix.multGamma(targetMatrixTranspose[i]); + sourceMatrixTranspose[i] = Matrix.multGamma(sourceMatrixTranspose[i]); + } + + // do actual calculation for transformation matrix + let tempMatrix = Matrix.multMat(targetMatrixTranspose, Matrix.transpose(sourceMatrixTranspose)); // tempMatrix = A'B + let SVDResult = SVD.svd(tempMatrix); // SVD(A'B) = USV', svd function returns U, S and V + transformationMatrix = Matrix.multMat(SVDResult.V, Matrix.transpose(SVDResult.U)); // transformationMatrix = T = VU' + + /* apply found transformation matrix to obtain final draft layout */ + for (let i = 0; i < nodeIndexes.size; i++) { + let temp1 = [xCoords[i], yCoords[i]]; + let temp2 = [transformationMatrix[0][0], transformationMatrix[1][0]]; + let temp3 = [transformationMatrix[0][1], transformationMatrix[1][1]]; + xCoords[i] = Matrix.dotProduct(temp1, temp2); + yCoords[i] = Matrix.dotProduct(temp1, temp3); + } + + // applied only both alignment and rel. placement constraints exist + if (reflectionType) { + applyReflectionForRelativePlacement(constraints.relativePlacementConstraint); + } + } + } + + if (CoSEConstants.ENFORCE_CONSTRAINTS) { + /**** enforce constraints on the transformed draft layout ****/ + + /* first enforce fixed node constraint */ + + if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 0) { + let translationAmount = { x: 0, y: 0 }; + constraints.fixedNodeConstraint.forEach(function(nodeData, i) { + let posInTheory = {x: xCoords[nodeIndexes.get(nodeData.nodeId)], y: yCoords[nodeIndexes.get(nodeData.nodeId)]}; + let posDesired = nodeData.position; + let posDiff = calculatePositionDiff(posDesired, posInTheory); + translationAmount.x += posDiff.x; + translationAmount.y += posDiff.y; + }); + translationAmount.x /= constraints.fixedNodeConstraint.length; + translationAmount.y /= constraints.fixedNodeConstraint.length; + + xCoords.forEach(function(value, i) { + xCoords[i] += translationAmount.x; + }); + + yCoords.forEach(function(value, i) { + yCoords[i] += translationAmount.y; + }); + + constraints.fixedNodeConstraint.forEach(function(nodeData) { + xCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.x; + yCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.y; + }); + } + + /* then enforce alignment constraint */ + + if (constraints.alignmentConstraint) { + if (constraints.alignmentConstraint.vertical) { + let xAlign = constraints.alignmentConstraint.vertical; + for (let i = 0; i < xAlign.length; i++) { + let alignmentSet = new Set(); + xAlign[i].forEach(function(nodeId) { + alignmentSet.add(nodeId); + }); + let intersection = new Set([...alignmentSet].filter(x => fixedNodes.has(x))); + let xPos; + if (intersection.size > 0) + xPos = xCoords[nodeIndexes.get(intersection.values().next().value)]; + else + xPos = calculateAvgPosition(alignmentSet).x; + + alignmentSet.forEach(function(nodeId) { + if (!fixedNodes.has(nodeId)) + xCoords[nodeIndexes.get(nodeId)] = xPos; + }); + } + } + if (constraints.alignmentConstraint.horizontal) { + let yAlign = constraints.alignmentConstraint.horizontal; + for (let i = 0; i < yAlign.length; i++) { + let alignmentSet = new Set(); + yAlign[i].forEach(function(nodeId) { + alignmentSet.add(nodeId); + }); + let intersection = new Set([...alignmentSet].filter(x => fixedNodes.has(x))); + let yPos; + if (intersection.size > 0) + yPos = yCoords[nodeIndexes.get(intersection.values().next().value)]; + else + yPos = calculateAvgPosition(alignmentSet).y; + + alignmentSet.forEach(function(nodeId) { + if (!fixedNodes.has(nodeId)) + yCoords[nodeIndexes.get(nodeId)] = yPos; + }); + } + } + } + + /* finally enforce relative placement constraint */ + + if (constraints.relativePlacementConstraint) { + let nodeToDummyForVerticalAlignment = new Map(); + let nodeToDummyForHorizontalAlignment = new Map(); + let dummyToNodeForVerticalAlignment = new Map(); + let dummyToNodeForHorizontalAlignment = new Map(); + let dummyPositionsForVerticalAlignment = new Map(); + let dummyPositionsForHorizontalAlignment = new Map(); + let fixedNodesOnHorizontal = new Set(); + let fixedNodesOnVertical = new Set(); + + // fill maps and sets + fixedNodes.forEach(function(nodeId) { + fixedNodesOnHorizontal.add(nodeId); + fixedNodesOnVertical.add(nodeId); + }); + + if (constraints.alignmentConstraint) { + if (constraints.alignmentConstraint.vertical) { + let verticalAlignment = constraints.alignmentConstraint.vertical; + for (let i = 0; i < verticalAlignment.length; i++) { + dummyToNodeForVerticalAlignment.set("dummy" + i, []); + verticalAlignment[i].forEach(function(nodeId) { + nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + i); + dummyToNodeForVerticalAlignment.get("dummy" + i).push(nodeId); + if (fixedNodes.has(nodeId)) { + fixedNodesOnHorizontal.add("dummy" + i); + } + }); + dummyPositionsForVerticalAlignment.set("dummy" + i, xCoords[nodeIndexes.get(verticalAlignment[i][0])]); + } + } + if (constraints.alignmentConstraint.horizontal) { + let horizontalAlignment = constraints.alignmentConstraint.horizontal; + for (let i = 0; i < horizontalAlignment.length; i++) { + dummyToNodeForHorizontalAlignment.set("dummy" + i, []); + horizontalAlignment[i].forEach(function(nodeId) { + nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + i); + dummyToNodeForHorizontalAlignment.get("dummy" + i).push(nodeId); + if (fixedNodes.has(nodeId)) { + fixedNodesOnVertical.add("dummy" + i); + } + }); + dummyPositionsForHorizontalAlignment.set("dummy" + i, yCoords[nodeIndexes.get(horizontalAlignment[i][0])]); + } + } + } + + // construct horizontal and vertical dags (subgraphs) from overall dag + let dagOnHorizontal = new Map(); + let dagOnVertical = new Map(); + + for (let nodeId of dag.keys()) { + dag.get(nodeId).forEach(function(adjacent) { + let sourceId; + let targetNode; + if (adjacent["direction"] == "horizontal") { + sourceId = nodeToDummyForVerticalAlignment.get(nodeId) ? nodeToDummyForVerticalAlignment.get(nodeId) : nodeId; + if (nodeToDummyForVerticalAlignment.get(adjacent.id)) { + targetNode = {id: nodeToDummyForVerticalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction}; + } + else { + targetNode = adjacent; + } + if (dagOnHorizontal.has(sourceId)) { + dagOnHorizontal.get(sourceId).push(targetNode); + } + else { + dagOnHorizontal.set(sourceId, [targetNode]); + } + if (!dagOnHorizontal.has(targetNode.id)) { + dagOnHorizontal.set(targetNode.id, []); + } + } + else { + sourceId = nodeToDummyForHorizontalAlignment.get(nodeId) ? nodeToDummyForHorizontalAlignment.get(nodeId) : nodeId; + if (nodeToDummyForHorizontalAlignment.get(adjacent.id)) { + targetNode = {id: nodeToDummyForHorizontalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction}; + } + else { + targetNode = adjacent; + } + if (dagOnVertical.has(sourceId)) { + dagOnVertical.get(sourceId).push(targetNode); + } + else { + dagOnVertical.set(sourceId, [targetNode]); + } + if (!dagOnVertical.has(targetNode.id)) { + dagOnVertical.set(targetNode.id, []); + } + } + }); + } + + // find source nodes of each component in horizontal and vertical dags + let undirectedOnHorizontal = dagToUndirected(dagOnHorizontal); + let undirectedOnVertical = dagToUndirected(dagOnVertical); + let componentsOnHorizontal = findComponents(undirectedOnHorizontal); + let componentsOnVertical = findComponents(undirectedOnVertical); + let reversedDagOnHorizontal = dagToReversed(dagOnHorizontal); + let reversedDagOnVertical = dagToReversed(dagOnVertical); + let componentSourcesOnHorizontal = []; + let componentSourcesOnVertical = []; + + componentsOnHorizontal.forEach(function(component, index) { + componentSourcesOnHorizontal[index] = []; + component.forEach(function(nodeId) { + if (reversedDagOnHorizontal.get(nodeId).length == 0) { + componentSourcesOnHorizontal[index].push(nodeId); + } + }); + }); + + componentsOnVertical.forEach(function(component, index) { + componentSourcesOnVertical[index] = []; + component.forEach(function(nodeId) { + if (reversedDagOnVertical.get(nodeId).length == 0) { + componentSourcesOnVertical[index].push(nodeId); + } + }); + }); + + // calculate appropriate positioning for subgraphs + let positionMapHorizontal = findAppropriatePositionForRelativePlacement(dagOnHorizontal, "horizontal", fixedNodesOnHorizontal, dummyPositionsForVerticalAlignment, componentSourcesOnHorizontal); + let positionMapVertical = findAppropriatePositionForRelativePlacement(dagOnVertical, "vertical", fixedNodesOnVertical, dummyPositionsForHorizontalAlignment, componentSourcesOnVertical); + + // update positions of the nodes based on relative placement constraints + for (let key of positionMapHorizontal.keys()) { + if (dummyToNodeForVerticalAlignment.get(key)) { + dummyToNodeForVerticalAlignment.get(key).forEach(function(nodeId) { + xCoords[nodeIndexes.get(nodeId)] = positionMapHorizontal.get(key); + }); + } + else { + xCoords[nodeIndexes.get(key)] = positionMapHorizontal.get(key); + } + } + for (let key of positionMapVertical.keys()) { + if (dummyToNodeForHorizontalAlignment.get(key)) { + dummyToNodeForHorizontalAlignment.get(key).forEach(function(nodeId) { + yCoords[nodeIndexes.get(nodeId)] = positionMapVertical.get(key); + }); + } + else { + yCoords[nodeIndexes.get(key)] = positionMapVertical.get(key); + } + } + } + } + + // assign new coordinates to nodes after constraint handling + for (let i = 0; i < allNodes.length; i++) { + let node = allNodes[i]; + if (node.getChild() == null) { + node.setCenter(xCoords[nodeIndexes.get(node.id)], yCoords[nodeIndexes.get(node.id)]); + } + } +}; + +module.exports = ConstraintHandler; \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/webpack.config.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/webpack.config.js new file mode 100644 index 0000000000000000000000000000000000000000..02d7c3c1eb0873df5096bd2066583602da323aea --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/cose-base/webpack.config.js @@ -0,0 +1,39 @@ +const path = require('path'); +const pkg = require('./package.json'); +const camelcase = require('camelcase'); +const process = require('process'); +const webpack = require('webpack'); +const env = process.env; +const NODE_ENV = env.NODE_ENV; +const MIN = env.MIN; +const PROD = NODE_ENV === 'production'; + +let config = { + devtool: PROD ? false : 'inline-source-map', + entry: './index.js', + output: { + path: path.join( __dirname ), + filename: 'cose-base.js', + library: camelcase( pkg.name ), + libraryTarget: 'umd', + globalObject: 'this' + }, + module: { + rules: [ + { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' } + ] + }, + optimization: { + minimize: MIN ? true : false + }, + externals: PROD ? { + 'layout-base': { + commonjs2: 'layout-base', + commonjs: 'layout-base', + amd: 'layout-base', + root: 'layoutBase' + } + } : {} +}; + +module.exports = config; \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/.babelrc b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/.babelrc new file mode 100644 index 0000000000000000000000000000000000000000..002b4aa0d58ec481a2688d3c0b66e9069e5d6adb --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["env"] +} diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/LICENSE b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6553af2e92cf87902b380f873971628c883788ed --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 iVis@Bilkent + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/README.md b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b08d3fb7edf6ea4cc5ab3ad8f5e76b904e706406 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/README.md @@ -0,0 +1,20 @@ +layout-base +================================================================================ + +## Description + +This repository implements a basic layout model and some utilities for Cytoscape.js layout extensions. + +## Usage instructions + +Add `layout-base` as a dependecy to your layout extension. + +`require()` in the extension to reach functionality: + + * `var Integer = require(layout-base).Integer`, + * `var Layout = require(layout-base).Layout`, + * `...` + + For a usage example, see [cose-base](https://github.com/iVis-at-Bilkent/cose-base) or [avsdf-base](https://github.com/iVis-at-Bilkent/avsdf-base). + + ![](https://github.com/iVis-at-Bilkent/layout-base/blob/master/layout-schema.png) diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/bower.json b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/bower.json new file mode 100644 index 0000000000000000000000000000000000000000..24f74de75d826c71c901136533823f9fbb020d55 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/bower.json @@ -0,0 +1,20 @@ +{ + "name": "layout-base", + "description": "Basic layout model and some utilities for Cytoscape.js layout extensions", + "main": "layout-base.js", + "repository": { + "type": "git", + "url": "https://github.com/iVis-at-Bilkent/layout-base.git" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "keywords": [ + "layout" + ], + "license": "MIT" +} diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/index.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/index.js new file mode 100644 index 0000000000000000000000000000000000000000..690cd0b2612ea8ce3cfd0ff7db7d82040a54206d --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/index.js @@ -0,0 +1,38 @@ +'use strict'; + +let layoutBase = function(){ + return; +}; + +layoutBase.FDLayout = require('./src/fd/FDLayout'); +layoutBase.FDLayoutConstants = require('./src/fd/FDLayoutConstants'); +layoutBase.FDLayoutEdge = require('./src/fd/FDLayoutEdge'); +layoutBase.FDLayoutNode = require('./src/fd/FDLayoutNode'); +layoutBase.DimensionD = require('./src/util/DimensionD'); +layoutBase.HashMap = require('./src/util/HashMap'); +layoutBase.HashSet = require('./src/util/HashSet'); +layoutBase.IGeometry = require('./src/util/IGeometry'); +layoutBase.IMath = require('./src/util/IMath'); +layoutBase.Integer = require('./src/util/Integer'); +layoutBase.Point = require('./src/util/Point'); +layoutBase.PointD = require('./src/util/PointD'); +layoutBase.RandomSeed = require('./src/util/RandomSeed'); +layoutBase.RectangleD = require('./src/util/RectangleD'); +layoutBase.Transform = require('./src/util/Transform'); +layoutBase.UniqueIDGeneretor = require('./src/util/UniqueIDGeneretor'); +layoutBase.Quicksort = require('./src/util/Quicksort'); +layoutBase.LinkedList = require('./src/util/LinkedList'); +layoutBase.LGraphObject = require('./src/LGraphObject'); +layoutBase.LGraph = require('./src/LGraph'); +layoutBase.LEdge = require('./src/LEdge'); +layoutBase.LGraphManager = require('./src/LGraphManager'); +layoutBase.LNode = require('./src/LNode'); +layoutBase.Layout = require('./src/Layout'); +layoutBase.LayoutConstants = require('./src/LayoutConstants'); +layoutBase.NeedlemanWunsch = require('./src/util/alignment/NeedlemanWunsch'); +layoutBase.Matrix = require('./src/util/Matrix'); +layoutBase.SVD = require('./src/util/SVD'); + +module.exports = layoutBase; + + diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js new file mode 100644 index 0000000000000000000000000000000000000000..dc770574b3929c55192f1c7e098af261272cc709 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js @@ -0,0 +1,5230 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["layoutBase"] = factory(); + else + root["layoutBase"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 28); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function LayoutConstants() {} + +/** + * Layout Quality: 0:draft, 1:default, 2:proof + */ +LayoutConstants.QUALITY = 1; + +/** + * Default parameters + */ +LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; +LayoutConstants.DEFAULT_INCREMENTAL = false; +LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; +LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; +LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; +LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; + +// ----------------------------------------------------------------------------- +// Section: General other constants +// ----------------------------------------------------------------------------- +/* + * Margins of a graph to be applied on bouding rectangle of its contents. We + * assume margins on all four sides to be uniform. + */ +LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; + +/* + * Whether to consider labels in node dimensions or not + */ +LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_SIZE = 40; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; + +/* + * Empty compound node size. When a compound node is empty, its both + * dimensions should be of this value. + */ +LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; + +/* + * Minimum length that an edge should take during layout + */ +LayoutConstants.MIN_EDGE_LENGTH = 1; + +/* + * World boundaries that layout operates on + */ +LayoutConstants.WORLD_BOUNDARY = 1000000; + +/* + * World boundaries that random positioning can be performed with + */ +LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000; + +/* + * Coordinates of the world center + */ +LayoutConstants.WORLD_CENTER_X = 1200; +LayoutConstants.WORLD_CENTER_Y = 900; + +module.exports = LayoutConstants; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var LGraphObject = __webpack_require__(2); +var IGeometry = __webpack_require__(8); +var IMath = __webpack_require__(9); + +function LEdge(source, target, vEdge) { + LGraphObject.call(this, vEdge); + + this.isOverlapingSourceAndTarget = false; + this.vGraphObject = vEdge; + this.bendpoints = []; + this.source = source; + this.target = target; +} + +LEdge.prototype = Object.create(LGraphObject.prototype); + +for (var prop in LGraphObject) { + LEdge[prop] = LGraphObject[prop]; +} + +LEdge.prototype.getSource = function () { + return this.source; +}; + +LEdge.prototype.getTarget = function () { + return this.target; +}; + +LEdge.prototype.isInterGraph = function () { + return this.isInterGraph; +}; + +LEdge.prototype.getLength = function () { + return this.length; +}; + +LEdge.prototype.isOverlapingSourceAndTarget = function () { + return this.isOverlapingSourceAndTarget; +}; + +LEdge.prototype.getBendpoints = function () { + return this.bendpoints; +}; + +LEdge.prototype.getLca = function () { + return this.lca; +}; + +LEdge.prototype.getSourceInLca = function () { + return this.sourceInLca; +}; + +LEdge.prototype.getTargetInLca = function () { + return this.targetInLca; +}; + +LEdge.prototype.getOtherEnd = function (node) { + if (this.source === node) { + return this.target; + } else if (this.target === node) { + return this.source; + } else { + throw "Node is not incident with this edge"; + } +}; + +LEdge.prototype.getOtherEndInGraph = function (node, graph) { + var otherEnd = this.getOtherEnd(node); + var root = graph.getGraphManager().getRoot(); + + while (true) { + if (otherEnd.getOwner() == graph) { + return otherEnd; + } + + if (otherEnd.getOwner() == root) { + break; + } + + otherEnd = otherEnd.getOwner().getParent(); + } + + return null; +}; + +LEdge.prototype.updateLength = function () { + var clipPointCoordinates = new Array(4); + + this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates); + + if (!this.isOverlapingSourceAndTarget) { + this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; + this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; + + if (Math.abs(this.lengthX) < 1.0) { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + } +}; + +LEdge.prototype.updateLengthSimple = function () { + this.lengthX = this.target.getCenterX() - this.source.getCenterX(); + this.lengthY = this.target.getCenterY() - this.source.getCenterY(); + + if (Math.abs(this.lengthX) < 1.0) { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); +}; + +module.exports = LEdge; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function LGraphObject(vGraphObject) { + this.vGraphObject = vGraphObject; +} + +module.exports = LGraphObject; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var LGraphObject = __webpack_require__(2); +var Integer = __webpack_require__(10); +var RectangleD = __webpack_require__(13); +var LayoutConstants = __webpack_require__(0); +var RandomSeed = __webpack_require__(16); +var PointD = __webpack_require__(5); + +function LNode(gm, loc, size, vNode) { + //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode) + if (size == null && vNode == null) { + vNode = loc; + } + + LGraphObject.call(this, vNode); + + //Alternative constructor 2 : LNode(Layout layout, Object vNode) + if (gm.graphManager != null) gm = gm.graphManager; + + this.estimatedSize = Integer.MIN_VALUE; + this.inclusionTreeDepth = Integer.MAX_VALUE; + this.vGraphObject = vNode; + this.edges = []; + this.graphManager = gm; + + if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD(); +} + +LNode.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LNode[prop] = LGraphObject[prop]; +} + +LNode.prototype.getEdges = function () { + return this.edges; +}; + +LNode.prototype.getChild = function () { + return this.child; +}; + +LNode.prototype.getOwner = function () { + // if (this.owner != null) { + // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) { + // throw "assert failed"; + // } + // } + + return this.owner; +}; + +LNode.prototype.getWidth = function () { + return this.rect.width; +}; + +LNode.prototype.setWidth = function (width) { + this.rect.width = width; +}; + +LNode.prototype.getHeight = function () { + return this.rect.height; +}; + +LNode.prototype.setHeight = function (height) { + this.rect.height = height; +}; + +LNode.prototype.getCenterX = function () { + return this.rect.x + this.rect.width / 2; +}; + +LNode.prototype.getCenterY = function () { + return this.rect.y + this.rect.height / 2; +}; + +LNode.prototype.getCenter = function () { + return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); +}; + +LNode.prototype.getLocation = function () { + return new PointD(this.rect.x, this.rect.y); +}; + +LNode.prototype.getRect = function () { + return this.rect; +}; + +LNode.prototype.getDiagonal = function () { + return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); +}; + +/** + * This method returns half the diagonal length of this node. + */ +LNode.prototype.getHalfTheDiagonal = function () { + return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; +}; + +LNode.prototype.setRect = function (upperLeft, dimension) { + this.rect.x = upperLeft.x; + this.rect.y = upperLeft.y; + this.rect.width = dimension.width; + this.rect.height = dimension.height; +}; + +LNode.prototype.setCenter = function (cx, cy) { + this.rect.x = cx - this.rect.width / 2; + this.rect.y = cy - this.rect.height / 2; +}; + +LNode.prototype.setLocation = function (x, y) { + this.rect.x = x; + this.rect.y = y; +}; + +LNode.prototype.moveBy = function (dx, dy) { + this.rect.x += dx; + this.rect.y += dy; +}; + +LNode.prototype.getEdgeListToNode = function (to) { + var edgeList = []; + var edge; + var self = this; + + self.edges.forEach(function (edge) { + + if (edge.target == to) { + if (edge.source != self) throw "Incorrect edge source!"; + + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getEdgesBetween = function (other) { + var edgeList = []; + var edge; + + var self = this; + self.edges.forEach(function (edge) { + + if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target"; + + if (edge.target == other || edge.source == other) { + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getNeighborsList = function () { + var neighbors = new Set(); + + var self = this; + self.edges.forEach(function (edge) { + + if (edge.source == self) { + neighbors.add(edge.target); + } else { + if (edge.target != self) { + throw "Incorrect incidency!"; + } + + neighbors.add(edge.source); + } + }); + + return neighbors; +}; + +LNode.prototype.withChildren = function () { + var withNeighborsList = new Set(); + var childNode; + var children; + + withNeighborsList.add(this); + + if (this.child != null) { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) { + childNode = nodes[i]; + children = childNode.withChildren(); + children.forEach(function (node) { + withNeighborsList.add(node); + }); + } + } + + return withNeighborsList; +}; + +LNode.prototype.getNoOfChildren = function () { + var noOfChildren = 0; + var childNode; + + if (this.child == null) { + noOfChildren = 1; + } else { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) { + childNode = nodes[i]; + + noOfChildren += childNode.getNoOfChildren(); + } + } + + if (noOfChildren == 0) { + noOfChildren = 1; + } + return noOfChildren; +}; + +LNode.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LNode.prototype.calcEstimatedSize = function () { + if (this.child == null) { + return this.estimatedSize = (this.rect.width + this.rect.height) / 2; + } else { + this.estimatedSize = this.child.calcEstimatedSize(); + this.rect.width = this.estimatedSize; + this.rect.height = this.estimatedSize; + + return this.estimatedSize; + } +}; + +LNode.prototype.scatter = function () { + var randomCenterX; + var randomCenterY; + + var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX; + + var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY; + + this.rect.x = randomCenterX; + this.rect.y = randomCenterY; +}; + +LNode.prototype.updateBounds = function () { + if (this.getChild() == null) { + throw "assert failed"; + } + if (this.getChild().getNodes().length != 0) { + // wrap the children nodes by re-arranging the boundaries + var childGraph = this.getChild(); + childGraph.updateBounds(true); + + this.rect.x = childGraph.getLeft(); + this.rect.y = childGraph.getTop(); + + this.setWidth(childGraph.getRight() - childGraph.getLeft()); + this.setHeight(childGraph.getBottom() - childGraph.getTop()); + + // Update compound bounds considering its label properties + if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { + + var width = childGraph.getRight() - childGraph.getLeft(); + var height = childGraph.getBottom() - childGraph.getTop(); + + if (this.labelWidth) { + if (this.labelPosHorizontal == "left") { + this.rect.x -= this.labelWidth; + this.setWidth(width + this.labelWidth); + } else if (this.labelPosHorizontal == "center" && this.labelWidth > width) { + this.rect.x -= (this.labelWidth - width) / 2; + this.setWidth(this.labelWidth); + } else if (this.labelPosHorizontal == "right") { + this.setWidth(width + this.labelWidth); + } + } + + if (this.labelHeight) { + if (this.labelPosVertical == "top") { + this.rect.y -= this.labelHeight; + this.setHeight(height + this.labelHeight); + } else if (this.labelPosVertical == "center" && this.labelHeight > height) { + this.rect.y -= (this.labelHeight - height) / 2; + this.setHeight(this.labelHeight); + } else if (this.labelPosVertical == "bottom") { + this.setHeight(height + this.labelHeight); + } + } + } + } +}; + +LNode.prototype.getInclusionTreeDepth = function () { + if (this.inclusionTreeDepth == Integer.MAX_VALUE) { + throw "assert failed"; + } + return this.inclusionTreeDepth; +}; + +LNode.prototype.transform = function (trans) { + var left = this.rect.x; + + if (left > LayoutConstants.WORLD_BOUNDARY) { + left = LayoutConstants.WORLD_BOUNDARY; + } else if (left < -LayoutConstants.WORLD_BOUNDARY) { + left = -LayoutConstants.WORLD_BOUNDARY; + } + + var top = this.rect.y; + + if (top > LayoutConstants.WORLD_BOUNDARY) { + top = LayoutConstants.WORLD_BOUNDARY; + } else if (top < -LayoutConstants.WORLD_BOUNDARY) { + top = -LayoutConstants.WORLD_BOUNDARY; + } + + var leftTop = new PointD(left, top); + var vLeftTop = trans.inverseTransformPoint(leftTop); + + this.setLocation(vLeftTop.x, vLeftTop.y); +}; + +LNode.prototype.getLeft = function () { + return this.rect.x; +}; + +LNode.prototype.getRight = function () { + return this.rect.x + this.rect.width; +}; + +LNode.prototype.getTop = function () { + return this.rect.y; +}; + +LNode.prototype.getBottom = function () { + return this.rect.y + this.rect.height; +}; + +LNode.prototype.getParent = function () { + if (this.owner == null) { + return null; + } + + return this.owner.getParent(); +}; + +module.exports = LNode; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var LayoutConstants = __webpack_require__(0); + +function FDLayoutConstants() {} + +//FDLayoutConstants inherits static props in LayoutConstants +for (var prop in LayoutConstants) { + FDLayoutConstants[prop] = LayoutConstants[prop]; +} + +FDLayoutConstants.MAX_ITERATIONS = 2500; + +FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; +FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; +FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0; +FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0; +FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; +FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; +FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; +FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; +FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; +FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000; +FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000; +FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0; +FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; +FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; +FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; +FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; +FDLayoutConstants.MIN_EDGE_LENGTH = 1; +FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; + +module.exports = FDLayoutConstants; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function PointD(x, y) { + if (x == null && y == null) { + this.x = 0; + this.y = 0; + } else { + this.x = x; + this.y = y; + } +} + +PointD.prototype.getX = function () { + return this.x; +}; + +PointD.prototype.getY = function () { + return this.y; +}; + +PointD.prototype.setX = function (x) { + this.x = x; +}; + +PointD.prototype.setY = function (y) { + this.y = y; +}; + +PointD.prototype.getDifference = function (pt) { + return new DimensionD(this.x - pt.x, this.y - pt.y); +}; + +PointD.prototype.getCopy = function () { + return new PointD(this.x, this.y); +}; + +PointD.prototype.translate = function (dim) { + this.x += dim.width; + this.y += dim.height; + return this; +}; + +module.exports = PointD; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var LGraphObject = __webpack_require__(2); +var Integer = __webpack_require__(10); +var LayoutConstants = __webpack_require__(0); +var LGraphManager = __webpack_require__(7); +var LNode = __webpack_require__(3); +var LEdge = __webpack_require__(1); +var RectangleD = __webpack_require__(13); +var Point = __webpack_require__(12); +var LinkedList = __webpack_require__(11); + +function LGraph(parent, obj2, vGraph) { + LGraphObject.call(this, vGraph); + this.estimatedSize = Integer.MIN_VALUE; + this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; + this.edges = []; + this.nodes = []; + this.isConnected = false; + this.parent = parent; + + if (obj2 != null && obj2 instanceof LGraphManager) { + this.graphManager = obj2; + } else if (obj2 != null && obj2 instanceof Layout) { + this.graphManager = obj2.graphManager; + } +} + +LGraph.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LGraph[prop] = LGraphObject[prop]; +} + +LGraph.prototype.getNodes = function () { + return this.nodes; +}; + +LGraph.prototype.getEdges = function () { + return this.edges; +}; + +LGraph.prototype.getGraphManager = function () { + return this.graphManager; +}; + +LGraph.prototype.getParent = function () { + return this.parent; +}; + +LGraph.prototype.getLeft = function () { + return this.left; +}; + +LGraph.prototype.getRight = function () { + return this.right; +}; + +LGraph.prototype.getTop = function () { + return this.top; +}; + +LGraph.prototype.getBottom = function () { + return this.bottom; +}; + +LGraph.prototype.isConnected = function () { + return this.isConnected; +}; + +LGraph.prototype.add = function (obj1, sourceNode, targetNode) { + if (sourceNode == null && targetNode == null) { + var newNode = obj1; + if (this.graphManager == null) { + throw "Graph has no graph mgr!"; + } + if (this.getNodes().indexOf(newNode) > -1) { + throw "Node already in graph!"; + } + newNode.owner = this; + this.getNodes().push(newNode); + + return newNode; + } else { + var newEdge = obj1; + if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) { + throw "Source or target not in graph!"; + } + + if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { + throw "Both owners must be this graph!"; + } + + if (sourceNode.owner != targetNode.owner) { + return null; + } + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // set as intra-graph edge + newEdge.isInterGraph = false; + + // add to graph edge list + this.getEdges().push(newEdge); + + // add to incidency lists + sourceNode.edges.push(newEdge); + + if (targetNode != sourceNode) { + targetNode.edges.push(newEdge); + } + + return newEdge; + } +}; + +LGraph.prototype.remove = function (obj) { + var node = obj; + if (obj instanceof LNode) { + if (node == null) { + throw "Node is null!"; + } + if (!(node.owner != null && node.owner == this)) { + throw "Owner graph is invalid!"; + } + if (this.graphManager == null) { + throw "Owner graph manager is invalid!"; + } + // remove incident edges first (make a copy to do it safely) + var edgesToBeRemoved = node.edges.slice(); + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + + if (edge.isInterGraph) { + this.graphManager.remove(edge); + } else { + edge.source.owner.remove(edge); + } + } + + // now the node itself + var index = this.nodes.indexOf(node); + if (index == -1) { + throw "Node not in owner node list!"; + } + + this.nodes.splice(index, 1); + } else if (obj instanceof LEdge) { + var edge = obj; + if (edge == null) { + throw "Edge is null!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) { + throw "Source and/or target owner is invalid!"; + } + + var sourceIndex = edge.source.edges.indexOf(edge); + var targetIndex = edge.target.edges.indexOf(edge); + if (!(sourceIndex > -1 && targetIndex > -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + edge.source.edges.splice(sourceIndex, 1); + + if (edge.target != edge.source) { + edge.target.edges.splice(targetIndex, 1); + } + + var index = edge.source.owner.getEdges().indexOf(edge); + if (index == -1) { + throw "Not in owner's edge list!"; + } + + edge.source.owner.getEdges().splice(index, 1); + } +}; + +LGraph.prototype.updateLeftTop = function () { + var top = Integer.MAX_VALUE; + var left = Integer.MAX_VALUE; + var nodeTop; + var nodeLeft; + var margin; + + var nodes = this.getNodes(); + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + nodeTop = lNode.getTop(); + nodeLeft = lNode.getLeft(); + + if (top > nodeTop) { + top = nodeTop; + } + + if (left > nodeLeft) { + left = nodeLeft; + } + } + + // Do we have any nodes in this graph? + if (top == Integer.MAX_VALUE) { + return null; + } + + if (nodes[0].getParent().paddingLeft != undefined) { + margin = nodes[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + + this.left = left - margin; + this.top = top - margin; + + // Apply the margins and return the result + return new Point(this.left, this.top); +}; + +LGraph.prototype.updateBounds = function (recursive) { + // calculate bounds + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var margin; + + var nodes = this.nodes; + var s = nodes.length; + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + + if (recursive && lNode.child != null) { + lNode.updateBounds(); + } + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + if (left == Integer.MAX_VALUE) { + this.left = this.parent.getLeft(); + this.right = this.parent.getRight(); + this.top = this.parent.getTop(); + this.bottom = this.parent.getBottom(); + } + + if (nodes[0].getParent().paddingLeft != undefined) { + margin = nodes[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + + this.left = boundingRect.x - margin; + this.right = boundingRect.x + boundingRect.width + margin; + this.top = boundingRect.y - margin; + this.bottom = boundingRect.y + boundingRect.height + margin; +}; + +LGraph.calculateBounds = function (nodes) { + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + + return boundingRect; +}; + +LGraph.prototype.getInclusionTreeDepth = function () { + if (this == this.graphManager.getRoot()) { + return 1; + } else { + return this.parent.getInclusionTreeDepth(); + } +}; + +LGraph.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LGraph.prototype.calcEstimatedSize = function () { + var size = 0; + var nodes = this.nodes; + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + size += lNode.calcEstimatedSize(); + } + + if (size == 0) { + this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; + } else { + this.estimatedSize = size / Math.sqrt(this.nodes.length); + } + + return this.estimatedSize; +}; + +LGraph.prototype.updateConnected = function () { + var self = this; + if (this.nodes.length == 0) { + this.isConnected = true; + return; + } + + var queue = new LinkedList(); + var visited = new Set(); + var currentNode = this.nodes[0]; + var neighborEdges; + var currentNeighbor; + var childrenOfNode = currentNode.withChildren(); + childrenOfNode.forEach(function (node) { + queue.push(node); + visited.add(node); + }); + + while (queue.length !== 0) { + currentNode = queue.shift(); + + // Traverse all neighbors of this node + neighborEdges = currentNode.getEdges(); + var size = neighborEdges.length; + for (var i = 0; i < size; i++) { + var neighborEdge = neighborEdges[i]; + currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this); + + // Add unvisited neighbors to the list to visit + if (currentNeighbor != null && !visited.has(currentNeighbor)) { + var childrenOfNeighbor = currentNeighbor.withChildren(); + + childrenOfNeighbor.forEach(function (node) { + queue.push(node); + visited.add(node); + }); + } + } + } + + this.isConnected = false; + + if (visited.size >= this.nodes.length) { + var noOfVisitedInThisGraph = 0; + + visited.forEach(function (visitedNode) { + if (visitedNode.owner == self) { + noOfVisitedInThisGraph++; + } + }); + + if (noOfVisitedInThisGraph == this.nodes.length) { + this.isConnected = true; + } + } +}; + +module.exports = LGraph; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var LGraph; +var LEdge = __webpack_require__(1); + +function LGraphManager(layout) { + LGraph = __webpack_require__(6); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now. + this.layout = layout; + + this.graphs = []; + this.edges = []; +} + +LGraphManager.prototype.addRoot = function () { + var ngraph = this.layout.newGraph(); + var nnode = this.layout.newNode(null); + var root = this.add(ngraph, nnode); + this.setRootGraph(root); + return this.rootGraph; +}; + +LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) { + //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge + if (newEdge == null && sourceNode == null && targetNode == null) { + if (newGraph == null) { + throw "Graph is null!"; + } + if (parentNode == null) { + throw "Parent node is null!"; + } + if (this.graphs.indexOf(newGraph) > -1) { + throw "Graph already in this graph mgr!"; + } + + this.graphs.push(newGraph); + + if (newGraph.parent != null) { + throw "Already has a parent!"; + } + if (parentNode.child != null) { + throw "Already has a child!"; + } + + newGraph.parent = parentNode; + parentNode.child = newGraph; + + return newGraph; + } else { + //change the order of the parameters + targetNode = newEdge; + sourceNode = parentNode; + newEdge = newGraph; + var sourceGraph = sourceNode.getOwner(); + var targetGraph = targetNode.getOwner(); + + if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { + throw "Source not in this graph mgr!"; + } + if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { + throw "Target not in this graph mgr!"; + } + + if (sourceGraph == targetGraph) { + newEdge.isInterGraph = false; + return sourceGraph.add(newEdge, sourceNode, targetNode); + } else { + newEdge.isInterGraph = true; + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // add edge to inter-graph edge list + if (this.edges.indexOf(newEdge) > -1) { + throw "Edge already in inter-graph edge list!"; + } + + this.edges.push(newEdge); + + // add edge to source and target incidency lists + if (!(newEdge.source != null && newEdge.target != null)) { + throw "Edge source and/or target is null!"; + } + + if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { + throw "Edge already in source and/or target incidency list!"; + } + + newEdge.source.edges.push(newEdge); + newEdge.target.edges.push(newEdge); + + return newEdge; + } + } +}; + +LGraphManager.prototype.remove = function (lObj) { + if (lObj instanceof LGraph) { + var graph = lObj; + if (graph.getGraphManager() != this) { + throw "Graph not in this graph mgr"; + } + if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) { + throw "Invalid parent node!"; + } + + // first the edges (make a copy to do it safely) + var edgesToBeRemoved = []; + + edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); + + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + graph.remove(edge); + } + + // then the nodes (make a copy to do it safely) + var nodesToBeRemoved = []; + + nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); + + var node; + s = nodesToBeRemoved.length; + for (var i = 0; i < s; i++) { + node = nodesToBeRemoved[i]; + graph.remove(node); + } + + // check if graph is the root + if (graph == this.rootGraph) { + this.setRootGraph(null); + } + + // now remove the graph itself + var index = this.graphs.indexOf(graph); + this.graphs.splice(index, 1); + + // also reset the parent of the graph + graph.parent = null; + } else if (lObj instanceof LEdge) { + edge = lObj; + if (edge == null) { + throw "Edge is null!"; + } + if (!edge.isInterGraph) { + throw "Not an inter-graph edge!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + + // remove edge from source and target nodes' incidency lists + + if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + var index = edge.source.edges.indexOf(edge); + edge.source.edges.splice(index, 1); + index = edge.target.edges.indexOf(edge); + edge.target.edges.splice(index, 1); + + // remove edge from owner graph manager's inter-graph edge list + + if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { + throw "Edge owner graph or owner graph manager is null!"; + } + if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { + throw "Not in owner graph manager's edge list!"; + } + + var index = edge.source.owner.getGraphManager().edges.indexOf(edge); + edge.source.owner.getGraphManager().edges.splice(index, 1); + } +}; + +LGraphManager.prototype.updateBounds = function () { + this.rootGraph.updateBounds(true); +}; + +LGraphManager.prototype.getGraphs = function () { + return this.graphs; +}; + +LGraphManager.prototype.getAllNodes = function () { + if (this.allNodes == null) { + var nodeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < s; i++) { + nodeList = nodeList.concat(graphs[i].getNodes()); + } + this.allNodes = nodeList; + } + return this.allNodes; +}; + +LGraphManager.prototype.resetAllNodes = function () { + this.allNodes = null; +}; + +LGraphManager.prototype.resetAllEdges = function () { + this.allEdges = null; +}; + +LGraphManager.prototype.resetAllNodesToApplyGravitation = function () { + this.allNodesToApplyGravitation = null; +}; + +LGraphManager.prototype.getAllEdges = function () { + if (this.allEdges == null) { + var edgeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < graphs.length; i++) { + edgeList = edgeList.concat(graphs[i].getEdges()); + } + + edgeList = edgeList.concat(this.edges); + + this.allEdges = edgeList; + } + return this.allEdges; +}; + +LGraphManager.prototype.getAllNodesToApplyGravitation = function () { + return this.allNodesToApplyGravitation; +}; + +LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) { + if (this.allNodesToApplyGravitation != null) { + throw "assert failed"; + } + + this.allNodesToApplyGravitation = nodeList; +}; + +LGraphManager.prototype.getRoot = function () { + return this.rootGraph; +}; + +LGraphManager.prototype.setRootGraph = function (graph) { + if (graph.getGraphManager() != this) { + throw "Root not in this graph mgr!"; + } + + this.rootGraph = graph; + // root graph must have a root node associated with it for convenience + if (graph.parent == null) { + graph.parent = this.layout.newNode("Root node"); + } +}; + +LGraphManager.prototype.getLayout = function () { + return this.layout; +}; + +LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) { + if (!(firstNode != null && secondNode != null)) { + throw "assert failed"; + } + + if (firstNode == secondNode) { + return true; + } + // Is second node an ancestor of the first one? + var ownerGraph = firstNode.getOwner(); + var parentNode; + + do { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) { + break; + } + + if (parentNode == secondNode) { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + // Is first node an ancestor of the second one? + ownerGraph = secondNode.getOwner(); + + do { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) { + break; + } + + if (parentNode == firstNode) { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + + return false; +}; + +LGraphManager.prototype.calcLowestCommonAncestors = function () { + var edge; + var sourceNode; + var targetNode; + var sourceAncestorGraph; + var targetAncestorGraph; + + var edges = this.getAllEdges(); + var s = edges.length; + for (var i = 0; i < s; i++) { + edge = edges[i]; + + sourceNode = edge.source; + targetNode = edge.target; + edge.lca = null; + edge.sourceInLca = sourceNode; + edge.targetInLca = targetNode; + + if (sourceNode == targetNode) { + edge.lca = sourceNode.getOwner(); + continue; + } + + sourceAncestorGraph = sourceNode.getOwner(); + + while (edge.lca == null) { + edge.targetInLca = targetNode; + targetAncestorGraph = targetNode.getOwner(); + + while (edge.lca == null) { + if (targetAncestorGraph == sourceAncestorGraph) { + edge.lca = targetAncestorGraph; + break; + } + + if (targetAncestorGraph == this.rootGraph) { + break; + } + + if (edge.lca != null) { + throw "assert failed"; + } + edge.targetInLca = targetAncestorGraph.getParent(); + targetAncestorGraph = edge.targetInLca.getOwner(); + } + + if (sourceAncestorGraph == this.rootGraph) { + break; + } + + if (edge.lca == null) { + edge.sourceInLca = sourceAncestorGraph.getParent(); + sourceAncestorGraph = edge.sourceInLca.getOwner(); + } + } + + if (edge.lca == null) { + throw "assert failed"; + } + } +}; + +LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) { + if (firstNode == secondNode) { + return firstNode.getOwner(); + } + var firstOwnerGraph = firstNode.getOwner(); + + do { + if (firstOwnerGraph == null) { + break; + } + var secondOwnerGraph = secondNode.getOwner(); + + do { + if (secondOwnerGraph == null) { + break; + } + + if (secondOwnerGraph == firstOwnerGraph) { + return secondOwnerGraph; + } + secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); + } while (true); + + firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); + } while (true); + + return firstOwnerGraph; +}; + +LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) { + if (graph == null && depth == null) { + graph = this.rootGraph; + depth = 1; + } + var node; + + var nodes = graph.getNodes(); + var s = nodes.length; + for (var i = 0; i < s; i++) { + node = nodes[i]; + node.inclusionTreeDepth = depth; + + if (node.child != null) { + this.calcInclusionTreeDepths(node.child, depth + 1); + } + } +}; + +LGraphManager.prototype.includesInvalidEdge = function () { + var edge; + var edgesToRemove = []; + + var s = this.edges.length; + for (var i = 0; i < s; i++) { + edge = this.edges[i]; + + if (this.isOneAncestorOfOther(edge.source, edge.target)) { + edgesToRemove.push(edge); + } + } + + // Remove invalid edges from graph manager + for (var i = 0; i < edgesToRemove.length; i++) { + this.remove(edgesToRemove[i]); + } + + // Invalid edges are cleared, so return false + return false; +}; + +module.exports = LGraphManager; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * This class maintains a list of static geometry related utility methods. + * + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +var Point = __webpack_require__(12); + +function IGeometry() {} + +/** + * This method calculates *half* the amount in x and y directions of the two + * input rectangles needed to separate them keeping their respective + * positioning, and returns the result in the input array. An input + * separation buffer added to the amount in both directions. We assume that + * the two rectangles do intersect. + */ +IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) { + if (!rectA.intersects(rectB)) { + throw "assert failed"; + } + + var directions = new Array(2); + + this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); + + overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x); + overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y); + + // update the overlapping amounts for the following cases: + if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) { + /* Case x.1: + * + * rectA + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectB + */ + overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight()); + } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) { + /* Case x.2: + * + * rectB + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectA + */ + overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight()); + } + if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) { + /* Case y.1: + * ________ rectA + * | + * | + * ______|____ rectB + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom()); + } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) { + /* Case y.2: + * ________ rectB + * | + * | + * ______|____ rectA + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom()); + } + + // find slope of the line passes two centers + var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX())); + // if centers are overlapped + if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) { + // assume the slope is 1 (45 degree) + slope = 1.0; + } + + var moveByY = slope * overlapAmount[0]; + var moveByX = overlapAmount[1] / slope; + if (overlapAmount[0] < moveByX) { + moveByX = overlapAmount[0]; + } else { + moveByY = overlapAmount[1]; + } + // return half the amount so that if each rectangle is moved by these + // amounts in opposite directions, overlap will be resolved + overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer); + overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer); +}; + +/** + * This method decides the separation direction of overlapping nodes + * + * if directions[0] = -1, then rectA goes left + * if directions[0] = 1, then rectA goes right + * if directions[1] = -1, then rectA goes up + * if directions[1] = 1, then rectA goes down + */ +IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) { + if (rectA.getCenterX() < rectB.getCenterX()) { + directions[0] = -1; + } else { + directions[0] = 1; + } + + if (rectA.getCenterY() < rectB.getCenterY()) { + directions[1] = -1; + } else { + directions[1] = 1; + } +}; + +/** + * This method calculates the intersection (clipping) points of the two + * input rectangles with line segment defined by the centers of these two + * rectangles. The clipping points are saved in the input double array and + * whether or not the two rectangles overlap is returned. + */ +IGeometry.getIntersection2 = function (rectA, rectB, result) { + //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB + var p1x = rectA.getCenterX(); + var p1y = rectA.getCenterY(); + var p2x = rectB.getCenterX(); + var p2y = rectB.getCenterY(); + + //if two rectangles intersect, then clipping points are centers + if (rectA.intersects(rectB)) { + result[0] = p1x; + result[1] = p1y; + result[2] = p2x; + result[3] = p2y; + return true; + } + //variables for rectA + var topLeftAx = rectA.getX(); + var topLeftAy = rectA.getY(); + var topRightAx = rectA.getRight(); + var bottomLeftAx = rectA.getX(); + var bottomLeftAy = rectA.getBottom(); + var bottomRightAx = rectA.getRight(); + var halfWidthA = rectA.getWidthHalf(); + var halfHeightA = rectA.getHeightHalf(); + //variables for rectB + var topLeftBx = rectB.getX(); + var topLeftBy = rectB.getY(); + var topRightBx = rectB.getRight(); + var bottomLeftBx = rectB.getX(); + var bottomLeftBy = rectB.getBottom(); + var bottomRightBx = rectB.getRight(); + var halfWidthB = rectB.getWidthHalf(); + var halfHeightB = rectB.getHeightHalf(); + + //flag whether clipping points are found + var clipPointAFound = false; + var clipPointBFound = false; + + // line is vertical + if (p1x === p2x) { + if (p1y > p2y) { + result[0] = p1x; + result[1] = topLeftAy; + result[2] = p2x; + result[3] = bottomLeftBy; + return false; + } else if (p1y < p2y) { + result[0] = p1x; + result[1] = bottomLeftAy; + result[2] = p2x; + result[3] = topLeftBy; + return false; + } else { + //not line, return null; + } + } + // line is horizontal + else if (p1y === p2y) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = p1y; + result[2] = topRightBx; + result[3] = p2y; + return false; + } else if (p1x < p2x) { + result[0] = topRightAx; + result[1] = p1y; + result[2] = topLeftBx; + result[3] = p2y; + return false; + } else { + //not valid line, return null; + } + } else { + //slopes of rectA's and rectB's diagonals + var slopeA = rectA.height / rectA.width; + var slopeB = rectB.height / rectB.width; + + //slope of line between center of rectA and center of rectB + var slopePrime = (p2y - p1y) / (p2x - p1x); + var cardinalDirectionA = void 0; + var cardinalDirectionB = void 0; + var tempPointAx = void 0; + var tempPointAy = void 0; + var tempPointBx = void 0; + var tempPointBy = void 0; + + //determine whether clipping point is the corner of nodeA + if (-slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = bottomLeftAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } else { + result[0] = topRightAx; + result[1] = topLeftAy; + clipPointAFound = true; + } + } else if (slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = topLeftAy; + clipPointAFound = true; + } else { + result[0] = bottomRightAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } + } + + //determine whether clipping point is the corner of nodeB + if (-slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = bottomLeftBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } else { + result[2] = topRightBx; + result[3] = topLeftBy; + clipPointBFound = true; + } + } else if (slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = topLeftBx; + result[3] = topLeftBy; + clipPointBFound = true; + } else { + result[2] = bottomRightBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } + } + + //if both clipping points are corners + if (clipPointAFound && clipPointBFound) { + return false; + } + + //determine Cardinal Direction of rectangles + if (p1x > p2x) { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); + } else { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); + } + } else { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); + } else { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); + } + } + //calculate clipping Point if it is not found before + if (!clipPointAFound) { + switch (cardinalDirectionA) { + case 1: + tempPointAy = topLeftAy; + tempPointAx = p1x + -halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 2: + tempPointAx = bottomRightAx; + tempPointAy = p1y + halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 3: + tempPointAy = bottomLeftAy; + tempPointAx = p1x + halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 4: + tempPointAx = bottomLeftAx; + tempPointAy = p1y + -halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + } + } + if (!clipPointBFound) { + switch (cardinalDirectionB) { + case 1: + tempPointBy = topLeftBy; + tempPointBx = p2x + -halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 2: + tempPointBx = bottomRightBx; + tempPointBy = p2y + halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 3: + tempPointBy = bottomLeftBy; + tempPointBx = p2x + halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 4: + tempPointBx = bottomLeftBx; + tempPointBy = p2y + -halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + } + } + } + return false; +}; + +/** + * This method returns in which cardinal direction does input point stays + * 1: North + * 2: East + * 3: South + * 4: West + */ +IGeometry.getCardinalDirection = function (slope, slopePrime, line) { + if (slope > slopePrime) { + return line; + } else { + return 1 + line % 4; + } +}; + +/** + * This method calculates the intersection of the two lines defined by + * point pairs (s1,s2) and (f1,f2). + */ +IGeometry.getIntersection = function (s1, s2, f1, f2) { + if (f2 == null) { + return this.getIntersection2(s1, s2, f1); + } + + var x1 = s1.x; + var y1 = s1.y; + var x2 = s2.x; + var y2 = s2.y; + var x3 = f1.x; + var y3 = f1.y; + var x4 = f2.x; + var y4 = f2.y; + var x = void 0, + y = void 0; // intersection point + var a1 = void 0, + a2 = void 0, + b1 = void 0, + b2 = void 0, + c1 = void 0, + c2 = void 0; // coefficients of line eqns. + var denom = void 0; + + a1 = y2 - y1; + b1 = x1 - x2; + c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 } + + a2 = y4 - y3; + b2 = x3 - x4; + c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 } + + denom = a1 * b2 - a2 * b1; + + if (denom === 0) { + return null; + } + + x = (b1 * c2 - b2 * c1) / denom; + y = (a2 * c1 - a1 * c2) / denom; + + return new Point(x, y); +}; + +/** + * This method finds and returns the angle of the vector from the + x-axis + * in clockwise direction (compatible w/ Java coordinate system!). + */ +IGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) { + var C_angle = void 0; + + if (Cx !== Nx) { + C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); + + if (Nx < Cx) { + C_angle += Math.PI; + } else if (Ny < Cy) { + C_angle += this.TWO_PI; + } + } else if (Ny < Cy) { + C_angle = this.ONE_AND_HALF_PI; // 270 degrees + } else { + C_angle = this.HALF_PI; // 90 degrees + } + + return C_angle; +}; + +/** + * This method checks whether the given two line segments (one with point + * p1 and p2, the other with point p3 and p4) intersect at a point other + * than these points. + */ +IGeometry.doIntersect = function (p1, p2, p3, p4) { + var a = p1.x; + var b = p1.y; + var c = p2.x; + var d = p2.y; + var p = p3.x; + var q = p3.y; + var r = p4.x; + var s = p4.y; + var det = (c - a) * (s - q) - (r - p) * (d - b); + + if (det === 0) { + return false; + } else { + var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; + var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det; + return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1; + } +}; + +/** + * This method checks and calculates the intersection of + * a line segment and a circle. + */ +IGeometry.findCircleLineIntersections = function (Ex, Ey, Lx, Ly, Cx, Cy, r) { + + // E is the starting point of the ray, + // L is the end point of the ray, + // C is the center of sphere you're testing against + // r is the radius of that sphere + + // Compute: + // d = L - E ( Direction vector of ray, from start to end ) + // f = E - C ( Vector from center sphere to ray start ) + + // Then the intersection is found by.. + // P = E + t * d + // This is a parametric equation: + // Px = Ex + tdx + // Py = Ey + tdy + + // get a, b, c values + var a = (Lx - Ex) * (Lx - Ex) + (Ly - Ey) * (Ly - Ey); + var b = 2 * ((Ex - Cx) * (Lx - Ex) + (Ey - Cy) * (Ly - Ey)); + var c = (Ex - Cx) * (Ex - Cx) + (Ey - Cy) * (Ey - Cy) - r * r; + + // get discriminant + var disc = b * b - 4 * a * c; + if (disc >= 0) { + // insert into quadratic formula + var t1 = (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a); + var t2 = (-b - Math.sqrt(b * b - 4 * a * c)) / (2 * a); + var intersections = null; + if (t1 >= 0 && t1 <= 1) { + // t1 is the intersection, and it's closer than t2 + // (since t1 uses -b - discriminant) + // Impale, Poke + return [t1]; + } + + // here t1 didn't intersect so we are either started + // inside the sphere or completely past it + if (t2 >= 0 && t2 <= 1) { + // ExitWound + return [t2]; + } + + return intersections; + } else return null; +}; + +// ----------------------------------------------------------------------------- +// Section: Class Constants +// ----------------------------------------------------------------------------- +/** + * Some useful pre-calculated constants + */ +IGeometry.HALF_PI = 0.5 * Math.PI; +IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; +IGeometry.TWO_PI = 2.0 * Math.PI; +IGeometry.THREE_PI = 3.0 * Math.PI; + +module.exports = IGeometry; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function IMath() {} + +/** + * This method returns the sign of the input value. + */ +IMath.sign = function (value) { + if (value > 0) { + return 1; + } else if (value < 0) { + return -1; + } else { + return 0; + } +}; + +IMath.floor = function (value) { + return value < 0 ? Math.ceil(value) : Math.floor(value); +}; + +IMath.ceil = function (value) { + return value < 0 ? Math.floor(value) : Math.ceil(value); +}; + +module.exports = IMath; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function Integer() {} + +Integer.MAX_VALUE = 2147483647; +Integer.MIN_VALUE = -2147483648; + +module.exports = Integer; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var nodeFrom = function nodeFrom(value) { + return { value: value, next: null, prev: null }; +}; + +var add = function add(prev, node, next, list) { + if (prev !== null) { + prev.next = node; + } else { + list.head = node; + } + + if (next !== null) { + next.prev = node; + } else { + list.tail = node; + } + + node.prev = prev; + node.next = next; + + list.length++; + + return node; +}; + +var _remove = function _remove(node, list) { + var prev = node.prev, + next = node.next; + + + if (prev !== null) { + prev.next = next; + } else { + list.head = next; + } + + if (next !== null) { + next.prev = prev; + } else { + list.tail = prev; + } + + node.prev = node.next = null; + + list.length--; + + return node; +}; + +var LinkedList = function () { + function LinkedList(vals) { + var _this = this; + + _classCallCheck(this, LinkedList); + + this.length = 0; + this.head = null; + this.tail = null; + + if (vals != null) { + vals.forEach(function (v) { + return _this.push(v); + }); + } + } + + _createClass(LinkedList, [{ + key: "size", + value: function size() { + return this.length; + } + }, { + key: "insertBefore", + value: function insertBefore(val, otherNode) { + return add(otherNode.prev, nodeFrom(val), otherNode, this); + } + }, { + key: "insertAfter", + value: function insertAfter(val, otherNode) { + return add(otherNode, nodeFrom(val), otherNode.next, this); + } + }, { + key: "insertNodeBefore", + value: function insertNodeBefore(newNode, otherNode) { + return add(otherNode.prev, newNode, otherNode, this); + } + }, { + key: "insertNodeAfter", + value: function insertNodeAfter(newNode, otherNode) { + return add(otherNode, newNode, otherNode.next, this); + } + }, { + key: "push", + value: function push(val) { + return add(this.tail, nodeFrom(val), null, this); + } + }, { + key: "unshift", + value: function unshift(val) { + return add(null, nodeFrom(val), this.head, this); + } + }, { + key: "remove", + value: function remove(node) { + return _remove(node, this); + } + }, { + key: "pop", + value: function pop() { + return _remove(this.tail, this).value; + } + }, { + key: "popNode", + value: function popNode() { + return _remove(this.tail, this); + } + }, { + key: "shift", + value: function shift() { + return _remove(this.head, this).value; + } + }, { + key: "shiftNode", + value: function shiftNode() { + return _remove(this.head, this); + } + }, { + key: "get_object_at", + value: function get_object_at(index) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + return current.value; + } + } + }, { + key: "set_object_at", + value: function set_object_at(index, value) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + current.value = value; + } + } + }]); + + return LinkedList; +}(); + +module.exports = LinkedList; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* + *This class is the javascript implementation of the Point.java class in jdk + */ +function Point(x, y, p) { + this.x = null; + this.y = null; + if (x == null && y == null && p == null) { + this.x = 0; + this.y = 0; + } else if (typeof x == 'number' && typeof y == 'number' && p == null) { + this.x = x; + this.y = y; + } else if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.x = p.x; + this.y = p.y; + } +} + +Point.prototype.getX = function () { + return this.x; +}; + +Point.prototype.getY = function () { + return this.y; +}; + +Point.prototype.getLocation = function () { + return new Point(this.x, this.y); +}; + +Point.prototype.setLocation = function (x, y, p) { + if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.setLocation(p.x, p.y); + } else if (typeof x == 'number' && typeof y == 'number' && p == null) { + //if both parameters are integer just move (x,y) location + if (parseInt(x) == x && parseInt(y) == y) { + this.move(x, y); + } else { + this.x = Math.floor(x + 0.5); + this.y = Math.floor(y + 0.5); + } + } +}; + +Point.prototype.move = function (x, y) { + this.x = x; + this.y = y; +}; + +Point.prototype.translate = function (dx, dy) { + this.x += dx; + this.y += dy; +}; + +Point.prototype.equals = function (obj) { + if (obj.constructor.name == "Point") { + var pt = obj; + return this.x == pt.x && this.y == pt.y; + } + return this == obj; +}; + +Point.prototype.toString = function () { + return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; +}; + +module.exports = Point; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function RectangleD(x, y, width, height) { + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + + if (x != null && y != null && width != null && height != null) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } +} + +RectangleD.prototype.getX = function () { + return this.x; +}; + +RectangleD.prototype.setX = function (x) { + this.x = x; +}; + +RectangleD.prototype.getY = function () { + return this.y; +}; + +RectangleD.prototype.setY = function (y) { + this.y = y; +}; + +RectangleD.prototype.getWidth = function () { + return this.width; +}; + +RectangleD.prototype.setWidth = function (width) { + this.width = width; +}; + +RectangleD.prototype.getHeight = function () { + return this.height; +}; + +RectangleD.prototype.setHeight = function (height) { + this.height = height; +}; + +RectangleD.prototype.getRight = function () { + return this.x + this.width; +}; + +RectangleD.prototype.getBottom = function () { + return this.y + this.height; +}; + +RectangleD.prototype.intersects = function (a) { + if (this.getRight() < a.x) { + return false; + } + + if (this.getBottom() < a.y) { + return false; + } + + if (a.getRight() < this.x) { + return false; + } + + if (a.getBottom() < this.y) { + return false; + } + + return true; +}; + +RectangleD.prototype.getCenterX = function () { + return this.x + this.width / 2; +}; + +RectangleD.prototype.getMinX = function () { + return this.getX(); +}; + +RectangleD.prototype.getMaxX = function () { + return this.getX() + this.width; +}; + +RectangleD.prototype.getCenterY = function () { + return this.y + this.height / 2; +}; + +RectangleD.prototype.getMinY = function () { + return this.getY(); +}; + +RectangleD.prototype.getMaxY = function () { + return this.getY() + this.height; +}; + +RectangleD.prototype.getWidthHalf = function () { + return this.width / 2; +}; + +RectangleD.prototype.getHeightHalf = function () { + return this.height / 2; +}; + +module.exports = RectangleD; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function UniqueIDGeneretor() {} + +UniqueIDGeneretor.lastID = 0; + +UniqueIDGeneretor.createID = function (obj) { + if (UniqueIDGeneretor.isPrimitive(obj)) { + return obj; + } + if (obj.uniqueID != null) { + return obj.uniqueID; + } + obj.uniqueID = UniqueIDGeneretor.getString(); + UniqueIDGeneretor.lastID++; + return obj.uniqueID; +}; + +UniqueIDGeneretor.getString = function (id) { + if (id == null) id = UniqueIDGeneretor.lastID; + return "Object#" + id + ""; +}; + +UniqueIDGeneretor.isPrimitive = function (arg) { + var type = typeof arg === "undefined" ? "undefined" : _typeof(arg); + return arg == null || type != "object" && type != "function"; +}; + +module.exports = UniqueIDGeneretor; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var LayoutConstants = __webpack_require__(0); +var LGraphManager = __webpack_require__(7); +var LNode = __webpack_require__(3); +var LEdge = __webpack_require__(1); +var LGraph = __webpack_require__(6); +var PointD = __webpack_require__(5); +var Transform = __webpack_require__(17); +var Emitter = __webpack_require__(29); + +function Layout(isRemoteUse) { + Emitter.call(this); + + //Layout Quality: 0:draft, 1:default, 2:proof + this.layoutQuality = LayoutConstants.QUALITY; + //Whether layout should create bendpoints as needed or not + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + //Whether layout should be incremental or not + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + //Whether we animate from before to after layout node positions + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + //Whether we animate the layout process or not + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + //Number iterations that should be done between two successive animations + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + /** + * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When + * they are, both spring and repulsion forces between two leaf nodes can be + * calculated without the expensive clipping point calculations, resulting + * in major speed-up. + */ + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + /** + * This is used for creation of bendpoints by using dummy nodes and edges. + * Maps an LEdge to its dummy bendpoint path. + */ + this.edgeToDummyNodes = new Map(); + this.graphManager = new LGraphManager(this); + this.isLayoutFinished = false; + this.isSubLayout = false; + this.isRemoteUse = false; + + if (isRemoteUse != null) { + this.isRemoteUse = isRemoteUse; + } +} + +Layout.RANDOM_SEED = 1; + +Layout.prototype = Object.create(Emitter.prototype); + +Layout.prototype.getGraphManager = function () { + return this.graphManager; +}; + +Layout.prototype.getAllNodes = function () { + return this.graphManager.getAllNodes(); +}; + +Layout.prototype.getAllEdges = function () { + return this.graphManager.getAllEdges(); +}; + +Layout.prototype.getAllNodesToApplyGravitation = function () { + return this.graphManager.getAllNodesToApplyGravitation(); +}; + +Layout.prototype.newGraphManager = function () { + var gm = new LGraphManager(this); + this.graphManager = gm; + return gm; +}; + +Layout.prototype.newGraph = function (vGraph) { + return new LGraph(null, this.graphManager, vGraph); +}; + +Layout.prototype.newNode = function (vNode) { + return new LNode(this.graphManager, vNode); +}; + +Layout.prototype.newEdge = function (vEdge) { + return new LEdge(null, null, vEdge); +}; + +Layout.prototype.checkLayoutSuccess = function () { + return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); +}; + +Layout.prototype.runLayout = function () { + this.isLayoutFinished = false; + + if (this.tilingPreLayout) { + this.tilingPreLayout(); + } + + this.initParameters(); + var isLayoutSuccessfull; + + if (this.checkLayoutSuccess()) { + isLayoutSuccessfull = false; + } else { + isLayoutSuccessfull = this.layout(); + } + + if (LayoutConstants.ANIMATE === 'during') { + // If this is a 'during' layout animation. Layout is not finished yet. + // We need to perform these in index.js when layout is really finished. + return false; + } + + if (isLayoutSuccessfull) { + if (!this.isSubLayout) { + this.doPostLayout(); + } + } + + if (this.tilingPostLayout) { + this.tilingPostLayout(); + } + + this.isLayoutFinished = true; + + return isLayoutSuccessfull; +}; + +/** + * This method performs the operations required after layout. + */ +Layout.prototype.doPostLayout = function () { + //assert !isSubLayout : "Should not be called on sub-layout!"; + // Propagate geometric changes to v-level objects + if (!this.incremental) { + this.transform(); + } + this.update(); +}; + +/** + * This method updates the geometry of the target graph according to + * calculated layout. + */ +Layout.prototype.update2 = function () { + // update bend points + if (this.createBendsAsNeeded) { + this.createBendpointsFromDummyNodes(); + + // reset all edges, since the topology has changed + this.graphManager.resetAllEdges(); + } + + // perform edge, node and root updates if layout is not called + // remotely + if (!this.isRemoteUse) { + // update all edges + var edge; + var allEdges = this.graphManager.getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + // this.update(edge); + } + + // recursively update nodes + var node; + var nodes = this.graphManager.getRoot().getNodes(); + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + // this.update(node); + } + + // update root graph + this.update(this.graphManager.getRoot()); + } +}; + +Layout.prototype.update = function (obj) { + if (obj == null) { + this.update2(); + } else if (obj instanceof LNode) { + var node = obj; + if (node.getChild() != null) { + // since node is compound, recursively update child nodes + var nodes = node.getChild().getNodes(); + for (var i = 0; i < nodes.length; i++) { + update(nodes[i]); + } + } + + // if the l-level node is associated with a v-level graph object, + // then it is assumed that the v-level node implements the + // interface Updatable. + if (node.vGraphObject != null) { + // cast to Updatable without any type check + var vNode = node.vGraphObject; + + // call the update method of the interface + vNode.update(node); + } + } else if (obj instanceof LEdge) { + var edge = obj; + // if the l-level edge is associated with a v-level graph object, + // then it is assumed that the v-level edge implements the + // interface Updatable. + + if (edge.vGraphObject != null) { + // cast to Updatable without any type check + var vEdge = edge.vGraphObject; + + // call the update method of the interface + vEdge.update(edge); + } + } else if (obj instanceof LGraph) { + var graph = obj; + // if the l-level graph is associated with a v-level graph object, + // then it is assumed that the v-level object implements the + // interface Updatable. + + if (graph.vGraphObject != null) { + // cast to Updatable without any type check + var vGraph = graph.vGraphObject; + + // call the update method of the interface + vGraph.update(graph); + } + } +}; + +/** + * This method is used to set all layout parameters to default values + * determined at compile time. + */ +Layout.prototype.initParameters = function () { + if (!this.isSubLayout) { + this.layoutQuality = LayoutConstants.QUALITY; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + } + + if (this.animationDuringLayout) { + this.animationOnLayout = false; + } +}; + +Layout.prototype.transform = function (newLeftTop) { + if (newLeftTop == undefined) { + this.transform(new PointD(0, 0)); + } else { + // create a transformation object (from Eclipse to layout). When an + // inverse transform is applied, we get upper-left coordinate of the + // drawing or the root graph at given input coordinate (some margins + // already included in calculation of left-top). + + var trans = new Transform(); + var leftTop = this.graphManager.getRoot().updateLeftTop(); + + if (leftTop != null) { + trans.setWorldOrgX(newLeftTop.x); + trans.setWorldOrgY(newLeftTop.y); + + trans.setDeviceOrgX(leftTop.x); + trans.setDeviceOrgY(leftTop.y); + + var nodes = this.getAllNodes(); + var node; + + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + node.transform(trans); + } + } + } +}; + +Layout.prototype.positionNodesRandomly = function (graph) { + + if (graph == undefined) { + //assert !this.incremental; + this.positionNodesRandomly(this.getGraphManager().getRoot()); + this.getGraphManager().getRoot().updateBounds(true); + } else { + var lNode; + var childGraph; + + var nodes = graph.getNodes(); + for (var i = 0; i < nodes.length; i++) { + lNode = nodes[i]; + childGraph = lNode.getChild(); + + if (childGraph == null) { + lNode.scatter(); + } else if (childGraph.getNodes().length == 0) { + lNode.scatter(); + } else { + this.positionNodesRandomly(childGraph); + lNode.updateBounds(); + } + } + } +}; + +/** + * This method returns a list of trees where each tree is represented as a + * list of l-nodes. The method returns a list of size 0 when: + * - The graph is not flat or + * - One of the component(s) of the graph is not a tree. + */ +Layout.prototype.getFlatForest = function () { + var flatForest = []; + var isForest = true; + + // Quick reference for all nodes in the graph manager associated with + // this layout. The list should not be changed. + var allNodes = this.graphManager.getRoot().getNodes(); + + // First be sure that the graph is flat + var isFlat = true; + + for (var i = 0; i < allNodes.length; i++) { + if (allNodes[i].getChild() != null) { + isFlat = false; + } + } + + // Return empty forest if the graph is not flat. + if (!isFlat) { + return flatForest; + } + + // Run BFS for each component of the graph. + + var visited = new Set(); + var toBeVisited = []; + var parents = new Map(); + var unProcessedNodes = []; + + unProcessedNodes = unProcessedNodes.concat(allNodes); + + // Each iteration of this loop finds a component of the graph and + // decides whether it is a tree or not. If it is a tree, adds it to the + // forest and continued with the next component. + + while (unProcessedNodes.length > 0 && isForest) { + toBeVisited.push(unProcessedNodes[0]); + + // Start the BFS. Each iteration of this loop visits a node in a + // BFS manner. + while (toBeVisited.length > 0 && isForest) { + //pool operation + var currentNode = toBeVisited[0]; + toBeVisited.splice(0, 1); + visited.add(currentNode); + + // Traverse all neighbors of this node + var neighborEdges = currentNode.getEdges(); + + for (var i = 0; i < neighborEdges.length; i++) { + var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode); + + // If BFS is not growing from this neighbor. + if (parents.get(currentNode) != currentNeighbor) { + // We haven't previously visited this neighbor. + if (!visited.has(currentNeighbor)) { + toBeVisited.push(currentNeighbor); + parents.set(currentNeighbor, currentNode); + } + // Since we have previously visited this neighbor and + // this neighbor is not parent of currentNode, given + // graph contains a component that is not tree, hence + // it is not a forest. + else { + isForest = false; + break; + } + } + } + } + + // The graph contains a component that is not a tree. Empty + // previously found trees. The method will end. + if (!isForest) { + flatForest = []; + } + // Save currently visited nodes as a tree in our forest. Reset + // visited and parents lists. Continue with the next component of + // the graph, if any. + else { + var temp = [].concat(_toConsumableArray(visited)); + flatForest.push(temp); + //flatForest = flatForest.concat(temp); + //unProcessedNodes.removeAll(visited); + for (var i = 0; i < temp.length; i++) { + var value = temp[i]; + var index = unProcessedNodes.indexOf(value); + if (index > -1) { + unProcessedNodes.splice(index, 1); + } + } + visited = new Set(); + parents = new Map(); + } + } + + return flatForest; +}; + +/** + * This method creates dummy nodes (an l-level node with minimal dimensions) + * for the given edge (one per bendpoint). The existing l-level structure + * is updated accordingly. + */ +Layout.prototype.createDummyNodesForBendpoints = function (edge) { + var dummyNodes = []; + var prev = edge.source; + + var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); + + for (var i = 0; i < edge.bendpoints.length; i++) { + // create new dummy node + var dummyNode = this.newNode(null); + dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); + + graph.add(dummyNode); + + // create new dummy edge between prev and dummy node + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, dummyNode); + + dummyNodes.add(dummyNode); + prev = dummyNode; + } + + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, edge.target); + + this.edgeToDummyNodes.set(edge, dummyNodes); + + // remove real edge from graph manager if it is inter-graph + if (edge.isInterGraph()) { + this.graphManager.remove(edge); + } + // else, remove the edge from the current graph + else { + graph.remove(edge); + } + + return dummyNodes; +}; + +/** + * This method creates bendpoints for edges from the dummy nodes + * at l-level. + */ +Layout.prototype.createBendpointsFromDummyNodes = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges); + + for (var k = 0; k < edges.length; k++) { + var lEdge = edges[k]; + + if (lEdge.bendpoints.length > 0) { + var path = this.edgeToDummyNodes.get(lEdge); + + for (var i = 0; i < path.length; i++) { + var dummyNode = path[i]; + var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY()); + + // update bendpoint's location according to dummy node + var ebp = lEdge.bendpoints.get(i); + ebp.x = p.x; + ebp.y = p.y; + + // remove the dummy node, dummy edges incident with this + // dummy node is also removed (within the remove method) + dummyNode.getOwner().remove(dummyNode); + } + + // add the real edge to graph + this.graphManager.add(lEdge, lEdge.source, lEdge.target); + } + } +}; + +Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) { + if (minDiv != undefined && maxMul != undefined) { + var value = defaultValue; + + if (sliderValue <= 50) { + var minValue = defaultValue / minDiv; + value -= (defaultValue - minValue) / 50 * (50 - sliderValue); + } else { + var maxValue = defaultValue * maxMul; + value += (maxValue - defaultValue) / 50 * (sliderValue - 50); + } + + return value; + } else { + var a, b; + + if (sliderValue <= 50) { + a = 9.0 * defaultValue / 500.0; + b = defaultValue / 10.0; + } else { + a = 9.0 * defaultValue / 50.0; + b = -8 * defaultValue; + } + + return a * sliderValue + b; + } +}; + +/** + * This method finds and returns the center of the given nodes, assuming + * that the given nodes form a tree in themselves. + */ +Layout.findCenterOfTree = function (nodes) { + var list = []; + list = list.concat(nodes); + + var removedNodes = []; + var remainingDegrees = new Map(); + var foundCenter = false; + var centerNode = null; + + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + + for (var i = 0; i < list.length; i++) { + var node = list[i]; + var degree = node.getNeighborsList().size; + remainingDegrees.set(node, node.getNeighborsList().size); + + if (degree == 1) { + removedNodes.push(node); + } + } + + var tempList = []; + tempList = tempList.concat(removedNodes); + + while (!foundCenter) { + var tempList2 = []; + tempList2 = tempList2.concat(tempList); + tempList = []; + + for (var i = 0; i < list.length; i++) { + var node = list[i]; + + var index = list.indexOf(node); + if (index >= 0) { + list.splice(index, 1); + } + + var neighbours = node.getNeighborsList(); + + neighbours.forEach(function (neighbour) { + if (removedNodes.indexOf(neighbour) < 0) { + var otherDegree = remainingDegrees.get(neighbour); + var newDegree = otherDegree - 1; + + if (newDegree == 1) { + tempList.push(neighbour); + } + + remainingDegrees.set(neighbour, newDegree); + } + }); + } + + removedNodes = removedNodes.concat(tempList); + + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + } + + return centerNode; +}; + +/** + * During the coarsening process, this layout may be referenced by two graph managers + * this setter function grants access to change the currently being used graph manager + */ +Layout.prototype.setGraphManager = function (gm) { + this.graphManager = gm; +}; + +module.exports = Layout; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function RandomSeed() {} +// adapted from: https://stackoverflow.com/a/19303725 +RandomSeed.seed = 1; +RandomSeed.x = 0; + +RandomSeed.nextDouble = function () { + RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000; + return RandomSeed.x - Math.floor(RandomSeed.x); +}; + +module.exports = RandomSeed; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var PointD = __webpack_require__(5); + +function Transform(x, y) { + this.lworldOrgX = 0.0; + this.lworldOrgY = 0.0; + this.ldeviceOrgX = 0.0; + this.ldeviceOrgY = 0.0; + this.lworldExtX = 1.0; + this.lworldExtY = 1.0; + this.ldeviceExtX = 1.0; + this.ldeviceExtY = 1.0; +} + +Transform.prototype.getWorldOrgX = function () { + return this.lworldOrgX; +}; + +Transform.prototype.setWorldOrgX = function (wox) { + this.lworldOrgX = wox; +}; + +Transform.prototype.getWorldOrgY = function () { + return this.lworldOrgY; +}; + +Transform.prototype.setWorldOrgY = function (woy) { + this.lworldOrgY = woy; +}; + +Transform.prototype.getWorldExtX = function () { + return this.lworldExtX; +}; + +Transform.prototype.setWorldExtX = function (wex) { + this.lworldExtX = wex; +}; + +Transform.prototype.getWorldExtY = function () { + return this.lworldExtY; +}; + +Transform.prototype.setWorldExtY = function (wey) { + this.lworldExtY = wey; +}; + +/* Device related */ + +Transform.prototype.getDeviceOrgX = function () { + return this.ldeviceOrgX; +}; + +Transform.prototype.setDeviceOrgX = function (dox) { + this.ldeviceOrgX = dox; +}; + +Transform.prototype.getDeviceOrgY = function () { + return this.ldeviceOrgY; +}; + +Transform.prototype.setDeviceOrgY = function (doy) { + this.ldeviceOrgY = doy; +}; + +Transform.prototype.getDeviceExtX = function () { + return this.ldeviceExtX; +}; + +Transform.prototype.setDeviceExtX = function (dex) { + this.ldeviceExtX = dex; +}; + +Transform.prototype.getDeviceExtY = function () { + return this.ldeviceExtY; +}; + +Transform.prototype.setDeviceExtY = function (dey) { + this.ldeviceExtY = dey; +}; + +Transform.prototype.transformX = function (x) { + var xDevice = 0.0; + var worldExtX = this.lworldExtX; + if (worldExtX != 0.0) { + xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX; + } + + return xDevice; +}; + +Transform.prototype.transformY = function (y) { + var yDevice = 0.0; + var worldExtY = this.lworldExtY; + if (worldExtY != 0.0) { + yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY; + } + + return yDevice; +}; + +Transform.prototype.inverseTransformX = function (x) { + var xWorld = 0.0; + var deviceExtX = this.ldeviceExtX; + if (deviceExtX != 0.0) { + xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX; + } + + return xWorld; +}; + +Transform.prototype.inverseTransformY = function (y) { + var yWorld = 0.0; + var deviceExtY = this.ldeviceExtY; + if (deviceExtY != 0.0) { + yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY; + } + return yWorld; +}; + +Transform.prototype.inverseTransformPoint = function (inPoint) { + var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y)); + return outPoint; +}; + +module.exports = Transform; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var Layout = __webpack_require__(15); +var FDLayoutConstants = __webpack_require__(4); +var LayoutConstants = __webpack_require__(0); +var IGeometry = __webpack_require__(8); +var IMath = __webpack_require__(9); + +function FDLayout() { + Layout.call(this); + + this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.totalDisplacement = 0.0; + this.oldTotalDisplacement = 0.0; + this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; +} + +FDLayout.prototype = Object.create(Layout.prototype); + +for (var prop in Layout) { + FDLayout[prop] = Layout[prop]; +} + +FDLayout.prototype.initParameters = function () { + Layout.prototype.initParameters.call(this, arguments); + + this.totalIterations = 0; + this.notAnimatedIterations = 0; + + this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; + + this.grid = []; +}; + +FDLayout.prototype.calcIdealEdgeLengths = function () { + var edge; + var originalIdealLength; + var lcaDepth; + var source; + var target; + var sizeOfSourceInLca; + var sizeOfTargetInLca; + + var allEdges = this.getGraphManager().getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + + originalIdealLength = edge.idealLength; + + if (edge.isInterGraph) { + source = edge.getSource(); + target = edge.getTarget(); + + sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); + sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); + + if (this.useSmartIdealEdgeLengthCalculation) { + edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE; + } + + lcaDepth = edge.getLca().getInclusionTreeDepth(); + + edge.idealLength += originalIdealLength * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth); + } + } +}; + +FDLayout.prototype.initSpringEmbedder = function () { + + var s = this.getAllNodes().length; + if (this.incremental) { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; + } else { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } else { + this.coolingFactor = 1.0; + } + this.initialCoolingFactor = this.coolingFactor; + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; + } + + this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations); + + // Reassign this attribute by using new constant value + this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; + this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; + + this.repulsionRange = this.calcRepulsionRange(); +}; + +FDLayout.prototype.calcSpringForces = function () { + var lEdges = this.getAllEdges(); + var edge; + + for (var i = 0; i < lEdges.length; i++) { + edge = lEdges[i]; + + this.calcSpringForce(edge, edge.idealLength); + } +}; + +FDLayout.prototype.calcRepulsionForces = function () { + var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var i, j; + var nodeA, nodeB; + var lNodes = this.getAllNodes(); + var processedNodeSet; + + if (this.useFRGridVariant) { + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { + this.updateGrid(); + } + + processedNodeSet = new Set(); + + // calculate repulsion forces between each nodes and its surrounding + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); + processedNodeSet.add(nodeA); + } + } else { + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + + for (j = i + 1; j < lNodes.length; j++) { + nodeB = lNodes[j]; + + // If both nodes are not members of the same graph, skip. + if (nodeA.getOwner() != nodeB.getOwner()) { + continue; + } + + this.calcRepulsionForce(nodeA, nodeB); + } + } + } +}; + +FDLayout.prototype.calcGravitationalForces = function () { + var node; + var lNodes = this.getAllNodesToApplyGravitation(); + + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + this.calcGravitationalForce(node); + } +}; + +FDLayout.prototype.moveNodes = function () { + var lNodes = this.getAllNodes(); + var node; + + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + node.move(); + } +}; + +FDLayout.prototype.calcSpringForce = function (edge, idealLength) { + var sourceNode = edge.getSource(); + var targetNode = edge.getTarget(); + + var length; + var springForce; + var springForceX; + var springForceY; + + // Update edge length + if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) { + edge.updateLengthSimple(); + } else { + edge.updateLength(); + + if (edge.isOverlapingSourceAndTarget) { + return; + } + } + + length = edge.getLength(); + + if (length == 0) return; + + // Calculate spring forces + springForce = edge.edgeElasticity * (length - idealLength); + + // Project force onto x and y axes + springForceX = springForce * (edge.lengthX / length); + springForceY = springForce * (edge.lengthY / length); + + // Apply forces on the end nodes + sourceNode.springForceX += springForceX; + sourceNode.springForceY += springForceY; + targetNode.springForceX -= springForceX; + targetNode.springForceY -= springForceY; +}; + +FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) { + var rectA = nodeA.getRect(); + var rectB = nodeB.getRect(); + var overlapAmount = new Array(2); + var clipPoints = new Array(4); + var distanceX; + var distanceY; + var distanceSquared; + var distance; + var repulsionForce; + var repulsionForceX; + var repulsionForceY; + + if (rectA.intersects(rectB)) // two nodes overlap + { + // calculate separation amount in x and y directions + IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0); + + repulsionForceX = 2 * overlapAmount[0]; + repulsionForceY = 2 * overlapAmount[1]; + + var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); + + // Apply forces on the two nodes + nodeA.repulsionForceX -= childrenConstant * repulsionForceX; + nodeA.repulsionForceY -= childrenConstant * repulsionForceY; + nodeB.repulsionForceX += childrenConstant * repulsionForceX; + nodeB.repulsionForceY += childrenConstant * repulsionForceY; + } else // no overlap + { + // calculate distance + + if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers + { + distanceX = rectB.getCenterX() - rectA.getCenterX(); + distanceY = rectB.getCenterY() - rectA.getCenterY(); + } else // use clipping points + { + IGeometry.getIntersection(rectA, rectB, clipPoints); + + distanceX = clipPoints[2] - clipPoints[0]; + distanceY = clipPoints[3] - clipPoints[1]; + } + + // No repulsion range. FR grid variant should take care of this. + if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST; + } + + if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST; + } + + distanceSquared = distanceX * distanceX + distanceY * distanceY; + distance = Math.sqrt(distanceSquared); + + // Here we use half of the nodes' repulsion values for backward compatibility + repulsionForce = (nodeA.nodeRepulsion / 2 + nodeB.nodeRepulsion / 2) * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; + + // Project force onto x and y axes + repulsionForceX = repulsionForce * distanceX / distance; + repulsionForceY = repulsionForce * distanceY / distance; + + // Apply forces on the two nodes + nodeA.repulsionForceX -= repulsionForceX; + nodeA.repulsionForceY -= repulsionForceY; + nodeB.repulsionForceX += repulsionForceX; + nodeB.repulsionForceY += repulsionForceY; + } +}; + +FDLayout.prototype.calcGravitationalForce = function (node) { + var ownerGraph; + var ownerCenterX; + var ownerCenterY; + var distanceX; + var distanceY; + var absDistanceX; + var absDistanceY; + var estimatedSize; + ownerGraph = node.getOwner(); + + ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; + ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; + distanceX = node.getCenterX() - ownerCenterX; + distanceY = node.getCenterY() - ownerCenterY; + absDistanceX = Math.abs(distanceX) + node.getWidth() / 2; + absDistanceY = Math.abs(distanceY) + node.getHeight() / 2; + + if (node.getOwner() == this.graphManager.getRoot()) // in the root graph + { + estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX; + node.gravitationForceY = -this.gravityConstant * distanceY; + } + } else // inside a compound + { + estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant; + node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant; + } + } +}; + +FDLayout.prototype.isConverged = function () { + var converged; + var oscilating = false; + + if (this.totalIterations > this.maxIterations / 3) { + oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; + } + + converged = this.totalDisplacement < this.totalDisplacementThreshold; + + this.oldTotalDisplacement = this.totalDisplacement; + + return converged || oscilating; +}; + +FDLayout.prototype.animate = function () { + if (this.animationDuringLayout && !this.isSubLayout) { + if (this.notAnimatedIterations == this.animationPeriod) { + this.update(); + this.notAnimatedIterations = 0; + } else { + this.notAnimatedIterations++; + } + } +}; + +//This method calculates the number of children (weight) for all nodes +FDLayout.prototype.calcNoOfChildrenForAllNodes = function () { + var node; + var allNodes = this.graphManager.getAllNodes(); + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + node.noOfChildren = node.getNoOfChildren(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: FR-Grid Variant Repulsion Force Calculation +// ----------------------------------------------------------------------------- + +FDLayout.prototype.calcGrid = function (graph) { + + var sizeX = 0; + var sizeY = 0; + + sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); + sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); + + var grid = new Array(sizeX); + + for (var i = 0; i < sizeX; i++) { + grid[i] = new Array(sizeY); + } + + for (var i = 0; i < sizeX; i++) { + for (var j = 0; j < sizeY; j++) { + grid[i][j] = new Array(); + } + } + + return grid; +}; + +FDLayout.prototype.addNodeToGrid = function (v, left, top) { + + var startX = 0; + var finishX = 0; + var startY = 0; + var finishY = 0; + + startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange)); + finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange)); + startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange)); + finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange)); + + for (var i = startX; i <= finishX; i++) { + for (var j = startY; j <= finishY; j++) { + this.grid[i][j].push(v); + v.setGridCoordinates(startX, finishX, startY, finishY); + } + } +}; + +FDLayout.prototype.updateGrid = function () { + var i; + var nodeA; + var lNodes = this.getAllNodes(); + + this.grid = this.calcGrid(this.graphManager.getRoot()); + + // put all nodes to proper grid cells + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); + } +}; + +FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { + + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { + var surrounding = new Set(); + nodeA.surrounding = new Array(); + var nodeB; + var grid = this.grid; + + for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) { + for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) { + if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) { + for (var k = 0; k < grid[i][j].length; k++) { + nodeB = grid[i][j][k]; + + // If both nodes are not members of the same graph, + // or both nodes are the same, skip. + if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) { + continue; + } + + // check if the repulsion force between + // nodeA and nodeB has already been calculated + if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) { + var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2); + var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2); + + // if the distance between nodeA and nodeB + // is less then calculation range + if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) { + //then add nodeB to surrounding of nodeA + surrounding.add(nodeB); + } + } + } + } + } + } + + nodeA.surrounding = [].concat(_toConsumableArray(surrounding)); + } + for (i = 0; i < nodeA.surrounding.length; i++) { + this.calcRepulsionForce(nodeA, nodeA.surrounding[i]); + } +}; + +FDLayout.prototype.calcRepulsionRange = function () { + return 0.0; +}; + +module.exports = FDLayout; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var LEdge = __webpack_require__(1); +var FDLayoutConstants = __webpack_require__(4); + +function FDLayoutEdge(source, target, vEdge) { + LEdge.call(this, source, target, vEdge); + + // Ideal length and elasticity value for this edge + this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + this.edgeElasticity = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; +} + +FDLayoutEdge.prototype = Object.create(LEdge.prototype); + +for (var prop in LEdge) { + FDLayoutEdge[prop] = LEdge[prop]; +} + +module.exports = FDLayoutEdge; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var LNode = __webpack_require__(3); +var FDLayoutConstants = __webpack_require__(4); + +function FDLayoutNode(gm, loc, size, vNode) { + // alternative constructor is handled inside LNode + LNode.call(this, gm, loc, size, vNode); + + // Repulsion value of this node + this.nodeRepulsion = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + + //Spring, repulsion and gravitational forces acting on this node + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + //Amount by which this node is to be moved in this iteration + this.displacementX = 0; + this.displacementY = 0; + + //Start and finish grid coordinates that this node is fallen into + this.startX = 0; + this.finishX = 0; + this.startY = 0; + this.finishY = 0; + + //Geometric neighbors of this node + this.surrounding = []; +} + +FDLayoutNode.prototype = Object.create(LNode.prototype); + +for (var prop in LNode) { + FDLayoutNode[prop] = LNode[prop]; +} + +FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) { + this.startX = _startX; + this.finishX = _finishX; + this.startY = _startY; + this.finishY = _finishY; +}; + +module.exports = FDLayoutNode; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function DimensionD(width, height) { + this.width = 0; + this.height = 0; + if (width !== null && height !== null) { + this.height = height; + this.width = width; + } +} + +DimensionD.prototype.getWidth = function () { + return this.width; +}; + +DimensionD.prototype.setWidth = function (width) { + this.width = width; +}; + +DimensionD.prototype.getHeight = function () { + return this.height; +}; + +DimensionD.prototype.setHeight = function (height) { + this.height = height; +}; + +module.exports = DimensionD; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var UniqueIDGeneretor = __webpack_require__(14); + +function HashMap() { + this.map = {}; + this.keys = []; +} + +HashMap.prototype.put = function (key, value) { + var theId = UniqueIDGeneretor.createID(key); + if (!this.contains(theId)) { + this.map[theId] = value; + this.keys.push(key); + } +}; + +HashMap.prototype.contains = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[key] != null; +}; + +HashMap.prototype.get = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[theId]; +}; + +HashMap.prototype.keySet = function () { + return this.keys; +}; + +module.exports = HashMap; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var UniqueIDGeneretor = __webpack_require__(14); + +function HashSet() { + this.set = {}; +} +; + +HashSet.prototype.add = function (obj) { + var theId = UniqueIDGeneretor.createID(obj); + if (!this.contains(theId)) this.set[theId] = obj; +}; + +HashSet.prototype.remove = function (obj) { + delete this.set[UniqueIDGeneretor.createID(obj)]; +}; + +HashSet.prototype.clear = function () { + this.set = {}; +}; + +HashSet.prototype.contains = function (obj) { + return this.set[UniqueIDGeneretor.createID(obj)] == obj; +}; + +HashSet.prototype.isEmpty = function () { + return this.size() === 0; +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +//concats this.set to the given list +HashSet.prototype.addAllTo = function (list) { + var keys = Object.keys(this.set); + var length = keys.length; + for (var i = 0; i < length; i++) { + list.push(this.set[keys[i]]); + } +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +HashSet.prototype.addAll = function (list) { + var s = list.length; + for (var i = 0; i < s; i++) { + var v = list[i]; + this.add(v); + } +}; + +module.exports = HashSet; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// Some matrix (1d and 2d array) operations +function Matrix() {} + +/** + * matrix multiplication + * array1, array2 and result are 2d arrays + */ +Matrix.multMat = function (array1, array2) { + var result = []; + + for (var i = 0; i < array1.length; i++) { + result[i] = []; + for (var j = 0; j < array2[0].length; j++) { + result[i][j] = 0; + for (var k = 0; k < array1[0].length; k++) { + result[i][j] += array1[i][k] * array2[k][j]; + } + } + } + return result; +}; + +/** + * matrix transpose + * array and result are 2d arrays + */ +Matrix.transpose = function (array) { + var result = []; + + for (var i = 0; i < array[0].length; i++) { + result[i] = []; + for (var j = 0; j < array.length; j++) { + result[i][j] = array[j][i]; + } + } + + return result; +}; + +/** + * multiply array with constant + * array and result are 1d arrays + */ +Matrix.multCons = function (array, constant) { + var result = []; + + for (var i = 0; i < array.length; i++) { + result[i] = array[i] * constant; + } + + return result; +}; + +/** + * substract two arrays + * array1, array2 and result are 1d arrays + */ +Matrix.minusOp = function (array1, array2) { + var result = []; + + for (var i = 0; i < array1.length; i++) { + result[i] = array1[i] - array2[i]; + } + + return result; +}; + +/** + * dot product of two arrays with same size + * array1 and array2 are 1d arrays + */ +Matrix.dotProduct = function (array1, array2) { + var product = 0; + + for (var i = 0; i < array1.length; i++) { + product += array1[i] * array2[i]; + } + + return product; +}; + +/** + * magnitude of an array + * array is 1d array + */ +Matrix.mag = function (array) { + return Math.sqrt(this.dotProduct(array, array)); +}; + +/** + * normalization of an array + * array and result are 1d array + */ +Matrix.normalize = function (array) { + var result = []; + var magnitude = this.mag(array); + + for (var i = 0; i < array.length; i++) { + result[i] = array[i] / magnitude; + } + + return result; +}; + +/** + * multiply an array with centering matrix + * array and result are 1d array + */ +Matrix.multGamma = function (array) { + var result = []; + var sum = 0; + + for (var i = 0; i < array.length; i++) { + sum += array[i]; + } + + sum *= -1 / array.length; + + for (var _i = 0; _i < array.length; _i++) { + result[_i] = sum + array[_i]; + } + return result; +}; + +/** + * a special matrix multiplication + * result = 0.5 * C * INV * C^T * array + * array and result are 1d, C and INV are 2d arrays + */ +Matrix.multL = function (array, C, INV) { + var result = []; + var temp1 = []; + var temp2 = []; + + // multiply by C^T + for (var i = 0; i < C[0].length; i++) { + var sum = 0; + for (var j = 0; j < C.length; j++) { + sum += -0.5 * C[j][i] * array[j]; + } + temp1[i] = sum; + } + // multiply the result by INV + for (var _i2 = 0; _i2 < INV.length; _i2++) { + var _sum = 0; + for (var _j = 0; _j < INV.length; _j++) { + _sum += INV[_i2][_j] * temp1[_j]; + } + temp2[_i2] = _sum; + } + // multiply the result by C + for (var _i3 = 0; _i3 < C.length; _i3++) { + var _sum2 = 0; + for (var _j2 = 0; _j2 < C[0].length; _j2++) { + _sum2 += C[_i3][_j2] * temp2[_j2]; + } + result[_i3] = _sum2; + } + + return result; +}; + +module.exports = Matrix; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * A classic Quicksort algorithm with Hoare's partition + * - Works also on LinkedList objects + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +var LinkedList = __webpack_require__(11); + +var Quicksort = function () { + function Quicksort(A, compareFunction) { + _classCallCheck(this, Quicksort); + + if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction; + + var length = void 0; + if (A instanceof LinkedList) length = A.size();else length = A.length; + + this._quicksort(A, 0, length - 1); + } + + _createClass(Quicksort, [{ + key: '_quicksort', + value: function _quicksort(A, p, r) { + if (p < r) { + var q = this._partition(A, p, r); + this._quicksort(A, p, q); + this._quicksort(A, q + 1, r); + } + } + }, { + key: '_partition', + value: function _partition(A, p, r) { + var x = this._get(A, p); + var i = p; + var j = r; + while (true) { + while (this.compareFunction(x, this._get(A, j))) { + j--; + }while (this.compareFunction(this._get(A, i), x)) { + i++; + }if (i < j) { + this._swap(A, i, j); + i++; + j--; + } else return j; + } + } + }, { + key: '_get', + value: function _get(object, index) { + if (object instanceof LinkedList) return object.get_object_at(index);else return object[index]; + } + }, { + key: '_set', + value: function _set(object, index, value) { + if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value; + } + }, { + key: '_swap', + value: function _swap(A, i, j) { + var temp = this._get(A, i); + this._set(A, i, this._get(A, j)); + this._set(A, j, temp); + } + }, { + key: '_defaultCompareFunction', + value: function _defaultCompareFunction(a, b) { + return b > a; + } + }]); + + return Quicksort; +}(); + +module.exports = Quicksort; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// Singular Value Decomposition implementation +function SVD() {}; + +/* Below singular value decomposition (svd) code including hypot function is adopted from https://github.com/dragonfly-ai/JamaJS + Some changes are applied to make the code compatible with the fcose code and to make it independent from Jama. + Input matrix is changed to a 2D array instead of Jama matrix. Matrix dimensions are taken according to 2D array instead of using Jama functions. + An object that includes singular value components is created for return. + The types of input parameters of the hypot function are removed. + let is used instead of var for the variable initialization. +*/ +/* + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +SVD.svd = function (A) { + this.U = null; + this.V = null; + this.s = null; + this.m = 0; + this.n = 0; + this.m = A.length; + this.n = A[0].length; + var nu = Math.min(this.m, this.n); + this.s = function (s) { + var a = []; + while (s-- > 0) { + a.push(0); + }return a; + }(Math.min(this.m + 1, this.n)); + this.U = function (dims) { + var allocate = function allocate(dims) { + if (dims.length == 0) { + return 0; + } else { + var array = []; + for (var i = 0; i < dims[0]; i++) { + array.push(allocate(dims.slice(1))); + } + return array; + } + }; + return allocate(dims); + }([this.m, nu]); + this.V = function (dims) { + var allocate = function allocate(dims) { + if (dims.length == 0) { + return 0; + } else { + var array = []; + for (var i = 0; i < dims[0]; i++) { + array.push(allocate(dims.slice(1))); + } + return array; + } + }; + return allocate(dims); + }([this.n, this.n]); + var e = function (s) { + var a = []; + while (s-- > 0) { + a.push(0); + }return a; + }(this.n); + var work = function (s) { + var a = []; + while (s-- > 0) { + a.push(0); + }return a; + }(this.m); + var wantu = true; + var wantv = true; + var nct = Math.min(this.m - 1, this.n); + var nrt = Math.max(0, Math.min(this.n - 2, this.m)); + for (var k = 0; k < Math.max(nct, nrt); k++) { + if (k < nct) { + this.s[k] = 0; + for (var i = k; i < this.m; i++) { + this.s[k] = SVD.hypot(this.s[k], A[i][k]); + } + ; + if (this.s[k] !== 0.0) { + if (A[k][k] < 0.0) { + this.s[k] = -this.s[k]; + } + for (var _i = k; _i < this.m; _i++) { + A[_i][k] /= this.s[k]; + } + ; + A[k][k] += 1.0; + } + this.s[k] = -this.s[k]; + } + for (var j = k + 1; j < this.n; j++) { + if (function (lhs, rhs) { + return lhs && rhs; + }(k < nct, this.s[k] !== 0.0)) { + var t = 0; + for (var _i2 = k; _i2 < this.m; _i2++) { + t += A[_i2][k] * A[_i2][j]; + } + ; + t = -t / A[k][k]; + for (var _i3 = k; _i3 < this.m; _i3++) { + A[_i3][j] += t * A[_i3][k]; + } + ; + } + e[j] = A[k][j]; + } + ; + if (function (lhs, rhs) { + return lhs && rhs; + }(wantu, k < nct)) { + for (var _i4 = k; _i4 < this.m; _i4++) { + this.U[_i4][k] = A[_i4][k]; + } + ; + } + if (k < nrt) { + e[k] = 0; + for (var _i5 = k + 1; _i5 < this.n; _i5++) { + e[k] = SVD.hypot(e[k], e[_i5]); + } + ; + if (e[k] !== 0.0) { + if (e[k + 1] < 0.0) { + e[k] = -e[k]; + } + for (var _i6 = k + 1; _i6 < this.n; _i6++) { + e[_i6] /= e[k]; + } + ; + e[k + 1] += 1.0; + } + e[k] = -e[k]; + if (function (lhs, rhs) { + return lhs && rhs; + }(k + 1 < this.m, e[k] !== 0.0)) { + for (var _i7 = k + 1; _i7 < this.m; _i7++) { + work[_i7] = 0.0; + } + ; + for (var _j = k + 1; _j < this.n; _j++) { + for (var _i8 = k + 1; _i8 < this.m; _i8++) { + work[_i8] += e[_j] * A[_i8][_j]; + } + ; + } + ; + for (var _j2 = k + 1; _j2 < this.n; _j2++) { + var _t = -e[_j2] / e[k + 1]; + for (var _i9 = k + 1; _i9 < this.m; _i9++) { + A[_i9][_j2] += _t * work[_i9]; + } + ; + } + ; + } + if (wantv) { + for (var _i10 = k + 1; _i10 < this.n; _i10++) { + this.V[_i10][k] = e[_i10]; + }; + } + } + }; + var p = Math.min(this.n, this.m + 1); + if (nct < this.n) { + this.s[nct] = A[nct][nct]; + } + if (this.m < p) { + this.s[p - 1] = 0.0; + } + if (nrt + 1 < p) { + e[nrt] = A[nrt][p - 1]; + } + e[p - 1] = 0.0; + if (wantu) { + for (var _j3 = nct; _j3 < nu; _j3++) { + for (var _i11 = 0; _i11 < this.m; _i11++) { + this.U[_i11][_j3] = 0.0; + } + ; + this.U[_j3][_j3] = 1.0; + }; + for (var _k = nct - 1; _k >= 0; _k--) { + if (this.s[_k] !== 0.0) { + for (var _j4 = _k + 1; _j4 < nu; _j4++) { + var _t2 = 0; + for (var _i12 = _k; _i12 < this.m; _i12++) { + _t2 += this.U[_i12][_k] * this.U[_i12][_j4]; + }; + _t2 = -_t2 / this.U[_k][_k]; + for (var _i13 = _k; _i13 < this.m; _i13++) { + this.U[_i13][_j4] += _t2 * this.U[_i13][_k]; + }; + }; + for (var _i14 = _k; _i14 < this.m; _i14++) { + this.U[_i14][_k] = -this.U[_i14][_k]; + }; + this.U[_k][_k] = 1.0 + this.U[_k][_k]; + for (var _i15 = 0; _i15 < _k - 1; _i15++) { + this.U[_i15][_k] = 0.0; + }; + } else { + for (var _i16 = 0; _i16 < this.m; _i16++) { + this.U[_i16][_k] = 0.0; + }; + this.U[_k][_k] = 1.0; + } + }; + } + if (wantv) { + for (var _k2 = this.n - 1; _k2 >= 0; _k2--) { + if (function (lhs, rhs) { + return lhs && rhs; + }(_k2 < nrt, e[_k2] !== 0.0)) { + for (var _j5 = _k2 + 1; _j5 < nu; _j5++) { + var _t3 = 0; + for (var _i17 = _k2 + 1; _i17 < this.n; _i17++) { + _t3 += this.V[_i17][_k2] * this.V[_i17][_j5]; + }; + _t3 = -_t3 / this.V[_k2 + 1][_k2]; + for (var _i18 = _k2 + 1; _i18 < this.n; _i18++) { + this.V[_i18][_j5] += _t3 * this.V[_i18][_k2]; + }; + }; + } + for (var _i19 = 0; _i19 < this.n; _i19++) { + this.V[_i19][_k2] = 0.0; + }; + this.V[_k2][_k2] = 1.0; + }; + } + var pp = p - 1; + var iter = 0; + var eps = Math.pow(2.0, -52.0); + var tiny = Math.pow(2.0, -966.0); + while (p > 0) { + var _k3 = void 0; + var kase = void 0; + for (_k3 = p - 2; _k3 >= -1; _k3--) { + if (_k3 === -1) { + break; + } + if (Math.abs(e[_k3]) <= tiny + eps * (Math.abs(this.s[_k3]) + Math.abs(this.s[_k3 + 1]))) { + e[_k3] = 0.0; + break; + } + }; + if (_k3 === p - 2) { + kase = 4; + } else { + var ks = void 0; + for (ks = p - 1; ks >= _k3; ks--) { + if (ks === _k3) { + break; + } + var _t4 = (ks !== p ? Math.abs(e[ks]) : 0.0) + (ks !== _k3 + 1 ? Math.abs(e[ks - 1]) : 0.0); + if (Math.abs(this.s[ks]) <= tiny + eps * _t4) { + this.s[ks] = 0.0; + break; + } + }; + if (ks === _k3) { + kase = 3; + } else if (ks === p - 1) { + kase = 1; + } else { + kase = 2; + _k3 = ks; + } + } + _k3++; + switch (kase) { + case 1: + { + var f = e[p - 2]; + e[p - 2] = 0.0; + for (var _j6 = p - 2; _j6 >= _k3; _j6--) { + var _t5 = SVD.hypot(this.s[_j6], f); + var cs = this.s[_j6] / _t5; + var sn = f / _t5; + this.s[_j6] = _t5; + if (_j6 !== _k3) { + f = -sn * e[_j6 - 1]; + e[_j6 - 1] = cs * e[_j6 - 1]; + } + if (wantv) { + for (var _i20 = 0; _i20 < this.n; _i20++) { + _t5 = cs * this.V[_i20][_j6] + sn * this.V[_i20][p - 1]; + this.V[_i20][p - 1] = -sn * this.V[_i20][_j6] + cs * this.V[_i20][p - 1]; + this.V[_i20][_j6] = _t5; + }; + } + }; + }; + break; + case 2: + { + var _f = e[_k3 - 1]; + e[_k3 - 1] = 0.0; + for (var _j7 = _k3; _j7 < p; _j7++) { + var _t6 = SVD.hypot(this.s[_j7], _f); + var _cs = this.s[_j7] / _t6; + var _sn = _f / _t6; + this.s[_j7] = _t6; + _f = -_sn * e[_j7]; + e[_j7] = _cs * e[_j7]; + if (wantu) { + for (var _i21 = 0; _i21 < this.m; _i21++) { + _t6 = _cs * this.U[_i21][_j7] + _sn * this.U[_i21][_k3 - 1]; + this.U[_i21][_k3 - 1] = -_sn * this.U[_i21][_j7] + _cs * this.U[_i21][_k3 - 1]; + this.U[_i21][_j7] = _t6; + }; + } + }; + }; + break; + case 3: + { + var scale = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[p - 1]), Math.abs(this.s[p - 2])), Math.abs(e[p - 2])), Math.abs(this.s[_k3])), Math.abs(e[_k3])); + var sp = this.s[p - 1] / scale; + var spm1 = this.s[p - 2] / scale; + var epm1 = e[p - 2] / scale; + var sk = this.s[_k3] / scale; + var ek = e[_k3] / scale; + var b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2.0; + var c = sp * epm1 * (sp * epm1); + var shift = 0.0; + if (function (lhs, rhs) { + return lhs || rhs; + }(b !== 0.0, c !== 0.0)) { + shift = Math.sqrt(b * b + c); + if (b < 0.0) { + shift = -shift; + } + shift = c / (b + shift); + } + var _f2 = (sk + sp) * (sk - sp) + shift; + var g = sk * ek; + for (var _j8 = _k3; _j8 < p - 1; _j8++) { + var _t7 = SVD.hypot(_f2, g); + var _cs2 = _f2 / _t7; + var _sn2 = g / _t7; + if (_j8 !== _k3) { + e[_j8 - 1] = _t7; + } + _f2 = _cs2 * this.s[_j8] + _sn2 * e[_j8]; + e[_j8] = _cs2 * e[_j8] - _sn2 * this.s[_j8]; + g = _sn2 * this.s[_j8 + 1]; + this.s[_j8 + 1] = _cs2 * this.s[_j8 + 1]; + if (wantv) { + for (var _i22 = 0; _i22 < this.n; _i22++) { + _t7 = _cs2 * this.V[_i22][_j8] + _sn2 * this.V[_i22][_j8 + 1]; + this.V[_i22][_j8 + 1] = -_sn2 * this.V[_i22][_j8] + _cs2 * this.V[_i22][_j8 + 1]; + this.V[_i22][_j8] = _t7; + }; + } + _t7 = SVD.hypot(_f2, g); + _cs2 = _f2 / _t7; + _sn2 = g / _t7; + this.s[_j8] = _t7; + _f2 = _cs2 * e[_j8] + _sn2 * this.s[_j8 + 1]; + this.s[_j8 + 1] = -_sn2 * e[_j8] + _cs2 * this.s[_j8 + 1]; + g = _sn2 * e[_j8 + 1]; + e[_j8 + 1] = _cs2 * e[_j8 + 1]; + if (wantu && _j8 < this.m - 1) { + for (var _i23 = 0; _i23 < this.m; _i23++) { + _t7 = _cs2 * this.U[_i23][_j8] + _sn2 * this.U[_i23][_j8 + 1]; + this.U[_i23][_j8 + 1] = -_sn2 * this.U[_i23][_j8] + _cs2 * this.U[_i23][_j8 + 1]; + this.U[_i23][_j8] = _t7; + }; + } + }; + e[p - 2] = _f2; + iter = iter + 1; + }; + break; + case 4: + { + if (this.s[_k3] <= 0.0) { + this.s[_k3] = this.s[_k3] < 0.0 ? -this.s[_k3] : 0.0; + if (wantv) { + for (var _i24 = 0; _i24 <= pp; _i24++) { + this.V[_i24][_k3] = -this.V[_i24][_k3]; + }; + } + } + while (_k3 < pp) { + if (this.s[_k3] >= this.s[_k3 + 1]) { + break; + } + var _t8 = this.s[_k3]; + this.s[_k3] = this.s[_k3 + 1]; + this.s[_k3 + 1] = _t8; + if (wantv && _k3 < this.n - 1) { + for (var _i25 = 0; _i25 < this.n; _i25++) { + _t8 = this.V[_i25][_k3 + 1]; + this.V[_i25][_k3 + 1] = this.V[_i25][_k3]; + this.V[_i25][_k3] = _t8; + }; + } + if (wantu && _k3 < this.m - 1) { + for (var _i26 = 0; _i26 < this.m; _i26++) { + _t8 = this.U[_i26][_k3 + 1]; + this.U[_i26][_k3 + 1] = this.U[_i26][_k3]; + this.U[_i26][_k3] = _t8; + }; + } + _k3++; + }; + iter = 0; + p--; + }; + break; + } + }; + var result = { U: this.U, V: this.V, S: this.s }; + return result; +}; + +// sqrt(a^2 + b^2) without under/overflow. +SVD.hypot = function (a, b) { + var r = void 0; + if (Math.abs(a) > Math.abs(b)) { + r = b / a; + r = Math.abs(a) * Math.sqrt(1 + r * r); + } else if (b != 0) { + r = a / b; + r = Math.abs(b) * Math.sqrt(1 + r * r); + } else { + r = 0.0; + } + return r; +}; + +module.exports = SVD; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string + * sequences by S.B.Needleman and C.D.Wunsch (1970). + * + * Aside from the inputs, you can assign the scores for, + * - Match: The two characters at the current index are same. + * - Mismatch: The two characters at the current index are different. + * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string. + */ + +var NeedlemanWunsch = function () { + function NeedlemanWunsch(sequence1, sequence2) { + var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1; + var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1; + + _classCallCheck(this, NeedlemanWunsch); + + this.sequence1 = sequence1; + this.sequence2 = sequence2; + this.match_score = match_score; + this.mismatch_penalty = mismatch_penalty; + this.gap_penalty = gap_penalty; + + // Just the remove redundancy + this.iMax = sequence1.length + 1; + this.jMax = sequence2.length + 1; + + // Grid matrix of scores + this.grid = new Array(this.iMax); + for (var i = 0; i < this.iMax; i++) { + this.grid[i] = new Array(this.jMax); + + for (var j = 0; j < this.jMax; j++) { + this.grid[i][j] = 0; + } + } + + // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions) + this.tracebackGrid = new Array(this.iMax); + for (var _i = 0; _i < this.iMax; _i++) { + this.tracebackGrid[_i] = new Array(this.jMax); + + for (var _j = 0; _j < this.jMax; _j++) { + this.tracebackGrid[_i][_j] = [null, null, null]; + } + } + + // The aligned sequences (return multiple possibilities) + this.alignments = []; + + // Final alignment score + this.score = -1; + + // Calculate scores and tracebacks + this.computeGrids(); + } + + _createClass(NeedlemanWunsch, [{ + key: "getScore", + value: function getScore() { + return this.score; + } + }, { + key: "getAlignments", + value: function getAlignments() { + return this.alignments; + } + + // Main dynamic programming procedure + + }, { + key: "computeGrids", + value: function computeGrids() { + // Fill in the first row + for (var j = 1; j < this.jMax; j++) { + this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty; + this.tracebackGrid[0][j] = [false, false, true]; + } + + // Fill in the first column + for (var i = 1; i < this.iMax; i++) { + this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty; + this.tracebackGrid[i][0] = [false, true, false]; + } + + // Fill the rest of the grid + for (var _i2 = 1; _i2 < this.iMax; _i2++) { + for (var _j2 = 1; _j2 < this.jMax; _j2++) { + // Find the max score(s) among [`Diag`, `Up`, `Left`] + var diag = void 0; + if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty; + + var up = this.grid[_i2 - 1][_j2] + this.gap_penalty; + var left = this.grid[_i2][_j2 - 1] + this.gap_penalty; + + // If there exists multiple max values, capture them for multiple paths + var maxOf = [diag, up, left]; + var indices = this.arrayAllMaxIndexes(maxOf); + + // Update Grids + this.grid[_i2][_j2] = maxOf[indices[0]]; + this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)]; + } + } + + // Update alignment score + this.score = this.grid[this.iMax - 1][this.jMax - 1]; + } + + // Gets all possible valid sequence combinations + + }, { + key: "alignmentTraceback", + value: function alignmentTraceback() { + var inProcessAlignments = []; + + inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length], + seq1: "", + seq2: "" + }); + + while (inProcessAlignments[0]) { + var current = inProcessAlignments[0]; + var directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; + + if (directions[0]) { + inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + if (directions[1]) { + inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: '-' + current.seq2 + }); + } + if (directions[2]) { + inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1], + seq1: '-' + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + + if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1, + sequence2: current.seq2 + }); + + inProcessAlignments.shift(); + } + + return this.alignments; + } + + // Helper Functions + + }, { + key: "getAllIndexes", + value: function getAllIndexes(arr, val) { + var indexes = [], + i = -1; + while ((i = arr.indexOf(val, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + }, { + key: "arrayAllMaxIndexes", + value: function arrayAllMaxIndexes(array) { + return this.getAllIndexes(array, Math.max.apply(null, array)); + } + }]); + + return NeedlemanWunsch; +}(); + +module.exports = NeedlemanWunsch; + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var layoutBase = function layoutBase() { + return; +}; + +layoutBase.FDLayout = __webpack_require__(18); +layoutBase.FDLayoutConstants = __webpack_require__(4); +layoutBase.FDLayoutEdge = __webpack_require__(19); +layoutBase.FDLayoutNode = __webpack_require__(20); +layoutBase.DimensionD = __webpack_require__(21); +layoutBase.HashMap = __webpack_require__(22); +layoutBase.HashSet = __webpack_require__(23); +layoutBase.IGeometry = __webpack_require__(8); +layoutBase.IMath = __webpack_require__(9); +layoutBase.Integer = __webpack_require__(10); +layoutBase.Point = __webpack_require__(12); +layoutBase.PointD = __webpack_require__(5); +layoutBase.RandomSeed = __webpack_require__(16); +layoutBase.RectangleD = __webpack_require__(13); +layoutBase.Transform = __webpack_require__(17); +layoutBase.UniqueIDGeneretor = __webpack_require__(14); +layoutBase.Quicksort = __webpack_require__(25); +layoutBase.LinkedList = __webpack_require__(11); +layoutBase.LGraphObject = __webpack_require__(2); +layoutBase.LGraph = __webpack_require__(6); +layoutBase.LEdge = __webpack_require__(1); +layoutBase.LGraphManager = __webpack_require__(7); +layoutBase.LNode = __webpack_require__(3); +layoutBase.Layout = __webpack_require__(15); +layoutBase.LayoutConstants = __webpack_require__(0); +layoutBase.NeedlemanWunsch = __webpack_require__(27); +layoutBase.Matrix = __webpack_require__(24); +layoutBase.SVD = __webpack_require__(26); + +module.exports = layoutBase; + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function Emitter() { + this.listeners = []; +} + +var p = Emitter.prototype; + +p.addListener = function (event, callback) { + this.listeners.push({ + event: event, + callback: callback + }); +}; + +p.removeListener = function (event, callback) { + for (var i = this.listeners.length; i >= 0; i--) { + var l = this.listeners[i]; + + if (l.event === event && l.callback === callback) { + this.listeners.splice(i, 1); + } + } +}; + +p.emit = function (event, data) { + for (var i = 0; i < this.listeners.length; i++) { + var l = this.listeners[i]; + + if (event === l.event) { + l.callback(data); + } + } +}; + +module.exports = Emitter; + +/***/ }) +/******/ ]); +}); \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/layout-schema.png b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/layout-schema.png new file mode 100644 index 0000000000000000000000000000000000000000..3828e3a509812e304ad067ccb4cd23a0e0cd6b00 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/layout-schema.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7f92a87b171942c13a63ee149c35d461aca4d6b2338da32ab9136a209fa1733 +size 107248 diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/private/private.properties b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/private/private.properties new file mode 100644 index 0000000000000000000000000000000000000000..3b1a22e6c97a8c2654cd087e610829a8b4eebdb8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/private/private.properties @@ -0,0 +1 @@ +browser=Chrome.INTEGRATED diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/private/private.xml b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/private/private.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a1e68f7c7df5e8f52b390cacd91d0c5e55285b8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/private/private.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/project.properties b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/project.properties new file mode 100644 index 0000000000000000000000000000000000000000..da97eba5689cca90e15d36e3313b84a7a7df27a4 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/project.properties @@ -0,0 +1,3 @@ +files.encoding=UTF-8 +site.root.folder= +source.folder= diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/project.xml b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..71c7a284d09c07c10313f548884f5887c005ae07 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.web.clientproject + + + layout-base + + + diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/package.json b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/package.json new file mode 100644 index 0000000000000000000000000000000000000000..44534e7cb9e1807636e94dc51e95745022d56f65 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/package.json @@ -0,0 +1,37 @@ +{ + "name": "layout-base", + "version": "2.0.1", + "description": "Basic layout model and some utilities for Cytoscape.js layout extensions", + "main": "layout-base.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "cross-env NODE_ENV=production webpack" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/iVis-at-Bilkent/layout-base.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/iVis-at-Bilkent/layout-base/issues" + }, + "homepage": "https://github.com/iVis-at-Bilkent/layout-base#readme", + "devDependencies": { + "babel-core": "^6.24.1", + "babel-loader": "^7.0.0", + "babel-preset-env": "^1.5.1", + "camelcase": "^4.1.0", + "cpy-cli": "^1.0.1", + "cross-env": "^5.1.6", + "eslint": "^3.19.0", + "gh-pages": "^1.1.0", + "npm-run-all": "^4.1.2", + "rimraf": "^2.6.2", + "update": "^0.7.4", + "updater-license": "^1.0.0", + "forever": "^0.15.3", + "webpack": "^2.6.1", + "webpack-dev-server": "^2.4.5" + } +} diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LEdge.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LEdge.js new file mode 100644 index 0000000000000000000000000000000000000000..6905a1ceed2bac66dcc76fdbfd23f43915d739c6 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LEdge.js @@ -0,0 +1,153 @@ +var LGraphObject = require('./LGraphObject'); +var IGeometry = require('./util/IGeometry'); +var IMath = require('./util/IMath'); + +function LEdge(source, target, vEdge) { + LGraphObject.call(this, vEdge); + + this.isOverlapingSourceAndTarget = false; + this.vGraphObject = vEdge; + this.bendpoints = []; + this.source = source; + this.target = target; +} + +LEdge.prototype = Object.create(LGraphObject.prototype); + +for (var prop in LGraphObject) { + LEdge[prop] = LGraphObject[prop]; +} + +LEdge.prototype.getSource = function () +{ + return this.source; +}; + +LEdge.prototype.getTarget = function () +{ + return this.target; +}; + +LEdge.prototype.isInterGraph = function () +{ + return this.isInterGraph; +}; + +LEdge.prototype.getLength = function () +{ + return this.length; +}; + +LEdge.prototype.isOverlapingSourceAndTarget = function () +{ + return this.isOverlapingSourceAndTarget; +}; + +LEdge.prototype.getBendpoints = function () +{ + return this.bendpoints; +}; + +LEdge.prototype.getLca = function () +{ + return this.lca; +}; + +LEdge.prototype.getSourceInLca = function () +{ + return this.sourceInLca; +}; + +LEdge.prototype.getTargetInLca = function () +{ + return this.targetInLca; +}; + +LEdge.prototype.getOtherEnd = function (node) +{ + if (this.source === node) + { + return this.target; + } + else if (this.target === node) + { + return this.source; + } + else + { + throw "Node is not incident with this edge"; + } +} + +LEdge.prototype.getOtherEndInGraph = function (node, graph) +{ + var otherEnd = this.getOtherEnd(node); + var root = graph.getGraphManager().getRoot(); + + while (true) + { + if (otherEnd.getOwner() == graph) + { + return otherEnd; + } + + if (otherEnd.getOwner() == root) + { + break; + } + + otherEnd = otherEnd.getOwner().getParent(); + } + + return null; +}; + +LEdge.prototype.updateLength = function () +{ + var clipPointCoordinates = new Array(4); + + this.isOverlapingSourceAndTarget = + IGeometry.getIntersection(this.target.getRect(), + this.source.getRect(), + clipPointCoordinates); + + if (!this.isOverlapingSourceAndTarget) + { + this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; + this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; + + if (Math.abs(this.lengthX) < 1.0) + { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) + { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt( + this.lengthX * this.lengthX + this.lengthY * this.lengthY); + } +}; + +LEdge.prototype.updateLengthSimple = function () +{ + this.lengthX = this.target.getCenterX() - this.source.getCenterX(); + this.lengthY = this.target.getCenterY() - this.source.getCenterY(); + + if (Math.abs(this.lengthX) < 1.0) + { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) + { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt( + this.lengthX * this.lengthX + this.lengthY * this.lengthY); +} + +module.exports = LEdge; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraph.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraph.js new file mode 100644 index 0000000000000000000000000000000000000000..93a237aeae95ff522a240bfa88b97eeb84a033d0 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraph.js @@ -0,0 +1,477 @@ +var LGraphObject = require('./LGraphObject'); +var Integer = require('./util/Integer'); +var LayoutConstants = require('./LayoutConstants'); +var LGraphManager = require('./LGraphManager'); +var LNode = require('./LNode'); +var LEdge = require('./LEdge'); +var RectangleD = require('./util/RectangleD'); +var Point = require('./util/Point'); +var LinkedList = require('./util/LinkedList'); + +function LGraph(parent, obj2, vGraph) { + LGraphObject.call(this, vGraph); + this.estimatedSize = Integer.MIN_VALUE; + this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; + this.edges = []; + this.nodes = []; + this.isConnected = false; + this.parent = parent; + + if (obj2 != null && obj2 instanceof LGraphManager) { + this.graphManager = obj2; + } + else if (obj2 != null && obj2 instanceof Layout) { + this.graphManager = obj2.graphManager; + } +} + +LGraph.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LGraph[prop] = LGraphObject[prop]; +} + +LGraph.prototype.getNodes = function () { + return this.nodes; +}; + +LGraph.prototype.getEdges = function () { + return this.edges; +}; + +LGraph.prototype.getGraphManager = function () +{ + return this.graphManager; +}; + +LGraph.prototype.getParent = function () +{ + return this.parent; +}; + +LGraph.prototype.getLeft = function () +{ + return this.left; +}; + +LGraph.prototype.getRight = function () +{ + return this.right; +}; + +LGraph.prototype.getTop = function () +{ + return this.top; +}; + +LGraph.prototype.getBottom = function () +{ + return this.bottom; +}; + +LGraph.prototype.isConnected = function () +{ + return this.isConnected; +}; + +LGraph.prototype.add = function (obj1, sourceNode, targetNode) { + if (sourceNode == null && targetNode == null) { + var newNode = obj1; + if (this.graphManager == null) { + throw "Graph has no graph mgr!"; + } + if (this.getNodes().indexOf(newNode) > -1) { + throw "Node already in graph!"; + } + newNode.owner = this; + this.getNodes().push(newNode); + + return newNode; + } + else { + var newEdge = obj1; + if (!(this.getNodes().indexOf(sourceNode) > -1 && (this.getNodes().indexOf(targetNode)) > -1)) { + throw "Source or target not in graph!"; + } + + if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { + throw "Both owners must be this graph!"; + } + + if (sourceNode.owner != targetNode.owner) + { + return null; + } + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // set as intra-graph edge + newEdge.isInterGraph = false; + + // add to graph edge list + this.getEdges().push(newEdge); + + // add to incidency lists + sourceNode.edges.push(newEdge); + + if (targetNode != sourceNode) + { + targetNode.edges.push(newEdge); + } + + return newEdge; + } +}; + +LGraph.prototype.remove = function (obj) { + var node = obj; + if (obj instanceof LNode) { + if (node == null) { + throw "Node is null!"; + } + if (!(node.owner != null && node.owner == this)) { + throw "Owner graph is invalid!"; + } + if (this.graphManager == null) { + throw "Owner graph manager is invalid!"; + } + // remove incident edges first (make a copy to do it safely) + var edgesToBeRemoved = node.edges.slice(); + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) + { + edge = edgesToBeRemoved[i]; + + if (edge.isInterGraph) + { + this.graphManager.remove(edge); + } + else + { + edge.source.owner.remove(edge); + } + } + + // now the node itself + var index = this.nodes.indexOf(node); + if (index == -1) { + throw "Node not in owner node list!"; + } + + this.nodes.splice(index, 1); + } + else if (obj instanceof LEdge) { + var edge = obj; + if (edge == null) { + throw "Edge is null!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.owner != null && edge.target.owner != null && + edge.source.owner == this && edge.target.owner == this)) { + throw "Source and/or target owner is invalid!"; + } + + var sourceIndex = edge.source.edges.indexOf(edge); + var targetIndex = edge.target.edges.indexOf(edge); + if (!(sourceIndex > -1 && targetIndex > -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + edge.source.edges.splice(sourceIndex, 1); + + if (edge.target != edge.source) + { + edge.target.edges.splice(targetIndex, 1); + } + + var index = edge.source.owner.getEdges().indexOf(edge); + if (index == -1) { + throw "Not in owner's edge list!"; + } + + edge.source.owner.getEdges().splice(index, 1); + } +}; + +LGraph.prototype.updateLeftTop = function () +{ + var top = Integer.MAX_VALUE; + var left = Integer.MAX_VALUE; + var nodeTop; + var nodeLeft; + var margin; + + var nodes = this.getNodes(); + var s = nodes.length; + + for (var i = 0; i < s; i++) + { + var lNode = nodes[i]; + nodeTop = lNode.getTop(); + nodeLeft = lNode.getLeft(); + + if (top > nodeTop) + { + top = nodeTop; + } + + if (left > nodeLeft) + { + left = nodeLeft; + } + } + + // Do we have any nodes in this graph? + if (top == Integer.MAX_VALUE) + { + return null; + } + + if(nodes[0].getParent().paddingLeft != undefined){ + margin = nodes[0].getParent().paddingLeft; + } + else{ + margin = this.margin; + } + + this.left = left - margin; + this.top = top - margin; + + // Apply the margins and return the result + return new Point(this.left, this.top); +}; + +LGraph.prototype.updateBounds = function (recursive) +{ + // calculate bounds + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var margin; + + var nodes = this.nodes; + var s = nodes.length; + for (var i = 0; i < s; i++) + { + var lNode = nodes[i]; + + if (recursive && lNode.child != null) + { + lNode.updateBounds(); + } + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) + { + left = nodeLeft; + } + + if (right < nodeRight) + { + right = nodeRight; + } + + if (top > nodeTop) + { + top = nodeTop; + } + + if (bottom < nodeBottom) + { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + if (left == Integer.MAX_VALUE) + { + this.left = this.parent.getLeft(); + this.right = this.parent.getRight(); + this.top = this.parent.getTop(); + this.bottom = this.parent.getBottom(); + } + + if(nodes[0].getParent().paddingLeft != undefined){ + margin = nodes[0].getParent().paddingLeft; + } + else{ + margin = this.margin; + } + + this.left = boundingRect.x - margin; + this.right = boundingRect.x + boundingRect.width + margin; + this.top = boundingRect.y - margin; + this.bottom = boundingRect.y + boundingRect.height + margin; +}; + +LGraph.calculateBounds = function (nodes) +{ + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + + var s = nodes.length; + + for (var i = 0; i < s; i++) + { + var lNode = nodes[i]; + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) + { + left = nodeLeft; + } + + if (right < nodeRight) + { + right = nodeRight; + } + + if (top > nodeTop) + { + top = nodeTop; + } + + if (bottom < nodeBottom) + { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + + return boundingRect; +}; + +LGraph.prototype.getInclusionTreeDepth = function () +{ + if (this == this.graphManager.getRoot()) + { + return 1; + } + else + { + return this.parent.getInclusionTreeDepth(); + } +}; + +LGraph.prototype.getEstimatedSize = function () +{ + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LGraph.prototype.calcEstimatedSize = function () +{ + var size = 0; + var nodes = this.nodes; + var s = nodes.length; + + for (var i = 0; i < s; i++) + { + var lNode = nodes[i]; + size += lNode.calcEstimatedSize(); + } + + if (size == 0) + { + this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; + } + else + { + this.estimatedSize = size / Math.sqrt(this.nodes.length); + } + + return this.estimatedSize; +}; + +LGraph.prototype.updateConnected = function () +{ + var self = this; + if (this.nodes.length == 0) + { + this.isConnected = true; + return; + } + + var queue = new LinkedList(); + var visited = new Set(); + var currentNode = this.nodes[0]; + var neighborEdges; + var currentNeighbor; + var childrenOfNode = currentNode.withChildren(); + childrenOfNode.forEach(function(node) { + queue.push(node); + visited.add(node); + }); + + while (queue.length !== 0) + { + currentNode = queue.shift(); + + // Traverse all neighbors of this node + neighborEdges = currentNode.getEdges(); + var size = neighborEdges.length; + for (var i = 0; i < size; i++) + { + var neighborEdge = neighborEdges[i]; + currentNeighbor = + neighborEdge.getOtherEndInGraph(currentNode, this); + + // Add unvisited neighbors to the list to visit + if (currentNeighbor != null && + !visited.has(currentNeighbor)) + { + var childrenOfNeighbor = currentNeighbor.withChildren(); + + childrenOfNeighbor.forEach(function(node) { + queue.push(node); + visited.add(node); + }); + } + } + } + + this.isConnected = false; + + if (visited.size >= this.nodes.length) + { + var noOfVisitedInThisGraph = 0; + + visited.forEach(function(visitedNode) { + if (visitedNode.owner == self) + { + noOfVisitedInThisGraph++; + } + }); + + if (noOfVisitedInThisGraph == this.nodes.length) + { + this.isConnected = true; + } + } +}; + +module.exports = LGraph; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraphManager.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraphManager.js new file mode 100644 index 0000000000000000000000000000000000000000..f6da40d825037644ebe94506d098b4bd23ce802e --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraphManager.js @@ -0,0 +1,500 @@ +var LGraph; +var LEdge = require('./LEdge'); + +function LGraphManager(layout) { + LGraph = require('./LGraph'); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now. + this.layout = layout; + + this.graphs = []; + this.edges = []; +} + +LGraphManager.prototype.addRoot = function () +{ + var ngraph = this.layout.newGraph(); + var nnode = this.layout.newNode(null); + var root = this.add(ngraph, nnode); + this.setRootGraph(root); + return this.rootGraph; +}; + +LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) +{ + //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge + if (newEdge == null && sourceNode == null && targetNode == null) { + if (newGraph == null) { + throw "Graph is null!"; + } + if (parentNode == null) { + throw "Parent node is null!"; + } + if (this.graphs.indexOf(newGraph) > -1) { + throw "Graph already in this graph mgr!"; + } + + this.graphs.push(newGraph); + + if (newGraph.parent != null) { + throw "Already has a parent!"; + } + if (parentNode.child != null) { + throw "Already has a child!"; + } + + newGraph.parent = parentNode; + parentNode.child = newGraph; + + return newGraph; + } + else { + //change the order of the parameters + targetNode = newEdge; + sourceNode = parentNode; + newEdge = newGraph; + var sourceGraph = sourceNode.getOwner(); + var targetGraph = targetNode.getOwner(); + + if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { + throw "Source not in this graph mgr!"; + } + if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { + throw "Target not in this graph mgr!"; + } + + if (sourceGraph == targetGraph) + { + newEdge.isInterGraph = false; + return sourceGraph.add(newEdge, sourceNode, targetNode); + } + else + { + newEdge.isInterGraph = true; + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // add edge to inter-graph edge list + if (this.edges.indexOf(newEdge) > -1) { + throw "Edge already in inter-graph edge list!"; + } + + this.edges.push(newEdge); + + // add edge to source and target incidency lists + if (!(newEdge.source != null && newEdge.target != null)) { + throw "Edge source and/or target is null!"; + } + + if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { + throw "Edge already in source and/or target incidency list!"; + } + + newEdge.source.edges.push(newEdge); + newEdge.target.edges.push(newEdge); + + return newEdge; + } + } +}; + +LGraphManager.prototype.remove = function (lObj) { + if (lObj instanceof LGraph) { + var graph = lObj; + if (graph.getGraphManager() != this) { + throw "Graph not in this graph mgr"; + } + if (!(graph == this.rootGraph || (graph.parent != null && graph.parent.graphManager == this))) { + throw "Invalid parent node!"; + } + + // first the edges (make a copy to do it safely) + var edgesToBeRemoved = []; + + edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); + + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) + { + edge = edgesToBeRemoved[i]; + graph.remove(edge); + } + + // then the nodes (make a copy to do it safely) + var nodesToBeRemoved = []; + + nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); + + var node; + s = nodesToBeRemoved.length; + for (var i = 0; i < s; i++) + { + node = nodesToBeRemoved[i]; + graph.remove(node); + } + + // check if graph is the root + if (graph == this.rootGraph) + { + this.setRootGraph(null); + } + + // now remove the graph itself + var index = this.graphs.indexOf(graph); + this.graphs.splice(index, 1); + + // also reset the parent of the graph + graph.parent = null; + } + else if (lObj instanceof LEdge) { + edge = lObj; + if (edge == null) { + throw "Edge is null!"; + } + if (!edge.isInterGraph) { + throw "Not an inter-graph edge!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + + // remove edge from source and target nodes' incidency lists + + if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + var index = edge.source.edges.indexOf(edge); + edge.source.edges.splice(index, 1); + index = edge.target.edges.indexOf(edge); + edge.target.edges.splice(index, 1); + + // remove edge from owner graph manager's inter-graph edge list + + if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { + throw "Edge owner graph or owner graph manager is null!"; + } + if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { + throw "Not in owner graph manager's edge list!"; + } + + var index = edge.source.owner.getGraphManager().edges.indexOf(edge); + edge.source.owner.getGraphManager().edges.splice(index, 1); + } +}; + +LGraphManager.prototype.updateBounds = function () +{ + this.rootGraph.updateBounds(true); +}; + +LGraphManager.prototype.getGraphs = function () +{ + return this.graphs; +}; + +LGraphManager.prototype.getAllNodes = function () +{ + if (this.allNodes == null) + { + var nodeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < s; i++) + { + nodeList = nodeList.concat(graphs[i].getNodes()); + } + this.allNodes = nodeList; + } + return this.allNodes; +}; + +LGraphManager.prototype.resetAllNodes = function () +{ + this.allNodes = null; +}; + +LGraphManager.prototype.resetAllEdges = function () +{ + this.allEdges = null; +}; + +LGraphManager.prototype.resetAllNodesToApplyGravitation = function () +{ + this.allNodesToApplyGravitation = null; +}; + +LGraphManager.prototype.getAllEdges = function () +{ + if (this.allEdges == null) + { + var edgeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < graphs.length; i++) + { + edgeList = edgeList.concat(graphs[i].getEdges()); + } + + edgeList = edgeList.concat(this.edges); + + this.allEdges = edgeList; + } + return this.allEdges; +}; + +LGraphManager.prototype.getAllNodesToApplyGravitation = function () +{ + return this.allNodesToApplyGravitation; +}; + +LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) +{ + if (this.allNodesToApplyGravitation != null) { + throw "assert failed"; + } + + this.allNodesToApplyGravitation = nodeList; +}; + +LGraphManager.prototype.getRoot = function () +{ + return this.rootGraph; +}; + +LGraphManager.prototype.setRootGraph = function (graph) +{ + if (graph.getGraphManager() != this) { + throw "Root not in this graph mgr!"; + } + + this.rootGraph = graph; + // root graph must have a root node associated with it for convenience + if (graph.parent == null) + { + graph.parent = this.layout.newNode("Root node"); + } +}; + +LGraphManager.prototype.getLayout = function () +{ + return this.layout; +}; + +LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) +{ + if (!(firstNode != null && secondNode != null)) { + throw "assert failed"; + } + + if (firstNode == secondNode) + { + return true; + } + // Is second node an ancestor of the first one? + var ownerGraph = firstNode.getOwner(); + var parentNode; + + do + { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) + { + break; + } + + if (parentNode == secondNode) + { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) + { + break; + } + } while (true); + // Is first node an ancestor of the second one? + ownerGraph = secondNode.getOwner(); + + do + { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) + { + break; + } + + if (parentNode == firstNode) + { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) + { + break; + } + } while (true); + + return false; +}; + +LGraphManager.prototype.calcLowestCommonAncestors = function () +{ + var edge; + var sourceNode; + var targetNode; + var sourceAncestorGraph; + var targetAncestorGraph; + + var edges = this.getAllEdges(); + var s = edges.length; + for (var i = 0; i < s; i++) + { + edge = edges[i]; + + sourceNode = edge.source; + targetNode = edge.target; + edge.lca = null; + edge.sourceInLca = sourceNode; + edge.targetInLca = targetNode; + + if (sourceNode == targetNode) + { + edge.lca = sourceNode.getOwner(); + continue; + } + + sourceAncestorGraph = sourceNode.getOwner(); + + while (edge.lca == null) + { + edge.targetInLca = targetNode; + targetAncestorGraph = targetNode.getOwner(); + + while (edge.lca == null) + { + if (targetAncestorGraph == sourceAncestorGraph) + { + edge.lca = targetAncestorGraph; + break; + } + + if (targetAncestorGraph == this.rootGraph) + { + break; + } + + if (edge.lca != null) { + throw "assert failed"; + } + edge.targetInLca = targetAncestorGraph.getParent(); + targetAncestorGraph = edge.targetInLca.getOwner(); + } + + if (sourceAncestorGraph == this.rootGraph) + { + break; + } + + if (edge.lca == null) + { + edge.sourceInLca = sourceAncestorGraph.getParent(); + sourceAncestorGraph = edge.sourceInLca.getOwner(); + } + } + + if (edge.lca == null) { + throw "assert failed"; + } + } +}; + +LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) +{ + if (firstNode == secondNode) + { + return firstNode.getOwner(); + } + var firstOwnerGraph = firstNode.getOwner(); + + do + { + if (firstOwnerGraph == null) + { + break; + } + var secondOwnerGraph = secondNode.getOwner(); + + do + { + if (secondOwnerGraph == null) + { + break; + } + + if (secondOwnerGraph == firstOwnerGraph) + { + return secondOwnerGraph; + } + secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); + } while (true); + + firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); + } while (true); + + return firstOwnerGraph; +}; + +LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) { + if (graph == null && depth == null) { + graph = this.rootGraph; + depth = 1; + } + var node; + + var nodes = graph.getNodes(); + var s = nodes.length; + for (var i = 0; i < s; i++) + { + node = nodes[i]; + node.inclusionTreeDepth = depth; + + if (node.child != null) + { + this.calcInclusionTreeDepths(node.child, depth + 1); + } + } +}; + +LGraphManager.prototype.includesInvalidEdge = function () +{ + var edge; + var edgesToRemove = []; + + var s = this.edges.length; + for (var i = 0; i < s; i++) + { + edge = this.edges[i]; + + if (this.isOneAncestorOfOther(edge.source, edge.target)) + { + edgesToRemove.push(edge); + } + } + + // Remove invalid edges from graph manager + for (var i = 0; i < edgesToRemove.length; i++) + { + this.remove(edgesToRemove[i]); + } + + // Invalid edges are cleared, so return false + return false; +}; + +module.exports = LGraphManager; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraphObject.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraphObject.js new file mode 100644 index 0000000000000000000000000000000000000000..17305144e25e40d735f6788ff6bd1028e9498816 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LGraphObject.js @@ -0,0 +1,5 @@ +function LGraphObject(vGraphObject) { + this.vGraphObject = vGraphObject; +} + +module.exports = LGraphObject; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LNode.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LNode.js new file mode 100644 index 0000000000000000000000000000000000000000..5c9e456c39b04450bb7edf176d4d710c0b1ae8f7 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LNode.js @@ -0,0 +1,418 @@ +var LGraphObject = require('./LGraphObject'); +var Integer = require('./util/Integer'); +var RectangleD = require('./util/RectangleD'); +var LayoutConstants = require('./LayoutConstants'); +var RandomSeed = require('./util/RandomSeed'); +var PointD = require('./util/PointD'); + +function LNode(gm, loc, size, vNode) { + //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode) + if (size == null && vNode == null) { + vNode = loc; + } + + LGraphObject.call(this, vNode); + + //Alternative constructor 2 : LNode(Layout layout, Object vNode) + if (gm.graphManager != null) + gm = gm.graphManager; + + this.estimatedSize = Integer.MIN_VALUE; + this.inclusionTreeDepth = Integer.MAX_VALUE; + this.vGraphObject = vNode; + this.edges = []; + this.graphManager = gm; + + if (size != null && loc != null) + this.rect = new RectangleD(loc.x, loc.y, size.width, size.height); + else + this.rect = new RectangleD(); +} + +LNode.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LNode[prop] = LGraphObject[prop]; +} + +LNode.prototype.getEdges = function () +{ + return this.edges; +}; + +LNode.prototype.getChild = function () +{ + return this.child; +}; + +LNode.prototype.getOwner = function () +{ +// if (this.owner != null) { +// if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) { +// throw "assert failed"; +// } +// } + + return this.owner; +}; + +LNode.prototype.getWidth = function () +{ + return this.rect.width; +}; + +LNode.prototype.setWidth = function (width) +{ + this.rect.width = width; +}; + +LNode.prototype.getHeight = function () +{ + return this.rect.height; +}; + +LNode.prototype.setHeight = function (height) +{ + this.rect.height = height; +}; + +LNode.prototype.getCenterX = function () +{ + return this.rect.x + this.rect.width / 2; +}; + +LNode.prototype.getCenterY = function () +{ + return this.rect.y + this.rect.height / 2; +}; + +LNode.prototype.getCenter = function () +{ + return new PointD(this.rect.x + this.rect.width / 2, + this.rect.y + this.rect.height / 2); +}; + +LNode.prototype.getLocation = function () +{ + return new PointD(this.rect.x, this.rect.y); +}; + +LNode.prototype.getRect = function () +{ + return this.rect; +}; + +LNode.prototype.getDiagonal = function () +{ + return Math.sqrt(this.rect.width * this.rect.width + + this.rect.height * this.rect.height); +}; + +/** + * This method returns half the diagonal length of this node. + */ +LNode.prototype.getHalfTheDiagonal = function () { + return Math.sqrt(this.rect.height * this.rect.height + + this.rect.width * this.rect.width) / 2; +}; + +LNode.prototype.setRect = function (upperLeft, dimension) +{ + this.rect.x = upperLeft.x; + this.rect.y = upperLeft.y; + this.rect.width = dimension.width; + this.rect.height = dimension.height; +}; + +LNode.prototype.setCenter = function (cx, cy) +{ + this.rect.x = cx - this.rect.width / 2; + this.rect.y = cy - this.rect.height / 2; +}; + +LNode.prototype.setLocation = function (x, y) +{ + this.rect.x = x; + this.rect.y = y; +}; + +LNode.prototype.moveBy = function (dx, dy) +{ + this.rect.x += dx; + this.rect.y += dy; +}; + +LNode.prototype.getEdgeListToNode = function (to) +{ + var edgeList = []; + var edge; + var self = this; + + self.edges.forEach(function(edge) { + + if (edge.target == to) + { + if (edge.source != self) + throw "Incorrect edge source!"; + + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getEdgesBetween = function (other) +{ + var edgeList = []; + var edge; + + var self = this; + self.edges.forEach(function(edge) { + + if (!(edge.source == self || edge.target == self)) + throw "Incorrect edge source and/or target"; + + if ((edge.target == other) || (edge.source == other)) + { + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getNeighborsList = function () +{ + var neighbors = new Set(); + + var self = this; + self.edges.forEach(function(edge) { + + if (edge.source == self) + { + neighbors.add(edge.target); + } + else + { + if (edge.target != self) { + throw "Incorrect incidency!"; + } + + neighbors.add(edge.source); + } + }); + + return neighbors; +}; + +LNode.prototype.withChildren = function () +{ + var withNeighborsList = new Set(); + var childNode; + var children; + + withNeighborsList.add(this); + + if (this.child != null) + { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) + { + childNode = nodes[i]; + children = childNode.withChildren(); + children.forEach(function(node) { + withNeighborsList.add(node); + }); + } + } + + return withNeighborsList; +}; + +LNode.prototype.getNoOfChildren = function () +{ + var noOfChildren = 0; + var childNode; + + if(this.child == null){ + noOfChildren = 1; + } + else + { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) + { + childNode = nodes[i]; + + noOfChildren += childNode.getNoOfChildren(); + } + } + + if(noOfChildren == 0){ + noOfChildren = 1; + } + return noOfChildren; +}; + +LNode.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LNode.prototype.calcEstimatedSize = function () { + if (this.child == null) + { + return this.estimatedSize = (this.rect.width + this.rect.height) / 2; + } + else + { + this.estimatedSize = this.child.calcEstimatedSize(); + this.rect.width = this.estimatedSize; + this.rect.height = this.estimatedSize; + + return this.estimatedSize; + } +}; + +LNode.prototype.scatter = function () { + var randomCenterX; + var randomCenterY; + + var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterX = LayoutConstants.WORLD_CENTER_X + + (RandomSeed.nextDouble() * (maxX - minX)) + minX; + + var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterY = LayoutConstants.WORLD_CENTER_Y + + (RandomSeed.nextDouble() * (maxY - minY)) + minY; + + this.rect.x = randomCenterX; + this.rect.y = randomCenterY +}; + +LNode.prototype.updateBounds = function () { + if (this.getChild() == null) { + throw "assert failed"; + } + if (this.getChild().getNodes().length != 0) + { + // wrap the children nodes by re-arranging the boundaries + var childGraph = this.getChild(); + childGraph.updateBounds(true); + + this.rect.x = childGraph.getLeft(); + this.rect.y = childGraph.getTop(); + + this.setWidth(childGraph.getRight() - childGraph.getLeft()); + this.setHeight(childGraph.getBottom() - childGraph.getTop()); + + // Update compound bounds considering its label properties + if(LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS){ + + var width = childGraph.getRight() - childGraph.getLeft(); + var height = childGraph.getBottom() - childGraph.getTop(); + + if(this.labelWidth){ + if(this.labelPosHorizontal == "left"){ + this.rect.x -= (this.labelWidth); + this.setWidth(width + this.labelWidth); + } + else if(this.labelPosHorizontal == "center" && this.labelWidth > width){ + this.rect.x -= (this.labelWidth - width) / 2; + this.setWidth(this.labelWidth); + } + else if(this.labelPosHorizontal == "right"){ + this.setWidth(width + this.labelWidth); + } + } + + if(this.labelHeight){ + if(this.labelPosVertical == "top"){ + this.rect.y -= (this.labelHeight); + this.setHeight(height + this.labelHeight); + } + else if(this.labelPosVertical == "center" && this.labelHeight > height){ + this.rect.y -= (this.labelHeight - height) / 2; + this.setHeight(this.labelHeight); + } + else if(this.labelPosVertical == "bottom"){ + this.setHeight(height + this.labelHeight); + } + } + } + } +}; + +LNode.prototype.getInclusionTreeDepth = function () +{ + if (this.inclusionTreeDepth == Integer.MAX_VALUE) { + throw "assert failed"; + } + return this.inclusionTreeDepth; +}; + +LNode.prototype.transform = function (trans) +{ + var left = this.rect.x; + + if (left > LayoutConstants.WORLD_BOUNDARY) + { + left = LayoutConstants.WORLD_BOUNDARY; + } + else if (left < -LayoutConstants.WORLD_BOUNDARY) + { + left = -LayoutConstants.WORLD_BOUNDARY; + } + + var top = this.rect.y; + + if (top > LayoutConstants.WORLD_BOUNDARY) + { + top = LayoutConstants.WORLD_BOUNDARY; + } + else if (top < -LayoutConstants.WORLD_BOUNDARY) + { + top = -LayoutConstants.WORLD_BOUNDARY; + } + + var leftTop = new PointD(left, top); + var vLeftTop = trans.inverseTransformPoint(leftTop); + + this.setLocation(vLeftTop.x, vLeftTop.y); +}; + +LNode.prototype.getLeft = function () +{ + return this.rect.x; +}; + +LNode.prototype.getRight = function () +{ + return this.rect.x + this.rect.width; +}; + +LNode.prototype.getTop = function () +{ + return this.rect.y; +}; + +LNode.prototype.getBottom = function () +{ + return this.rect.y + this.rect.height; +}; + +LNode.prototype.getParent = function () +{ + if (this.owner == null) + { + return null; + } + + return this.owner.getParent(); +}; + +module.exports = LNode; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/Layout.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/Layout.js new file mode 100644 index 0000000000000000000000000000000000000000..507313723c0a42634fdbbf56d56f180649be2d38 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/Layout.js @@ -0,0 +1,672 @@ +var LayoutConstants = require('./LayoutConstants'); +var LGraphManager = require('./LGraphManager'); +var LNode = require('./LNode'); +var LEdge = require('./LEdge'); +var LGraph = require('./LGraph'); +var PointD = require('./util/PointD'); +var Transform = require('./util/Transform'); +var Emitter = require('./util/Emitter'); + +function Layout(isRemoteUse) { + Emitter.call( this ); + + //Layout Quality: 0:draft, 1:default, 2:proof + this.layoutQuality = LayoutConstants.QUALITY; + //Whether layout should create bendpoints as needed or not + this.createBendsAsNeeded = + LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + //Whether layout should be incremental or not + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + //Whether we animate from before to after layout node positions + this.animationOnLayout = + LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + //Whether we animate the layout process or not + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + //Number iterations that should be done between two successive animations + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + /** + * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When + * they are, both spring and repulsion forces between two leaf nodes can be + * calculated without the expensive clipping point calculations, resulting + * in major speed-up. + */ + this.uniformLeafNodeSizes = + LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + /** + * This is used for creation of bendpoints by using dummy nodes and edges. + * Maps an LEdge to its dummy bendpoint path. + */ + this.edgeToDummyNodes = new Map(); + this.graphManager = new LGraphManager(this); + this.isLayoutFinished = false; + this.isSubLayout = false; + this.isRemoteUse = false; + + if (isRemoteUse != null) { + this.isRemoteUse = isRemoteUse; + } +} + +Layout.RANDOM_SEED = 1; + +Layout.prototype = Object.create( Emitter.prototype ); + +Layout.prototype.getGraphManager = function () { + return this.graphManager; +}; + +Layout.prototype.getAllNodes = function () { + return this.graphManager.getAllNodes(); +}; + +Layout.prototype.getAllEdges = function () { + return this.graphManager.getAllEdges(); +}; + +Layout.prototype.getAllNodesToApplyGravitation = function () { + return this.graphManager.getAllNodesToApplyGravitation(); +}; + +Layout.prototype.newGraphManager = function () { + var gm = new LGraphManager(this); + this.graphManager = gm; + return gm; +}; + +Layout.prototype.newGraph = function (vGraph) +{ + return new LGraph(null, this.graphManager, vGraph); +}; + +Layout.prototype.newNode = function (vNode) +{ + return new LNode(this.graphManager, vNode); +}; + +Layout.prototype.newEdge = function (vEdge) +{ + return new LEdge(null, null, vEdge); +}; + +Layout.prototype.checkLayoutSuccess = function() { + return (this.graphManager.getRoot() == null) + || this.graphManager.getRoot().getNodes().length == 0 + || this.graphManager.includesInvalidEdge(); +}; + +Layout.prototype.runLayout = function () +{ + this.isLayoutFinished = false; + + if (this.tilingPreLayout) { + this.tilingPreLayout(); + } + + this.initParameters(); + var isLayoutSuccessfull; + + if (this.checkLayoutSuccess()) + { + isLayoutSuccessfull = false; + } + else + { + isLayoutSuccessfull = this.layout(); + } + + if (LayoutConstants.ANIMATE === 'during') { + // If this is a 'during' layout animation. Layout is not finished yet. + // We need to perform these in index.js when layout is really finished. + return false; + } + + if (isLayoutSuccessfull) + { + if (!this.isSubLayout) + { + this.doPostLayout(); + } + } + + if (this.tilingPostLayout) { + this.tilingPostLayout(); + } + + this.isLayoutFinished = true; + + return isLayoutSuccessfull; +}; + +/** + * This method performs the operations required after layout. + */ +Layout.prototype.doPostLayout = function () +{ + //assert !isSubLayout : "Should not be called on sub-layout!"; + // Propagate geometric changes to v-level objects + if(!this.incremental){ + this.transform(); + } + this.update(); +}; + +/** + * This method updates the geometry of the target graph according to + * calculated layout. + */ +Layout.prototype.update2 = function () { + // update bend points + if (this.createBendsAsNeeded) + { + this.createBendpointsFromDummyNodes(); + + // reset all edges, since the topology has changed + this.graphManager.resetAllEdges(); + } + + // perform edge, node and root updates if layout is not called + // remotely + if (!this.isRemoteUse) + { + // update all edges + var edge; + var allEdges = this.graphManager.getAllEdges(); + for (var i = 0; i < allEdges.length; i++) + { + edge = allEdges[i]; +// this.update(edge); + } + + // recursively update nodes + var node; + var nodes = this.graphManager.getRoot().getNodes(); + for (var i = 0; i < nodes.length; i++) + { + node = nodes[i]; +// this.update(node); + } + + // update root graph + this.update(this.graphManager.getRoot()); + } +}; + +Layout.prototype.update = function (obj) { + if (obj == null) { + this.update2(); + } + else if (obj instanceof LNode) { + var node = obj; + if (node.getChild() != null) + { + // since node is compound, recursively update child nodes + var nodes = node.getChild().getNodes(); + for (var i = 0; i < nodes.length; i++) + { + update(nodes[i]); + } + } + + // if the l-level node is associated with a v-level graph object, + // then it is assumed that the v-level node implements the + // interface Updatable. + if (node.vGraphObject != null) + { + // cast to Updatable without any type check + var vNode = node.vGraphObject; + + // call the update method of the interface + vNode.update(node); + } + } + else if (obj instanceof LEdge) { + var edge = obj; + // if the l-level edge is associated with a v-level graph object, + // then it is assumed that the v-level edge implements the + // interface Updatable. + + if (edge.vGraphObject != null) + { + // cast to Updatable without any type check + var vEdge = edge.vGraphObject; + + // call the update method of the interface + vEdge.update(edge); + } + } + else if (obj instanceof LGraph) { + var graph = obj; + // if the l-level graph is associated with a v-level graph object, + // then it is assumed that the v-level object implements the + // interface Updatable. + + if (graph.vGraphObject != null) + { + // cast to Updatable without any type check + var vGraph = graph.vGraphObject; + + // call the update method of the interface + vGraph.update(graph); + } + } +}; + +/** + * This method is used to set all layout parameters to default values + * determined at compile time. + */ +Layout.prototype.initParameters = function () { + if (!this.isSubLayout) + { + this.layoutQuality = LayoutConstants.QUALITY; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + } + + if (this.animationDuringLayout) + { + this.animationOnLayout = false; + } +}; + +Layout.prototype.transform = function (newLeftTop) { + if (newLeftTop == undefined) { + this.transform(new PointD(0, 0)); + } + else { + // create a transformation object (from Eclipse to layout). When an + // inverse transform is applied, we get upper-left coordinate of the + // drawing or the root graph at given input coordinate (some margins + // already included in calculation of left-top). + + var trans = new Transform(); + var leftTop = this.graphManager.getRoot().updateLeftTop(); + + if (leftTop != null) + { + trans.setWorldOrgX(newLeftTop.x); + trans.setWorldOrgY(newLeftTop.y); + + trans.setDeviceOrgX(leftTop.x); + trans.setDeviceOrgY(leftTop.y); + + var nodes = this.getAllNodes(); + var node; + + for (var i = 0; i < nodes.length; i++) + { + node = nodes[i]; + node.transform(trans); + } + } + } +}; + +Layout.prototype.positionNodesRandomly = function (graph) { + + if (graph == undefined) { + //assert !this.incremental; + this.positionNodesRandomly(this.getGraphManager().getRoot()); + this.getGraphManager().getRoot().updateBounds(true); + } + else { + var lNode; + var childGraph; + + var nodes = graph.getNodes(); + for (var i = 0; i < nodes.length; i++) + { + lNode = nodes[i]; + childGraph = lNode.getChild(); + + if (childGraph == null) + { + lNode.scatter(); + } + else if (childGraph.getNodes().length == 0) + { + lNode.scatter(); + } + else + { + this.positionNodesRandomly(childGraph); + lNode.updateBounds(); + } + } + } +}; + +/** + * This method returns a list of trees where each tree is represented as a + * list of l-nodes. The method returns a list of size 0 when: + * - The graph is not flat or + * - One of the component(s) of the graph is not a tree. + */ +Layout.prototype.getFlatForest = function () +{ + var flatForest = []; + var isForest = true; + + // Quick reference for all nodes in the graph manager associated with + // this layout. The list should not be changed. + var allNodes = this.graphManager.getRoot().getNodes(); + + // First be sure that the graph is flat + var isFlat = true; + + for (var i = 0; i < allNodes.length; i++) + { + if (allNodes[i].getChild() != null) + { + isFlat = false; + } + } + + // Return empty forest if the graph is not flat. + if (!isFlat) + { + return flatForest; + } + + // Run BFS for each component of the graph. + + var visited = new Set(); + var toBeVisited = []; + var parents = new Map(); + var unProcessedNodes = []; + + unProcessedNodes = unProcessedNodes.concat(allNodes); + + // Each iteration of this loop finds a component of the graph and + // decides whether it is a tree or not. If it is a tree, adds it to the + // forest and continued with the next component. + + while (unProcessedNodes.length > 0 && isForest) + { + toBeVisited.push(unProcessedNodes[0]); + + // Start the BFS. Each iteration of this loop visits a node in a + // BFS manner. + while (toBeVisited.length > 0 && isForest) + { + //pool operation + var currentNode = toBeVisited[0]; + toBeVisited.splice(0, 1); + visited.add(currentNode); + + // Traverse all neighbors of this node + var neighborEdges = currentNode.getEdges(); + + for (var i = 0; i < neighborEdges.length; i++) + { + var currentNeighbor = + neighborEdges[i].getOtherEnd(currentNode); + + // If BFS is not growing from this neighbor. + if (parents.get(currentNode) != currentNeighbor) + { + // We haven't previously visited this neighbor. + if (!visited.has(currentNeighbor)) + { + toBeVisited.push(currentNeighbor); + parents.set(currentNeighbor, currentNode); + } + // Since we have previously visited this neighbor and + // this neighbor is not parent of currentNode, given + // graph contains a component that is not tree, hence + // it is not a forest. + else + { + isForest = false; + break; + } + } + } + } + + // The graph contains a component that is not a tree. Empty + // previously found trees. The method will end. + if (!isForest) + { + flatForest = []; + } + // Save currently visited nodes as a tree in our forest. Reset + // visited and parents lists. Continue with the next component of + // the graph, if any. + else + { + var temp = [...visited]; + flatForest.push(temp); + //flatForest = flatForest.concat(temp); + //unProcessedNodes.removeAll(visited); + for (var i = 0; i < temp.length; i++) { + var value = temp[i]; + var index = unProcessedNodes.indexOf(value); + if (index > -1) { + unProcessedNodes.splice(index, 1); + } + } + visited = new Set(); + parents = new Map(); + } + } + + return flatForest; +}; + +/** + * This method creates dummy nodes (an l-level node with minimal dimensions) + * for the given edge (one per bendpoint). The existing l-level structure + * is updated accordingly. + */ +Layout.prototype.createDummyNodesForBendpoints = function (edge) +{ + var dummyNodes = []; + var prev = edge.source; + + var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); + + for (var i = 0; i < edge.bendpoints.length; i++) + { + // create new dummy node + var dummyNode = this.newNode(null); + dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); + + graph.add(dummyNode); + + // create new dummy edge between prev and dummy node + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, dummyNode); + + dummyNodes.add(dummyNode); + prev = dummyNode; + } + + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, edge.target); + + this.edgeToDummyNodes.set(edge, dummyNodes); + + // remove real edge from graph manager if it is inter-graph + if (edge.isInterGraph()) + { + this.graphManager.remove(edge); + } + // else, remove the edge from the current graph + else + { + graph.remove(edge); + } + + return dummyNodes; +}; + +/** + * This method creates bendpoints for edges from the dummy nodes + * at l-level. + */ +Layout.prototype.createBendpointsFromDummyNodes = function () +{ + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + edges = [...this.edgeToDummyNodes.keys()].concat(edges); + + for (var k = 0; k < edges.length; k++) + { + var lEdge = edges[k]; + + if (lEdge.bendpoints.length > 0) + { + var path = this.edgeToDummyNodes.get(lEdge); + + for (var i = 0; i < path.length; i++) + { + var dummyNode = path[i]; + var p = new PointD(dummyNode.getCenterX(), + dummyNode.getCenterY()); + + // update bendpoint's location according to dummy node + var ebp = lEdge.bendpoints.get(i); + ebp.x = p.x; + ebp.y = p.y; + + // remove the dummy node, dummy edges incident with this + // dummy node is also removed (within the remove method) + dummyNode.getOwner().remove(dummyNode); + } + + // add the real edge to graph + this.graphManager.add(lEdge, lEdge.source, lEdge.target); + } + } +}; + +Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) { + if (minDiv != undefined && maxMul != undefined) { + var value = defaultValue; + + if (sliderValue <= 50) + { + var minValue = defaultValue / minDiv; + value -= ((defaultValue - minValue) / 50) * (50 - sliderValue); + } + else + { + var maxValue = defaultValue * maxMul; + value += ((maxValue - defaultValue) / 50) * (sliderValue - 50); + } + + return value; + } + else { + var a, b; + + if (sliderValue <= 50) + { + a = 9.0 * defaultValue / 500.0; + b = defaultValue / 10.0; + } + else + { + a = 9.0 * defaultValue / 50.0; + b = -8 * defaultValue; + } + + return (a * sliderValue + b); + } +}; + +/** + * This method finds and returns the center of the given nodes, assuming + * that the given nodes form a tree in themselves. + */ +Layout.findCenterOfTree = function (nodes) +{ + var list = []; + list = list.concat(nodes); + + var removedNodes = []; + var remainingDegrees = new Map(); + var foundCenter = false; + var centerNode = null; + + if (list.length == 1 || list.length == 2) + { + foundCenter = true; + centerNode = list[0]; + } + + for (var i = 0; i < list.length; i++) + { + var node = list[i]; + var degree = node.getNeighborsList().size; + remainingDegrees.set(node, node.getNeighborsList().size); + + if (degree == 1) + { + removedNodes.push(node); + } + } + + var tempList = []; + tempList = tempList.concat(removedNodes); + + while (!foundCenter) + { + var tempList2 = []; + tempList2 = tempList2.concat(tempList); + tempList = []; + + for (var i = 0; i < list.length; i++) + { + var node = list[i]; + + var index = list.indexOf(node); + if (index >= 0) { + list.splice(index, 1); + } + + var neighbours = node.getNeighborsList(); + + neighbours.forEach(function(neighbour) { + if (removedNodes.indexOf(neighbour) < 0) + { + var otherDegree = remainingDegrees.get(neighbour); + var newDegree = otherDegree - 1; + + if (newDegree == 1) + { + tempList.push(neighbour); + } + + remainingDegrees.set(neighbour, newDegree); + } + }); + } + + removedNodes = removedNodes.concat(tempList); + + if (list.length == 1 || list.length == 2) + { + foundCenter = true; + centerNode = list[0]; + } + } + + return centerNode; +}; + +/** + * During the coarsening process, this layout may be referenced by two graph managers + * this setter function grants access to change the currently being used graph manager + */ +Layout.prototype.setGraphManager = function (gm) +{ + this.graphManager = gm; +}; + +module.exports = Layout; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LayoutConstants.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LayoutConstants.js new file mode 100644 index 0000000000000000000000000000000000000000..c6645820c81795bf98c5ad6c85f4e32f5a078b5f --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/LayoutConstants.js @@ -0,0 +1,70 @@ +function LayoutConstants() { +} + +/** + * Layout Quality: 0:draft, 1:default, 2:proof + */ +LayoutConstants.QUALITY = 1; + +/** + * Default parameters + */ +LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; +LayoutConstants.DEFAULT_INCREMENTAL = false; +LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; +LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; +LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; +LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; + +// ----------------------------------------------------------------------------- +// Section: General other constants +// ----------------------------------------------------------------------------- +/* + * Margins of a graph to be applied on bouding rectangle of its contents. We + * assume margins on all four sides to be uniform. + */ +LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; + +/* + * Whether to consider labels in node dimensions or not + */ +LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_SIZE = 40; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; + +/* + * Empty compound node size. When a compound node is empty, its both + * dimensions should be of this value. + */ +LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; + +/* + * Minimum length that an edge should take during layout + */ +LayoutConstants.MIN_EDGE_LENGTH = 1; + +/* + * World boundaries that layout operates on + */ +LayoutConstants.WORLD_BOUNDARY = 1000000; + +/* + * World boundaries that random positioning can be performed with + */ +LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000; + +/* + * Coordinates of the world center + */ +LayoutConstants.WORLD_CENTER_X = 1200; +LayoutConstants.WORLD_CENTER_Y = 900; + +module.exports = LayoutConstants; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayout.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayout.js new file mode 100644 index 0000000000000000000000000000000000000000..42a03ff5fc7938992160b7149ee492b03ecd89e8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayout.js @@ -0,0 +1,529 @@ +var Layout = require('../Layout'); +var FDLayoutConstants = require('./FDLayoutConstants'); +var LayoutConstants = require('../LayoutConstants'); +var IGeometry = require('../util/IGeometry'); +var IMath = require('../util/IMath'); + +function FDLayout() { + Layout.call(this); + + this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.displacementThresholdPerNode = (3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH) / 100; + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.totalDisplacement = 0.0; + this.oldTotalDisplacement = 0.0; + this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; +} + +FDLayout.prototype = Object.create(Layout.prototype); + +for (var prop in Layout) { + FDLayout[prop] = Layout[prop]; +} + +FDLayout.prototype.initParameters = function () { + Layout.prototype.initParameters.call(this, arguments); + + this.totalIterations = 0; + this.notAnimatedIterations = 0; + + this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; + + this.grid = []; +}; + +FDLayout.prototype.calcIdealEdgeLengths = function () { + var edge; + var originalIdealLength; + var lcaDepth; + var source; + var target; + var sizeOfSourceInLca; + var sizeOfTargetInLca; + + var allEdges = this.getGraphManager().getAllEdges(); + for (var i = 0; i < allEdges.length; i++) + { + edge = allEdges[i]; + + originalIdealLength = edge.idealLength; + + if (edge.isInterGraph) + { + source = edge.getSource(); + target = edge.getTarget(); + + sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); + sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); + + if (this.useSmartIdealEdgeLengthCalculation) + { + edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - + 2 * LayoutConstants.SIMPLE_NODE_SIZE; + } + + lcaDepth = edge.getLca().getInclusionTreeDepth(); + + edge.idealLength += originalIdealLength * + FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * + (source.getInclusionTreeDepth() + + target.getInclusionTreeDepth() - 2 * lcaDepth); + } + } +}; + +FDLayout.prototype.initSpringEmbedder = function () { + + var s = this.getAllNodes().length; + if (this.incremental) { + if(s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT){ + this.coolingFactor = Math.max(this.coolingFactor*FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - + (s-FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT)/(FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT-FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; + } + else { + if(s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT){ + this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - + (s-FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT)/(FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT-FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT)*(1-FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } + else { + this.coolingFactor = 1.0; + } + this.initialCoolingFactor = this.coolingFactor; + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; + } + + this.maxIterations = + Math.max(this.getAllNodes().length * 5, this.maxIterations); + + // Reassign this attribute by using new constant value + this.displacementThresholdPerNode = (3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH) / 100; + this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; + + this.repulsionRange = this.calcRepulsionRange(); +}; + +FDLayout.prototype.calcSpringForces = function () { + var lEdges = this.getAllEdges(); + var edge; + + for (var i = 0; i < lEdges.length; i++) + { + edge = lEdges[i]; + + this.calcSpringForce(edge, edge.idealLength); + } +}; + +FDLayout.prototype.calcRepulsionForces = function (gridUpdateAllowed = true, forceToNodeSurroundingUpdate = false) { + var i, j; + var nodeA, nodeB; + var lNodes = this.getAllNodes(); + var processedNodeSet; + + if (this.useFRGridVariant) + { + if ((this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed)) + { + this.updateGrid(); + } + + processedNodeSet = new Set(); + + // calculate repulsion forces between each nodes and its surrounding + for (i = 0; i < lNodes.length; i++) + { + nodeA = lNodes[i]; + this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); + processedNodeSet.add(nodeA); + } + } + else + { + for (i = 0; i < lNodes.length; i++) + { + nodeA = lNodes[i]; + + for (j = i + 1; j < lNodes.length; j++) + { + nodeB = lNodes[j]; + + // If both nodes are not members of the same graph, skip. + if (nodeA.getOwner() != nodeB.getOwner()) + { + continue; + } + + this.calcRepulsionForce(nodeA, nodeB); + } + } + } +}; + +FDLayout.prototype.calcGravitationalForces = function () { + var node; + var lNodes = this.getAllNodesToApplyGravitation(); + + for (var i = 0; i < lNodes.length; i++) + { + node = lNodes[i]; + this.calcGravitationalForce(node); + } +}; + +FDLayout.prototype.moveNodes = function () { + var lNodes = this.getAllNodes(); + var node; + + for (var i = 0; i < lNodes.length; i++) + { + node = lNodes[i]; + node.move(); + } +} + +FDLayout.prototype.calcSpringForce = function (edge, idealLength) { + var sourceNode = edge.getSource(); + var targetNode = edge.getTarget(); + + var length; + var springForce; + var springForceX; + var springForceY; + + // Update edge length + if (this.uniformLeafNodeSizes && + sourceNode.getChild() == null && targetNode.getChild() == null) + { + edge.updateLengthSimple(); + } + else + { + edge.updateLength(); + + if (edge.isOverlapingSourceAndTarget) + { + return; + } + } + + length = edge.getLength(); + + if(length == 0) + return; + + // Calculate spring forces + springForce = edge.edgeElasticity * (length - idealLength); + + // Project force onto x and y axes + springForceX = springForce * (edge.lengthX / length); + springForceY = springForce * (edge.lengthY / length); + + // Apply forces on the end nodes + sourceNode.springForceX += springForceX; + sourceNode.springForceY += springForceY; + targetNode.springForceX -= springForceX; + targetNode.springForceY -= springForceY; +}; + +FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) { + var rectA = nodeA.getRect(); + var rectB = nodeB.getRect(); + var overlapAmount = new Array(2); + var clipPoints = new Array(4); + var distanceX; + var distanceY; + var distanceSquared; + var distance; + var repulsionForce; + var repulsionForceX; + var repulsionForceY; + + if (rectA.intersects(rectB))// two nodes overlap + { + // calculate separation amount in x and y directions + IGeometry.calcSeparationAmount(rectA, + rectB, + overlapAmount, + FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0); + + repulsionForceX = 2 * overlapAmount[0]; + repulsionForceY = 2 * overlapAmount[1]; + + var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); + + // Apply forces on the two nodes + nodeA.repulsionForceX -= childrenConstant * repulsionForceX; + nodeA.repulsionForceY -= childrenConstant * repulsionForceY; + nodeB.repulsionForceX += childrenConstant * repulsionForceX; + nodeB.repulsionForceY += childrenConstant * repulsionForceY; + } + else// no overlap + { + // calculate distance + + if (this.uniformLeafNodeSizes && + nodeA.getChild() == null && nodeB.getChild() == null)// simply base repulsion on distance of node centers + { + distanceX = rectB.getCenterX() - rectA.getCenterX(); + distanceY = rectB.getCenterY() - rectA.getCenterY(); + } + else// use clipping points + { + IGeometry.getIntersection(rectA, rectB, clipPoints); + + distanceX = clipPoints[2] - clipPoints[0]; + distanceY = clipPoints[3] - clipPoints[1]; + } + + // No repulsion range. FR grid variant should take care of this. + if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) + { + distanceX = IMath.sign(distanceX) * + FDLayoutConstants.MIN_REPULSION_DIST; + } + + if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) + { + distanceY = IMath.sign(distanceY) * + FDLayoutConstants.MIN_REPULSION_DIST; + } + + distanceSquared = distanceX * distanceX + distanceY * distanceY; + distance = Math.sqrt(distanceSquared); + + // Here we use half of the nodes' repulsion values for backward compatibility + repulsionForce = (nodeA.nodeRepulsion / 2 + nodeB.nodeRepulsion / 2) * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; + + // Project force onto x and y axes + repulsionForceX = repulsionForce * distanceX / distance; + repulsionForceY = repulsionForce * distanceY / distance; + + // Apply forces on the two nodes + nodeA.repulsionForceX -= repulsionForceX; + nodeA.repulsionForceY -= repulsionForceY; + nodeB.repulsionForceX += repulsionForceX; + nodeB.repulsionForceY += repulsionForceY; + } +}; + +FDLayout.prototype.calcGravitationalForce = function (node) { + var ownerGraph; + var ownerCenterX; + var ownerCenterY; + var distanceX; + var distanceY; + var absDistanceX; + var absDistanceY; + var estimatedSize; + ownerGraph = node.getOwner(); + + ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; + ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; + distanceX = node.getCenterX() - ownerCenterX; + distanceY = node.getCenterY() - ownerCenterY; + absDistanceX = Math.abs(distanceX) + node.getWidth() / 2; + absDistanceY = Math.abs(distanceY) + node.getHeight() / 2; + + if (node.getOwner() == this.graphManager.getRoot())// in the root graph + { + estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) + { + node.gravitationForceX = -this.gravityConstant * distanceX; + node.gravitationForceY = -this.gravityConstant * distanceY; + } + } + else// inside a compound + { + estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) + { + node.gravitationForceX = -this.gravityConstant * distanceX * + this.compoundGravityConstant; + node.gravitationForceY = -this.gravityConstant * distanceY * + this.compoundGravityConstant; + } + } +}; + +FDLayout.prototype.isConverged = function () { + var converged; + var oscilating = false; + + if (this.totalIterations > this.maxIterations / 3) + { + oscilating = + Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; + } + + converged = this.totalDisplacement < this.totalDisplacementThreshold; + + this.oldTotalDisplacement = this.totalDisplacement; + + return converged || oscilating; +}; + +FDLayout.prototype.animate = function () { + if (this.animationDuringLayout && !this.isSubLayout) + { + if (this.notAnimatedIterations == this.animationPeriod) + { + this.update(); + this.notAnimatedIterations = 0; + } + else + { + this.notAnimatedIterations++; + } + } +}; + +//This method calculates the number of children (weight) for all nodes +FDLayout.prototype.calcNoOfChildrenForAllNodes = function () +{ + var node; + var allNodes = this.graphManager.getAllNodes(); + + for(var i = 0; i < allNodes.length; i++) + { + node = allNodes[i]; + node.noOfChildren = node.getNoOfChildren(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: FR-Grid Variant Repulsion Force Calculation +// ----------------------------------------------------------------------------- + +FDLayout.prototype.calcGrid = function (graph){ + + var sizeX = 0; + var sizeY = 0; + + sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); + sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); + + var grid = new Array(sizeX); + + for(var i = 0; i < sizeX; i++){ + grid[i] = new Array(sizeY); + } + + for(var i = 0; i < sizeX; i++){ + for(var j = 0; j < sizeY; j++){ + grid[i][j] = new Array(); + } + } + + return grid; +}; + +FDLayout.prototype.addNodeToGrid = function (v, left, top){ + + var startX = 0; + var finishX = 0; + var startY = 0; + var finishY = 0; + + startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange)); + finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange)); + startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange)); + finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange)); + + for (var i = startX; i <= finishX; i++) + { + for (var j = startY; j <= finishY; j++) + { + this.grid[i][j].push(v); + v.setGridCoordinates(startX, finishX, startY, finishY); + } + } + +}; + +FDLayout.prototype.updateGrid = function() { + var i; + var nodeA; + var lNodes = this.getAllNodes(); + + this.grid = this.calcGrid(this.graphManager.getRoot()); + + // put all nodes to proper grid cells + for (i = 0; i < lNodes.length; i++) + { + nodeA = lNodes[i]; + this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); + } + +}; + +FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate){ + + if ((this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) || forceToNodeSurroundingUpdate) + { + var surrounding = new Set(); + nodeA.surrounding = new Array(); + var nodeB; + var grid = this.grid; + + for (var i = (nodeA.startX - 1); i < (nodeA.finishX + 2); i++) + { + for (var j = (nodeA.startY - 1); j < (nodeA.finishY + 2); j++) + { + if (!((i < 0) || (j < 0) || (i >= grid.length) || (j >= grid[0].length))) + { + for (var k = 0; k < grid[i][j].length; k++) { + nodeB = grid[i][j][k]; + + // If both nodes are not members of the same graph, + // or both nodes are the same, skip. + if ((nodeA.getOwner() != nodeB.getOwner()) || (nodeA == nodeB)) + { + continue; + } + + // check if the repulsion force between + // nodeA and nodeB has already been calculated + if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) + { + var distanceX = Math.abs(nodeA.getCenterX()-nodeB.getCenterX()) - + ((nodeA.getWidth()/2) + (nodeB.getWidth()/2)); + var distanceY = Math.abs(nodeA.getCenterY()-nodeB.getCenterY()) - + ((nodeA.getHeight()/2) + (nodeB.getHeight()/2)); + + // if the distance between nodeA and nodeB + // is less then calculation range + if ((distanceX <= this.repulsionRange) && (distanceY <= this.repulsionRange)) + { + //then add nodeB to surrounding of nodeA + surrounding.add(nodeB); + } + } + } + } + } + } + + nodeA.surrounding = [...surrounding]; + + } + for (i = 0; i < nodeA.surrounding.length; i++) + { + this.calcRepulsionForce(nodeA, nodeA.surrounding[i]); + } +}; + +FDLayout.prototype.calcRepulsionRange = function () { + return 0.0; +}; + +module.exports = FDLayout; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutConstants.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutConstants.js new file mode 100644 index 0000000000000000000000000000000000000000..35982be9a49f49c073080d4784877622b7545517 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutConstants.js @@ -0,0 +1,34 @@ +var LayoutConstants = require('../LayoutConstants'); + +function FDLayoutConstants() { +} + +//FDLayoutConstants inherits static props in LayoutConstants +for (var prop in LayoutConstants) { + FDLayoutConstants[prop] = LayoutConstants[prop]; +} + +FDLayoutConstants.MAX_ITERATIONS = 2500; + +FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; +FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; +FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0; +FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0; +FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; +FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; +FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; +FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; +FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; +FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000; +FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000; +FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0; +FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; +FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; +FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; +FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; +FDLayoutConstants.MIN_EDGE_LENGTH = 1; +FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; + +module.exports = FDLayoutConstants; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutEdge.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutEdge.js new file mode 100644 index 0000000000000000000000000000000000000000..b04ce28786fc4da46d2c97ee8a09dfebae26e6e0 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutEdge.js @@ -0,0 +1,18 @@ +var LEdge = require('../LEdge'); +var FDLayoutConstants = require('./FDLayoutConstants'); + +function FDLayoutEdge(source, target, vEdge) { + LEdge.call(this, source, target, vEdge); + + // Ideal length and elasticity value for this edge + this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + this.edgeElasticity = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; +} + +FDLayoutEdge.prototype = Object.create(LEdge.prototype); + +for (var prop in LEdge) { + FDLayoutEdge[prop] = LEdge[prop]; +} + +module.exports = FDLayoutEdge; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutNode.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutNode.js new file mode 100644 index 0000000000000000000000000000000000000000..aa0f8bae806a5f5fc755bf4b5bc930cd6f7b3b6a --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/fd/FDLayoutNode.js @@ -0,0 +1,47 @@ +var LNode = require('../LNode'); +var FDLayoutConstants = require('./FDLayoutConstants'); + +function FDLayoutNode(gm, loc, size, vNode) { + // alternative constructor is handled inside LNode + LNode.call(this, gm, loc, size, vNode); + + // Repulsion value of this node + this.nodeRepulsion = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + + //Spring, repulsion and gravitational forces acting on this node + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + //Amount by which this node is to be moved in this iteration + this.displacementX = 0; + this.displacementY = 0; + + //Start and finish grid coordinates that this node is fallen into + this.startX = 0; + this.finishX = 0; + this.startY = 0; + this.finishY = 0; + + //Geometric neighbors of this node + this.surrounding = []; +} + +FDLayoutNode.prototype = Object.create(LNode.prototype); + +for (var prop in LNode) { + FDLayoutNode[prop] = LNode[prop]; +} + +FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) +{ + this.startX = _startX; + this.finishX = _finishX; + this.startY = _startY; + this.finishY = _finishY; + +}; + +module.exports = FDLayoutNode; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/DimensionD.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/DimensionD.js new file mode 100644 index 0000000000000000000000000000000000000000..8632401eba8de3f019f3cec4d19f2b7bbec12ad5 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/DimensionD.js @@ -0,0 +1,30 @@ +function DimensionD(width, height) { + this.width = 0; + this.height = 0; + if (width !== null && height !== null) { + this.height = height; + this.width = width; + } +} + +DimensionD.prototype.getWidth = function () +{ + return this.width; +}; + +DimensionD.prototype.setWidth = function (width) +{ + this.width = width; +}; + +DimensionD.prototype.getHeight = function () +{ + return this.height; +}; + +DimensionD.prototype.setHeight = function (height) +{ + this.height = height; +}; + +module.exports = DimensionD; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Emitter.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Emitter.js new file mode 100644 index 0000000000000000000000000000000000000000..b4d4934cf849fb2b94d0f6a06221d3a26726ec6b --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Emitter.js @@ -0,0 +1,34 @@ +function Emitter(){ + this.listeners = []; +} + +var p = Emitter.prototype; + +p.addListener = function( event, callback ){ + this.listeners.push({ + event: event, + callback: callback + }); +}; + +p.removeListener = function( event, callback ){ + for( var i = this.listeners.length; i >= 0; i-- ){ + var l = this.listeners[i]; + + if( l.event === event && l.callback === callback ){ + this.listeners.splice( i, 1 ); + } + } +}; + +p.emit = function( event, data ){ + for( var i = 0; i < this.listeners.length; i++ ){ + var l = this.listeners[i]; + + if( event === l.event ){ + l.callback( data ); + } + } +}; + +module.exports = Emitter; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/HashMap.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/HashMap.js new file mode 100644 index 0000000000000000000000000000000000000000..0d8ad3e21900f92ad62433221325464f8e8ec80f --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/HashMap.js @@ -0,0 +1,30 @@ +var UniqueIDGeneretor = require('./UniqueIDGeneretor'); + +function HashMap() { + this.map = {}; + this.keys = []; +} + +HashMap.prototype.put = function (key, value) { + var theId = UniqueIDGeneretor.createID(key); + if (!this.contains(theId)) { + this.map[theId] = value; + this.keys.push(key); + } +}; + +HashMap.prototype.contains = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[key] != null; +}; + +HashMap.prototype.get = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[theId]; +}; + +HashMap.prototype.keySet = function () { + return this.keys; +}; + +module.exports = HashMap; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/HashSet.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/HashSet.js new file mode 100644 index 0000000000000000000000000000000000000000..84c23fc6cdff0e8b90aee8f3d2d71164f0f22422 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/HashSet.js @@ -0,0 +1,55 @@ +var UniqueIDGeneretor = require('./UniqueIDGeneretor'); + +function HashSet() { + this.set = {}; +} +; + +HashSet.prototype.add = function (obj) { + var theId = UniqueIDGeneretor.createID(obj); + if (!this.contains(theId)) + this.set[theId] = obj; +}; + +HashSet.prototype.remove = function (obj) { + delete this.set[UniqueIDGeneretor.createID(obj)]; +}; + +HashSet.prototype.clear = function () { + this.set = {}; +}; + +HashSet.prototype.contains = function (obj) { + return this.set[UniqueIDGeneretor.createID(obj)] == obj; +}; + +HashSet.prototype.isEmpty = function () { + return this.size() === 0; +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +//concats this.set to the given list +HashSet.prototype.addAllTo = function (list) { + var keys = Object.keys(this.set); + var length = keys.length; + for (var i = 0; i < length; i++) { + list.push(this.set[keys[i]]); + } +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +HashSet.prototype.addAll = function (list) { + var s = list.length; + for (var i = 0; i < s; i++) { + var v = list[i]; + this.add(v); + } +}; + +module.exports = HashSet; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/IGeometry.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/IGeometry.js new file mode 100644 index 0000000000000000000000000000000000000000..b7fec84bbc61d8621caccc5a14a89939db75ece7 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/IGeometry.js @@ -0,0 +1,621 @@ +/** + * This class maintains a list of static geometry related utility methods. + * + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +const Point = require('./Point'); + +function IGeometry() { + +} + +/** + * This method calculates *half* the amount in x and y directions of the two + * input rectangles needed to separate them keeping their respective + * positioning, and returns the result in the input array. An input + * separation buffer added to the amount in both directions. We assume that + * the two rectangles do intersect. + */ +IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) +{ + if (!rectA.intersects(rectB)) { + throw "assert failed"; + } + + let directions = new Array(2); + + this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); + + overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - + Math.max(rectA.x, rectB.x); + overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - + Math.max(rectA.y, rectB.y); + + // update the overlapping amounts for the following cases: + if ((rectA.getX() <= rectB.getX()) && (rectA.getRight() >= rectB.getRight())) + { + /* Case x.1: + * + * rectA + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectB + */ + overlapAmount[0] += Math.min((rectB.getX() - rectA.getX()), + (rectA.getRight() - rectB.getRight())); + } + else if ((rectB.getX() <= rectA.getX()) && (rectB.getRight() >= rectA.getRight())) + { + /* Case x.2: + * + * rectB + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectA + */ + overlapAmount[0] += Math.min((rectA.getX() - rectB.getX()), + (rectB.getRight() - rectA.getRight())); + } + if ((rectA.getY() <= rectB.getY()) && (rectA.getBottom() >= rectB.getBottom())) + { + /* Case y.1: + * ________ rectA + * | + * | + * ______|____ rectB + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min((rectB.getY() - rectA.getY()), + (rectA.getBottom() - rectB.getBottom())); + } + else if ((rectB.getY() <= rectA.getY()) && (rectB.getBottom() >= rectA.getBottom())) + { + /* Case y.2: + * ________ rectB + * | + * | + * ______|____ rectA + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min((rectA.getY() - rectB.getY()), + (rectB.getBottom() - rectA.getBottom())); + } + + // find slope of the line passes two centers + let slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / + (rectB.getCenterX() - rectA.getCenterX())); + // if centers are overlapped + if ((rectB.getCenterY() === rectA.getCenterY()) && + (rectB.getCenterX() === rectA.getCenterX())) + { + // assume the slope is 1 (45 degree) + slope = 1.0; + } + + let moveByY = slope * overlapAmount[0]; + let moveByX = overlapAmount[1] / slope; + if (overlapAmount[0] < moveByX) + { + moveByX = overlapAmount[0]; + } + else + { + moveByY = overlapAmount[1]; + } + // return half the amount so that if each rectangle is moved by these + // amounts in opposite directions, overlap will be resolved + overlapAmount[0] = -1 * directions[0] * ((moveByX / 2) + separationBuffer); + overlapAmount[1] = -1 * directions[1] * ((moveByY / 2) + separationBuffer); +}; + +/** + * This method decides the separation direction of overlapping nodes + * + * if directions[0] = -1, then rectA goes left + * if directions[0] = 1, then rectA goes right + * if directions[1] = -1, then rectA goes up + * if directions[1] = 1, then rectA goes down + */ +IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) +{ + if (rectA.getCenterX() < rectB.getCenterX()) + { + directions[0] = -1; + } + else + { + directions[0] = 1; + } + + if (rectA.getCenterY() < rectB.getCenterY()) + { + directions[1] = -1; + } + else + { + directions[1] = 1; + } +}; + +/** + * This method calculates the intersection (clipping) points of the two + * input rectangles with line segment defined by the centers of these two + * rectangles. The clipping points are saved in the input double array and + * whether or not the two rectangles overlap is returned. + */ +IGeometry.getIntersection2 = function(rectA, rectB, result) +{ + //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB + let p1x = rectA.getCenterX(); + let p1y = rectA.getCenterY(); + let p2x = rectB.getCenterX(); + let p2y = rectB.getCenterY(); + + //if two rectangles intersect, then clipping points are centers + if (rectA.intersects(rectB)) + { + result[0] = p1x; + result[1] = p1y; + result[2] = p2x; + result[3] = p2y; + return true; + } + //variables for rectA + let topLeftAx = rectA.getX(); + let topLeftAy = rectA.getY(); + let topRightAx = rectA.getRight(); + let bottomLeftAx = rectA.getX(); + let bottomLeftAy = rectA.getBottom(); + let bottomRightAx = rectA.getRight(); + let halfWidthA = rectA.getWidthHalf(); + let halfHeightA = rectA.getHeightHalf(); + //variables for rectB + let topLeftBx = rectB.getX(); + let topLeftBy = rectB.getY(); + let topRightBx = rectB.getRight(); + let bottomLeftBx = rectB.getX(); + let bottomLeftBy = rectB.getBottom(); + let bottomRightBx = rectB.getRight(); + let halfWidthB = rectB.getWidthHalf(); + let halfHeightB = rectB.getHeightHalf(); + + //flag whether clipping points are found + let clipPointAFound = false; + let clipPointBFound = false; + + // line is vertical + if (p1x === p2x) + { + if (p1y > p2y) + { + result[0] = p1x; + result[1] = topLeftAy; + result[2] = p2x; + result[3] = bottomLeftBy; + return false; + } + else if (p1y < p2y) + { + result[0] = p1x; + result[1] = bottomLeftAy; + result[2] = p2x; + result[3] = topLeftBy; + return false; + } + else + { + //not line, return null; + } + } + // line is horizontal + else if (p1y === p2y) + { + if (p1x > p2x) + { + result[0] = topLeftAx; + result[1] = p1y; + result[2] = topRightBx; + result[3] = p2y; + return false; + } + else if (p1x < p2x) + { + result[0] = topRightAx; + result[1] = p1y; + result[2] = topLeftBx; + result[3] = p2y; + return false; + } + else + { + //not valid line, return null; + } + } + else + { + //slopes of rectA's and rectB's diagonals + let slopeA = rectA.height / rectA.width; + let slopeB = rectB.height / rectB.width; + + //slope of line between center of rectA and center of rectB + let slopePrime = (p2y - p1y) / (p2x - p1x); + let cardinalDirectionA; + let cardinalDirectionB; + let tempPointAx; + let tempPointAy; + let tempPointBx; + let tempPointBy; + + //determine whether clipping point is the corner of nodeA + if ((-slopeA) === slopePrime) + { + if (p1x > p2x) + { + result[0] = bottomLeftAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } + else + { + result[0] = topRightAx; + result[1] = topLeftAy; + clipPointAFound = true; + } + } + else if (slopeA === slopePrime) + { + if (p1x > p2x) + { + result[0] = topLeftAx; + result[1] = topLeftAy; + clipPointAFound = true; + } + else + { + result[0] = bottomRightAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } + } + + //determine whether clipping point is the corner of nodeB + if ((-slopeB) === slopePrime) + { + if (p2x > p1x) + { + result[2] = bottomLeftBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } + else + { + result[2] = topRightBx; + result[3] = topLeftBy; + clipPointBFound = true; + } + } + else if (slopeB === slopePrime) + { + if (p2x > p1x) + { + result[2] = topLeftBx; + result[3] = topLeftBy; + clipPointBFound = true; + } + else + { + result[2] = bottomRightBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } + } + + //if both clipping points are corners + if (clipPointAFound && clipPointBFound) + { + return false; + } + + //determine Cardinal Direction of rectangles + if (p1x > p2x) + { + if (p1y > p2y) + { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); + } + else + { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); + } + } + else + { + if (p1y > p2y) + { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); + } + else + { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); + } + } + //calculate clipping Point if it is not found before + if (!clipPointAFound) + { + switch (cardinalDirectionA) + { + case 1: + tempPointAy = topLeftAy; + tempPointAx = p1x + (-halfHeightA) / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 2: + tempPointAx = bottomRightAx; + tempPointAy = p1y + halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 3: + tempPointAy = bottomLeftAy; + tempPointAx = p1x + halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 4: + tempPointAx = bottomLeftAx; + tempPointAy = p1y + (-halfWidthA) * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + } + } + if (!clipPointBFound) + { + switch (cardinalDirectionB) + { + case 1: + tempPointBy = topLeftBy; + tempPointBx = p2x + (-halfHeightB) / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 2: + tempPointBx = bottomRightBx; + tempPointBy = p2y + halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 3: + tempPointBy = bottomLeftBy; + tempPointBx = p2x + halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 4: + tempPointBx = bottomLeftBx; + tempPointBy = p2y + (-halfWidthB) * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + } + } + } + return false; +}; + +/** + * This method returns in which cardinal direction does input point stays + * 1: North + * 2: East + * 3: South + * 4: West + */ +IGeometry.getCardinalDirection = function (slope, slopePrime, line) +{ + if (slope > slopePrime) + { + return line; + } + else + { + return 1 + line % 4; + } +}; + +/** + * This method calculates the intersection of the two lines defined by + * point pairs (s1,s2) and (f1,f2). + */ +IGeometry.getIntersection = function(s1, s2, f1, f2) +{ + if (f2 == null) { + return this.getIntersection2(s1, s2, f1); + } + + let x1 = s1.x; + let y1 = s1.y; + let x2 = s2.x; + let y2 = s2.y; + let x3 = f1.x; + let y3 = f1.y; + let x4 = f2.x; + let y4 = f2.y; + let x, y; // intersection point + let a1, a2, b1, b2, c1, c2; // coefficients of line eqns. + let denom; + + a1 = y2 - y1; + b1 = x1 - x2; + c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 } + + a2 = y4 - y3; + b2 = x3 - x4; + c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 } + + denom = a1 * b2 - a2 * b1; + + if (denom === 0) + { + return null; + } + + x = (b1 * c2 - b2 * c1) / denom; + y = (a2 * c1 - a1 * c2) / denom; + + return new Point(x, y); +}; + +/** + * This method finds and returns the angle of the vector from the + x-axis + * in clockwise direction (compatible w/ Java coordinate system!). + */ +IGeometry.angleOfVector = function(Cx, Cy, Nx, Ny) +{ + let C_angle; + + if (Cx !== Nx) + { + C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); + + if (Nx < Cx) + { + C_angle += Math.PI; + } + else if (Ny < Cy) + { + C_angle += this.TWO_PI; + } + } + else if (Ny < Cy) + { + C_angle = this.ONE_AND_HALF_PI; // 270 degrees + } + else + { + C_angle = this.HALF_PI; // 90 degrees + } + + return C_angle; +}; + + +/** + * This method checks whether the given two line segments (one with point + * p1 and p2, the other with point p3 and p4) intersect at a point other + * than these points. + */ +IGeometry.doIntersect = function(p1, p2, p3, p4){ + let a = p1.x; + let b = p1.y; + let c = p2.x; + let d = p2.y; + let p = p3.x; + let q = p3.y; + let r = p4.x; + let s = p4.y; + let det = (c - a) * (s - q) - (r - p) * (d - b); + + if (det === 0) { + return false; + } else { + let lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; + let gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det; + return (0 < lambda && lambda < 1) && (0 < gamma && gamma < 1); + } +}; + +/** + * This method checks and calculates the intersection of + * a line segment and a circle. + */ +IGeometry.findCircleLineIntersections = function(Ex, Ey, Lx, Ly, Cx, Cy, r) { + + // E is the starting point of the ray, + // L is the end point of the ray, + // C is the center of sphere you're testing against + // r is the radius of that sphere + + // Compute: + // d = L - E ( Direction vector of ray, from start to end ) + // f = E - C ( Vector from center sphere to ray start ) + + // Then the intersection is found by.. + // P = E + t * d + // This is a parametric equation: + // Px = Ex + tdx + // Py = Ey + tdy + + // get a, b, c values + let a = (Lx-Ex)*(Lx-Ex) + (Ly-Ey)*(Ly-Ey); + let b = 2*((Ex-Cx)*(Lx-Ex)+(Ey-Cy)*(Ly-Ey)) ; + let c = (Ex-Cx)*(Ex-Cx)+(Ey-Cy)*(Ey-Cy) - r*r ; + + // get discriminant + var disc = b*b - 4 * a * c; + if (disc >= 0) { + // insert into quadratic formula + let t1 = (-b + Math.sqrt(b*b - 4 * a * c)) / (2 * a); + let t2 = (-b - Math.sqrt(b*b - 4 * a * c)) / (2 * a); + let intersections = null; + if( t1 >= 0 && t1 <= 1 ) + { + // t1 is the intersection, and it's closer than t2 + // (since t1 uses -b - discriminant) + // Impale, Poke + return [t1]; + } + + // here t1 didn't intersect so we are either started + // inside the sphere or completely past it + if( t2 >= 0 && t2 <= 1 ) + { + // ExitWound + return [t2] ; + } + + return intersections; + } + else + return null; +}; + +// ----------------------------------------------------------------------------- +// Section: Class Constants +// ----------------------------------------------------------------------------- +/** + * Some useful pre-calculated constants + */ +IGeometry.HALF_PI = 0.5 * Math.PI; +IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; +IGeometry.TWO_PI = 2.0 * Math.PI; +IGeometry.THREE_PI = 3.0 * Math.PI; + + +module.exports = IGeometry; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/IMath.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/IMath.js new file mode 100644 index 0000000000000000000000000000000000000000..c9dd5da9d4717be284f30292ff3cac97089be8fd --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/IMath.js @@ -0,0 +1,30 @@ +function IMath() { +} + +/** + * This method returns the sign of the input value. + */ +IMath.sign = function (value) { + if (value > 0) + { + return 1; + } + else if (value < 0) + { + return -1; + } + else + { + return 0; + } +}; + +IMath.floor = function (value) { + return value < 0 ? Math.ceil(value) : Math.floor(value); +}; + +IMath.ceil = function (value) { + return value < 0 ? Math.floor(value) : Math.ceil(value); +}; + +module.exports = IMath; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Integer.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Integer.js new file mode 100644 index 0000000000000000000000000000000000000000..e8e755ca89faea0fe9ab48fd19991315ed809809 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Integer.js @@ -0,0 +1,7 @@ +function Integer() { +} + +Integer.MAX_VALUE = 2147483647; +Integer.MIN_VALUE = -2147483648; + +module.exports = Integer; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/LinkedList.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/LinkedList.js new file mode 100644 index 0000000000000000000000000000000000000000..3a7cf9cc6e60b3b4a3caa523585a3962cc5eee6c --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/LinkedList.js @@ -0,0 +1,130 @@ +const nodeFrom = value => ({ value, next: null, prev: null }); + +const add = ( prev, node, next, list ) => { + if( prev !== null ){ + prev.next = node; + } else { + list.head = node; + } + + if( next !== null ){ + next.prev = node; + } else { + list.tail = node; + } + + node.prev = prev; + node.next = next; + + list.length++; + + return node; +}; + +const remove = ( node, list ) => { + let { prev, next } = node; + + if( prev !== null ){ + prev.next = next; + } else { + list.head = next; + } + + if( next !== null ){ + next.prev = prev; + } else { + list.tail = prev; + } + + node.prev = node.next = null; + + list.length--; + + return node; +}; + +class LinkedList { + constructor( vals ){ + this.length = 0; + this.head = null; + this.tail = null; + + if( vals != null ){ + vals.forEach( v => this.push(v) ); + } + } + + size(){ + return this.length; + } + + insertBefore( val, otherNode ){ + return add( otherNode.prev, nodeFrom(val), otherNode, this ); + } + + insertAfter( val, otherNode ){ + return add( otherNode, nodeFrom(val), otherNode.next, this ); + } + + insertNodeBefore( newNode, otherNode ){ + return add( otherNode.prev, newNode, otherNode, this ); + } + + insertNodeAfter( newNode, otherNode ){ + return add( otherNode, newNode, otherNode.next, this ); + } + + push( val ){ + return add( this.tail, nodeFrom(val), null, this ); + } + + unshift( val ){ + return add( null, nodeFrom(val), this.head, this ); + } + + remove( node ){ + return remove( node, this ); + } + + pop(){ + return remove( this.tail, this ).value; + } + + popNode(){ + return remove( this.tail, this ); + } + + shift(){ + return remove( this.head, this ).value; + } + + shiftNode(){ + return remove( this.head, this ); + } + + get_object_at( index ){ + if(index <= this.length()){ + var i = 1; + var current = this.head; + while(i < index){ + current = current.next; + i++; + } + return current.value; + } + } + + set_object_at( index, value){ + if(index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + current.value = value; + } + } +} + +module.exports = LinkedList; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Matrix.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Matrix.js new file mode 100644 index 0000000000000000000000000000000000000000..aee02206f26bfefeda0043cf54a211079c99e9b1 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Matrix.js @@ -0,0 +1,164 @@ +// Some matrix (1d and 2d array) operations +function Matrix() { +} + +/** + * matrix multiplication + * array1, array2 and result are 2d arrays + */ +Matrix.multMat = function(array1, array2){ + let result = []; + + for(let i = 0; i < array1.length; i++){ + result[i] = []; + for(let j = 0; j < array2[0].length; j++){ + result[i][j] = 0; + for(let k = 0; k < array1[0].length; k++){ + result[i][j] += array1[i][k] * array2[k][j]; + } + } + } + return result; +}; + +/** + * matrix transpose + * array and result are 2d arrays + */ +Matrix.transpose = function(array){ + let result = []; + + for(let i = 0; i < array[0].length; i++){ + result[i] = []; + for(let j = 0; j < array.length; j++){ + result[i][j] = array[j][i]; + } + } + + return result; +}; + +/** + * multiply array with constant + * array and result are 1d arrays + */ +Matrix.multCons = function(array, constant){ + let result = []; + + for(let i = 0; i < array.length; i++){ + result[i] = array[i] * constant; + } + + return result; +}; + +/** + * substract two arrays + * array1, array2 and result are 1d arrays + */ +Matrix.minusOp = function(array1, array2){ + let result = []; + + for(let i = 0; i < array1.length; i++){ + result[i] = array1[i] - array2[i]; + } + + return result; +}; + +/** + * dot product of two arrays with same size + * array1 and array2 are 1d arrays + */ +Matrix.dotProduct = function(array1, array2){ + let product = 0; + + for(let i = 0; i < array1.length; i++){ + product += array1[i] * array2[i]; + } + + return product; +}; + +/** + * magnitude of an array + * array is 1d array + */ +Matrix.mag = function(array){ + return Math.sqrt(this.dotProduct(array, array)); +}; + +/** + * normalization of an array + * array and result are 1d array + */ +Matrix.normalize = function(array){ + let result = []; + let magnitude = this.mag(array); + + for(let i = 0; i < array.length; i++){ + result[i] = array[i] / magnitude; + } + + return result; +}; + +/** + * multiply an array with centering matrix + * array and result are 1d array + */ +Matrix.multGamma = function(array){ + let result = []; + let sum = 0; + + for(let i = 0; i < array.length; i++){ + sum += array[i]; + } + + sum *= (-1)/array.length; + + for(let i = 0; i < array.length; i++){ + result[i] = sum + array[i]; + } + return result; +}; + +/** + * a special matrix multiplication + * result = 0.5 * C * INV * C^T * array + * array and result are 1d, C and INV are 2d arrays + */ +Matrix.multL = function(array, C, INV){ + let result = []; + let temp1 = []; + let temp2 = []; + + // multiply by C^T + for(let i = 0; i < C[0].length; i++){ + let sum = 0; + for(let j = 0; j < C.length; j++){ + sum += -0.5 * C[j][i] * array[j]; + } + temp1[i] = sum; + } + // multiply the result by INV + for(let i = 0; i < INV.length; i++){ + let sum = 0; + for(let j = 0; j < INV.length; j++){ + sum += INV[i][j] * temp1[j]; + } + temp2[i] = sum; + } + // multiply the result by C + for(let i = 0; i < C.length; i++){ + let sum = 0; + for(let j = 0; j < C[0].length; j++){ + sum += C[i][j] * temp2[j]; + } + result[i] = sum; + } + + return result; +}; + +module.exports = Matrix; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Point.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Point.js new file mode 100644 index 0000000000000000000000000000000000000000..0e905fc982a175bbb5f681ebcf4f4103f0537188 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Point.js @@ -0,0 +1,73 @@ +/* + *This class is the javascript implementation of the Point.java class in jdk + */ +function Point(x, y, p) { + this.x = null; + this.y = null; + if (x == null && y == null && p == null) { + this.x = 0; + this.y = 0; + } + else if (typeof x == 'number' && typeof y == 'number' && p == null) { + this.x = x; + this.y = y; + } + else if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.x = p.x; + this.y = p.y; + } +} + +Point.prototype.getX = function () { + return this.x; +} + +Point.prototype.getY = function () { + return this.y; +} + +Point.prototype.getLocation = function () { + return new Point(this.x, this.y); +} + +Point.prototype.setLocation = function (x, y, p) { + if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.setLocation(p.x, p.y); + } + else if (typeof x == 'number' && typeof y == 'number' && p == null) { + //if both parameters are integer just move (x,y) location + if (parseInt(x) == x && parseInt(y) == y) { + this.move(x, y); + } + else { + this.x = Math.floor(x + 0.5); + this.y = Math.floor(y + 0.5); + } + } +} + +Point.prototype.move = function (x, y) { + this.x = x; + this.y = y; +} + +Point.prototype.translate = function (dx, dy) { + this.x += dx; + this.y += dy; +} + +Point.prototype.equals = function (obj) { + if (obj.constructor.name == "Point") { + var pt = obj; + return (this.x == pt.x) && (this.y == pt.y); + } + return this == obj; +} + +Point.prototype.toString = function () { + return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; +} + +module.exports = Point; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/PointD.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/PointD.js new file mode 100644 index 0000000000000000000000000000000000000000..4fc34ec4e7dc32fe0d1d639e9bbc2c45f93e0fa0 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/PointD.js @@ -0,0 +1,48 @@ +function PointD(x, y) { + if (x == null && y == null) { + this.x = 0; + this.y = 0; + } else { + this.x = x; + this.y = y; + } +} + +PointD.prototype.getX = function () +{ + return this.x; +}; + +PointD.prototype.getY = function () +{ + return this.y; +}; + +PointD.prototype.setX = function (x) +{ + this.x = x; +}; + +PointD.prototype.setY = function (y) +{ + this.y = y; +}; + +PointD.prototype.getDifference = function (pt) +{ + return new DimensionD(this.x - pt.x, this.y - pt.y); +}; + +PointD.prototype.getCopy = function () +{ + return new PointD(this.x, this.y); +}; + +PointD.prototype.translate = function (dim) +{ + this.x += dim.width; + this.y += dim.height; + return this; +}; + +module.exports = PointD; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Quicksort.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Quicksort.js new file mode 100644 index 0000000000000000000000000000000000000000..cee9ecb96980084a928dc550e8dafd9782ecee39 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Quicksort.js @@ -0,0 +1,77 @@ +/** + * A classic Quicksort algorithm with Hoare's partition + * - Works also on LinkedList objects + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +const LinkedList = require('./LinkedList.js'); + +class Quicksort { + constructor(A, compareFunction) { + if(compareFunction !== null || compareFunction !== undefined) + this.compareFunction = this._defaultCompareFunction; + + let length; + if( A instanceof LinkedList ) + length = A.size(); + else + length = A.length; + + this._quicksort(A, 0, length - 1); + } + + _quicksort(A, p, r){ + if(p < r) { + let q = this._partition(A, p, r); + this._quicksort(A, p, q); + this._quicksort(A, q + 1, r); + } + } + + _partition(A, p, r){ + let x = this._get(A, p); + let i = p; + let j = r; + while(true){ + while (this.compareFunction(x, this._get(A, j))) + j--; + while (this.compareFunction(this._get(A, i), x)) + i++; + + if (i < j){ + this._swap(A, i, j); + i++; + j--; + } + else + return j; + } + } + + _get(object, index){ + if( object instanceof LinkedList) + return object.get_object_at(index); + else + return object[index]; + } + + _set(object, index, value){ + if( object instanceof LinkedList) + object.set_object_at(index, value); + else + object[index] = value; + } + + _swap(A, i, j){ + let temp = this._get(A, i); + this._set(A, i, this._get(A, j)); + this._set(A, j, temp); + } + + _defaultCompareFunction(a, b){ + return b > a; + } +} + +module.exports = Quicksort; \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/RandomSeed.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/RandomSeed.js new file mode 100644 index 0000000000000000000000000000000000000000..f71f40ff7ec10ea75fc5efe67edfa73c7d8fa952 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/RandomSeed.js @@ -0,0 +1,12 @@ +function RandomSeed() { +} +// adapted from: https://stackoverflow.com/a/19303725 +RandomSeed.seed = 1; +RandomSeed.x = 0; + +RandomSeed.nextDouble = function () { + RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000; + return RandomSeed.x - Math.floor(RandomSeed.x); +}; + +module.exports = RandomSeed; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/RectangleD.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/RectangleD.js new file mode 100644 index 0000000000000000000000000000000000000000..d36e3571ddb424b495258bfdf2b611070b4b5c8c --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/RectangleD.js @@ -0,0 +1,130 @@ +function RectangleD(x, y, width, height) { + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + + if (x != null && y != null && width != null && height != null) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } +} + +RectangleD.prototype.getX = function () +{ + return this.x; +}; + +RectangleD.prototype.setX = function (x) +{ + this.x = x; +}; + +RectangleD.prototype.getY = function () +{ + return this.y; +}; + +RectangleD.prototype.setY = function (y) +{ + this.y = y; +}; + +RectangleD.prototype.getWidth = function () +{ + return this.width; +}; + +RectangleD.prototype.setWidth = function (width) +{ + this.width = width; +}; + +RectangleD.prototype.getHeight = function () +{ + return this.height; +}; + +RectangleD.prototype.setHeight = function (height) +{ + this.height = height; +}; + +RectangleD.prototype.getRight = function () +{ + return this.x + this.width; +}; + +RectangleD.prototype.getBottom = function () +{ + return this.y + this.height; +}; + +RectangleD.prototype.intersects = function (a) +{ + if (this.getRight() < a.x) + { + return false; + } + + if (this.getBottom() < a.y) + { + return false; + } + + if (a.getRight() < this.x) + { + return false; + } + + if (a.getBottom() < this.y) + { + return false; + } + + return true; +}; + +RectangleD.prototype.getCenterX = function () +{ + return this.x + this.width / 2; +}; + +RectangleD.prototype.getMinX = function () +{ + return this.getX(); +}; + +RectangleD.prototype.getMaxX = function () +{ + return this.getX() + this.width; +}; + +RectangleD.prototype.getCenterY = function () +{ + return this.y + this.height / 2; +}; + +RectangleD.prototype.getMinY = function () +{ + return this.getY(); +}; + +RectangleD.prototype.getMaxY = function () +{ + return this.getY() + this.height; +}; + +RectangleD.prototype.getWidthHalf = function () +{ + return this.width / 2; +}; + +RectangleD.prototype.getHeightHalf = function () +{ + return this.height / 2; +}; + +module.exports = RectangleD; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/SVD.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/SVD.js new file mode 100644 index 0000000000000000000000000000000000000000..2029bcc80cf1c1b2e12a5f6d2f548f43ceaa7168 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/SVD.js @@ -0,0 +1,639 @@ +// Singular Value Decomposition implementation +function SVD() { +}; + +/* Below singular value decomposition (svd) code including hypot function is adopted from https://github.com/dragonfly-ai/JamaJS + Some changes are applied to make the code compatible with the fcose code and to make it independent from Jama. + Input matrix is changed to a 2D array instead of Jama matrix. Matrix dimensions are taken according to 2D array instead of using Jama functions. + An object that includes singular value components is created for return. + The types of input parameters of the hypot function are removed. + let is used instead of var for the variable initialization. +*/ +/* + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +SVD.svd = function (A) { + this.U = null; + this.V = null; + this.s = null; + this.m = 0; + this.n = 0; + this.m = A.length; + this.n = A[0].length; + let nu = Math.min(this.m, this.n); + this.s = (function (s) { + let a = []; + while (s-- > 0) + a.push(0); + return a; + })(Math.min(this.m + 1, this.n)); + this.U = (function (dims) { + let allocate = function (dims) { + if (dims.length == 0) { + return 0; + } else { + let array = []; + for (let i = 0; i < dims[0]; i++) { + array.push(allocate(dims.slice(1))); + } + return array; + } + }; + return allocate(dims); + })([this.m, nu]); + this.V = (function (dims) { + let allocate = function (dims) { + if (dims.length == 0) { + return 0; + } else { + let array = []; + for (let i = 0; i < dims[0]; i++) { + array.push(allocate(dims.slice(1))); + } + return array; + } + }; + return allocate(dims); + })([this.n, this.n]); + let e = (function (s) { + let a = []; + while (s-- > 0) + a.push(0); + return a; + })(this.n); + let work = (function (s) { + let a = []; + while (s-- > 0) + a.push(0); + return a; + })(this.m); + let wantu = true; + let wantv = true; + let nct = Math.min(this.m - 1, this.n); + let nrt = Math.max(0, Math.min(this.n - 2, this.m)); + for (let k = 0; k < Math.max(nct, nrt); k++) { + if (k < nct) { + this.s[k] = 0; + for (let i = k; i < this.m; i++) { + this.s[k] = SVD.hypot(this.s[k], A[i][k]); + } + ; + if (this.s[k] !== 0.0) { + if (A[k][k] < 0.0) { + this.s[k] = -this.s[k]; + } + for (let i = k; i < this.m; i++) { + A[i][k] /= this.s[k]; + } + ; + A[k][k] += 1.0; + } + this.s[k] = -this.s[k]; + } + for (let j = k + 1; j < this.n; j++) { + if ((function (lhs, rhs) { + return lhs && rhs; + })((k < nct), (this.s[k] !== 0.0))) { + let t = 0; + for (let i = k; i < this.m; i++) { + t += A[i][k] * A[i][j]; + } + ; + t = -t / A[k][k]; + for (let i = k; i < this.m; i++) { + A[i][j] += t * A[i][k]; + } + ; + } + e[j] = A[k][j]; + } + ; + if ((function (lhs, rhs) { + return lhs && rhs; + })(wantu, (k < nct))) { + for (let i = k; i < this.m; i++) { + this.U[i][k] = A[i][k]; + } + ; + } + if (k < nrt) { + e[k] = 0; + for (let i = k + 1; i < this.n; i++) { + e[k] = SVD.hypot(e[k], e[i]); + } + ; + if (e[k] !== 0.0) { + if (e[k + 1] < 0.0) { + e[k] = -e[k]; + } + for (let i = k + 1; i < this.n; i++) { + e[i] /= e[k]; + } + ; + e[k + 1] += 1.0; + } + e[k] = -e[k]; + if ((function (lhs, rhs) { + return lhs && rhs; + })((k + 1 < this.m), (e[k] !== 0.0))) { + for (let i = k + 1; i < this.m; i++) { + work[i] = 0.0; + } + ; + for (let j = k + 1; j < this.n; j++) { + for (let i = k + 1; i < this.m; i++) { + work[i] += e[j] * A[i][j]; + } + ; + } + ; + for (let j = k + 1; j < this.n; j++) { + let t = -e[j] / e[k + 1]; + for (let i = k + 1; i < this.m; i++) { + A[i][j] += t * work[i]; + } + ; + } + ; + } + if (wantv) { + for (let i = k + 1; i < this.n; i++) { + this.V[i][k] = e[i]; + }; + } + } + }; + let p = Math.min(this.n, this.m + 1); + if (nct < this.n) { + this.s[nct] = A[nct][nct]; + } + if (this.m < p) { + this.s[p - 1] = 0.0; + } + if (nrt + 1 < p) { + e[nrt] = A[nrt][p - 1]; + } + e[p - 1] = 0.0; + if (wantu) { + for (let j = nct; j < nu; j++) { + for (let i = 0; i < this.m; i++) { + this.U[i][j] = 0.0; + } + ; + this.U[j][j] = 1.0; + }; + for (let k = nct - 1; k >= 0; k--) { + if (this.s[k] !== 0.0) { + for (let j = k + 1; j < nu; j++) { + let t = 0; + for (let i = k; i < this.m; i++) { + t += this.U[i][k] * this.U[i][j]; + }; + t = -t / this.U[k][k]; + for (let i = k; i < this.m; i++) { + this.U[i][j] += t * this.U[i][k]; + }; + }; + for (let i = k; i < this.m; i++) { + this.U[i][k] = -this.U[i][k]; + }; + this.U[k][k] = 1.0 + this.U[k][k]; + for (let i = 0; i < k - 1; i++) { + this.U[i][k] = 0.0; + }; + } else { + for (let i = 0; i < this.m; i++) { + this.U[i][k] = 0.0; + }; + this.U[k][k] = 1.0; + } + }; + } + if (wantv) { + for (let k = this.n - 1; k >= 0; k--) { + if ((function (lhs, rhs) { + return lhs && rhs; + })((k < nrt), (e[k] !== 0.0))) { + for (let j = k + 1; j < nu; j++) { + let t = 0; + for (let i = k + 1; i < this.n; i++) { + t += this.V[i][k] * this.V[i][j]; + }; + t = -t / this.V[k + 1][k]; + for (let i = k + 1; i < this.n; i++) { + this.V[i][j] += t * this.V[i][k]; + }; + }; + } + for (let i = 0; i < this.n; i++) { + this.V[i][k] = 0.0; + }; + this.V[k][k] = 1.0; + }; + } + let pp = p - 1; + let iter = 0; + let eps = Math.pow(2.0, -52.0); + let tiny = Math.pow(2.0, -966.0); + while ((p > 0)) { + let k = void 0; + let kase = void 0; + for (k = p - 2; k >= -1; k--) { + if (k === -1) { + break; + } + if (Math.abs(e[k]) <= tiny + eps * (Math.abs(this.s[k]) + Math.abs(this.s[k + 1]))) { + e[k] = 0.0; + break; + } + }; + if (k === p - 2) { + kase = 4; + } else { + let ks = void 0; + for (ks = p - 1; ks >= k; ks--) { + if (ks === k) { + break; + } + let t = (ks !== p ? Math.abs(e[ks]) : 0.0) + (ks !== k + 1 ? Math.abs(e[ks - 1]) : 0.0); + if (Math.abs(this.s[ks]) <= tiny + eps * t) { + this.s[ks] = 0.0; + break; + } + }; + if (ks === k) { + kase = 3; + } else if (ks === p - 1) { + kase = 1; + } else { + kase = 2; + k = ks; + } + } + k++; + switch ((kase)) { + case 1: + { + let f = e[p - 2]; + e[p - 2] = 0.0; + for (let j = p - 2; j >= k; j--) { + let t = SVD.hypot(this.s[j], f); + let cs = this.s[j] / t; + let sn = f / t; + this.s[j] = t; + if (j !== k) { + f = -sn * e[j - 1]; + e[j - 1] = cs * e[j - 1]; + } + if (wantv) { + for (let i = 0; i < this.n; i++) { + t = cs * this.V[i][j] + sn * this.V[i][p - 1]; + this.V[i][p - 1] = -sn * this.V[i][j] + cs * this.V[i][p - 1]; + this.V[i][j] = t; + }; + } + }; + }; + break; + case 2: + { + let f = e[k - 1]; + e[k - 1] = 0.0; + for (let j = k; j < p; j++) { + let t = SVD.hypot(this.s[j], f); + let cs = this.s[j] / t; + let sn = f / t; + this.s[j] = t; + f = -sn * e[j]; + e[j] = cs * e[j]; + if (wantu) { + for (let i = 0; i < this.m; i++) { + t = cs * this.U[i][j] + sn * this.U[i][k - 1]; + this.U[i][k - 1] = -sn * this.U[i][j] + cs * this.U[i][k - 1]; + this.U[i][j] = t; + }; + } + }; + }; + break; + case 3: + { + let scale = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[p - 1]), Math.abs(this.s[p - 2])), Math.abs(e[p - 2])), Math.abs(this.s[k])), Math.abs(e[k])); + let sp = this.s[p - 1] / scale; + let spm1 = this.s[p - 2] / scale; + let epm1 = e[p - 2] / scale; + let sk = this.s[k] / scale; + let ek = e[k] / scale; + let b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2.0; + let c = (sp * epm1) * (sp * epm1); + let shift = 0.0; + if ((function (lhs, rhs) { + return lhs || rhs; + })((b !== 0.0), (c !== 0.0))) { + shift = Math.sqrt(b * b + c); + if (b < 0.0) { + shift = -shift; + } + shift = c / (b + shift); + } + let f = (sk + sp) * (sk - sp) + shift; + let g = sk * ek; + for (let j = k; j < p - 1; j++) { + let t = SVD.hypot(f, g); + let cs = f / t; + let sn = g / t; + if (j !== k) { + e[j - 1] = t; + } + f = cs * this.s[j] + sn * e[j]; + e[j] = cs * e[j] - sn * this.s[j]; + g = sn * this.s[j + 1]; + this.s[j + 1] = cs * this.s[j + 1]; + if (wantv) { + for (let i = 0; i < this.n; i++) { + t = cs * this.V[i][j] + sn * this.V[i][j + 1]; + this.V[i][j + 1] = -sn * this.V[i][j] + cs * this.V[i][j + 1]; + this.V[i][j] = t; + }; + } + t = SVD.hypot(f, g); + cs = f / t; + sn = g / t; + this.s[j] = t; + f = cs * e[j] + sn * this.s[j + 1]; + this.s[j + 1] = -sn * e[j] + cs * this.s[j + 1]; + g = sn * e[j + 1]; + e[j + 1] = cs * e[j + 1]; + if (wantu && (j < this.m - 1)) { + for (let i = 0; i < this.m; i++) { + t = cs * this.U[i][j] + sn * this.U[i][j + 1]; + this.U[i][j + 1] = -sn * this.U[i][j] + cs * this.U[i][j + 1]; + this.U[i][j] = t; + }; + } + }; + e[p - 2] = f; + iter = iter + 1; + }; + break; + case 4: + { + if (this.s[k] <= 0.0) { + this.s[k] = (this.s[k] < 0.0 ? -this.s[k] : 0.0); + if (wantv) { + for (let i = 0; i <= pp; i++) { + this.V[i][k] = -this.V[i][k]; + }; + } + } + while ((k < pp)) { + if (this.s[k] >= this.s[k + 1]) { + break; + } + let t = this.s[k]; + this.s[k] = this.s[k + 1]; + this.s[k + 1] = t; + if (wantv && (k < this.n - 1)) { + for (let i = 0; i < this.n; i++) { + t = this.V[i][k + 1]; + this.V[i][k + 1] = this.V[i][k]; + this.V[i][k] = t; + }; + } + if (wantu && (k < this.m - 1)) { + for (let i = 0; i < this.m; i++) { + t = this.U[i][k + 1]; + this.U[i][k + 1] = this.U[i][k]; + this.U[i][k] = t; + }; + } + k++; + }; + iter = 0; + p--; + }; + break; + } + }; + let result = {U: this.U, V: this.V, S: this.s}; + return result; +}; + +// sqrt(a^2 + b^2) without under/overflow. +SVD.hypot = function(a, b) { + let r; + if (Math.abs(a) > Math.abs(b)) { + r = b/a; + r = Math.abs(a)*Math.sqrt(1+r*r); + } else if (b != 0) { + r = a/b; + r = Math.abs(b)*Math.sqrt(1+r*r); + } else { + r = 0.0; + } + return r; +}; + +module.exports = SVD; + diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Transform.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Transform.js new file mode 100644 index 0000000000000000000000000000000000000000..fc7c120f36d32c97404f9915e255067e2a6db553 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/Transform.js @@ -0,0 +1,157 @@ +var PointD = require('./PointD'); + +function Transform(x, y) { + this.lworldOrgX = 0.0; + this.lworldOrgY = 0.0; + this.ldeviceOrgX = 0.0; + this.ldeviceOrgY = 0.0; + this.lworldExtX = 1.0; + this.lworldExtY = 1.0; + this.ldeviceExtX = 1.0; + this.ldeviceExtY = 1.0; +} + +Transform.prototype.getWorldOrgX = function () +{ + return this.lworldOrgX; +} + +Transform.prototype.setWorldOrgX = function (wox) +{ + this.lworldOrgX = wox; +} + +Transform.prototype.getWorldOrgY = function () +{ + return this.lworldOrgY; +} + +Transform.prototype.setWorldOrgY = function (woy) +{ + this.lworldOrgY = woy; +} + +Transform.prototype.getWorldExtX = function () +{ + return this.lworldExtX; +} + +Transform.prototype.setWorldExtX = function (wex) +{ + this.lworldExtX = wex; +} + +Transform.prototype.getWorldExtY = function () +{ + return this.lworldExtY; +} + +Transform.prototype.setWorldExtY = function (wey) +{ + this.lworldExtY = wey; +} + +/* Device related */ + +Transform.prototype.getDeviceOrgX = function () +{ + return this.ldeviceOrgX; +} + +Transform.prototype.setDeviceOrgX = function (dox) +{ + this.ldeviceOrgX = dox; +} + +Transform.prototype.getDeviceOrgY = function () +{ + return this.ldeviceOrgY; +} + +Transform.prototype.setDeviceOrgY = function (doy) +{ + this.ldeviceOrgY = doy; +} + +Transform.prototype.getDeviceExtX = function () +{ + return this.ldeviceExtX; +} + +Transform.prototype.setDeviceExtX = function (dex) +{ + this.ldeviceExtX = dex; +} + +Transform.prototype.getDeviceExtY = function () +{ + return this.ldeviceExtY; +} + +Transform.prototype.setDeviceExtY = function (dey) +{ + this.ldeviceExtY = dey; +} + +Transform.prototype.transformX = function (x) +{ + var xDevice = 0.0; + var worldExtX = this.lworldExtX; + if (worldExtX != 0.0) + { + xDevice = this.ldeviceOrgX + + ((x - this.lworldOrgX) * this.ldeviceExtX / worldExtX); + } + + return xDevice; +} + +Transform.prototype.transformY = function (y) +{ + var yDevice = 0.0; + var worldExtY = this.lworldExtY; + if (worldExtY != 0.0) + { + yDevice = this.ldeviceOrgY + + ((y - this.lworldOrgY) * this.ldeviceExtY / worldExtY); + } + + + return yDevice; +} + +Transform.prototype.inverseTransformX = function (x) +{ + var xWorld = 0.0; + var deviceExtX = this.ldeviceExtX; + if (deviceExtX != 0.0) + { + xWorld = this.lworldOrgX + + ((x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX); + } + + + return xWorld; +} + +Transform.prototype.inverseTransformY = function (y) +{ + var yWorld = 0.0; + var deviceExtY = this.ldeviceExtY; + if (deviceExtY != 0.0) + { + yWorld = this.lworldOrgY + + ((y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY); + } + return yWorld; +} + +Transform.prototype.inverseTransformPoint = function (inPoint) +{ + var outPoint = + new PointD(this.inverseTransformX(inPoint.x), + this.inverseTransformY(inPoint.y)); + return outPoint; +} + +module.exports = Transform; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/UniqueIDGeneretor.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/UniqueIDGeneretor.js new file mode 100644 index 0000000000000000000000000000000000000000..0f85c326c04f5b079c38c404f3c93a5069dd1de8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/UniqueIDGeneretor.js @@ -0,0 +1,29 @@ +function UniqueIDGeneretor() { +} + +UniqueIDGeneretor.lastID = 0; + +UniqueIDGeneretor.createID = function (obj) { + if (UniqueIDGeneretor.isPrimitive(obj)) { + return obj; + } + if (obj.uniqueID != null) { + return obj.uniqueID; + } + obj.uniqueID = UniqueIDGeneretor.getString(); + UniqueIDGeneretor.lastID++; + return obj.uniqueID; +} + +UniqueIDGeneretor.getString = function (id) { + if (id == null) + id = UniqueIDGeneretor.lastID; + return "Object#" + id + ""; +} + +UniqueIDGeneretor.isPrimitive = function (arg) { + var type = typeof arg; + return arg == null || (type != "object" && type != "function"); +} + +module.exports = UniqueIDGeneretor; diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/alignment/NeedlemanWunsch.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/alignment/NeedlemanWunsch.js new file mode 100644 index 0000000000000000000000000000000000000000..6a63781d523c98b75aa5fbaed1b6a1f11685f1cf --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/src/util/alignment/NeedlemanWunsch.js @@ -0,0 +1,158 @@ +/** + * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string + * sequences by S.B.Needleman and C.D.Wunsch (1970). + * + * Aside from the inputs, you can assign the scores for, + * - Match: The two characters at the current index are same. + * - Mismatch: The two characters at the current index are different. + * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string. + */ + +class NeedlemanWunsch { + constructor(sequence1, sequence2, match_score = 1, mismatch_penalty = -1, gap_penalty = -1) { + this.sequence1 = sequence1; + this.sequence2 = sequence2; + this.match_score = match_score; + this.mismatch_penalty = mismatch_penalty; + this.gap_penalty = gap_penalty; + + // Just the remove redundancy + this.iMax = sequence1.length + 1; + this.jMax = sequence2.length + 1; + + // Grid matrix of scores + this.grid = new Array(this.iMax); + for(let i = 0; i < this.iMax; i++){ + this.grid[i] = new Array(this.jMax ); + + for(let j = 0; j < this.jMax ; j++) + this.grid[i][j] = 0; + } + + // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions) + this.tracebackGrid = new Array(this.iMax); + for(let i = 0; i < this.iMax; i++) { + this.tracebackGrid[i] = new Array(this.jMax); + + for(let j = 0; j < this.jMax ; j++) + this.tracebackGrid[i][j] = [null, null, null]; + } + + // The aligned sequences (return multiple possibilities) + this.alignments = []; + + // Final alignment score + this.score = -1; + + // Calculate scores and tracebacks + this.computeGrids(); + } + + getScore(){ + return this.score; + } + + getAlignments(){ + return this.alignments; + } + + // Main dynamic programming procedure + computeGrids(){ + // Fill in the first row + for (let j = 1; j < this.jMax; j++) { + this.grid[0][j] = this.grid[0][j-1] + this.gap_penalty; + this.tracebackGrid[0][j] = [false, false, true]; + } + + // Fill in the first column + for (let i = 1; i < this.iMax; i++) { + this.grid[i][0] = this.grid[i-1][0] + this.gap_penalty; + this.tracebackGrid[i][0] = [false, true, false]; + } + + // Fill the rest of the grid + for(let i = 1; i < this.iMax; i++){ + for(let j = 1; j < this.jMax; j++){ + // Find the max score(s) among [`Diag`, `Up`, `Left`] + let diag; + if(this.sequence1[i-1] === this.sequence2[j-1]) + diag = this.grid[i-1][j-1] + this.match_score; + else + diag = this.grid[i-1][j-1] + this.mismatch_penalty; + + let up = this.grid[i-1][j] + this.gap_penalty; + let left = this.grid[i][j-1] + this.gap_penalty; + + // If there exists multiple max values, capture them for multiple paths + let maxOf = [diag,up,left]; + let indices = this.arrayAllMaxIndexes(maxOf); + + // Update Grids + this.grid[i][j] = maxOf[indices[0]]; + this.tracebackGrid[i][j] = [indices.includes(0), indices.includes(1), indices.includes(2)]; + } + } + + // Update alignment score + this.score = this.grid[this.iMax-1][this.jMax-1]; + } + + // Gets all possible valid sequence combinations + alignmentTraceback(){ + let inProcessAlignments = []; + + inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length], + seq1: "", + seq2: "" + }); + + while(inProcessAlignments[0]){ + let current = inProcessAlignments[0]; + let directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; + + if(directions[0]){ + inProcessAlignments.push({ pos: [current.pos[0]-1, current.pos[1]-1], + seq1: (this.sequence1[current.pos[0]-1] + current.seq1), + seq2: (this.sequence2[current.pos[1]-1] + current.seq2) + }); + } + if(directions[1]){ + inProcessAlignments.push({ pos: [current.pos[0]-1, current.pos[1]], + seq1: this.sequence1[current.pos[0]-1] + current.seq1, + seq2: '-' + current.seq2 + }); + } + if(directions[2]){ + inProcessAlignments.push({ pos: [current.pos[0], current.pos[1]-1], + seq1:'-' + current.seq1, + seq2: this.sequence2[current.pos[1]-1] + current.seq2 + }); + } + + if(current.pos[0] === 0 && current.pos[1] === 0) + this.alignments.push({sequence1 : current.seq1, + sequence2: current.seq2 + }); + + inProcessAlignments.shift(); + } + + return this.alignments; + } + + // Helper Functions + + getAllIndexes(arr, val) { + let indexes = [], i = -1; + while ((i = arr.indexOf(val, i+1)) !== -1){ + indexes.push(i); + } + return indexes; + } + + arrayAllMaxIndexes(array){ + return this.getAllIndexes(array, Math.max.apply(null, array)); + } +} + +module.exports = NeedlemanWunsch; \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/webpack.config.js b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/webpack.config.js new file mode 100644 index 0000000000000000000000000000000000000000..660d204276d58a75fbfa379105f0d22e57a7980e --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/node_modules/layout-base/webpack.config.js @@ -0,0 +1,35 @@ +const path = require('path'); +const pkg = require('./package.json'); +const camelcase = require('camelcase'); +const process = require('process'); +const webpack = require('webpack'); +const env = process.env; +const NODE_ENV = env.NODE_ENV; +const MIN = env.MIN; +const PROD = NODE_ENV === 'production'; + +let config = { + devtool: PROD ? false : 'inline-source-map', + entry: './index.js', + output: { + path: path.join( __dirname ), + filename: 'layout-base.js', + library: camelcase( pkg.name ), + libraryTarget: 'umd' + }, + module: { + rules: [ + { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' } + ] + }, + plugins: MIN ? [ + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false, + drop_console: false, + } + }) + ] : [] +}; + +module.exports = config; diff --git a/tools/ui/node_modules/cytoscape-fcose/package.json b/tools/ui/node_modules/cytoscape-fcose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..70f4bcd144710baa0a5335d802367e9e09fc160b --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/package.json @@ -0,0 +1,57 @@ +{ + "name": "cytoscape-fcose", + "version": "2.2.0", + "description": "The fCoSE layout for Cytoscape.js by Bilkent with fast compound node placement", + "main": "cytoscape-fcose.js", + "author": { + "name": "iVis-at-Bilkent" + }, + "scripts": { + "copyright": "update license", + "lint": "eslint src", + "build": "cross-env NODE_ENV=production webpack", + "build:min": "cross-env NODE_ENV=production MIN=true webpack", + "build:release": "run-s build copyright", + "watch": "webpack --progress --watch", + "dev": "webpack-dev-server --open", + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose.git" + }, + "keywords": [ + "cytoscape", + "cytoscape-extension" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues" + }, + "homepage": "https://github.com/iVis-at-Bilkent/cytoscape.js-fcose", + "devDependencies": { + "babel-core": "^6.24.1", + "babel-loader": "^7.1.4", + "babel-preset-env": "^1.5.1", + "camelcase": "^6.2.0", + "chai": "4.0.2", + "cpy-cli": "^3.1.1", + "cross-env": "^7.0.3", + "eslint": "^7.26.0", + "gh-pages": "^1.0.0", + "mocha": "8.4.0", + "npm-run-all": "^4.1.2", + "rimraf": "^3.0.2", + "update": "^0.7.4", + "updater-license": "^1.0.0", + "webpack": "^5.37.0", + "webpack-cli": "^4.7.0", + "webpack-dev-server": "^3.11.2" + }, + "peerDependencies": { + "cytoscape": "^3.2.0" + }, + "dependencies": { + "cose-base": "^2.2.0" + } +} diff --git a/tools/ui/node_modules/cytoscape-fcose/src/assign.js b/tools/ui/node_modules/cytoscape-fcose/src/assign.js new file mode 100644 index 0000000000000000000000000000000000000000..9d020cf8ce6a4aede84a8df850923eb55bafe902 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/src/assign.js @@ -0,0 +1,9 @@ +// Simple, internal Object.assign() polyfill for options objects etc. + +module.exports = Object.assign != null ? Object.assign.bind( Object ) : function( tgt, ...srcs ){ + srcs.forEach( src => { + Object.keys( src ).forEach( k => tgt[k] = src[k] ); + } ); + + return tgt; +}; diff --git a/tools/ui/node_modules/cytoscape-fcose/src/fcose/auxiliary.js b/tools/ui/node_modules/cytoscape-fcose/src/fcose/auxiliary.js new file mode 100644 index 0000000000000000000000000000000000000000..bfd49b46f92d47ca62c8665d10595f1d8e539e58 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/src/fcose/auxiliary.js @@ -0,0 +1,269 @@ +/* + * Auxiliary functions + */ + +const LinkedList = require('cose-base').layoutBase.LinkedList; + +let auxiliary = {}; + +// get the top most nodes +auxiliary.getTopMostNodes = function(nodes) { + let nodesMap = {}; + for (let i = 0; i < nodes.length; i++) { + nodesMap[nodes[i].id()] = true; + } + let roots = nodes.filter(function (ele, i) { + if(typeof ele === "number") { + ele = i; + } + let parent = ele.parent()[0]; + while(parent != null){ + if(nodesMap[parent.id()]){ + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + + return roots; +}; + +// find disconnected components and create dummy nodes that connect them +auxiliary.connectComponents = function(cy, eles, topMostNodes, dummyNodes){ + let queue = new LinkedList(); + let visited = new Set(); + let visitedTopMostNodes = []; + let currentNeighbor; + let minDegreeNode; + let minDegree; + + let isConnected = false; + let count = 1; + let nodesConnectedToDummy = []; + let components = []; + + do{ + let cmpt = cy.collection(); + components.push(cmpt); + + let currentNode = topMostNodes[0]; + let childrenOfCurrentNode = cy.collection(); + childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants().intersection(eles)); + visitedTopMostNodes.push(currentNode); + + childrenOfCurrentNode.forEach(function(node) { + queue.push(node); + visited.add(node); + cmpt.merge(node); + }); + + while(queue.length != 0){ + currentNode = queue.shift(); + + // Traverse all neighbors of this node + let neighborNodes = cy.collection(); + currentNode.neighborhood().nodes().forEach(function(node){ + if(eles.intersection(currentNode.edgesWith(node)).length > 0){ + neighborNodes.merge(node); + } + }); + + for(let i = 0; i < neighborNodes.length; i++){ + let neighborNode = neighborNodes[i]; + currentNeighbor = topMostNodes.intersection(neighborNode.union(neighborNode.ancestors())); + if(currentNeighbor != null && !visited.has(currentNeighbor[0])){ + let childrenOfNeighbor = currentNeighbor.union(currentNeighbor.descendants()); + + childrenOfNeighbor.forEach(function(node){ + queue.push(node); + visited.add(node); + cmpt.merge(node); + if(topMostNodes.has(node)){ + visitedTopMostNodes.push(node); + } + }); + + } + } + } + + cmpt.forEach(node => { + eles.intersection(node.connectedEdges()).forEach(e => { // connectedEdges() usually cached + if( cmpt.has(e.source()) && cmpt.has(e.target()) ){ // has() is cheap + cmpt.merge(e); + } + }); + }); + + if(visitedTopMostNodes.length == topMostNodes.length){ + isConnected = true; + } + + if(!isConnected || (isConnected && count > 1)){ + minDegreeNode = visitedTopMostNodes[0]; + minDegree = minDegreeNode.connectedEdges().length; + visitedTopMostNodes.forEach(function(node){ + if(node.connectedEdges().length < minDegree){ + minDegree = node.connectedEdges().length; + minDegreeNode = node; + } + }); + nodesConnectedToDummy.push(minDegreeNode.id()); + // TO DO: Check efficiency of this part + let temp = cy.collection(); + temp.merge(visitedTopMostNodes[0]); + visitedTopMostNodes.forEach(function(node){ + temp.merge(node); + }); + visitedTopMostNodes = []; + topMostNodes = topMostNodes.difference(temp); + count++; + } + + } + while(!isConnected); + + if(dummyNodes){ + if(nodesConnectedToDummy.length > 0 ){ + dummyNodes.set('dummy'+(dummyNodes.size+1), nodesConnectedToDummy); + } + } + return components; +}; + +// relocates componentResult to originalCenter if there is no fixedNodeConstraint +auxiliary.relocateComponent = function(originalCenter, componentResult, options) { + if (!options.fixedNodeConstraint) { + let minXCoord = Number.POSITIVE_INFINITY; + let maxXCoord = Number.NEGATIVE_INFINITY; + let minYCoord = Number.POSITIVE_INFINITY; + let maxYCoord = Number.NEGATIVE_INFINITY; + if (options.quality == "draft") { + // calculate current bounding box + for (let [key, value] of componentResult.nodeIndexes) { + let cyNode = options.cy.getElementById(key); + if (cyNode) { + let nodeBB = cyNode.boundingBox(); + let leftX = componentResult.xCoords[value] - nodeBB.w / 2; + let rightX = componentResult.xCoords[value] + nodeBB.w / 2; + let topY = componentResult.yCoords[value] - nodeBB.h / 2; + let bottomY = componentResult.yCoords[value] + nodeBB.h / 2; + + if (leftX < minXCoord) + minXCoord = leftX; + if (rightX > maxXCoord) + maxXCoord = rightX; + if (topY < minYCoord) + minYCoord = topY; + if (bottomY > maxYCoord) + maxYCoord = bottomY; + } + } + // find difference between current and original center + let diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2; + let diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2; + // move component to original center + componentResult.xCoords = componentResult.xCoords.map(x => x + diffOnX); + componentResult.yCoords = componentResult.yCoords.map(y => y + diffOnY); + } + else { + // calculate current bounding box + Object.keys(componentResult).forEach(function (item) { + let node = componentResult[item]; + let leftX = node.getRect().x; + let rightX = node.getRect().x + node.getRect().width; + let topY = node.getRect().y; + let bottomY = node.getRect().y + node.getRect().height; + + if (leftX < minXCoord) + minXCoord = leftX; + if (rightX > maxXCoord) + maxXCoord = rightX; + if (topY < minYCoord) + minYCoord = topY; + if (bottomY > maxYCoord) + maxYCoord = bottomY; + }); + // find difference between current and original center + let diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2; + let diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2; + // move component to original center + Object.keys(componentResult).forEach(function (item) { + let node = componentResult[item]; + node.setCenter(node.getCenterX() + diffOnX, node.getCenterY() + diffOnY); + }); + } + } +}; + +auxiliary.calcBoundingBox = function(parentNode, xCoords, yCoords, nodeIndexes){ + // calculate bounds + let left = Number.MAX_SAFE_INTEGER; + let right = Number.MIN_SAFE_INTEGER; + let top = Number.MAX_SAFE_INTEGER; + let bottom = Number.MIN_SAFE_INTEGER; + let nodeLeft; + let nodeRight; + let nodeTop; + let nodeBottom; + + let nodes = parentNode.descendants().not(":parent"); + let s = nodes.length; + for (let i = 0; i < s; i++) + { + let node = nodes[i]; + + nodeLeft = xCoords[nodeIndexes.get(node.id())] - node.width()/2; + nodeRight = xCoords[nodeIndexes.get(node.id())] + node.width()/2; + nodeTop = yCoords[nodeIndexes.get(node.id())] - node.height()/2; + nodeBottom = yCoords[nodeIndexes.get(node.id())] + node.height()/2; + + if (left > nodeLeft) + { + left = nodeLeft; + } + + if (right < nodeRight) + { + right = nodeRight; + } + + if (top > nodeTop) + { + top = nodeTop; + } + + if (bottom < nodeBottom) + { + bottom = nodeBottom; + } + } + + let boundingBox = {}; + boundingBox.topLeftX = left; + boundingBox.topLeftY = top; + boundingBox.width = right - left; + boundingBox.height = bottom - top; + return boundingBox; +}; + +// This function finds and returns parent nodes whose all children are hidden +auxiliary.calcParentsWithoutChildren = function(cy, eles){ + let parentsWithoutChildren = cy.collection(); + eles.nodes(':parent').forEach((parent) => { + let check = false; + parent.children().forEach((child) => { + if(child.css('display') != 'none') { + check = true; + } + }); + if(!check) { + parentsWithoutChildren.merge(parent); + } + }); + + return parentsWithoutChildren; +} + +module.exports = auxiliary; \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/src/fcose/cose.js b/tools/ui/node_modules/cytoscape-fcose/src/fcose/cose.js new file mode 100644 index 0000000000000000000000000000000000000000..634393f3cc3dd6657f4087c41035bbc1e37df737 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/src/fcose/cose.js @@ -0,0 +1,261 @@ +/** + The implementation of the postprocessing part that applies CoSE layout over the spectral layout +*/ + +const aux = require('./auxiliary'); +const CoSELayout = require('cose-base').CoSELayout; +const CoSENode = require('cose-base').CoSENode; +const PointD = require('cose-base').layoutBase.PointD; +const DimensionD = require('cose-base').layoutBase.DimensionD; +const LayoutConstants = require('cose-base').layoutBase.LayoutConstants; +const FDLayoutConstants = require('cose-base').layoutBase.FDLayoutConstants; +const CoSEConstants = require('cose-base').CoSEConstants; + +// main function that cose layout is processed +let coseLayout = function(options, spectralResult){ + + let cy = options.cy; + let eles = options.eles; + let nodes = eles.nodes(); + let edges = eles.edges(); + + let nodeIndexes; + let xCoords; + let yCoords; + let idToLNode = {}; + + if(options.randomize){ + nodeIndexes = spectralResult["nodeIndexes"]; + xCoords = spectralResult["xCoords"]; + yCoords = spectralResult["yCoords"]; + } + + const isFn = fn => typeof fn === 'function'; + + const optFn = ( opt, ele ) => { + if( isFn( opt ) ){ + return opt( ele ); + } else { + return opt; + } + }; + + /**** Postprocessing functions ****/ + + let parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles); + + // transfer cytoscape nodes to cose nodes + let processChildrenList = function (parent, children, layout, options) { + let size = children.length; + for (let i = 0; i < size; i++) { + let theChild = children[i]; + let children_of_children = null; + if(theChild.intersection(parentsWithoutChildren).length == 0) { + children_of_children = theChild.children(); + } + let theNode; + + let dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: options.nodeDimensionsIncludeLabels + }); + + if (theChild.outerWidth() != null + && theChild.outerHeight() != null) { + if(options.randomize){ + if(!theChild.isParent()){ + theNode = parent.add(new CoSENode(layout.graphManager, + new PointD(xCoords[nodeIndexes.get(theChild.id())] - dimensions.w / 2, yCoords[nodeIndexes.get(theChild.id())] - dimensions.h / 2), + new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } + else{ + let parentInfo = aux.calcBoundingBox(theChild, xCoords, yCoords, nodeIndexes); + if(theChild.intersection(parentsWithoutChildren).length == 0) { + theNode = parent.add(new CoSENode(layout.graphManager, + new PointD(parentInfo.topLeftX, parentInfo.topLeftY), + new DimensionD(parentInfo.width, parentInfo.height))); + } + else { // for the parentsWithoutChildren + theNode = parent.add(new CoSENode(layout.graphManager, + new PointD(parentInfo.topLeftX, parentInfo.topLeftY), + new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } + } + } + else{ + theNode = parent.add(new CoSENode(layout.graphManager, + new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), + new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } + } + else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + // Attach id to the layout node and repulsion value + theNode.id = theChild.data("id"); + theNode.nodeRepulsion = optFn( options.nodeRepulsion, theChild ); + // Attach the paddings of cy node to layout node + theNode.paddingLeft = parseInt( theChild.css('padding') ); + theNode.paddingTop = parseInt( theChild.css('padding') ); + theNode.paddingRight = parseInt( theChild.css('padding') ); + theNode.paddingBottom = parseInt( theChild.css('padding') ); + + //Attach the label properties to both compound and simple nodes if labels will be included in node dimensions + //These properties will be used while updating bounds of compounds during iterations or tiling + //and will be used for simple nodes while transferring final positions to cytoscape + if(options.nodeDimensionsIncludeLabels){ + theNode.labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).w; + theNode.labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).h; + theNode.labelPosVertical = theChild.css("text-valign"); + theNode.labelPosHorizontal = theChild.css("text-halign"); + } + + // Map the layout node + idToLNode[theChild.data("id")] = theNode; + + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + + if (children_of_children != null && children_of_children.length > 0) { + let theNewGraph; + theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); + processChildrenList(theNewGraph, children_of_children, layout, options); + } + } + }; + + // transfer cytoscape edges to cose edges + let processEdges = function(layout, gm, edges){ + let idealLengthTotal = 0; + let edgeCount = 0; + for (let i = 0; i < edges.length; i++) { + let edge = edges[i]; + let sourceNode = idToLNode[edge.data("source")]; + let targetNode = idToLNode[edge.data("target")]; + if(sourceNode && targetNode && sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0){ + let e1 = gm.add(layout.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + e1.idealLength = optFn( options.idealEdgeLength, edge ); + e1.edgeElasticity = optFn( options.edgeElasticity, edge ); + idealLengthTotal += e1.idealLength; + edgeCount++; + } + } + // we need to update the ideal edge length constant with the avg. ideal length value after processing edges + // in case there is no edge, use other options + if (options.idealEdgeLength != null){ + if (edgeCount > 0) + CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = idealLengthTotal / edgeCount; + else if(!isFn(options.idealEdgeLength)) // in case there is no edge, but option gives a value to use + CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength; + else // in case there is no edge and we cannot get a value from option (because it's a function) + CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; + // we need to update these constant values based on the ideal edge length constant + CoSEConstants.MIN_REPULSION_DIST = FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; + CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + } + }; + + // transfer cytoscape constraints to cose layout + let processConstraints = function(layout, options){ + // get nodes to be fixed + if(options.fixedNodeConstraint){ + layout.constraints["fixedNodeConstraint"] = options.fixedNodeConstraint; + } + // get nodes to be aligned + if(options.alignmentConstraint){ + layout.constraints["alignmentConstraint"] = options.alignmentConstraint; + } + // get nodes to be relatively placed + if(options.relativePlacementConstraint){ + layout.constraints["relativePlacementConstraint"] = options.relativePlacementConstraint; + } + }; + + /**** Apply postprocessing ****/ + if (options.nestingFactor != null) + CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; + if (options.gravity != null) + CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; + if (options.numIter != null) + CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; + if (options.gravityRange != null) + CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; + if(options.gravityCompound != null) + CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; + if(options.gravityRangeCompound != null) + CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; + if (options.initialEnergyOnIncremental != null) + CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; + + if (options.tilingCompareBy != null) + CoSEConstants.TILING_COMPARE_BY = options.tilingCompareBy; + + if(options.quality == 'proof') + LayoutConstants.QUALITY = 2; + else + LayoutConstants.QUALITY = 0; + + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = + !(options.randomize); + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; + CoSEConstants.TILE = options.tile; + CoSEConstants.TILING_PADDING_VERTICAL = + typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = + typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; + + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = true; + CoSEConstants.PURE_INCREMENTAL = !options.randomize; + LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = options.uniformNodeDimensions; + + // This part is for debug/demo purpose + if(options.step == "transformed"){ + CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true; + CoSEConstants.ENFORCE_CONSTRAINTS = false; + CoSEConstants.APPLY_LAYOUT = false; + } + if(options.step == "enforced"){ + CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; + CoSEConstants.ENFORCE_CONSTRAINTS = true; + CoSEConstants.APPLY_LAYOUT = false; + } + if(options.step == "cose"){ + CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; + CoSEConstants.ENFORCE_CONSTRAINTS = false; + CoSEConstants.APPLY_LAYOUT = true; + } + if(options.step == "all"){ + if(options.randomize) + CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true; + else + CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; + CoSEConstants.ENFORCE_CONSTRAINTS = true; + CoSEConstants.APPLY_LAYOUT = true; + } + + if(options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint){ + CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; + } + else{ + CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; + } + + let coseLayout = new CoSELayout(); + let gm = coseLayout.newGraphManager(); + + processChildrenList(gm.addRoot(), aux.getTopMostNodes(nodes), coseLayout, options); + processEdges(coseLayout, gm, edges); + processConstraints(coseLayout, options); + + coseLayout.runLayout(); + + return idToLNode; +}; + +module.exports = { coseLayout }; diff --git a/tools/ui/node_modules/cytoscape-fcose/src/fcose/index.js b/tools/ui/node_modules/cytoscape-fcose/src/fcose/index.js new file mode 100644 index 0000000000000000000000000000000000000000..1cf03498593492bb31fc18475d0de54e3b83a35e --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/src/fcose/index.js @@ -0,0 +1,414 @@ +/** + The implementation of the fcose layout algorithm +*/ + +const assign = require('../assign'); +const aux = require('./auxiliary'); +const { spectralLayout } = require('./spectral'); +const { coseLayout } = require('./cose'); + +const defaults = Object.freeze({ + + // 'draft', 'default' or 'proof' + // - 'draft' only applies spectral layout + // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate) + // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate) + quality: "default", + // Use random node positions at beginning of layout + // if this is set to false, then quality option must be "proof" + randomize: true, + // Whether or not to animate the layout + animate: true, + // Duration of animation in ms, if enabled + animationDuration: 1000, + // Easing of animation, if enabled + animationEasing: undefined, + // Fit the viewport to the repositioned nodes + fit: true, + // Padding around layout + padding: 30, + // Whether to include labels in node dimensions. Valid in "proof" quality + nodeDimensionsIncludeLabels: false, + // Whether or not simple nodes (non-compound nodes) are of uniform dimensions + uniformNodeDimensions: false, + // Whether to pack disconnected components - valid only if randomize: true + packComponents: true, + // Layout step - all, transformed, enforced, cose - for debug purpose only + step: "all", + + /* spectral layout options */ + + // False for random, true for greedy + samplingType: true, + // Sample size to construct distance matrix + sampleSize: 25, + // Separation amount between nodes + nodeSeparation: 75, + // Power iteration tolerance + piTol: 0.0000001, + + /* CoSE layout options */ + + // Node repulsion (non overlapping) multiplier + nodeRepulsion: node => 4500, + // Ideal edge (non nested) length + idealEdgeLength: edge => 50, + // Divisor to compute edge forces + edgeElasticity: edge => 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // The function that specifies the criteria for comparing nodes while sorting them during tiling operation. + // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set. + tilingCompareBy: undefined, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.3, + + /* constraint options */ + + // Fix required nodes to predefined positions + // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}] + fixedNodeConstraint: undefined, + // Align required nodes in vertical/horizontal direction + // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']} + alignmentConstraint: undefined, + // Place two nodes relatively in vertical/horizontal direction + // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}] + relativePlacementConstraint: undefined, + + /* layout event callbacks */ + ready: () => {}, // on layoutready + stop: () => {} // on layoutstop +}); + +class Layout { + constructor( options ){ + this.options = assign( {}, defaults, options ); + } + + run(){ + let layout = this; + let options = this.options; + let cy = options.cy; + let eles = options.eles; + + let spectralResult = []; + let xCoords; + let yCoords; + let coseResult = []; + let components; + let componentCenters = []; + + // basic validity check for constraint inputs + if(options.fixedNodeConstraint && (!Array.isArray(options.fixedNodeConstraint) || options.fixedNodeConstraint.length == 0)){ + options.fixedNodeConstraint = undefined; + } + + if(options.alignmentConstraint){ + if(options.alignmentConstraint.vertical && (!Array.isArray(options.alignmentConstraint.vertical) || options.alignmentConstraint.vertical.length == 0)){ + options.alignmentConstraint.vertical = undefined; + } + if(options.alignmentConstraint.horizontal && (!Array.isArray(options.alignmentConstraint.horizontal) || options.alignmentConstraint.horizontal.length == 0)){ + options.alignmentConstraint.horizontal = undefined; + } + + } + + if(options.relativePlacementConstraint && (!Array.isArray(options.relativePlacementConstraint) || options.relativePlacementConstraint.length == 0)){ + options.relativePlacementConstraint = undefined; + } + + // if any constraint exists, set some options + let constraintExist = options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint; + if(constraintExist){ + // constraints work with these options + options.tile = false; + options.packComponents = false; + } + + // decide component packing is enabled or not + let layUtil; + let packingEnabled = false; + if(cy.layoutUtilities && options.packComponents){ + layUtil = cy.layoutUtilities("get"); + if(!layUtil) + layUtil = cy.layoutUtilities(); + packingEnabled = true; + } + + if(eles.nodes().length > 0) { + // if packing is not enabled, perform layout on the whole graph + if(!packingEnabled){ + // store component center + let boundingBox = options.eles.boundingBox(); + componentCenters.push({x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2}); + // apply spectral layout + if(options.randomize){ + let result = spectralLayout(options); + spectralResult.push(result); + } + // apply cose layout as postprocessing + if(options.quality == "default" || options.quality == "proof"){ + coseResult.push(coseLayout(options, spectralResult[0])); + aux.relocateComponent(componentCenters[0], coseResult[0], options); // relocate center to original position + } + else{ + aux.relocateComponent(componentCenters[0], spectralResult[0], options); // relocate center to original position + } + } + else{ // packing is enabled + let topMostNodes = aux.getTopMostNodes(options.eles.nodes()); + components = aux.connectComponents(cy, options.eles, topMostNodes); + // store component centers + components.forEach(function(component){ + let boundingBox = component.boundingBox(); + componentCenters.push({x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2}); + }); + + //send each component to spectral layout if randomized + if(options.randomize){ + components.forEach(function(component){ + options.eles = component; + spectralResult.push(spectralLayout(options)); + }); + } + + if(options.quality == "default" || options.quality == "proof"){ + let toBeTiledNodes = cy.collection(); + if(options.tile){ // behave nodes to be tiled as one component + let nodeIndexes = new Map(); + let xCoords = []; + let yCoords = []; + let count = 0; + let tempSpectralResult = {nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords}; + let indexesToBeDeleted = []; + components.forEach(function(component, index){ + if(component.edges().length == 0){ + component.nodes().forEach(function(node, i){ + toBeTiledNodes.merge(component.nodes()[i]); + if(!node.isParent()){ + tempSpectralResult.nodeIndexes.set(component.nodes()[i].id(), count++); + tempSpectralResult.xCoords.push(component.nodes()[0].position().x); + tempSpectralResult.yCoords.push(component.nodes()[0].position().y); + } + }); + indexesToBeDeleted.push(index); + } + }); + if(toBeTiledNodes.length > 1){ + let boundingBox = toBeTiledNodes.boundingBox(); + componentCenters.push({x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2}); + components.push(toBeTiledNodes); + spectralResult.push(tempSpectralResult); + for(let i = indexesToBeDeleted.length-1; i >= 0; i--){ + components.splice(indexesToBeDeleted[i], 1); + spectralResult.splice(indexesToBeDeleted[i], 1); + componentCenters.splice(indexesToBeDeleted[i], 1); + }; + } + } + components.forEach(function(component, index){ // send each component to cose layout + options.eles = component; + coseResult.push(coseLayout(options, spectralResult[index])); + aux.relocateComponent(componentCenters[index], coseResult[index], options); // relocate center to original position + }); + } + else { + components.forEach(function(component, index){ + aux.relocateComponent(componentCenters[index], spectralResult[index], options); // relocate center to original position + }); + } + + // packing + let componentsEvaluated = new Set(); + if(components.length > 1){ + let subgraphs = []; + let hiddenEles = eles.filter((ele) => {return ele.css('display') == 'none'}); + components.forEach(function(component, index){ + let nodeIndexes; + if(options.quality == "draft"){ + nodeIndexes = spectralResult[index].nodeIndexes; + } + + if(component.nodes().not(hiddenEles).length > 0) { + let subgraph = {}; + subgraph.edges = []; + subgraph.nodes = []; + let nodeIndex; + component.nodes().not(hiddenEles).forEach(function (node) { + if(options.quality == "draft"){ + if(!node.isParent()){ + nodeIndex = nodeIndexes.get(node.id()); + subgraph.nodes.push({x: spectralResult[index].xCoords[nodeIndex] - node.boundingbox().w/2, y: spectralResult[index].yCoords[nodeIndex] - node.boundingbox().h/2, width: node.boundingbox().w, height: node.boundingbox().h}); + } + else{ + let parentInfo = aux.calcBoundingBox(node, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); + subgraph.nodes.push({x: parentInfo.topLeftX, y: parentInfo.topLeftY, width: parentInfo.width, height: parentInfo.height}); + } + } + else{ + if(coseResult[index][node.id()]) { + subgraph.nodes.push({x: coseResult[index][node.id()].getLeft(), y: coseResult[index][node.id()].getTop(), width: coseResult[index][node.id()].getWidth(), height: coseResult[index][node.id()].getHeight()}); + } + } + }); + component.edges().forEach(function (edge) { + let source = edge.source(); + let target = edge.target(); + if(source.css("display") != "none" && target.css("display") != "none") { + if(options.quality == "draft"){ + let sourceNodeIndex = nodeIndexes.get(source.id()); + let targetNodeIndex = nodeIndexes.get(target.id()); + let sourceCenter = []; + let targetCenter = []; + if(source.isParent()){ + let parentInfo = aux.calcBoundingBox(source, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); + sourceCenter.push(parentInfo.topLeftX + parentInfo.width / 2); + sourceCenter.push(parentInfo.topLeftY + parentInfo.height / 2); + } + else{ + sourceCenter.push(spectralResult[index].xCoords[sourceNodeIndex]); + sourceCenter.push(spectralResult[index].yCoords[sourceNodeIndex]); + } + if(target.isParent()){ + let parentInfo = aux.calcBoundingBox(target, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); + targetCenter.push(parentInfo.topLeftX + parentInfo.width / 2); + targetCenter.push(parentInfo.topLeftY + parentInfo.height / 2); + } + else{ + targetCenter.push(spectralResult[index].xCoords[targetNodeIndex]); + targetCenter.push(spectralResult[index].yCoords[targetNodeIndex]); + } + subgraph.edges.push({startX: sourceCenter[0], startY: sourceCenter[1], endX: targetCenter[0], endY: targetCenter[1]}); + } + else{ + if(coseResult[index][source.id()] && coseResult[index][target.id()]) { + subgraph.edges.push({startX: coseResult[index][source.id()].getCenterX(), startY: coseResult[index][source.id()].getCenterY(), endX: coseResult[index][target.id()].getCenterX(), endY: coseResult[index][target.id()].getCenterY()}); + } + } + } + }); + if(subgraph.nodes.length > 0) { + subgraphs.push(subgraph); + componentsEvaluated.add(index); + } + } + }); + let shiftResult = layUtil.packComponents(subgraphs, options.randomize).shifts; + if(options.quality == "draft"){ + spectralResult.forEach(function(result, index){ + let newXCoords = result.xCoords.map(x => x + shiftResult[index].dx); + let newYCoords = result.yCoords.map(y => y + shiftResult[index].dy); + result.xCoords = newXCoords; + result.yCoords = newYCoords; + }); + } + else{ + let count = 0; + componentsEvaluated.forEach((index) => { + Object.keys(coseResult[index]).forEach(function (item) { + let nodeRectangle = coseResult[index][item]; + nodeRectangle.setCenter(nodeRectangle.getCenterX() + shiftResult[count].dx, nodeRectangle.getCenterY() + shiftResult[count].dy); + }); + count++; + }) + } + } + } + } + + // get each element's calculated position + let getPositions = function(ele, i ){ + if(options.quality == "default" || options.quality == "proof") { + if(typeof ele === "number") { + ele = i; + } + let pos; + let node; + let theId = ele.data('id'); + coseResult.forEach(function(result){ + if (theId in result){ + pos = {x: result[theId].getRect().getCenterX(), y: result[theId].getRect().getCenterY()}; + node = result[theId]; + } + }); + if(options.nodeDimensionsIncludeLabels){ + if(node.labelWidth){ + if(node.labelPosHorizontal == "left"){ + pos.x += node.labelWidth/2; + } + else if(node.labelPosHorizontal == "right"){ + pos.x -= node.labelWidth/2; + } + } + if(node.labelHeight){ + if(node.labelPosVertical == "top"){ + pos.y += node.labelHeight/2; + } + else if(node.labelPosVertical == "bottom"){ + pos.y -= node.labelHeight/2; + } + } + } + if(pos == undefined) + pos = {x: ele.position("x"), y: ele.position("y")}; + return { + x: pos.x, + y: pos.y + }; + } + else{ + let pos; + spectralResult.forEach(function(result){ + let index = result.nodeIndexes.get(ele.id()); + if(index != undefined){ + pos = {x: result.xCoords[index], y: result.yCoords[index]}; + } + }); + if(pos == undefined) + pos = {x: ele.position("x"), y: ele.position("y")}; + return { + x: pos.x, + y: pos.y + }; + } + }; + + // quality = "draft" and randomize = false are contradictive so in that case positions don't change + if(options.quality == "default" || options.quality == "proof" || options.randomize) { + // transfer calculated positions to nodes (positions of only simple nodes are evaluated, compounds are positioned automatically) + let parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles); + let hiddenEles = eles.filter((ele) => {return ele.css('display') == 'none'}); + options.eles = eles.not(hiddenEles); + + eles.nodes().not(":parent").not(hiddenEles).layoutPositions(layout, options, getPositions); + + if(parentsWithoutChildren.length > 0){ + parentsWithoutChildren.forEach((ele) => { + ele.position(getPositions(ele)); + }); + } + } + else{ + console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'."); + } + + } +} + +module.exports = Layout; \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/src/fcose/spectral.js b/tools/ui/node_modules/cytoscape-fcose/src/fcose/spectral.js new file mode 100644 index 0000000000000000000000000000000000000000..f95ec0b92f81728b0c83fb8a924dac3aab957528 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/src/fcose/spectral.js @@ -0,0 +1,428 @@ +/** + The implementation of the spectral layout that is the first part of the fcose layout algorithm +*/ + +const aux = require('./auxiliary'); +const Matrix = require('cose-base').layoutBase.Matrix; +const SVD = require('cose-base').layoutBase.SVD; + +// main function that spectral layout is processed +let spectralLayout = function(options){ + + let cy = options.cy; + let eles = options.eles; + let nodes = eles.nodes(); + let parentNodes = eles.nodes(":parent"); + + let dummyNodes = new Map(); // map to keep dummy nodes and their neighbors + let nodeIndexes = new Map(); // map to keep indexes to nodes + let parentChildMap = new Map(); // mapping btw. compound and its representative node + let allNodesNeighborhood = []; // array to keep neighborhood of all nodes + let xCoords = []; + let yCoords = []; + + let samplesColumn = []; // sampled vertices + let minDistancesColumn = []; + let C = []; // column sampling matrix + let PHI = []; // intersection of column and row sampling matrices + let INV = []; // inverse of PHI + + let firstSample; // the first sampled node + let nodeSize; + + const infinity = 100000000; + const small = 0.000000001; + + let piTol = options.piTol; + let samplingType = options.samplingType; // false for random, true for greedy + let nodeSeparation = options.nodeSeparation; + let sampleSize; + + /**** Spectral-preprocessing functions ****/ + + /**** Spectral layout functions ****/ + + // determine which columns to be sampled + let randomSampleCR = function() { + let sample = 0; + let count = 0; + let flag = false; + + while(count < sampleSize){ + sample = Math.floor(Math.random() * nodeSize); + + flag = false; + for(let i = 0; i < count; i++){ + if(samplesColumn[i] == sample){ + flag = true; + break; + } + } + + if(!flag){ + samplesColumn[count] = sample; + count++; + } + else{ + continue; + } + } + }; + + // takes the index of the node(pivot) to initiate BFS as a parameter + let BFS = function(pivot, index, samplingMethod){ + let path = []; // the front of the path + let front = 0; // the back of the path + let back = 0; + let current = 0; + let temp; + let distance = []; + + let max_dist = 0; // the furthest node to be returned + let max_ind = 1; + + for(let i = 0; i < nodeSize; i++){ + distance[i] = infinity; + } + + path[back] = pivot; + distance[pivot] = 0; + + while(back >= front){ + current = path[front++]; + let neighbors = allNodesNeighborhood[current]; + for(let i = 0; i < neighbors.length; i++){ + temp = nodeIndexes.get(neighbors[i]); + if(distance[temp] == infinity){ + distance[temp] = distance[current] + 1; + path[++back] = temp; + } + } + C[current][index] = distance[current] * nodeSeparation; + } + + if(samplingMethod){ + for(let i = 0; i < nodeSize; i++){ + if(C[i][index] < minDistancesColumn[i]) + minDistancesColumn[i] = C[i][index]; + } + + for(let i = 0; i < nodeSize; i++){ + if(minDistancesColumn[i] > max_dist ){ + max_dist = minDistancesColumn[i]; + max_ind = i; + + } + } + } + return max_ind; + }; + + // apply BFS to all nodes or selected samples + let allBFS = function(samplingMethod){ + + let sample; + + if(!samplingMethod){ + randomSampleCR(); + + // call BFS + for(let i = 0; i < sampleSize; i++){ + BFS(samplesColumn[i], i, samplingMethod, false); + } + } + else{ + sample = Math.floor(Math.random() * nodeSize); + firstSample = sample; + + for(let i = 0; i < nodeSize; i++){ + minDistancesColumn[i] = infinity; + } + + for(let i = 0; i < sampleSize; i++){ + samplesColumn[i] = sample; + sample = BFS(sample, i, samplingMethod); + } + + } + + // form the squared distances for C + for(let i = 0; i < nodeSize; i++){ + for(let j = 0; j < sampleSize; j++){ + C[i][j] *= C[i][j]; + } + } + + // form PHI + for(let i = 0; i < sampleSize; i++){ + PHI[i] = []; + } + + for(let i = 0; i < sampleSize; i++){ + for(let j = 0; j < sampleSize; j++){ + PHI[i][j] = C[samplesColumn[j]][i]; + } + } + }; + + // perform the SVD algorithm and apply a regularization step + let sample = function(){ + + let SVDResult = SVD.svd(PHI); + + let a_q = SVDResult.S; + let a_u = SVDResult.U; + let a_v = SVDResult.V; + + let max_s = a_q[0]*a_q[0]*a_q[0]; + + let a_Sig = []; + + // regularization + for(let i = 0; i < sampleSize; i++){ + a_Sig[i] = []; + for(let j = 0; j < sampleSize; j++){ + a_Sig[i][j] = 0; + if(i == j){ + a_Sig[i][j] = a_q[i]/(a_q[i]*a_q[i] + max_s/(a_q[i]*a_q[i])); + } + } + } + + INV = Matrix.multMat(Matrix.multMat(a_v, a_Sig), Matrix.transpose(a_u)); + + }; + + // calculate final coordinates + let powerIteration = function(){ + // two largest eigenvalues + let theta1; + let theta2; + + // initial guesses for eigenvectors + let Y1 = []; + let Y2 = []; + + let V1 = []; + let V2 = []; + + for(let i = 0; i < nodeSize; i++){ + Y1[i] = Math.random(); + Y2[i] = Math.random(); + } + + Y1 = Matrix.normalize(Y1); + Y2 = Matrix.normalize(Y2); + + let count = 0; + // to keep track of the improvement ratio in power iteration + let current = small; + let previous = small; + + let temp; + + while(true){ + count++; + + for(let i = 0; i < nodeSize; i++){ + V1[i] = Y1[i]; + } + + Y1 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V1), C, INV)); + theta1 = Matrix.dotProduct(V1, Y1); + Y1 = Matrix.normalize(Y1); + + current = Matrix.dotProduct(V1, Y1); + + temp = Math.abs(current/previous); + + if(temp <= 1 + piTol && temp >= 1){ + break; + } + + previous = current; + } + + for(let i = 0; i < nodeSize; i++){ + V1[i] = Y1[i]; + } + + count = 0; + previous = small; + while(true){ + count++; + + for(let i = 0; i < nodeSize; i++){ + V2[i] = Y2[i]; + } + + V2 = Matrix.minusOp(V2, Matrix.multCons(V1, (Matrix.dotProduct(V1, V2)))); + Y2 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V2), C, INV)); + theta2 = Matrix.dotProduct(V2, Y2); + Y2 = Matrix.normalize(Y2); + + current = Matrix.dotProduct(V2, Y2); + + temp = Math.abs(current/previous); + + if(temp <= 1 + piTol && temp >= 1){ + break; + } + + previous = current; + } + + for(let i = 0; i < nodeSize; i++){ + V2[i] = Y2[i]; + } + + // theta1 now contains dominant eigenvalue + // theta2 now contains the second-largest eigenvalue + // V1 now contains theta1's eigenvector + // V2 now contains theta2's eigenvector + + //populate the two vectors + xCoords = Matrix.multCons(V1, Math.sqrt(Math.abs(theta1))); + yCoords = Matrix.multCons(V2, Math.sqrt(Math.abs(theta2))); + + }; + + /**** Preparation for spectral layout (Preprocessing) ****/ + + // connect disconnected components (first top level, then inside of each compound node) + aux.connectComponents(cy, eles, aux.getTopMostNodes(nodes), dummyNodes); + + parentNodes.forEach(function( ele ){ + aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants().intersection(eles)), dummyNodes); + }); + + // assign indexes to nodes (first real, then dummy nodes) + let index = 0; + for(let i = 0; i < nodes.length; i++){ + if(!nodes[i].isParent()){ + nodeIndexes.set(nodes[i].id(), index++); + } + } + + for (let key of dummyNodes.keys()) { + nodeIndexes.set(key, index++); + } + + // instantiate the neighborhood matrix + for(let i = 0; i < nodeIndexes.size; i++){ + allNodesNeighborhood[i] = []; + } + + // form a parent-child map to keep representative node of each compound node + parentNodes.forEach(function( ele ){ + let children = ele.children().intersection(eles); + + // let random = 0; + while(children.nodes(":childless").length == 0){ + // random = Math.floor(Math.random() * children.nodes().length); // if all children are compound then proceed randomly + children = children.nodes()[0].children().intersection(eles); + } + // select the representative node - we can apply different methods here + // random = Math.floor(Math.random() * children.nodes(":childless").length); + let index = 0; + let min = children.nodes(":childless")[0].connectedEdges().length; + children.nodes(":childless").forEach(function(ele2, i){ + if(ele2.connectedEdges().length < min){ + min = ele2.connectedEdges().length; + index = i; + } + }); + parentChildMap.set(ele.id(), children.nodes(":childless")[index].id()); + }); + + // add neighborhood relations (first real, then dummy nodes) + nodes.forEach(function( ele ){ + let eleIndex; + + if(ele.isParent()) + eleIndex = nodeIndexes.get(parentChildMap.get(ele.id())); + else + eleIndex = nodeIndexes.get(ele.id()); + + ele.neighborhood().nodes().forEach(function(node){ + if(eles.intersection(ele.edgesWith(node)).length > 0){ + if(node.isParent()) + allNodesNeighborhood[eleIndex].push(parentChildMap.get(node.id())); + else + allNodesNeighborhood[eleIndex].push(node.id()); + } + }); + }); + + for (let key of dummyNodes.keys()) { + let eleIndex = nodeIndexes.get(key); + let disconnectedId; + dummyNodes.get(key).forEach(function(id){ + if(cy.getElementById(id).isParent()) + disconnectedId = parentChildMap.get(id); + else + disconnectedId = id; + + allNodesNeighborhood[eleIndex].push(disconnectedId); + allNodesNeighborhood[nodeIndexes.get(disconnectedId)].push(key); + }); + } + + // nodeSize now only considers the size of transformed graph + nodeSize = nodeIndexes.size; + + let spectralResult; + + // If number of nodes in transformed graph is 1 or 2, either SVD or powerIteration causes problem + // So skip spectral and layout the graph with cose + if(nodeSize > 2) { + // if # of nodes in transformed graph is smaller than sample size, + // then use # of nodes as sample size + sampleSize = nodeSize < options.sampleSize ? nodeSize : options.sampleSize; + + // instantiates the partial matrices that will be used in spectral layout + for(let i = 0; i < nodeSize; i++){ + C[i] = []; + } + for(let i = 0; i < sampleSize; i++){ + INV[i] = []; + } + + /**** Apply spectral layout ****/ + + if(options.quality == "draft" || options.step == "all"){ + allBFS(samplingType); + sample(); + powerIteration(); + + spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; + } + else{ + nodeIndexes.forEach(function(value, key){ + xCoords.push(cy.getElementById(key).position("x")); + yCoords.push(cy.getElementById(key).position("y")); + }); + spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; + } + return spectralResult; + } + else { + let iterator = nodeIndexes.keys(); + let firstNode = cy.getElementById(iterator.next().value); + let firstNodePos = firstNode.position(); + let firstNodeWidth = firstNode.outerWidth(); + xCoords.push(firstNodePos.x); + yCoords.push(firstNodePos.y); + if(nodeSize == 2){ + let secondNode = cy.getElementById(iterator.next().value); + let secondNodeWidth = secondNode.outerWidth(); + xCoords.push(firstNodePos.x + firstNodeWidth / 2 + secondNodeWidth / 2 + options.idealEdgeLength); + yCoords.push(firstNodePos.y); + } + + spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; + return spectralResult; + } +}; + +module.exports = { spectralLayout }; \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape-fcose/src/index.js b/tools/ui/node_modules/cytoscape-fcose/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..585c435cf5958e399b86558416363cdaf2fc4dc2 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/src/index.js @@ -0,0 +1,14 @@ +const impl = require('./fcose'); + +// registers the extension on a cytoscape lib ref +let register = function( cytoscape ){ + if( !cytoscape ){ return; } // can't register if cytoscape unspecified + + cytoscape( 'layout', 'fcose', impl ); // register with cytoscape.js +}; + +if( typeof cytoscape !== 'undefined' ){ // expose to global cytoscape (i.e. window.cytoscape) + register( cytoscape ); +} + +module.exports = register; diff --git a/tools/ui/node_modules/cytoscape-fcose/test/example.js b/tools/ui/node_modules/cytoscape-fcose/test/example.js new file mode 100644 index 0000000000000000000000000000000000000000..2b907f27817cf0646989e6bddae6eecf9ad53d4d --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/test/example.js @@ -0,0 +1,7 @@ +const chai = require('chai'); + +describe('This', function(){ + it('does that', function(){ + expect( true ).to.be.true; + }); +}); diff --git a/tools/ui/node_modules/cytoscape-fcose/webpack.config.js b/tools/ui/node_modules/cytoscape-fcose/webpack.config.js new file mode 100644 index 0000000000000000000000000000000000000000..d39d5de230e127f78109a76f8b4076ab4679b7b9 --- /dev/null +++ b/tools/ui/node_modules/cytoscape-fcose/webpack.config.js @@ -0,0 +1,39 @@ +const path = require('path'); +const pkg = require('./package.json'); +const camelcase = require('camelcase'); +const process = require('process'); +const webpack = require('webpack'); +const env = process.env; +const NODE_ENV = env.NODE_ENV; +const MIN = env.MIN; +const PROD = NODE_ENV === 'production'; + +let config = { + devtool: PROD ? false : 'inline-source-map', + entry: './src/index.js', + output: { + path: path.join( __dirname ), + filename: pkg.name + '.js', + library: camelcase( pkg.name ), + libraryTarget: 'umd', + globalObject: 'this' + }, + module: { + rules: [ + { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' } + ] + }, + optimization: { + minimize: MIN ? true : false, + }, + externals: PROD ? { + 'cose-base': { + commonjs2: 'cose-base', + commonjs: 'cose-base', + amd: 'cose-base', + root: 'coseBase' + } + } : {} +}; + +module.exports = config; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/load-listeners.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/load-listeners.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fdf4daabac719c34b7a64a040984c9afd364c8b9 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/load-listeners.mjs @@ -0,0 +1,2195 @@ +import * as is from '../../../is.mjs'; +import * as util from '../../../util/index.mjs'; +import * as math from '../../../math.mjs'; +import { setFreed, setGrabbed } from './grab-state.mjs'; + +var BRp = {}; + +/* global document, ResizeObserver, MutationObserver */ + +BRp.registerBinding = function( target, event, handler, useCapture ){ // eslint-disable-line no-unused-vars + var args = Array.prototype.slice.apply( arguments, [1] ); // copy + + if( Array.isArray(target) ){ + let res = []; + for( var i = 0; i < target.length; i++ ){ + let t = target[i]; + if( t !== undefined ){ + var b = this.binder( t ); + res.push( b.on.apply( b, args ) ); + } + } + return res; + } + + var b = this.binder( target ); + return b.on.apply( b, args ); +}; + +BRp.binder = function( tgt ){ + var r = this; + var containerWindow = r.cy.window(); + + var tgtIsDom = tgt === containerWindow || tgt === containerWindow.document || tgt === containerWindow.document.body || is.domElement( tgt ); + + if( r.supportsPassiveEvents == null ){ + + // from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection + var supportsPassive = false; + try { + var opts = Object.defineProperty( {}, 'passive', { + get: function(){ + supportsPassive = true; + + return true; + } + } ); + + containerWindow.addEventListener( 'test', null, opts ); + } catch( err ){ + // not supported + } + + r.supportsPassiveEvents = supportsPassive; + } + + var on = function( event, handler, useCapture ){ + var args = Array.prototype.slice.call( arguments ); + + if( tgtIsDom && r.supportsPassiveEvents ){ // replace useCapture w/ opts obj + args[2] = { + capture: useCapture != null ? useCapture : false, + passive: false, + once: false + }; + } + + r.bindings.push({ + target: tgt, + args: args + }); + + ( tgt.addEventListener || tgt.on ).apply( tgt, args ); + + return this; + }; + + return { + on: on, + addEventListener: on, + addListener: on, + bind: on + }; +}; + +BRp.nodeIsDraggable = function( node ){ + return ( + node + && node.isNode() + && !node.locked() + && node.grabbable() + ); +}; + +BRp.nodeIsGrabbable = function( node ){ + return ( + this.nodeIsDraggable( node ) + && node.interactive() + ); +}; + +BRp.load = function(){ + var r = this; + var containerWindow = r.cy.window(); + var isSelected = ele => ele.selected(); + + var getShadowRoot = function( element ){ + const rootNode = element.getRootNode(); + // Check if the root node is a shadow root + if ( rootNode && rootNode.nodeType === 11 && rootNode.host !== undefined ) { + return rootNode; + } + }; + + var triggerEvents = function( target, names, e, position ){ + if( target == null ){ + target = r.cy; + } + + for( var i = 0; i < names.length; i++ ){ + var name = names[ i ]; + + target.emit({ + originalEvent: e, + type: name, + position + }); + } + }; + + var isMultSelKeyDown = function( e ){ + return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey + }; + + var allowPanningPassthrough = function( down, downs ){ + var allowPassthrough = true; + + if( r.cy.hasCompoundNodes() && down && down.pannable() ){ + // a grabbable compound node below the ele => no passthrough panning + for( var i = 0; downs && i < downs.length; i++ ){ + var down = downs[i]; + + //if any parent node in event hierarchy isn't pannable, reject passthrough + if( down.isNode() && down.isParent() && !down.pannable() ){ + allowPassthrough = false; + break; + } + } + } else { + allowPassthrough = true; + } + + return allowPassthrough; + }; + + var setInDragLayer = function( ele ){ + ele[0]._private.rscratch.inDragLayer = true; + }; + + var setOutDragLayer = function( ele ){ + ele[0]._private.rscratch.inDragLayer = false; + }; + + var setGrabTarget = function( ele ){ + ele[0]._private.rscratch.isGrabTarget = true; + }; + + var removeGrabTarget = function( ele ){ + ele[0]._private.rscratch.isGrabTarget = false; + }; + + var addToDragList = function( ele, opts ){ + var list = opts.addToList; + var listHasEle = list.has(ele); + + if( !listHasEle && ele.grabbable() && !ele.locked() ){ + list.merge( ele ); + setGrabbed( ele ); + } + }; + + // helper function to determine which child nodes and inner edges + // of a compound node to be dragged as well as the grabbed and selected nodes + var addDescendantsToDrag = function( node, opts ){ + if( !node.cy().hasCompoundNodes() ){ + return; + } + + if( opts.inDragLayer == null && opts.addToList == null ){ return; } // nothing to do + + var innerNodes = node.descendants(); + + if( opts.inDragLayer ){ + innerNodes.forEach( setInDragLayer ); + innerNodes.connectedEdges().forEach( setInDragLayer ); + } + + if( opts.addToList ){ + addToDragList(innerNodes, opts); + } + }; + + // adds the given nodes and its neighbourhood to the drag layer + var addNodesToDrag = function( nodes, opts ){ + opts = opts || {}; + + var hasCompoundNodes = nodes.cy().hasCompoundNodes(); + + if( opts.inDragLayer ){ + nodes.forEach( setInDragLayer ); + + nodes.neighborhood().stdFilter(function( ele ){ + return !hasCompoundNodes || ele.isEdge(); + }).forEach( setInDragLayer ); + } + + if( opts.addToList ){ + nodes.forEach(function( ele ){ + addToDragList( ele, opts ); + }); + } + + addDescendantsToDrag( nodes, opts ); // always add to drag + + // also add nodes and edges related to the topmost ancestor + updateAncestorsInDragLayer( nodes, { + inDragLayer: opts.inDragLayer + } ); + + r.updateCachedGrabbedEles(); + }; + + var addNodeToDrag = addNodesToDrag; + + var freeDraggedElements = function( grabbedEles ){ + if( !grabbedEles ){ return; } + + // just go over all elements rather than doing a bunch of (possibly expensive) traversals + r.getCachedZSortedEles().forEach(function( ele ){ + setFreed( ele ); + setOutDragLayer( ele ); + removeGrabTarget( ele ); + }); + + r.updateCachedGrabbedEles(); + }; + + // helper function to determine which ancestor nodes and edges should go + // to the drag layer (or should be removed from drag layer). + var updateAncestorsInDragLayer = function( node, opts ){ + + if( opts.inDragLayer == null && opts.addToList == null ){ return; } // nothing to do + + if( !node.cy().hasCompoundNodes() ){ + return; + } + + // find top-level parent + var parent = node.ancestors().orphans(); + + // no parent node: no nodes to add to the drag layer + if( parent.same( node ) ){ + return; + } + + var nodes = parent.descendants().spawnSelf() + .merge( parent ) + .unmerge( node ) + .unmerge( node.descendants() ) + ; + + var edges = nodes.connectedEdges(); + + if( opts.inDragLayer ){ + edges.forEach( setInDragLayer ); + nodes.forEach( setInDragLayer ); + } + + if( opts.addToList ){ + nodes.forEach(function( ele ){ + addToDragList( ele, opts ); + }); + } + }; + + var blurActiveDomElement = function(){ + if( document.activeElement != null && document.activeElement.blur != null ){ + document.activeElement.blur(); + } + }; + + var haveMutationsApi = typeof MutationObserver !== 'undefined'; + var haveResizeObserverApi = typeof ResizeObserver !== 'undefined'; + + // watch for when the cy container is removed from the dom + if( haveMutationsApi ){ + r.removeObserver = new MutationObserver( function( mutns ){ // eslint-disable-line no-undef + for( var i = 0; i < mutns.length; i++ ){ + var mutn = mutns[ i ]; + var rNodes = mutn.removedNodes; + + if( rNodes ){ for( var j = 0; j < rNodes.length; j++ ){ + var rNode = rNodes[ j ]; + + if( rNode === r.container ){ + r.destroy(); + break; + } + } } + } + } ); + + if( r.container.parentNode ){ + r.removeObserver.observe( r.container.parentNode, { childList: true } ); + } + } else { + r.registerBinding( r.container, 'DOMNodeRemoved', function( e ){ // eslint-disable-line no-unused-vars + r.destroy(); + } ); + } + + var onResize = util.debounce( function(){ + r.cy.resize(); + }, 100 ); + + if( haveMutationsApi ){ + r.styleObserver = new MutationObserver( onResize ); // eslint-disable-line no-undef + + r.styleObserver.observe( r.container, { attributes: true } ); + } + + // auto resize + r.registerBinding( containerWindow, 'resize', onResize ); // eslint-disable-line no-undef + + if( haveResizeObserverApi ){ + r.resizeObserver = new ResizeObserver(onResize); // eslint-disable-line no-undef + + r.resizeObserver.observe( r.container ); + } + + var forEachUp = function( domEle, fn ){ + while( domEle != null ){ + fn( domEle ); + + domEle = domEle.parentNode; + } + }; + + var invalidateCoords = function(){ + r.invalidateContainerClientCoordsCache(); + }; + + forEachUp( r.container, function( domEle ){ + r.registerBinding( domEle, 'transitionend', invalidateCoords ); + r.registerBinding( domEle, 'animationend', invalidateCoords ); + r.registerBinding( domEle, 'scroll', invalidateCoords ); + } ); + + // stop right click menu from appearing on cy + r.registerBinding( r.container, 'contextmenu', function( e ){ + e.preventDefault(); + } ); + + var inBoxSelection = function(){ + return r.selection[4] !== 0; + }; + + var eventInContainer = function( e ){ + // save cycles if mouse events aren't to be captured + var containerPageCoords = r.findContainerClientCoords(); + var x = containerPageCoords[0]; + var y = containerPageCoords[1]; + var width = containerPageCoords[2]; + var height = containerPageCoords[3]; + + var positions = e.touches ? e.touches : [ e ]; + var atLeastOnePosInside = false; + + for( var i = 0; i < positions.length; i++ ){ + var p = positions[i]; + + if( x <= p.clientX && p.clientX <= x + width + && y <= p.clientY && p.clientY <= y + height + ){ + atLeastOnePosInside = true; + break; + } + } + + if( !atLeastOnePosInside ){ return false; } + + var container = r.container; + var target = e.target; + var tParent = target.parentNode; + var containerIsTarget = false; + + while( tParent ){ + if( tParent === container ){ + containerIsTarget = true; + break; + } + + tParent = tParent.parentNode; + } + + if( !containerIsTarget ){ return false; } // if target is outisde cy container, then this event is not for us + + return true; + }; + + // Primary key + r.registerBinding( r.container, 'mousedown', function mousedownHandler( e ){ + if( !eventInContainer(e) ){ return; } + + // during left mouse button gestures, ignore other buttons + if (r.hoverData.which === 1 && e.which !== 1) { + return; + } + + e.preventDefault(); + + blurActiveDomElement(); + + r.hoverData.capture = true; + r.hoverData.which = e.which; + + var cy = r.cy; + var gpos = [ e.clientX, e.clientY ]; + var pos = r.projectIntoViewport( gpos[0], gpos[1] ); + var select = r.selection; + var nears = r.findNearestElements( pos[0], pos[1], true, false ); + var near = nears[0]; + var draggedElements = r.dragData.possibleDragElements; + + r.hoverData.mdownPos = pos; + r.hoverData.mdownGPos = gpos; + + let makeEvent = (type) => ({ + originalEvent: e, + type: type, + position: { x: pos[0], y: pos[1] } + }); + + var checkForTaphold = function(){ + r.hoverData.tapholdCancelled = false; + + clearTimeout( r.hoverData.tapholdTimeout ); + + r.hoverData.tapholdTimeout = setTimeout( function(){ + + if( r.hoverData.tapholdCancelled ){ + return; + } else { + var ele = r.hoverData.down; + + if( ele ){ + ele.emit(makeEvent('taphold')); + } else { + cy.emit(makeEvent('taphold')); + } + } + + }, r.tapholdDuration ); + }; + + // Right click button + if( e.which == 3 ){ + + r.hoverData.cxtStarted = true; + + var cxtEvt = { + originalEvent: e, + type: 'cxttapstart', + position: { x: pos[0], y: pos[1] } + }; + + if( near ){ + near.activate(); + near.emit( cxtEvt ); + + r.hoverData.down = near; + } else { + cy.emit( cxtEvt ); + } + + r.hoverData.downTime = (new Date()).getTime(); + r.hoverData.cxtDragged = false; + + // Primary button + } else if( e.which == 1 ){ + + if( near ){ + near.activate(); + } + + // Element dragging + { + // If something is under the cursor and it is draggable, prepare to grab it + if( near != null ){ + + if( r.nodeIsGrabbable( near ) ){ + var triggerGrab = function( ele ){ + ele.emit( makeEvent('grab') ); + }; + + setGrabTarget( near ); + + if( !near.selected() ){ + + draggedElements = r.dragData.possibleDragElements = cy.collection(); + addNodeToDrag( near, { addToList: draggedElements } ); + + near.emit( makeEvent('grabon') ).emit( makeEvent('grab') ); + + } else { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + + var selectedNodes = cy.$( function( ele ){ return ele.isNode() && ele.selected() && r.nodeIsGrabbable( ele ); } ); + + addNodesToDrag( selectedNodes, { addToList: draggedElements } ); + + near.emit( makeEvent('grabon') ); + + selectedNodes.forEach( triggerGrab ); + } + + r.redrawHint( 'eles', true ); + r.redrawHint( 'drag', true ); + + } + + } + + r.hoverData.down = near; + r.hoverData.downs = nears; + r.hoverData.downTime = (new Date()).getTime(); + } + + triggerEvents( near, [ 'mousedown', 'tapstart', 'vmousedown' ], e, { x: pos[0], y: pos[1] } ); + + if( near == null ){ + select[4] = 1; + + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + + r.redrawHint( 'select', true ); + + r.redraw(); + } else if( near.pannable() ){ + select[4] = 1; // for future pan + } + + checkForTaphold(); + + } + + // Initialize selection box coordinates + select[0] = select[2] = pos[0]; + select[1] = select[3] = pos[1]; + + }, false ); + + var shadowRoot = getShadowRoot( r.container ); + r.registerBinding( [ containerWindow, shadowRoot ], 'mousemove', function mousemoveHandler( e ){ // eslint-disable-line no-undef + var capture = r.hoverData.capture; + + if( !capture && !eventInContainer(e) ){ return; } + + var preventDefault = false; + var cy = r.cy; + var zoom = cy.zoom(); + var gpos = [ e.clientX, e.clientY ]; + var pos = r.projectIntoViewport( gpos[0], gpos[1] ); + var mdownPos = r.hoverData.mdownPos; + var mdownGPos = r.hoverData.mdownGPos; + var select = r.selection; + + var near = null; + if( !r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting ){ + near = r.findNearestElement( pos[0], pos[1], true, false ); + } + var last = r.hoverData.last; + var down = r.hoverData.down; + + var disp = [ pos[0] - select[2], pos[1] - select[3] ]; + + var draggedElements = r.dragData.possibleDragElements; + + var isOverThresholdDrag; + + if( mdownGPos ){ + var dx = gpos[0] - mdownGPos[0]; + var dx2 = dx * dx; + var dy = gpos[1] - mdownGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + + r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2; + } + + var multSelKeyDown = isMultSelKeyDown( e ); + + if (isOverThresholdDrag) { + r.hoverData.tapholdCancelled = true; + } + + var updateDragDelta = function(){ + var dragDelta = r.hoverData.dragDelta = r.hoverData.dragDelta || []; + + if( dragDelta.length === 0 ){ + dragDelta.push( disp[0] ); + dragDelta.push( disp[1] ); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + }; + + + preventDefault = true; + + triggerEvents( near, [ 'mousemove', 'vmousemove', 'tapdrag' ], e, { x: pos[0], y: pos[1] } ); + + let makeEvent = (type) => ({ + originalEvent: e, + type: type, + position: { x: pos[0], y: pos[1] } + }); + + var goIntoBoxMode = function(){ + r.data.bgActivePosistion = undefined; + + if( !r.hoverData.selecting ){ + cy.emit(makeEvent('boxstart')); + } + + select[4] = 1; + r.hoverData.selecting = true; + + r.redrawHint( 'select', true ); + r.redraw(); + }; + + // trigger context drag if rmouse down + if( r.hoverData.which === 3 ){ + // but only if over threshold + if( isOverThresholdDrag ){ + var cxtEvt = makeEvent('cxtdrag'); + + if( down ){ + down.emit( cxtEvt ); + } else { + cy.emit( cxtEvt ); + } + + r.hoverData.cxtDragged = true; + + if( !r.hoverData.cxtOver || near !== r.hoverData.cxtOver ){ + + if( r.hoverData.cxtOver ){ + r.hoverData.cxtOver.emit(makeEvent('cxtdragout')); + } + + r.hoverData.cxtOver = near; + + if( near ){ + near.emit(makeEvent('cxtdragover')); + } + + } + } + + // Check if we are drag panning the entire graph + } else if( r.hoverData.dragging ){ + preventDefault = true; + + if( cy.panningEnabled() && cy.userPanningEnabled() ){ + var deltaP; + + if( r.hoverData.justStartedPan ){ + var mdPos = r.hoverData.mdownPos; + + deltaP = { + x: ( pos[0] - mdPos[0] ) * zoom, + y: ( pos[1] - mdPos[1] ) * zoom + }; + + r.hoverData.justStartedPan = false; + + } else { + deltaP = { + x: disp[0] * zoom, + y: disp[1] * zoom + }; + + } + + cy.panBy( deltaP ); + cy.emit(makeEvent('dragpan')); + + r.hoverData.dragged = true; + } + + // Needs reproject due to pan changing viewport + pos = r.projectIntoViewport( e.clientX, e.clientY ); + + // Checks primary button down & out of time & mouse not moved much + } else if( + select[4] == 1 && (down == null || down.pannable()) + ){ + + if( isOverThresholdDrag ){ + + if( !r.hoverData.dragging && cy.boxSelectionEnabled() && ( multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled() ) ){ + goIntoBoxMode(); + + } else if( !r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled() ){ + var allowPassthrough = allowPanningPassthrough( down, r.hoverData.downs ); + + if( allowPassthrough ){ + r.hoverData.dragging = true; + r.hoverData.justStartedPan = true; + select[4] = 0; + + r.data.bgActivePosistion = math.array2point( mdownPos ); + + r.redrawHint( 'select', true ); + r.redraw(); + } + } + + if( down && down.pannable() && down.active() ){ down.unactivate(); } + + } + + } else { + if( down && down.pannable() && down.active() ){ down.unactivate(); } + + if( ( !down || !down.grabbed() ) && near != last ){ + + if( last ){ + triggerEvents( last, [ 'mouseout', 'tapdragout' ], e, { x: pos[0], y: pos[1] } ); + } + + if( near ){ + triggerEvents( near, [ 'mouseover', 'tapdragover' ], e, { x: pos[0], y: pos[1] } ); + } + + r.hoverData.last = near; + } + + if( down ){ + + if( isOverThresholdDrag ){ // then we can take action + + if( cy.boxSelectionEnabled() && multSelKeyDown ){ // then selection overrides + if( down && down.grabbed() ){ + freeDraggedElements( draggedElements ); + + down.emit(makeEvent('freeon')); + draggedElements.emit(makeEvent('free')); + + if( r.dragData.didDrag ){ + down.emit(makeEvent('dragfreeon')); + draggedElements.emit(makeEvent('dragfree')); + } + } + + goIntoBoxMode(); + + } else if( down && down.grabbed() && r.nodeIsDraggable( down ) ){ // drag node + var justStartedDrag = !r.dragData.didDrag; + + if( justStartedDrag ){ + r.redrawHint( 'eles', true ); + } + + r.dragData.didDrag = true; // indicate that we actually did drag the node + + // now, add the elements to the drag layer if not done already + if( !r.hoverData.draggingEles ){ + addNodesToDrag( draggedElements, { inDragLayer: true } ); + } + + let totalShift = { x: 0, y: 0 }; + + if( is.number( disp[0] ) && is.number( disp[1] ) ){ + totalShift.x += disp[0]; + totalShift.y += disp[1]; + + if( justStartedDrag ){ + var dragDelta = r.hoverData.dragDelta; + + if( dragDelta && is.number( dragDelta[0] ) && is.number( dragDelta[1] ) ){ + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + + r.hoverData.draggingEles = true; + + ( draggedElements + .silentShift( totalShift ) + .emit(makeEvent('position')) + .emit(makeEvent('drag')) + ); + + r.redrawHint( 'drag', true ); + r.redraw(); + } + + } else { // otherwise save drag delta for when we actually start dragging so the relative grab pos is constant + updateDragDelta(); + } + } + + // prevent the dragging from triggering text selection on the page + preventDefault = true; + } + + select[2] = pos[0]; select[3] = pos[1]; + + if( preventDefault ){ + if( e.stopPropagation ) e.stopPropagation(); + if( e.preventDefault ) e.preventDefault(); + return false; + } + }, false ); + + let clickTimeout, didDoubleClick, prevClickTimeStamp; + r.registerBinding( containerWindow, 'mouseup', function mouseupHandler( e ){ // eslint-disable-line no-undef + // during left mouse button gestures, ignore other buttons + if (r.hoverData.which === 1 && e.which !== 1 && r.hoverData.capture) { + return; + } + + var capture = r.hoverData.capture; + if( !capture ){ return; } + r.hoverData.capture = false; + + var cy = r.cy; var pos = r.projectIntoViewport( e.clientX, e.clientY ); var select = r.selection; + var near = r.findNearestElement( pos[0], pos[1], true, false ); + var draggedElements = r.dragData.possibleDragElements; var down = r.hoverData.down; + var multSelKeyDown = isMultSelKeyDown( e ); + + if( r.data.bgActivePosistion ){ + r.redrawHint( 'select', true ); + r.redraw(); + } + + r.hoverData.tapholdCancelled = true; + + r.data.bgActivePosistion = undefined; // not active bg now + + if( down ){ + down.unactivate(); + } + + let makeEvent = (type) => ({ + originalEvent: e, + type: type, + position: { x: pos[0], y: pos[1] } + }); + + if( r.hoverData.which === 3 ){ + var cxtEvt = (makeEvent('cxttapend')); + + if( down ){ + down.emit( cxtEvt ); + } else { + cy.emit( cxtEvt ); + } + + if( !r.hoverData.cxtDragged ){ + var cxtTap = makeEvent('cxttap'); + + if( down ){ + down.emit( cxtTap ); + } else { + cy.emit( cxtTap ); + } + } + + r.hoverData.cxtDragged = false; + r.hoverData.which = null; + + } else if( r.hoverData.which === 1 ){ + + triggerEvents( near, [ 'mouseup', 'tapend', 'vmouseup' ], e, { x: pos[0], y: pos[1] } ); + + if ( + !r.dragData.didDrag && // didn't move a node around + !r.hoverData.dragged && // didn't pan + !r.hoverData.selecting && // not box selection + !r.hoverData.isOverThresholdDrag // didn't move too much + ) { + triggerEvents(down, ["click", "tap", "vclick"], e, { x: pos[0], y: pos[1] }); + + didDoubleClick = false; + if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) { + clickTimeout && clearTimeout(clickTimeout); + didDoubleClick = true; + prevClickTimeStamp = null; + triggerEvents(down, ["dblclick", "dbltap", "vdblclick"], e, { x: pos[0], y: pos[1] }); + } else { + clickTimeout = setTimeout(() => { + if (didDoubleClick) return; + triggerEvents(down, ["oneclick", "onetap", "voneclick"], e, { x: pos[0], y: pos[1] }); + }, cy.multiClickDebounceTime()); + prevClickTimeStamp = e.timeStamp; + } + } + + // Deselect all elements if nothing is currently under the mouse cursor and we aren't dragging something + if( (down == null) // not mousedown on node + && !r.dragData.didDrag // didn't move the node around + && !r.hoverData.selecting // not box selection + && !r.hoverData.dragged // didn't pan + && !isMultSelKeyDown( e ) + ){ + + cy.$(isSelected).unselect(['tapunselect']); + + if( draggedElements.length > 0 ){ + r.redrawHint( 'eles', true ); + } + + r.dragData.possibleDragElements = draggedElements = cy.collection(); + } + + // Single selection + if( near == down && !r.dragData.didDrag && !r.hoverData.selecting ){ + if( near != null && near._private.selectable ){ + + if( r.hoverData.dragging ){ + // if panning, don't change selection state + } else if( cy.selectionType() === 'additive' || multSelKeyDown ){ + if( near.selected() ){ + near.unselect(['tapunselect']); + } else { + near.select(['tapselect']); + } + } else { + if( !multSelKeyDown ){ + cy.$(isSelected).unmerge( near ).unselect(['tapunselect']); + near.select(['tapselect']); + } + } + + r.redrawHint( 'eles', true ); + } + } + + if( r.hoverData.selecting ){ + var box = cy.collection( r.getAllInBox( select[0], select[1], select[2], select[3] ) ); + + r.redrawHint( 'select', true ); + + if( box.length > 0 ){ + r.redrawHint( 'eles', true ); + } + + cy.emit(makeEvent('boxend')); + + var eleWouldBeSelected = function( ele ){ return ele.selectable() && !ele.selected(); }; + + if( cy.selectionType() === 'additive' ){ + box + .emit(makeEvent('box')) + .stdFilter( eleWouldBeSelected ) + .select() + .emit(makeEvent('boxselect')) + ; + } else { + if( !multSelKeyDown ){ + cy.$(isSelected).unmerge(box).unselect(); + } + + box + .emit(makeEvent('box')) + .stdFilter( eleWouldBeSelected ) + .select() + .emit(makeEvent('boxselect')) + ; + } + + // always need redraw in case eles unselectable + r.redraw(); + + } + + // Cancel drag pan + if( r.hoverData.dragging ){ + r.hoverData.dragging = false; + + r.redrawHint( 'select', true ); + r.redrawHint( 'eles', true ); + + r.redraw(); + } + + if( !select[4] ) { + r.redrawHint('drag', true); + r.redrawHint('eles', true); + + var downWasGrabbed = down && down.grabbed(); + + freeDraggedElements( draggedElements ); + + if( downWasGrabbed ){ + down.emit(makeEvent('freeon')); + draggedElements.emit(makeEvent('free')); + + if( r.dragData.didDrag ){ + down.emit(makeEvent('dragfreeon')); + draggedElements.emit(makeEvent('dragfree')); + } + } + } + + } // else not right mouse + + select[4] = 0; r.hoverData.down = null; + + r.hoverData.cxtStarted = false; + r.hoverData.draggingEles = false; + r.hoverData.selecting = false; + r.hoverData.isOverThresholdDrag = false; + r.dragData.didDrag = false; + r.hoverData.dragged = false; + r.hoverData.dragDelta = []; + r.hoverData.mdownPos = null; + r.hoverData.mdownGPos = null; + r.hoverData.which = null; + + }, false ); + + var wheelDeltas = []; // log of first N wheel deltas + var wheelDeltaN = 4; // how many events to log + var inaccurateScrollDevice; + var inaccurateScrollFactor = 100000; // base of inaccurate wheel deltas (e.g. base 5 could yield wheels of 10, 25, 50, etc.) + + var allAreDivisibleBy = function( list, factor ){ + for( var i = 0; i < list.length; i++ ){ + if( list[i] % factor !== 0 ){ + return false; + } + } + + return true; + } + + var allAreSameMagnitude = function(list) { + var firstMag = Math.abs(list[0]); + for (var i = 1; i < list.length; i++) { + if (Math.abs(list[i]) !== firstMag) { + return false; + } + } + return true; + } + + var wheelHandler = function( e ){ + var clamp = false; + var delta = e.deltaY; + + if (delta == null) { // compatibility with old browsers + if (e.wheelDeltaY != null) { + delta = e.wheelDeltaY / 4; + } else if (e.wheelDelta != null) { + delta = e.wheelDelta / 4; + } + } + + if (delta === 0) { + return; // no change in zoom (Bug: Zoom becomes erratic on rapid scroll due to deltaY: 0 event #3394) + } + + if (inaccurateScrollDevice == null) { + if (wheelDeltas.length >= wheelDeltaN) { // use log to determine if inaccurate + var wds = wheelDeltas; + inaccurateScrollDevice = allAreDivisibleBy(wds, 5); + + if (!inaccurateScrollDevice) { // check for all large values of exact same magnitude + var firstMag = Math.abs(wds[0]); + + inaccurateScrollDevice = allAreSameMagnitude(wds) && firstMag > 5; + } + + if (inaccurateScrollDevice) { + for (var i = 0; i < wds.length; i++) { + inaccurateScrollFactor = Math.min(Math.abs(wds[i]), inaccurateScrollFactor); + } + } + + // console.log('Sampled wheel deltas:', wds); + // console.log('inaccurateScrollDevice:', inaccurateScrollDevice); + // console.log('inaccurateScrollFactor:', inaccurateScrollFactor); + } else { // clamp and log until we reach N + wheelDeltas.push(delta); + clamp = true; + // console.log('Clamping initial wheel events until we get a good sample'); + } + } else if(inaccurateScrollDevice) { // keep updating + inaccurateScrollFactor = Math.min(Math.abs(delta), inaccurateScrollFactor); + // console.log('Keep updating inaccurateScrollFactor beyond sample in case we did not get the smallest possible val:', inaccurateScrollFactor); + } + + if( r.scrollingPage ){ return; } // while scrolling, ignore wheel-to-zoom + + var cy = r.cy; + var zoom = cy.zoom(); + var pan = cy.pan(); + var pos = r.projectIntoViewport( e.clientX, e.clientY ); + var rpos = [ pos[0] * zoom + pan.x, + pos[1] * zoom + pan.y ]; + + if( r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection() ){ // if pan dragging or cxt dragging, wheel movements make no zoom + e.preventDefault(); + return; + } + + if( cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled() ){ + e.preventDefault(); + + r.data.wheelZooming = true; + clearTimeout( r.data.wheelTimeout ); + r.data.wheelTimeout = setTimeout( function(){ + r.data.wheelZooming = false; + + r.redrawHint( 'eles', true ); + r.redraw(); + }, 150 ); + + var diff; + + if (clamp && Math.abs(delta) > 5) { + delta = math.signum(delta) * 5; + } + + diff = delta / -250; + + if (inaccurateScrollDevice) { + diff /= inaccurateScrollFactor; + + diff *= 3; + } + + diff = diff * r.wheelSensitivity; + + // console.log(`delta = ${delta}, diff = ${diff}, mode = ${e.deltaMode}`) + + var needsWheelFix = e.deltaMode === 1; + if( needsWheelFix ){ // fixes slow wheel events on ff/linux and ff/windows + diff *= 33; + } + + var newZoom = cy.zoom() * Math.pow( 10, diff ); + + if( e.type === 'gesturechange' ){ + newZoom = r.gestureStartZoom * e.scale; + } + + cy.zoom( { + level: newZoom, + renderedPosition: { x: rpos[0], y: rpos[1] } + } ); + + cy.emit({ + type: e.type === 'gesturechange' ? 'pinchzoom' : 'scrollzoom', + originalEvent: e, + position: { x: pos[0], y: pos[1] } + }); + } + + }; + + // Functions to help with whether mouse wheel should trigger zooming + // -- + r.registerBinding( r.container, 'wheel', wheelHandler, true ); + + // disable nonstandard wheel events + // r.registerBinding(r.container, 'mousewheel', wheelHandler, true); + // r.registerBinding(r.container, 'DOMMouseScroll', wheelHandler, true); + // r.registerBinding(r.container, 'MozMousePixelScroll', wheelHandler, true); // older firefox + + r.registerBinding( containerWindow, 'scroll', function scrollHandler( e ){ // eslint-disable-line no-unused-vars + r.scrollingPage = true; + + clearTimeout( r.scrollingPageTimeout ); + r.scrollingPageTimeout = setTimeout( function(){ + r.scrollingPage = false; + }, 250 ); + }, true ); + + // desktop safari pinch to zoom start + r.registerBinding( r.container, 'gesturestart', function gestureStartHandler(e){ + r.gestureStartZoom = r.cy.zoom(); + + if( !r.hasTouchStarted ){ // don't affect touch devices like iphone + e.preventDefault(); + } + }, true ); + + r.registerBinding( r.container, 'gesturechange', function(e){ + if( !r.hasTouchStarted ){ // don't affect touch devices like iphone + wheelHandler(e); + } + }, true ); + + // Functions to help with handling mouseout/mouseover on the Cytoscape container + // Handle mouseout on Cytoscape container + r.registerBinding( r.container, 'mouseout', function mouseOutHandler( e ){ + var pos = r.projectIntoViewport( e.clientX, e.clientY ); + + r.cy.emit( ( { + originalEvent: e, + type: 'mouseout', + position: { x: pos[0], y: pos[1] } + } ) ); + }, false ); + + r.registerBinding( r.container, 'mouseover', function mouseOverHandler( e ){ + var pos = r.projectIntoViewport( e.clientX, e.clientY ); + + r.cy.emit( ( { + originalEvent: e, + type: 'mouseover', + position: { x: pos[0], y: pos[1] } + } ) ); + }, false ); + + var f1x1, f1y1, f2x1, f2y1; // starting points for pinch-to-zoom + var distance1, distance1Sq; // initial distance between finger 1 and finger 2 for pinch-to-zoom + var center1, modelCenter1; // center point on start pinch to zoom + var offsetLeft, offsetTop; + var containerWidth, containerHeight; + var twoFingersStartInside; + + var distance = function( x1, y1, x2, y2 ){ + return Math.sqrt( (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) ); + }; + + var distanceSq = function( x1, y1, x2, y2 ){ + return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); + }; + + var touchstartHandler; + r.registerBinding( r.container, 'touchstart', touchstartHandler = function( e ){ + r.hasTouchStarted = true; + + if( !eventInContainer(e) ){ return; } + + blurActiveDomElement(); + + r.touchData.capture = true; + r.data.bgActivePosistion = undefined; + + var cy = r.cy; + var now = r.touchData.now; + var earlier = r.touchData.earlier; + + if( e.touches[0] ){ var pos = r.projectIntoViewport( e.touches[0].clientX, e.touches[0].clientY ); now[0] = pos[0]; now[1] = pos[1]; } + if( e.touches[1] ){ var pos = r.projectIntoViewport( e.touches[1].clientX, e.touches[1].clientY ); now[2] = pos[0]; now[3] = pos[1]; } + if( e.touches[2] ){ var pos = r.projectIntoViewport( e.touches[2].clientX, e.touches[2].clientY ); now[4] = pos[0]; now[5] = pos[1]; } + + let makeEvent = (type) => ({ + originalEvent: e, + type: type, + position: { x: now[0], y: now[1] } + }); + + // record starting points for pinch-to-zoom + if( e.touches[1] ){ + + r.touchData.singleTouchMoved = true; + + freeDraggedElements( r.dragData.touchDragEles ); + + var offsets = r.findContainerClientCoords(); + offsetLeft = offsets[0]; + offsetTop = offsets[1]; + containerWidth = offsets[2]; + containerHeight = offsets[3]; + + f1x1 = e.touches[0].clientX - offsetLeft; + f1y1 = e.touches[0].clientY - offsetTop; + + f2x1 = e.touches[1].clientX - offsetLeft; + f2y1 = e.touches[1].clientY - offsetTop; + + twoFingersStartInside = + 0 <= f1x1 && f1x1 <= containerWidth + && 0 <= f2x1 && f2x1 <= containerWidth + && 0 <= f1y1 && f1y1 <= containerHeight + && 0 <= f2y1 && f2y1 <= containerHeight + ; + + var pan = cy.pan(); + var zoom = cy.zoom(); + + distance1 = distance( f1x1, f1y1, f2x1, f2y1 ); + distance1Sq = distanceSq( f1x1, f1y1, f2x1, f2y1 ); + center1 = [ (f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2 ]; + modelCenter1 = [ + (center1[0] - pan.x) / zoom, + (center1[1] - pan.y) / zoom + ]; + + // consider context tap + var cxtDistThreshold = 200; + var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold; + if( distance1Sq < cxtDistThresholdSq && !e.touches[2] ){ + + var near1 = r.findNearestElement( now[0], now[1], true, true ); + var near2 = r.findNearestElement( now[2], now[3], true, true ); + + if( near1 && near1.isNode() ){ + near1.activate().emit(makeEvent('cxttapstart')); + r.touchData.start = near1; + + } else if( near2 && near2.isNode() ){ + near2.activate().emit(makeEvent('cxttapstart')); + r.touchData.start = near2; + + } else { + cy.emit(makeEvent('cxttapstart')); + } + + if( r.touchData.start ){ r.touchData.start._private.grabbed = false; } + r.touchData.cxt = true; + r.touchData.cxtDragged = false; + r.data.bgActivePosistion = undefined; + + r.redraw(); + return; + + } + + } + + if( e.touches[2] ){ + // ignore + + // safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...) + if( cy.boxSelectionEnabled() ){ + e.preventDefault(); + } + + } else if( e.touches[1] ){ + // ignore + } else if( e.touches[0] ){ + var nears = r.findNearestElements( now[0], now[1], true, true ); + var near = nears[0]; + + if( near != null ){ + near.activate(); + + r.touchData.start = near; + r.touchData.starts = nears; + + if( r.nodeIsGrabbable( near ) ){ + + var draggedEles = r.dragData.touchDragEles = cy.collection(); + var selectedNodes = null; + + r.redrawHint( 'eles', true ); + r.redrawHint( 'drag', true ); + + if( near.selected() ){ + // reset drag elements, since near will be added again + + selectedNodes = cy.$( function( ele ){ + return ele.selected() && r.nodeIsGrabbable( ele ); + } ); + + addNodesToDrag( selectedNodes, { addToList: draggedEles } ); + } else { + addNodeToDrag( near, { addToList: draggedEles } ); + } + + setGrabTarget( near ); + + near.emit( makeEvent('grabon') ); + + if( selectedNodes ){ + selectedNodes.forEach(function( n ){ n.emit( makeEvent('grab') ); }); + } else { + near.emit( makeEvent('grab') ); + } + } + } + + triggerEvents( near, [ 'touchstart', 'tapstart', 'vmousedown' ], e, { x: now[0], y: now[1] } ); + + if( near == null ){ + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + + r.redrawHint( 'select', true ); + r.redraw(); + } + + + // Tap, taphold + // ----- + + r.touchData.singleTouchMoved = false; + r.touchData.singleTouchStartTime = +new Date(); + + clearTimeout( r.touchData.tapholdTimeout ); + r.touchData.tapholdTimeout = setTimeout( function(){ + if( + r.touchData.singleTouchMoved === false + && !r.pinching // if pinching, then taphold unselect shouldn't take effect + && !r.touchData.selecting // box selection shouldn't allow taphold through + ){ + triggerEvents( r.touchData.start, [ 'taphold' ], e, { x: now[0], y: now[1] } ); + } + }, r.tapholdDuration ); + } + + if( e.touches.length >= 1 ){ + var sPos = r.touchData.startPosition = [null, null, null, null, null, null]; + + for( var i = 0; i < now.length; i++ ){ + sPos[i] = earlier[i] = now[i]; + } + + var touch0 = e.touches[0]; + + r.touchData.startGPosition = [ touch0.clientX, touch0.clientY ]; + } + + }, false ); + + var touchmoveHandler; + r.registerBinding(containerWindow, 'touchmove', touchmoveHandler = function(e) { // eslint-disable-line no-undef + var capture = r.touchData.capture; + + if( !capture && !eventInContainer(e) ){ return; } + + var select = r.selection; + var cy = r.cy; + var now = r.touchData.now; + var earlier = r.touchData.earlier; + var zoom = cy.zoom(); + + if( e.touches[0] ){ var pos = r.projectIntoViewport( e.touches[0].clientX, e.touches[0].clientY ); now[0] = pos[0]; now[1] = pos[1]; } + if( e.touches[1] ){ var pos = r.projectIntoViewport( e.touches[1].clientX, e.touches[1].clientY ); now[2] = pos[0]; now[3] = pos[1]; } + if( e.touches[2] ){ var pos = r.projectIntoViewport( e.touches[2].clientX, e.touches[2].clientY ); now[4] = pos[0]; now[5] = pos[1]; } + + let makeEvent = (type) => ({ + originalEvent: e, + type: type, + position: { x: now[0], y: now[1] } + }); + + var startGPos = r.touchData.startGPosition; + var isOverThresholdDrag; + + if( capture && e.touches[0] && startGPos ){ + var disp = []; for (var j=0;j= r.touchTapThreshold2; + } + + // context swipe cancelling + if( capture && r.touchData.cxt ){ + e.preventDefault(); + + var f1x2 = e.touches[0].clientX - offsetLeft, f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, f2y2 = e.touches[1].clientY - offsetTop; + // var distance2 = distance( f1x2, f1y2, f2x2, f2y2 ); + var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 ); + var factorSq = distance2Sq / distance1Sq; + + var distThreshold = 150; + var distThresholdSq = distThreshold * distThreshold; + var factorThreshold = 1.5; + var factorThresholdSq = factorThreshold * factorThreshold; + + // cancel ctx gestures if the distance b/t the fingers increases + if( factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq ){ + r.touchData.cxt = false; + + r.data.bgActivePosistion = undefined; + + r.redrawHint( 'select', true ); + + var cxtEvt = makeEvent('cxttapend'); + + if( r.touchData.start ){ + r.touchData.start + .unactivate() + .emit( cxtEvt ) + ; + + r.touchData.start = null; + } else { + cy.emit( cxtEvt ); + } + } + + } + + // context swipe + if( capture && r.touchData.cxt ){ + var cxtEvt = makeEvent('cxtdrag'); + r.data.bgActivePosistion = undefined; + r.redrawHint( 'select', true ); + + if( r.touchData.start ){ + r.touchData.start.emit( cxtEvt ); + } else { + cy.emit( cxtEvt ); + } + + if( r.touchData.start ){ r.touchData.start._private.grabbed = false; } + r.touchData.cxtDragged = true; + + var near = r.findNearestElement( now[0], now[1], true, true ); + + if( !r.touchData.cxtOver || near !== r.touchData.cxtOver ){ + + if( r.touchData.cxtOver ){ + r.touchData.cxtOver.emit(makeEvent('cxtdragout')); + } + + r.touchData.cxtOver = near; + + if( near ){ + near.emit(makeEvent('cxtdragover')); + } + + } + + // box selection + } else if( capture && e.touches[2] && cy.boxSelectionEnabled() ){ + e.preventDefault(); + + r.data.bgActivePosistion = undefined; + + this.lastThreeTouch = +new Date(); + + if( !r.touchData.selecting ){ + cy.emit(makeEvent('boxstart')); + } + + r.touchData.selecting = true; + r.touchData.didSelect = true; + select[4] = 1; + + if( !select || select.length === 0 || select[0] === undefined ){ + select[0] = (now[0] + now[2] + now[4]) / 3; + select[1] = (now[1] + now[3] + now[5]) / 3; + select[2] = (now[0] + now[2] + now[4]) / 3 + 1; + select[3] = (now[1] + now[3] + now[5]) / 3 + 1; + } else { + select[2] = (now[0] + now[2] + now[4]) / 3; + select[3] = (now[1] + now[3] + now[5]) / 3; + } + + r.redrawHint( 'select', true ); + r.redraw(); + + // pinch to zoom + } else if( + capture && e.touches[1] + && !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom + && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled() + ){ // two fingers => pinch to zoom + e.preventDefault(); + + r.data.bgActivePosistion = undefined; + r.redrawHint( 'select', true ); + + var draggedEles = r.dragData.touchDragEles; + if( draggedEles ){ + r.redrawHint( 'drag', true ); + + for( var i = 0; i < draggedEles.length; i++ ){ + var de_p = draggedEles[i]._private; + + de_p.grabbed = false; + de_p.rscratch.inDragLayer = false; + } + } + + let start = r.touchData.start; + + // (x2, y2) for fingers 1 and 2 + var f1x2 = e.touches[0].clientX - offsetLeft, f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, f2y2 = e.touches[1].clientY - offsetTop; + + + var distance2 = distance( f1x2, f1y2, f2x2, f2y2 ); + // var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 ); + // var factor = Math.sqrt( distance2Sq ) / Math.sqrt( distance1Sq ); + var factor = distance2 / distance1; + + if( twoFingersStartInside ){ + // delta finger1 + var df1x = f1x2 - f1x1; + var df1y = f1y2 - f1y1; + + // delta finger 2 + var df2x = f2x2 - f2x1; + var df2y = f2y2 - f2y1; + + // translation is the normalised vector of the two fingers movement + // i.e. so pinching cancels out and moving together pans + var tx = (df1x + df2x) / 2; + var ty = (df1y + df2y) / 2; + + // now calculate the zoom + var zoom1 = cy.zoom(); + var zoom2 = zoom1 * factor; + var pan1 = cy.pan(); + + // the model center point converted to the current rendered pos + var ctrx = modelCenter1[0] * zoom1 + pan1.x; + var ctry = modelCenter1[1] * zoom1 + pan1.y; + + var pan2 = { + x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx, + y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry + }; + + // remove dragged eles + if( start && start.active() ){ + var draggedEles = r.dragData.touchDragEles; + + freeDraggedElements( draggedEles ); + + r.redrawHint( 'drag', true ); + r.redrawHint( 'eles', true ); + + start + .unactivate() + .emit(makeEvent('freeon')) + ; + + draggedEles.emit(makeEvent('free')); + + if( r.dragData.didDrag ){ + start.emit(makeEvent('dragfreeon')); + draggedEles.emit(makeEvent('dragfree')); + } + } + + cy.viewport( { + zoom: zoom2, + pan: pan2, + cancelOnFailedZoom: true + } ); + cy.emit(makeEvent('pinchzoom')); + + distance1 = distance2; + f1x1 = f1x2; + f1y1 = f1y2; + f2x1 = f2x2; + f2y1 = f2y2; + + r.pinching = true; + } + + // Re-project + if( e.touches[0] ){ var pos = r.projectIntoViewport( e.touches[0].clientX, e.touches[0].clientY ); now[0] = pos[0]; now[1] = pos[1]; } + if( e.touches[1] ){ var pos = r.projectIntoViewport( e.touches[1].clientX, e.touches[1].clientY ); now[2] = pos[0]; now[3] = pos[1]; } + if( e.touches[2] ){ var pos = r.projectIntoViewport( e.touches[2].clientX, e.touches[2].clientY ); now[4] = pos[0]; now[5] = pos[1]; } + + } else if( + e.touches[0] + && !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning + ){ + var start = r.touchData.start; + var last = r.touchData.last; + var near; + + if( !r.hoverData.draggingEles && !r.swipePanning ){ + near = r.findNearestElement( now[0], now[1], true, true ); + } + + if( capture && start != null ){ + e.preventDefault(); + } + + // dragging nodes + if( capture && start != null && r.nodeIsDraggable( start ) ){ + + if( isOverThresholdDrag ){ // then dragging can happen + var draggedEles = r.dragData.touchDragEles; + var justStartedDrag = !r.dragData.didDrag; + + if( justStartedDrag ){ + addNodesToDrag( draggedEles , { inDragLayer: true } ); + } + + r.dragData.didDrag = true; + + var totalShift = { x: 0, y: 0 }; + + if( is.number( disp[0] ) && is.number( disp[1] ) ){ + totalShift.x += disp[0]; + totalShift.y += disp[1]; + + if( justStartedDrag ){ + r.redrawHint( 'eles', true ); + + var dragDelta = r.touchData.dragDelta; + + if( dragDelta && is.number( dragDelta[0] ) && is.number( dragDelta[1] ) ){ + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + + r.hoverData.draggingEles = true; + + ( draggedEles + .silentShift( totalShift ) + .emit(makeEvent('position')) + .emit(makeEvent('drag')) + ); + + r.redrawHint( 'drag', true ); + + if( + r.touchData.startPosition[0] == earlier[0] + && r.touchData.startPosition[1] == earlier[1] + ){ + + r.redrawHint( 'eles', true ); + } + + r.redraw(); + } else { // otherwise keep track of drag delta for later + var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || []; + + if( dragDelta.length === 0 ){ + dragDelta.push( disp[0] ); + dragDelta.push( disp[1] ); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + } + } + + // touchmove + { + triggerEvents( (start || near), [ 'touchmove', 'tapdrag', 'vmousemove' ], e, { x: now[0], y: now[1] } ); + + if( ( !start || !start.grabbed() ) && near != last ){ + if( last ){ last.emit(makeEvent('tapdragout')); } + if( near ){ near.emit(makeEvent('tapdragover')); } + } + + r.touchData.last = near; + } + + // check to cancel taphold + if( capture ){ + for( var i = 0; i < now.length; i++ ){ + if( now[ i ] + && r.touchData.startPosition[ i ] + && isOverThresholdDrag ){ + + r.touchData.singleTouchMoved = true; + } + } + } + + // panning + if( + capture + && ( start == null || start.pannable() ) + && cy.panningEnabled() && cy.userPanningEnabled() + ){ + + var allowPassthrough = allowPanningPassthrough( start, r.touchData.starts ); + + if( allowPassthrough ){ + e.preventDefault(); + + if( !r.data.bgActivePosistion ){ + r.data.bgActivePosistion = math.array2point( r.touchData.startPosition ); + } + + if( r.swipePanning ){ + cy.panBy( { + x: disp[0] * zoom, + y: disp[1] * zoom + } ); + cy.emit(makeEvent('dragpan')); + + } else if( isOverThresholdDrag ){ + r.swipePanning = true; + + cy.panBy( { + x: dx * zoom, + y: dy * zoom + } ); + cy.emit(makeEvent('dragpan')); + + if( start ){ + start.unactivate(); + + r.redrawHint( 'select', true ); + + r.touchData.start = null; + } + } + + } + + // Re-project + var pos = r.projectIntoViewport( e.touches[0].clientX, e.touches[0].clientY ); + now[0] = pos[0]; now[1] = pos[1]; + } + } + + for( var j = 0; j < now.length; j++ ){ earlier[ j ] = now[ j ]; } + + // the active bg indicator should be removed when making a swipe that is neither for dragging nodes or panning + if( capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null ){ + r.data.bgActivePosistion = undefined; + r.redrawHint( 'select', true ); + r.redraw(); + } + + }, false ); + var touchcancelHandler; + r.registerBinding( containerWindow, 'touchcancel', touchcancelHandler = function( e ){ // eslint-disable-line no-unused-vars + var start = r.touchData.start; + + r.touchData.capture = false; + + if( start ){ + start.unactivate(); + } + } ); + + var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp; + r.registerBinding( containerWindow, 'touchend', touchendHandler = function( e ){ // eslint-disable-line no-unused-vars + var start = r.touchData.start; + + var capture = r.touchData.capture; + + if( capture ){ + if( e.touches.length === 0 ){ + r.touchData.capture = false; + } + + e.preventDefault(); + } else { + return; + } + + var select = r.selection; + + r.swipePanning = false; + r.hoverData.draggingEles = false; + + var cy = r.cy; + var zoom = cy.zoom(); + var now = r.touchData.now; + var earlier = r.touchData.earlier; + + if( e.touches[0] ){ var pos = r.projectIntoViewport( e.touches[0].clientX, e.touches[0].clientY ); now[0] = pos[0]; now[1] = pos[1]; } + if( e.touches[1] ){ var pos = r.projectIntoViewport( e.touches[1].clientX, e.touches[1].clientY ); now[2] = pos[0]; now[3] = pos[1]; } + if( e.touches[2] ){ var pos = r.projectIntoViewport( e.touches[2].clientX, e.touches[2].clientY ); now[4] = pos[0]; now[5] = pos[1]; } + + let makeEvent = (type) => ({ + originalEvent: e, + type: type, + position: { x: now[0], y: now[1] } + }); + + if( start ){ + start.unactivate(); + } + + var ctxTapend; + if( r.touchData.cxt ){ + ctxTapend = makeEvent('cxttapend'); + + if( start ){ + start.emit( ctxTapend ); + } else { + cy.emit( ctxTapend ); + } + + if( !r.touchData.cxtDragged ){ + var ctxTap = makeEvent('cxttap'); + + if( start ){ + start.emit( ctxTap ); + } else { + cy.emit( ctxTap ); + } + + } + + if( r.touchData.start ){ r.touchData.start._private.grabbed = false; } + r.touchData.cxt = false; + r.touchData.start = null; + + r.redraw(); + return; + } + + // no more box selection if we don't have three fingers + if( !e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting ){ + r.touchData.selecting = false; + + var box = cy.collection( r.getAllInBox( select[0], select[1], select[2], select[3] ) ); + + select[0] = undefined; + select[1] = undefined; + select[2] = undefined; + select[3] = undefined; + select[4] = 0; + + r.redrawHint( 'select', true ); + + cy.emit(makeEvent('boxend')); + + var eleWouldBeSelected = function( ele ){ return ele.selectable() && !ele.selected(); }; + + box + .emit(makeEvent('box')) + .stdFilter( eleWouldBeSelected ) + .select() + .emit(makeEvent('boxselect')) + ; + + if( box.nonempty() ){ + r.redrawHint( 'eles', true ); + } + + r.redraw(); + } + + if( start != null ){ + start.unactivate(); + } + + if( e.touches[2] ){ + r.data.bgActivePosistion = undefined; + r.redrawHint( 'select', true ); + } else if( e.touches[1] ){ + // ignore + } else if( e.touches[0] ){ + // ignore + + // Last touch released + } else if( !e.touches[0] ){ + + r.data.bgActivePosistion = undefined; + r.redrawHint( 'select', true ); + + var draggedEles = r.dragData.touchDragEles; + + if( start != null ){ + + var startWasGrabbed = start._private.grabbed; + + freeDraggedElements( draggedEles ); + + r.redrawHint( 'drag', true ); + r.redrawHint( 'eles', true ); + + if( startWasGrabbed ){ + start.emit(makeEvent('freeon')); + draggedEles.emit(makeEvent('free')); + + if( r.dragData.didDrag ){ + start.emit(makeEvent('dragfreeon')); + draggedEles.emit(makeEvent('dragfree')); + } + } + + triggerEvents( start, [ 'touchend', 'tapend', 'vmouseup', 'tapdragout' ], e, { x: now[0], y: now[1] } ); + + start.unactivate(); + + r.touchData.start = null; + + } else { + var near = r.findNearestElement( now[0], now[1], true, true ); + + triggerEvents( near, [ 'touchend', 'tapend', 'vmouseup', 'tapdragout' ], e, { x: now[0], y: now[1] } ); + } + + var dx = r.touchData.startPosition[0] - now[0]; + var dx2 = dx * dx; + var dy = r.touchData.startPosition[1] - now[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + var rdist2 = dist2 * zoom * zoom; + + // Tap event, roughly same as mouse click event for touch + if( !r.touchData.singleTouchMoved ){ + if( !start ){ + cy.$(':selected').unselect(['tapunselect']); + } + + triggerEvents( start, [ 'tap', 'vclick' ], e, { x: now[0], y: now[1] } ); + + didDoubleTouch = false; + if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) { + touchTimeout && clearTimeout(touchTimeout); + didDoubleTouch = true; + prevTouchTimeStamp = null; + triggerEvents( start, [ 'dbltap', 'vdblclick' ], e, { x: now[0], y: now[1] } ); + } else { + touchTimeout = setTimeout(() => { + if (didDoubleTouch) return; + triggerEvents( start, [ 'onetap', 'voneclick' ], e, { x: now[0], y: now[1] } ); + }, cy.multiClickDebounceTime()); + prevTouchTimeStamp = e.timeStamp; + } + } + + // Prepare to select the currently touched node, only if it hasn't been dragged past a certain distance + if( start != null + && !r.dragData.didDrag // didn't drag nodes around + && start._private.selectable + && rdist2 < r.touchTapThreshold2 + && !r.pinching // pinch to zoom should not affect selection + ){ + + if( cy.selectionType() === 'single' ){ + cy.$(isSelected).unmerge( start ).unselect(['tapunselect']); + start.select(['tapselect']); + } else { + if( start.selected() ){ + start.unselect(['tapunselect']); + } else { + start.select(['tapselect']); + } + } + + r.redrawHint( 'eles', true ); + } + + r.touchData.singleTouchMoved = true; + } + + for( var j = 0; j < now.length; j++ ){ earlier[ j ] = now[ j ]; } + + r.dragData.didDrag = false; // reset for next touchstart + + if( e.touches.length === 0 ){ + r.touchData.dragDelta = []; + r.touchData.startPosition = [null, null, null, null, null, null]; + r.touchData.startGPosition = null; + r.touchData.didSelect = false; + } + + if( e.touches.length < 2 ){ + if( e.touches.length === 1 ){ + // the old start global pos'n may not be the same finger that remains + r.touchData.startGPosition = [ e.touches[0].clientX, e.touches[0].clientY ]; + } + + r.pinching = false; + + r.redrawHint( 'eles', true ); + r.redraw(); + } + + //r.redraw(); + + }, false ); + + // fallback compatibility layer for ms pointer events + if( typeof TouchEvent === 'undefined' ){ + + var pointers = []; + + var makeTouch = function( e ){ + return { + clientX: e.clientX, + clientY: e.clientY, + force: 1, + identifier: e.pointerId, + pageX: e.pageX, + pageY: e.pageY, + radiusX: e.width / 2, + radiusY: e.height / 2, + screenX: e.screenX, + screenY: e.screenY, + target: e.target + }; + }; + + var makePointer = function( e ){ + return { + event: e, + touch: makeTouch( e ) + }; + }; + + var addPointer = function( e ){ + pointers.push( makePointer( e ) ); + }; + + var removePointer = function( e ){ + for( var i = 0; i < pointers.length; i++ ){ + var p = pointers[ i ]; + + if( p.event.pointerId === e.pointerId ){ + pointers.splice( i, 1 ); + return; + } + } + }; + + var updatePointer = function( e ){ + var p = pointers.filter( function( p ){ + return p.event.pointerId === e.pointerId; + } )[0]; + + p.event = e; + p.touch = makeTouch( e ); + }; + + var addTouchesToEvent = function( e ){ + e.touches = pointers.map( function( p ){ + return p.touch; + } ); + }; + + var pointerIsMouse = function( e ){ + return e.pointerType === 'mouse' || e.pointerType === 4; + }; + + r.registerBinding( r.container, 'pointerdown', function( e ){ + if( pointerIsMouse(e) ){ return; } // mouse already handled + + e.preventDefault(); + + addPointer( e ); + + addTouchesToEvent( e ); + touchstartHandler( e ); + } ); + + r.registerBinding( r.container, 'pointerup', function( e ){ + if( pointerIsMouse(e) ){ return; } // mouse already handled + + removePointer( e ); + + addTouchesToEvent( e ); + touchendHandler( e ); + } ); + + r.registerBinding( r.container, 'pointercancel', function( e ){ + if( pointerIsMouse(e) ){ return; } // mouse already handled + + removePointer( e ); + + addTouchesToEvent( e ); + touchcancelHandler( e ); + } ); + + r.registerBinding( r.container, 'pointermove', function( e ){ + if( pointerIsMouse(e) ){ return; } // mouse already handled + + e.preventDefault(); + + updatePointer( e ); + + addTouchesToEvent( e ); + touchmoveHandler( e ); + } ); + + } +}; + +export default BRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/node-shapes.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/node-shapes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..646c4b048ae5638d8b53762b261faf0a25e99db1 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/node-shapes.mjs @@ -0,0 +1,658 @@ +import * as math from '../../../math.mjs'; +import * as round from "../../../round.mjs"; + +var BRp = {}; + +BRp.generatePolygon = function( name, points ){ + return ( this.nodeShapes[ name ] = { + renderer: this, + + name: name, + + points: points, + + draw: function( context, centerX, centerY, width, height, cornerRadius ){ + this.renderer.nodeShapeImpl( 'polygon', context, centerX, centerY, width, height, this.points ); + }, + + intersectLine: function( nodeX, nodeY, width, height, x, y, padding, cornerRadius ){ + return math.polygonIntersectLine( + x, y, + this.points, + nodeX, + nodeY, + width / 2, height / 2, + padding ) + ; + }, + + checkPoint: function( x, y, padding, width, height, centerX, centerY, cornerRadius ){ + return math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width, height, [0, -1], padding ) + ; + }, + + hasMiterBounds: name !== 'rectangle', + + miterBounds: function( centerX, centerY, width, height, strokeWidth, strokePosition ){ + return math.miterBox( this.points, centerX, centerY, width, height, strokeWidth, strokePosition ); + } + } ); +}; + +BRp.generateEllipse = function(){ + return ( this.nodeShapes['ellipse'] = { + renderer: this, + + name: 'ellipse', + + draw: function( context, centerX, centerY, width, height, cornerRadius ){ + this.renderer.nodeShapeImpl( this.name, context, centerX, centerY, width, height ); + }, + + intersectLine: function( nodeX, nodeY, width, height, x, y, padding, cornerRadius ){ + return math.intersectLineEllipse( + x, y, + nodeX, + nodeY, + width / 2 + padding, + height / 2 + padding ) + ; + }, + + checkPoint: function( x, y, padding, width, height, centerX, centerY, cornerRadius ){ + return math.checkInEllipse( x, y, width, height, centerX, centerY, padding ); + } + } ); +}; + +BRp.generateRoundPolygon = function( name, points ){ + + return ( this.nodeShapes[ name ] = { + renderer: this, + + name: name, + + points: points, + + getOrCreateCorners: function (centerX, centerY, width, height, cornerRadius, rs, field) { + if( rs[field] !== undefined && rs[field + '-cx'] === centerX && rs [field + '-cy'] === centerY ){ + return rs[field]; + } + + rs[field] = new Array( points.length / 2 ); + rs[field + '-cx'] = centerX; + rs[field + '-cy'] = centerY; + const halfW = width / 2; + const halfH = height / 2; + cornerRadius = cornerRadius === 'auto' ? math.getRoundPolygonRadius( width, height ) : cornerRadius; + const p = new Array( points.length / 2 ); + + for ( let i = 0; i < points.length / 2; i++ ){ + p[i] = { + x: centerX + halfW * points[ i * 2 ], + y: centerY + halfH * points[ i * 2 + 1 ] + }; + } + + let i, p1, p2, p3, len = p.length; + + p1 = p[ len - 1 ]; + // for each point + for( i = 0; i < len; i++ ){ + p2 = p[ (i) % len ]; + p3 = p[ (i + 1) % len ]; + rs[ field ][ i ] = round.getRoundCorner( p1, p2, p3, cornerRadius ); + + p1 = p2; + p2 = p3; + } + + return rs[ field ]; + }, + + draw: function( context, centerX, centerY, width, height, cornerRadius , rs){ + this.renderer.nodeShapeImpl( 'round-polygon', context, centerX, centerY, width, height, this.points, this.getOrCreateCorners( centerX, centerY, width, height, cornerRadius, rs, 'drawCorners' )); + }, + + intersectLine: function( nodeX, nodeY, width, height, x, y, padding, cornerRadius, rs ){ + return math.roundPolygonIntersectLine( + x, y, + this.points, + nodeX, + nodeY, + width, height, + padding, this.getOrCreateCorners( nodeX, nodeY, width, height, cornerRadius, rs, 'corners' ) ) + ; + }, + + checkPoint: function( x, y, padding, width, height, centerX, centerY, cornerRadius, rs ){ + return math.pointInsideRoundPolygon( x, y, this.points, + centerX, centerY, width, height, this.getOrCreateCorners( centerX, centerY, width, height, cornerRadius, rs, 'corners' ) ) + ; + } + } ); +}; + +BRp.generateRoundRectangle = function(){ + return ( this.nodeShapes['round-rectangle'] = this.nodeShapes['roundrectangle'] = { + renderer: this, + + name: 'round-rectangle', + + points: math.generateUnitNgonPointsFitToSquare( 4, 0 ), + + draw: function( context, centerX, centerY, width, height, cornerRadius ){ + this.renderer.nodeShapeImpl( this.name, context, centerX, centerY, width, height, this.points, cornerRadius ); + }, + + intersectLine: function( nodeX, nodeY, width, height, x, y, padding, cornerRadius ){ + return math.roundRectangleIntersectLine( + x, y, + nodeX, + nodeY, + width, height, + padding, cornerRadius ) + ; + }, + + checkPoint: function( + x, y, padding, width, height, centerX, centerY, cornerRadius ){ + let halfWidth = width / 2; + let halfHeight = height / 2; + cornerRadius = cornerRadius === 'auto' ? math.getRoundRectangleRadius( width, height ) : cornerRadius; + cornerRadius = Math.min(halfWidth, halfHeight, cornerRadius); + var diam = cornerRadius * 2; + + // Check hBox + if( math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width, height - diam, [0, -1], padding ) ){ + return true; + } + + // Check vBox + if( math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width - diam, height, [0, -1], padding ) ){ + return true; + } + + // Check top left quarter circle + if( math.checkInEllipse( x, y, + diam, diam, + centerX - halfWidth + cornerRadius, + centerY - halfHeight + cornerRadius, + padding ) ){ + + return true; + } + + // Check top right quarter circle + if( math.checkInEllipse( x, y, + diam, diam, + centerX + halfWidth - cornerRadius, + centerY - halfHeight + cornerRadius, + padding ) ){ + + return true; + } + + // Check bottom right quarter circle + if( math.checkInEllipse( x, y, + diam, diam, + centerX + halfWidth - cornerRadius, + centerY + halfHeight - cornerRadius, + padding ) ){ + + return true; + } + + // Check bottom left quarter circle + if( math.checkInEllipse( x, y, + diam, diam, + centerX - halfWidth + cornerRadius, + centerY + halfHeight - cornerRadius, + padding ) ){ + + return true; + } + + return false; + } + } ); +}; + +BRp.generateCutRectangle = function(){ + return ( this.nodeShapes['cut-rectangle'] = this.nodeShapes['cutrectangle'] = { + renderer: this, + + name: 'cut-rectangle', + + cornerLength: math.getCutRectangleCornerLength(), + + points: math.generateUnitNgonPointsFitToSquare( 4, 0 ), + + draw: function( context, centerX, centerY, width, height, cornerRadius ){ + this.renderer.nodeShapeImpl( this.name, context, centerX, centerY, width, height, null, cornerRadius); + }, + + generateCutTrianglePts: function( width, height, centerX, centerY, cornerRadius ){ + var cl = cornerRadius === 'auto' ? this.cornerLength : cornerRadius; + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + + // points are in clockwise order, inner (imaginary) triangle pt on [4, 5] + return { + topLeft: [ xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl ], + topRight: [ xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl ], + bottomRight: [ xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl ], + bottomLeft: [ xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl ] + }; + }, + + intersectLine: function( nodeX, nodeY, width, height, x, y, padding, cornerRadius ){ + var cPts = this.generateCutTrianglePts( width + 2*padding, height+2*padding, nodeX, nodeY, cornerRadius ); + var pts = [].concat.apply([], + [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), + cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4) + ]); + + return math.polygonIntersectLine( x, y, pts, nodeX, nodeY ); + }, + + checkPoint: function( x, y, padding, width, height, centerX, centerY, cornerRadius ){ + const cl = cornerRadius === 'auto' ? this.cornerLength : cornerRadius; + // Check hBox + if( math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width, height - 2 * cl, [0, -1], padding ) ){ + return true; + } + + // Check vBox + if( math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width - 2 * cl, height, [0, -1], padding ) ){ + return true; + } + var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY); + return math.pointInsidePolygonPoints( x, y, cutTrianglePts.topLeft) + || math.pointInsidePolygonPoints( x, y, cutTrianglePts.topRight ) + || math.pointInsidePolygonPoints( x, y, cutTrianglePts.bottomRight ) + || math.pointInsidePolygonPoints( x, y, cutTrianglePts.bottomLeft ); + } + + } ); +}; + +BRp.generateBarrel = function(){ + return ( this.nodeShapes['barrel'] = { + renderer: this, + + name: 'barrel', + + points: math.generateUnitNgonPointsFitToSquare( 4, 0 ), + + draw: function( context, centerX, centerY, width, height, cornerRadius ){ + this.renderer.nodeShapeImpl( this.name, context, centerX, centerY, width, height ); + }, + + intersectLine: function( nodeX, nodeY, width, height, x, y, padding, cornerRadius ){ + // use two fixed t values for the bezier curve approximation + + var t0 = 0.15; + var t1 = 0.5; + var t2 = 0.85; + + var bPts = this.generateBarrelBezierPts( width + 2*padding, height + 2*padding, nodeX, nodeY ); + + var approximateBarrelCurvePts = pts => { + // approximate curve pts based on the two t values + var m0 = math.qbezierPtAt({x: pts[0], y: pts[1]}, {x: pts[2], y: pts[3]}, {x: pts[4], y: pts[5]}, t0); + var m1 = math.qbezierPtAt({x: pts[0], y: pts[1]}, {x: pts[2], y: pts[3]}, {x: pts[4], y: pts[5]}, t1); + var m2 = math.qbezierPtAt({x: pts[0], y: pts[1]}, {x: pts[2], y: pts[3]}, {x: pts[4], y: pts[5]}, t2); + + return [ + pts[0],pts[1], + m0.x, m0.y, + m1.x, m1.y, + m2.x, m2.y, + pts[4], pts[5] + ]; + }; + + var pts = [].concat( + approximateBarrelCurvePts(bPts.topLeft), + approximateBarrelCurvePts(bPts.topRight), + approximateBarrelCurvePts(bPts.bottomRight), + approximateBarrelCurvePts(bPts.bottomLeft) + ); + + return math.polygonIntersectLine( x, y, pts, nodeX, nodeY ); + }, + + generateBarrelBezierPts: function( width, height, centerX, centerY ){ + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + + var curveConstants = math.getBarrelCurveConstants( width, height ); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width; + + // points are in clockwise order, inner (imaginary) control pt on [4, 5] + var pts = { + topLeft: [ xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin ], + topRight: [ xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset ], + bottomRight: [ xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd ], + bottomLeft: [ xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset ] + }; + + pts.topLeft.isTop = true; + pts.topRight.isTop = true; + pts.bottomLeft.isBottom = true; + pts.bottomRight.isBottom = true; + + return pts; + }, + + checkPoint: function( + x, y, padding, width, height, centerX, centerY, cornerRadius){ + + var curveConstants = math.getBarrelCurveConstants( width, height ); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + + // Check hBox + if( math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width, height - 2 * hOffset, [0, -1], padding ) ){ + return true; + } + + // Check vBox + if( math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width - 2 * wOffset, height, [0, -1], padding ) ){ + return true; + } + + var barrelCurvePts = this.generateBarrelBezierPts( width, height, centerX, centerY ); + + var getCurveT = function (x, y, curvePts) { + var x0 = curvePts[ 4 ]; + var x1 = curvePts[ 2 ]; + var x2 = curvePts[ 0 ]; + var y0 = curvePts[ 5 ]; + // var y1 = curvePts[ 3 ]; + var y2 = curvePts[ 1 ]; + + var xMin = Math.min( x0, x2 ); + var xMax = Math.max( x0, x2 ); + var yMin = Math.min( y0, y2 ); + var yMax = Math.max( y0, y2 ); + + if( xMin <= x && x <= xMax && yMin <= y && y <= yMax ){ + var coeff = math.bezierPtsToQuadCoeff( x0, x1, x2 ); + var roots = math.solveQuadratic( coeff[0], coeff[1], coeff[2], x ); + + var validRoots = roots.filter(function( r ){ + return 0 <= r && r <= 1; + }); + + if( validRoots.length > 0 ){ + return validRoots[ 0 ]; + } + } + return null; + }; + + var curveRegions = Object.keys( barrelCurvePts ); + for( var i = 0; i < curveRegions.length; i++ ){ + var corner = curveRegions[ i ]; + var cornerPts = barrelCurvePts[ corner ]; + var t = getCurveT( x, y, cornerPts ); + + if( t == null ){ continue; } + + var y0 = cornerPts[ 5 ]; + var y1 = cornerPts[ 3 ]; + var y2 = cornerPts[ 1 ]; + var bezY = math.qbezierAt( y0, y1, y2, t ); + + if( cornerPts.isTop && bezY <= y ){ + return true; + } + if( cornerPts.isBottom && y <= bezY ){ + return true; + } + } + return false; + } + } ); +}; + +BRp.generateBottomRoundrectangle = function(){ + return ( this.nodeShapes['bottom-round-rectangle'] = this.nodeShapes['bottomroundrectangle'] = { + renderer: this, + + name: 'bottom-round-rectangle', + + points: math.generateUnitNgonPointsFitToSquare( 4, 0 ), + + draw: function( context, centerX, centerY, width, height, cornerRadius ){ + this.renderer.nodeShapeImpl( this.name, context, centerX, centerY, width, height, this.points, cornerRadius ); + }, + + intersectLine: function( nodeX, nodeY, width, height, x, y, padding, cornerRadius ){ + var topStartX = nodeX - ( width / 2 + padding ); + var topStartY = nodeY - ( height / 2 + padding ); + var topEndY = topStartY; + var topEndX = nodeX + ( width / 2 + padding ); + + var topIntersections = math.finiteLinesIntersect( + x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false ); + if( topIntersections.length > 0 ){ + return topIntersections; + } + + return math.roundRectangleIntersectLine( + x, y, + nodeX, + nodeY, + width, height, + padding, cornerRadius ) + ; + }, + + checkPoint: function( + x, y, padding, width, height, centerX, centerY, cornerRadius ){ + + cornerRadius = cornerRadius === 'auto' ? math.getRoundRectangleRadius( width, height ) : cornerRadius; + var diam = 2 * cornerRadius; + + // Check hBox + if( math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width, height - diam, [0, -1], padding ) ){ + return true; + } + + // Check vBox + if( math.pointInsidePolygon( x, y, this.points, + centerX, centerY, width - diam, height, [0, -1], padding ) ){ + return true; + } + + // check non-rounded top side + var outerWidth = ( ( width / 2 ) + 2 * padding ); + var outerHeight = ( ( height / 2 ) + 2 * padding ); + var points = [ + centerX - outerWidth, centerY - outerHeight, + centerX - outerWidth, centerY, + centerX + outerWidth, centerY, + centerX + outerWidth, centerY - outerHeight + ]; + if( math.pointInsidePolygonPoints( x, y, points) ){ + return true; + } + + // Check bottom right quarter circle + if( math.checkInEllipse( x, y, + diam, diam, + centerX + width / 2 - cornerRadius, + centerY + height / 2 - cornerRadius, + padding ) ){ + + return true; + } + + // Check bottom left quarter circle + if( math.checkInEllipse( x, y, + diam, diam, + centerX - width / 2 + cornerRadius, + centerY + height / 2 - cornerRadius, + padding ) ){ + + return true; + } + + return false; + } + } ); +}; + + +BRp.registerNodeShapes = function(){ + var nodeShapes = this.nodeShapes = {}; + var renderer = this; + + this.generateEllipse(); + + this.generatePolygon( 'triangle', math.generateUnitNgonPointsFitToSquare( 3, 0 ) ); + this.generateRoundPolygon( 'round-triangle', math.generateUnitNgonPointsFitToSquare( 3, 0 ) ); + + this.generatePolygon( 'rectangle', math.generateUnitNgonPointsFitToSquare( 4, 0 ) ); + nodeShapes[ 'square' ] = nodeShapes[ 'rectangle' ]; + + this.generateRoundRectangle(); + + this.generateCutRectangle(); + + this.generateBarrel(); + + this.generateBottomRoundrectangle(); + + { + const diamondPoints = [ + 0, 1, + 1, 0, + 0, -1, + -1, 0 + ]; + this.generatePolygon( 'diamond', diamondPoints ); + this.generateRoundPolygon( 'round-diamond', diamondPoints ); + } + + this.generatePolygon( 'pentagon', math.generateUnitNgonPointsFitToSquare( 5, 0 ) ); + this.generateRoundPolygon( 'round-pentagon', math.generateUnitNgonPointsFitToSquare( 5, 0) ); + + this.generatePolygon( 'hexagon', math.generateUnitNgonPointsFitToSquare( 6, 0 ) ); + this.generateRoundPolygon( 'round-hexagon', math.generateUnitNgonPointsFitToSquare( 6, 0) ); + + this.generatePolygon( 'heptagon', math.generateUnitNgonPointsFitToSquare( 7, 0 ) ); + this.generateRoundPolygon( 'round-heptagon', math.generateUnitNgonPointsFitToSquare( 7, 0) ); + + this.generatePolygon( 'octagon', math.generateUnitNgonPointsFitToSquare( 8, 0 ) ); + this.generateRoundPolygon( 'round-octagon', math.generateUnitNgonPointsFitToSquare( 8, 0) ); + + var star5Points = new Array( 20 ); + { + var outerPoints = math.generateUnitNgonPoints( 5, 0 ); + var innerPoints = math.generateUnitNgonPoints( 5, Math.PI / 5 ); + + // Outer radius is 1; inner radius of star is smaller + var innerRadius = 0.5 * (3 - Math.sqrt( 5 )); + innerRadius *= 1.57; + + for( var i = 0;i < innerPoints.length / 2;i++ ){ + innerPoints[ i * 2] *= innerRadius; + innerPoints[ i * 2 + 1] *= innerRadius; + } + + for( var i = 0;i < 20 / 4;i++ ){ + star5Points[ i * 4] = outerPoints[ i * 2]; + star5Points[ i * 4 + 1] = outerPoints[ i * 2 + 1]; + + star5Points[ i * 4 + 2] = innerPoints[ i * 2]; + star5Points[ i * 4 + 3] = innerPoints[ i * 2 + 1]; + } + } + + star5Points = math.fitPolygonToSquare( star5Points ); + + this.generatePolygon( 'star', star5Points ); + + this.generatePolygon( 'vee', [ + -1, -1, + 0, -0.333, + 1, -1, + 0, 1 + ] ); + + this.generatePolygon( 'rhomboid', [ + -1, -1, + 0.333, -1, + 1, 1, + -0.333, 1 + ] ); + + this.generatePolygon( 'right-rhomboid', [ + -0.333, -1, + 1, -1, + 0.333, 1, + -1, 1 + ] ); + + this.nodeShapes['concavehexagon'] = this.generatePolygon( 'concave-hexagon', [ + -1, -0.95, + -0.75, 0, + -1, 0.95, + 1, 0.95, + 0.75, 0, + 1, -0.95 + ] ); + + { + const tagPoints = [ + -1, -1, + 0.25, -1, + 1, 0, + 0.25,1, + -1, 1 + ]; + this.generatePolygon( 'tag', tagPoints ); + this.generateRoundPolygon( 'round-tag', tagPoints ); + } + + nodeShapes.makePolygon = function( points ){ + + // use caching on user-specified polygons so they are as fast as native shapes + + var key = points.join( '$' ); + var name = 'polygon-' + key; + var shape; + + if( (shape = this[ name ]) ){ // got cached shape + return shape; + } + + // create and cache new shape + return renderer.generatePolygon( name, points ); + }; + +}; + +export default BRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/redraw.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/redraw.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ea93af5fbc30c262727ffa6123a9e26ba6c4fc36 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/base/redraw.mjs @@ -0,0 +1,108 @@ +import * as util from '../../../util/index.mjs'; + +var BRp = {}; + +BRp.timeToRender = function(){ + return this.redrawTotalTime / this.redrawCount; +}; + +BRp.redraw = function( options ){ + options = options || util.staticEmptyObject(); + + var r = this; + + if( r.averageRedrawTime === undefined ){ r.averageRedrawTime = 0; } + if( r.lastRedrawTime === undefined ){ r.lastRedrawTime = 0; } + if( r.lastDrawTime === undefined ){ r.lastDrawTime = 0; } + + r.requestedFrame = true; + r.renderOptions = options; +}; + +BRp.beforeRender = function( fn, priority ){ + // the renderer can't add tick callbacks when destroyed + if( this.destroyed ){ return; } + + if( priority == null ){ + util.error('Priority is not optional for beforeRender'); + } + + var cbs = this.beforeRenderCallbacks; + + cbs.push({ fn: fn, priority: priority }); + + // higher priority callbacks executed first + cbs.sort(function( a, b ){ return b.priority - a.priority; }); +}; + +var beforeRenderCallbacks = function( r, willDraw, startTime ){ + var cbs = r.beforeRenderCallbacks; + + for( var i = 0; i < cbs.length; i++ ){ + cbs[i].fn( willDraw, startTime ); + } +}; + +BRp.startRenderLoop = function(){ + var r = this; + var cy = r.cy; + + if( r.renderLoopStarted ){ + return; + } else { + r.renderLoopStarted = true; + } + + var renderFn = function( requestTime ){ + if( r.destroyed ){ return; } + + if( cy.batching() ){ + // mid-batch, none of these should run + // - pre frame hooks (calculations, texture caches, style, etc.) + // - any drawing + } else if( r.requestedFrame && !r.skipFrame ){ + beforeRenderCallbacks( r, true, requestTime ); + + var startTime = util.performanceNow(); + + r.render( r.renderOptions ); + + var endTime = r.lastDrawTime = util.performanceNow(); + + if( r.averageRedrawTime === undefined ){ + r.averageRedrawTime = endTime - startTime; + } + + if( r.redrawCount === undefined ){ + r.redrawCount = 0; + } + + r.redrawCount++; + + if( r.redrawTotalTime === undefined ){ + r.redrawTotalTime = 0; + } + + var duration = endTime - startTime; + + r.redrawTotalTime += duration; + r.lastRedrawTime = duration; + + // use a weighted average with a bias from the previous average so we don't spike so easily + r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2; + + r.requestedFrame = false; + } else { + beforeRenderCallbacks( r, false, requestTime ); + } + + r.skipFrame = false; + + util.requestAnimationFrame( renderFn ); + }; + + util.requestAnimationFrame( renderFn ); + +}; + +export default BRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/arrow-shapes.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/arrow-shapes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6028542e3408887d7cd135808ff0d8f594007c70 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/arrow-shapes.mjs @@ -0,0 +1,87 @@ +var CRp = {}; + +var impl; + +function polygon( context, points ){ + for( var i = 0; i < points.length; i++ ){ + var pt = points[ i ]; + + context.lineTo( pt.x, pt.y ); + } +} + +function triangleBackcurve( context, points, controlPoint ){ + var firstPt; + + for( var i = 0; i < points.length; i++ ){ + var pt = points[ i ]; + + if( i === 0 ){ + firstPt = pt; + } + + context.lineTo( pt.x, pt.y ); + } + + context.quadraticCurveTo( controlPoint.x, controlPoint.y, firstPt.x, firstPt.y ); +} + +function triangleTee( context, trianglePoints, teePoints ){ + if( context.beginPath ){ context.beginPath(); } + + var triPts = trianglePoints; + for( var i = 0; i < triPts.length; i++ ){ + var pt = triPts[ i ]; + + context.lineTo( pt.x, pt.y ); + } + + var teePts = teePoints; + var firstTeePt = teePoints[0]; + context.moveTo( firstTeePt.x, firstTeePt.y ); + + for( var i = 1; i < teePts.length; i++ ){ + var pt = teePts[ i ]; + + context.lineTo( pt.x, pt.y ); + } + + if( context.closePath ){ context.closePath(); } +} + +function circleTriangle(context, trianglePoints, rx, ry, r) { + if (context.beginPath) { context.beginPath(); } + context.arc(rx, ry, r, 0, Math.PI * 2, false); + var triPts = trianglePoints; + var firstTrPt = triPts[0]; + context.moveTo(firstTrPt.x, firstTrPt.y); + for (var i = 0; i < triPts.length; i++) { + var pt = triPts[i]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } +} + +function circle( context, rx, ry, r ){ + context.arc( rx, ry, r, 0, Math.PI * 2, false ); +} + +CRp.arrowShapeImpl = function( name ){ + return ( impl || (impl = { + 'polygon': polygon, + + 'triangle-backcurve': triangleBackcurve, + + 'triangle-tee': triangleTee, + + 'circle-triangle' : circleTriangle, + + 'triangle-cross': triangleTee, + + 'circle': circle + }) )[ name ]; +}; + +export default CRp; \ No newline at end of file diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-edges.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-edges.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fc71ef5d59833424041981c322aa0aa89671899b --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-edges.mjs @@ -0,0 +1,431 @@ +/* global Path2D */ + +import * as util from '../../../util/index.mjs'; +import {drawPreparedRoundCorner} from "../../../round.mjs"; + +let CRp = {}; + +CRp.drawEdge = function( context, edge, shiftToOriginWithBb, drawLabel = true, shouldDrawOverlay = true, shouldDrawOpacity = true ){ + let r = this; + let rs = edge._private.rscratch; + + if( shouldDrawOpacity && !edge.visible() ){ return; } + + // if bezier ctrl pts can not be calculated, then die + if( rs.badLine || rs.allpts == null || isNaN(rs.allpts[0]) ){ // isNaN in case edge is impossible and browser bugs (e.g. safari) + return; + } + + let bb; + if( shiftToOriginWithBb ){ + bb = shiftToOriginWithBb; + + context.translate( -bb.x1, -bb.y1 ); + } + + let opacity = shouldDrawOpacity ? edge.pstyle('opacity').value : 1; + let lineOpacity = shouldDrawOpacity ? edge.pstyle('line-opacity').value : 1; + + let curveStyle = edge.pstyle('curve-style').value; + let lineStyle = edge.pstyle('line-style').value; + let edgeWidth = edge.pstyle('width').pfValue; + let lineCap = edge.pstyle('line-cap').value; + let lineOutlineWidth = edge.pstyle('line-outline-width').value; + let lineOutlineColor = edge.pstyle('line-outline-color').value; + + let effectiveLineOpacity = opacity * lineOpacity; + // separate arrow opacity would require arrow-opacity property + let effectiveArrowOpacity = opacity * lineOpacity; + + let drawLine = ( strokeOpacity = effectiveLineOpacity) => { + if (curveStyle === 'straight-triangle') { + r.eleStrokeStyle( context, edge, strokeOpacity ); + r.drawEdgeTrianglePath( + edge, + context, + rs.allpts + ); + } else { + context.lineWidth = edgeWidth; + context.lineCap = lineCap; + + r.eleStrokeStyle( context, edge, strokeOpacity ); + r.drawEdgePath( + edge, + context, + rs.allpts, + lineStyle + ); + + context.lineCap = 'butt'; // reset for other drawing functions + } + }; + + let drawLineOutline = ( strokeOpacity = effectiveLineOpacity) => { + context.lineWidth = edgeWidth + lineOutlineWidth; + context.lineCap = lineCap; + + if (lineOutlineWidth > 0) { + r.colorStrokeStyle( context, lineOutlineColor[0], lineOutlineColor[1], lineOutlineColor[2], strokeOpacity ); + } else { + // do not draw any lineOutline + context.lineCap = 'butt'; // reset for other drawing functions + return; + } + + if (curveStyle === 'straight-triangle') { + r.drawEdgeTrianglePath( + edge, + context, + rs.allpts + ); + } else { + r.drawEdgePath( + edge, + context, + rs.allpts, + lineStyle + ); + + context.lineCap = 'butt'; // reset for other drawing functions + } + }; + + let drawOverlay = () => { + if( !shouldDrawOverlay ){ return; } + + r.drawEdgeOverlay( context, edge ); + }; + + let drawUnderlay = () => { + if( !shouldDrawOverlay ){ return; } + + r.drawEdgeUnderlay( context, edge ); + }; + + let drawArrows = ( arrowOpacity = effectiveArrowOpacity) => { + r.drawArrowheads( context, edge, arrowOpacity ); + }; + + let drawText = () => { + r.drawElementText( context, edge, null, drawLabel ); + }; + + context.lineJoin = 'round'; + + let ghost = edge.pstyle('ghost').value === 'yes'; + + if( ghost ){ + let gx = edge.pstyle('ghost-offset-x').pfValue; + let gy = edge.pstyle('ghost-offset-y').pfValue; + let ghostOpacity = edge.pstyle('ghost-opacity').value; + let effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity; + + context.translate( gx, gy ); + + drawLine( effectiveGhostOpacity ); + drawArrows( effectiveGhostOpacity ); + + context.translate( -gx, -gy ); + } else { + drawLineOutline(); + } + + drawUnderlay(); + drawLine(); + drawArrows(); + drawOverlay(); + drawText(); + + if( shiftToOriginWithBb ){ + context.translate( bb.x1, bb.y1 ); + } +}; + +const drawEdgeOverlayUnderlay = function( overlayOrUnderlay ) { + if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { + throw new Error('Invalid state'); + } + + return function( context, edge ){ + if( !edge.visible() ){ return; } + + let opacity = edge.pstyle(`${overlayOrUnderlay}-opacity`).value; + + if( opacity === 0 ){ return; } + + let r = this; + let usePaths = r.usePaths(); + let rs = edge._private.rscratch; + + let padding = edge.pstyle(`${overlayOrUnderlay}-padding`).pfValue; + let width = 2 * padding; + let color = edge.pstyle(`${overlayOrUnderlay}-color`).value; + + context.lineWidth = width; + + if( rs.edgeType === 'self' && !usePaths ){ + context.lineCap = 'butt'; + } else { + context.lineCap = 'round'; + } + + r.colorStrokeStyle( context, color[0], color[1], color[2], opacity ); + + r.drawEdgePath( + edge, + context, + rs.allpts, + 'solid' + ); + }; +}; + +CRp.drawEdgeOverlay = drawEdgeOverlayUnderlay('overlay'); + +CRp.drawEdgeUnderlay = drawEdgeOverlayUnderlay('underlay'); + + +CRp.drawEdgePath = function( edge, context, pts, type ){ + let rs = edge._private.rscratch; + let canvasCxt = context; + let path; + let pathCacheHit = false; + let usePaths = this.usePaths(); + let lineDashPattern = edge.pstyle('line-dash-pattern').pfValue; + let lineDashOffset = edge.pstyle('line-dash-offset').pfValue; + + if( usePaths ){ + let pathCacheKey = pts.join( '$' ); + let keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey; + + if( keyMatches ){ + path = context = rs.pathCache; + pathCacheHit = true; + } else { + path = context = new Path2D(); + rs.pathCacheKey = pathCacheKey; + rs.pathCache = path; + } + } + + if( canvasCxt.setLineDash ){ // for very outofdate browsers + switch( type ){ + case 'dotted': + canvasCxt.setLineDash( [ 1, 1 ] ); + break; + + case 'dashed': + canvasCxt.setLineDash( lineDashPattern ); + canvasCxt.lineDashOffset = lineDashOffset; + break; + + case 'solid': + canvasCxt.setLineDash( [ ] ); + break; + } + } + + if( !pathCacheHit && !rs.badLine ){ + if( context.beginPath ){ context.beginPath(); } + context.moveTo( pts[0], pts[1] ); + + switch( rs.edgeType ){ + case 'bezier': + case 'self': + case 'compound': + case 'multibezier': + for( let i = 2; i + 3 < pts.length; i += 4 ){ + context.quadraticCurveTo( pts[ i ], pts[ i + 1], pts[ i + 2], pts[ i + 3] ); + } + break; + + case 'straight': + case 'haystack': + for( let i = 2; i + 1 < pts.length; i += 2 ) { + context.lineTo( pts[ i ], pts[ i + 1] ); + } + break; + case 'segments': + if (rs.isRound) { + for( let corner of rs.roundCorners ){ + drawPreparedRoundCorner(context, corner); + } + context.lineTo( pts[ pts.length - 2 ], pts[ pts.length - 1] ); + } else { + for( let i = 2; i + 1 < pts.length; i += 2 ) { + context.lineTo( pts[ i ], pts[ i + 1] ); + } + } + break; + } + } + + context = canvasCxt; + if( usePaths ){ + context.stroke( path ); + } else { + context.stroke(); + } + + // reset any line dashes + if( context.setLineDash ){ // for very outofdate browsers + context.setLineDash( [ ] ); + } + +}; + + +CRp.drawEdgeTrianglePath = function( edge, context, pts ){ + // use line stroke style for triangle fill style + context.fillStyle = context.strokeStyle; + + let edgeWidth = edge.pstyle('width').pfValue; + + for( let i = 0; i + 1 < pts.length; i += 2 ){ + const vector = [ pts[ i + 2 ] - pts[ i ], pts[ i + 3 ] - pts[ i + 1 ] ]; + const length = Math.sqrt( vector[0] * vector[0] + vector[1] * vector[1] ); + const normal = [ vector[1] / length, -vector[0] / length ]; + const triangleHead = [ normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2 ]; + + context.beginPath(); + context.moveTo( pts[ i ] - triangleHead[0], pts[ i + 1 ] - triangleHead[1] ); + context.lineTo( pts[ i ] + triangleHead[0], pts[ i + 1 ] + triangleHead[1] ); + context.lineTo( pts[ i + 2 ], pts[ i + 3 ] ); + context.closePath(); + context.fill(); + } +}; + +CRp.drawArrowheads = function( context, edge, opacity ){ + let rs = edge._private.rscratch; + let isHaystack = rs.edgeType === 'haystack'; + + if( !isHaystack ){ + this.drawArrowhead( context, edge, 'source', rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity ); + } + + this.drawArrowhead( context, edge, 'mid-target', rs.midX, rs.midY, rs.midtgtArrowAngle, opacity ); + + this.drawArrowhead( context, edge, 'mid-source', rs.midX, rs.midY, rs.midsrcArrowAngle, opacity ); + + if( !isHaystack ){ + this.drawArrowhead( context, edge, 'target', rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity ); + } +}; + +CRp.drawArrowhead = function( context, edge, prefix, x, y, angle, opacity ){ + if( isNaN( x ) || x == null || isNaN( y ) || y == null || isNaN( angle ) || angle == null ){ return; } + + let self = this; + let arrowShape = edge.pstyle( prefix + '-arrow-shape' ).value; + if( arrowShape === 'none' ) { return; } + + let arrowClearFill = edge.pstyle( prefix + '-arrow-fill' ).value === 'hollow' ? 'both' : 'filled'; + let arrowFill = edge.pstyle( prefix + '-arrow-fill' ).value; + let edgeWidth = edge.pstyle( 'width' ).pfValue; + + let pArrowWidth = edge.pstyle( prefix + '-arrow-width' ); + let arrowWidth = pArrowWidth.value === 'match-line' ? edgeWidth : pArrowWidth.pfValue; + if (pArrowWidth.units === '%') arrowWidth *= edgeWidth; + + let edgeOpacity = edge.pstyle( 'opacity' ).value; + + if( opacity === undefined ){ + opacity = edgeOpacity; + } + + let gco = context.globalCompositeOperation; + + if( opacity !== 1 || arrowFill === 'hollow' ){ // then extra clear is needed + context.globalCompositeOperation = 'destination-out'; + + self.colorFillStyle( context, 255, 255, 255, 1 ); + self.colorStrokeStyle( context, 255, 255, 255, 1 ); + + self.drawArrowShape( edge, context, + arrowClearFill, edgeWidth, arrowShape, arrowWidth, x, y, angle + ); + + context.globalCompositeOperation = gco; + } // otherwise, the opaque arrow clears it for free :) + + let color = edge.pstyle( prefix + '-arrow-color' ).value; + self.colorFillStyle( context, color[0], color[1], color[2], opacity ); + self.colorStrokeStyle( context, color[0], color[1], color[2], opacity ); + + self.drawArrowShape( edge, context, + arrowFill, edgeWidth, arrowShape, arrowWidth, x, y, angle + ); +}; + +CRp.drawArrowShape = function( edge, context, fill, edgeWidth, shape, shapeWidth, x, y, angle ){ + let r = this; + let usePaths = this.usePaths() && shape !== 'triangle-cross'; + let pathCacheHit = false; + let path; + let canvasContext = context; + let translation = { x, y }; + let scale = edge.pstyle( 'arrow-scale' ).value; + let size = this.getArrowWidth( edgeWidth, scale ); + let shapeImpl = r.arrowShapes[ shape ]; + + if( usePaths ){ + let cache = r.arrowPathCache = r.arrowPathCache || []; + let key = util.hashString(shape); + let cachedPath = cache[ key ]; + + if( cachedPath != null ){ + path = context = cachedPath; + pathCacheHit = true; + } else { + path = context = new Path2D(); + cache[ key ] = path; + } + } + + if( !pathCacheHit ){ + if( context.beginPath ){ context.beginPath(); } + if( usePaths ){ // store in the path cache with values easily manipulated later + shapeImpl.draw( context, 1, 0, { x: 0, y: 0 }, 1 ); + } else { + shapeImpl.draw( context, size, angle, translation, edgeWidth ); + } + if( context.closePath ){ context.closePath(); } + } + + context = canvasContext; + + if( usePaths ){ // set transform to arrow position/orientation + context.translate( x, y ); + context.rotate( angle ); + context.scale( size, size ); + } + + if( fill === 'filled' || fill === 'both' ){ + if( usePaths ){ + context.fill( path ); + } else { + context.fill(); + } + } + + if( fill === 'hollow' || fill === 'both' ){ + context.lineWidth = shapeWidth / (usePaths ? size : 1); + context.lineJoin = 'miter'; + + if( usePaths ){ + context.stroke( path ); + } else { + context.stroke(); + } + } + + if( usePaths ){ // reset transform by applying inverse + context.scale( 1/size, 1/size ); + context.rotate( -angle ); + context.translate( -x, -y ); + } +}; + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-elements.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-elements.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9ee4ef8f6235593253177ba6037b1e5a816606da --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-elements.mjs @@ -0,0 +1,218 @@ +import * as math from '../../../math.mjs'; + +let CRp = {}; + +CRp.drawElement = function( context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity ){ + let r = this; + + if( ele.isNode() ){ + r.drawNode( context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity ); + } else { + r.drawEdge( context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity ); + } +}; + +CRp.drawElementOverlay = function( context, ele ){ + let r = this; + + if( ele.isNode() ){ + r.drawNodeOverlay( context, ele ); + } else { + r.drawEdgeOverlay( context, ele ); + } +}; + +CRp.drawElementUnderlay = function( context, ele ){ + let r = this; + + if( ele.isNode() ){ + r.drawNodeUnderlay( context, ele ); + } else { + r.drawEdgeUnderlay( context, ele ); + } +}; + +CRp.drawCachedElementPortion = function( context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity ){ + let r = this; + let bb = eleTxrCache.getBoundingBox(ele); + + if( bb.w === 0 || bb.h === 0 ){ return; } // ignore zero size case + + let eleCache = eleTxrCache.getElement( ele, bb, pxRatio, lvl, reason ); + + if( eleCache != null ){ + let opacity = getOpacity(r, ele); + + if( opacity === 0 ){ return; } + + let theta = getRotation(r, ele); + let { x1, y1, w, h } = bb; + let x, y, sx, sy, smooth; + + if( theta !== 0 ){ + let rotPt = eleTxrCache.getRotationPoint(ele); + + sx = rotPt.x; + sy = rotPt.y; + + context.translate(sx, sy); + context.rotate(theta); + + smooth = r.getImgSmoothing(context); + + if( !smooth ){ r.setImgSmoothing(context, true); } + + let off = eleTxrCache.getRotationOffset(ele); + + x = off.x; + y = off.y; + } else { + x = x1; + y = y1; + } + + let oldGlobalAlpha; + + if( opacity !== 1 ){ + oldGlobalAlpha = context.globalAlpha; + context.globalAlpha = oldGlobalAlpha * opacity; + } + + context.drawImage( eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h ); + + if( opacity !== 1 ){ + context.globalAlpha = oldGlobalAlpha; + } + + if( theta !== 0 ){ + context.rotate(-theta); + context.translate(-sx, -sy); + + if( !smooth ){ r.setImgSmoothing(context, false); } + } + } else { + eleTxrCache.drawElement( context, ele ); // direct draw fallback + } +}; + +const getZeroRotation = () => 0; +const getLabelRotation = (r, ele) => r.getTextAngle(ele, null); +const getSourceLabelRotation = (r, ele) => r.getTextAngle(ele, 'source'); +const getTargetLabelRotation = (r, ele) => r.getTextAngle(ele, 'target'); +const getOpacity = (r, ele) => ele.effectiveOpacity(); +const getTextOpacity = (e, ele) => ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity(); + +CRp.drawCachedElement = function( context, ele, pxRatio, extent, lvl, requestHighQuality ){ + let r = this; + let { eleTxrCache, lblTxrCache, slbTxrCache, tlbTxrCache } = r.data; + + let bb = ele.boundingBox(); + let reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null; + + if( bb.w === 0 || bb.h === 0 || !ele.visible() ){ return; } + + if( !extent || math.boundingBoxesIntersect( bb, extent ) ){ + let isEdge = ele.isEdge(); + let badLine = ele.element()._private.rscratch.badLine; + + r.drawElementUnderlay( context, ele ); + + r.drawCachedElementPortion( context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity ); + + if( !isEdge || !badLine ){ + r.drawCachedElementPortion( context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity ); + } + + if( isEdge && !badLine ){ + r.drawCachedElementPortion( context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity ); + r.drawCachedElementPortion( context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity ); + } + + r.drawElementOverlay( context, ele ); + } +}; + +CRp.drawElements = function( context, eles ){ + let r = this; + + for( let i = 0; i < eles.length; i++ ){ + let ele = eles[ i ]; + + r.drawElement( context, ele ); + } +}; + +CRp.drawCachedElements = function( context, eles, pxRatio, extent ){ + let r = this; + + for( let i = 0; i < eles.length; i++ ){ + let ele = eles[ i ]; + + r.drawCachedElement( context, ele, pxRatio, extent ); + } +}; + +CRp.drawCachedNodes = function( context, eles, pxRatio, extent ){ + let r = this; + + for( let i = 0; i < eles.length; i++ ){ + let ele = eles[ i ]; + + if( !ele.isNode() ){ continue; } + + r.drawCachedElement( context, ele, pxRatio, extent ); + } +}; + +CRp.drawLayeredElements = function( context, eles, pxRatio, extent ){ + let r = this; + + let layers = r.data.lyrTxrCache.getLayers( eles, pxRatio ); + + if( layers ){ + for( let i = 0; i < layers.length; i++ ){ + let layer = layers[i]; + let bb = layer.bb; + + if( bb.w === 0 || bb.h === 0 ){ continue; } + + context.drawImage( layer.canvas, bb.x1, bb.y1, bb.w, bb.h ); + } + } else { // fall back on plain caching if no layers + r.drawCachedElements( context, eles, pxRatio, extent ); + } +}; + +if( process.env.NODE_ENV !== 'production' ){ + CRp.drawDebugPoints = function( context, eles ){ + let draw = function( x, y, color ){ + context.fillStyle = color; + context.fillRect( x - 1, y - 1, 3, 3 ); + }; + + for( let i = 0; i < eles.length; i++ ){ + let ele = eles[i]; + let rs = ele._private.rscratch; + + if( ele.isNode() ){ + let p = ele.position(); + + draw( rs.labelX, rs.labelY, 'red' ); + draw( p.x, p.y, 'magenta' ); + } else { + let pts = rs.allpts; + + for( let j = 0; j + 1 < pts.length; j += 2 ){ + let x = pts[ j ]; + let y = pts[ j + 1 ]; + + draw( x, y, 'cyan' ); + } + + draw( rs.midX, rs.midY, 'yellow' ); + } + } + }; +} + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-images.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-images.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ee4bdbcc4c385d8b06e9dff4b3600791355fe270 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-images.mjs @@ -0,0 +1,188 @@ +import * as util from '../../../util/index.mjs'; + +var CRp = {}; + +CRp.safeDrawImage = function( context, img, ix, iy, iw, ih, x, y, w, h ){ + // detect problematic cases for old browsers with bad images (cheaper than try-catch) + if( iw <= 0 || ih <= 0 || w <= 0 || h <= 0 ){ + return; + } + + try { + context.drawImage( img, ix, iy, iw, ih, x, y, w, h ); + } catch (e) { + util.warn(e); + } +}; + +CRp.drawInscribedImage = function( context, img, node, index, nodeOpacity ){ + var r = this; + var pos = node.position(); + var nodeX = pos.x; + var nodeY = pos.y; + var styleObj = node.cy().style(); + var getIndexedStyle = styleObj.getIndexedStyle.bind( styleObj ); + var fit = getIndexedStyle( node, 'background-fit', 'value', index ); + var repeat = getIndexedStyle( node, 'background-repeat', 'value', index ); + var nodeW = node.width(); + var nodeH = node.height(); + var paddingX2 = node.padding() * 2; + var nodeTW = nodeW + ( getIndexedStyle( node, 'background-width-relative-to', 'value', index ) === 'inner' ? 0 : paddingX2 ); + var nodeTH = nodeH + ( getIndexedStyle( node, 'background-height-relative-to', 'value', index ) === 'inner' ? 0 : paddingX2 ); + var rs = node._private.rscratch; + var clip = getIndexedStyle( node, 'background-clip', 'value', index ); + var shouldClip = clip === 'node'; + var imgOpacity = getIndexedStyle( node, 'background-image-opacity', 'value', index ) * nodeOpacity; + var smooth = getIndexedStyle( node, 'background-image-smoothing', 'value', index ); + var cornerRadius = node.pstyle('corner-radius').value; + if (cornerRadius !== 'auto') cornerRadius = node.pstyle('corner-radius').pfValue; + + var imgW = img.width || img.cachedW; + var imgH = img.height || img.cachedH; + + // workaround for broken browsers like ie + if( null == imgW || null == imgH ){ + document.body.appendChild( img ); // eslint-disable-line no-undef + + imgW = img.cachedW = img.width || img.offsetWidth; + imgH = img.cachedH = img.height || img.offsetHeight; + + document.body.removeChild( img ); // eslint-disable-line no-undef + } + + var w = imgW; + var h = imgH; + + if( getIndexedStyle( node, 'background-width', 'value', index ) !== 'auto' ){ + if( getIndexedStyle( node, 'background-width', 'units', index ) === '%' ){ + w = getIndexedStyle( node, 'background-width', 'pfValue', index ) * nodeTW; + } else { + w = getIndexedStyle( node, 'background-width', 'pfValue', index ); + } + } + + if( getIndexedStyle( node, 'background-height', 'value', index ) !== 'auto' ){ + if( getIndexedStyle( node, 'background-height', 'units', index ) === '%' ){ + h = getIndexedStyle( node, 'background-height', 'pfValue', index ) * nodeTH; + } else { + h = getIndexedStyle( node, 'background-height', 'pfValue', index ); + } + } + + if( w === 0 || h === 0 ){ + return; // no point in drawing empty image (and chrome is broken in this case) + } + + if( fit === 'contain' ){ + var scale = Math.min( nodeTW / w, nodeTH / h ); + + w *= scale; + h *= scale; + + } else if( fit === 'cover' ){ + var scale = Math.max( nodeTW / w, nodeTH / h ); + + w *= scale; + h *= scale; + } + + var x = (nodeX - nodeTW / 2); // left + var posXUnits = getIndexedStyle( node, 'background-position-x', 'units', index ); + var posXPfVal = getIndexedStyle( node, 'background-position-x', 'pfValue', index ); + if( posXUnits === '%' ){ + x += (nodeTW - w) * posXPfVal; + } else { + x += posXPfVal; + } + + var offXUnits = getIndexedStyle( node, 'background-offset-x', 'units', index ); + var offXPfVal = getIndexedStyle( node, 'background-offset-x', 'pfValue', index ); + if( offXUnits === '%' ){ + x += (nodeTW - w) * offXPfVal; + } else { + x += offXPfVal; + } + + var y = (nodeY - nodeTH / 2); // top + var posYUnits = getIndexedStyle( node, 'background-position-y', 'units', index ); + var posYPfVal = getIndexedStyle( node, 'background-position-y', 'pfValue', index ); + if( posYUnits === '%' ){ + y += (nodeTH - h) * posYPfVal; + } else { + y += posYPfVal; + } + + var offYUnits = getIndexedStyle( node, 'background-offset-y', 'units', index ); + var offYPfVal = getIndexedStyle( node, 'background-offset-y', 'pfValue', index ); + if( offYUnits === '%' ){ + y += (nodeTH - h) * offYPfVal; + } else { + y += offYPfVal; + } + + if( rs.pathCache ){ + x -= nodeX; + y -= nodeY; + + nodeX = 0; + nodeY = 0; + } + + var gAlpha = context.globalAlpha; + + context.globalAlpha = imgOpacity; + + var smoothingEnabled = r.getImgSmoothing( context ); + var isSmoothingSwitched = false; + + if( smooth === 'no' && smoothingEnabled ){ + r.setImgSmoothing( context, false ); + isSmoothingSwitched = true; + } else if( smooth === 'yes' && !smoothingEnabled ){ + r.setImgSmoothing( context, true ); + isSmoothingSwitched = true; + } + + if( repeat === 'no-repeat' ){ + + if( shouldClip ){ + context.save(); + + if( rs.pathCache ){ + context.clip( rs.pathCache ); + } else { + r.nodeShapes[ r.getNodeShape( node ) ].draw( + context, + nodeX, nodeY, + nodeTW, nodeTH, + cornerRadius, rs ); + + context.clip(); + } + } + + r.safeDrawImage( context, img, 0, 0, imgW, imgH, x, y, w, h ); + + if( shouldClip ){ + context.restore(); + } + } else { + var pattern = context.createPattern( img, repeat ); + context.fillStyle = pattern; + + r.nodeShapes[ r.getNodeShape( node ) ].draw( + context, + nodeX, nodeY, + nodeTW, nodeTH, cornerRadius, rs); + + context.translate( x, y ); + context.fill(); + context.translate( -x, -y ); + } + + context.globalAlpha = gAlpha; + + if( isSmoothingSwitched ){ r.setImgSmoothing( context, smoothingEnabled ); } +}; + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-label-text.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-label-text.mjs new file mode 100644 index 0000000000000000000000000000000000000000..68341945db8aa788d143db85c782105a5f298a6f --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-label-text.mjs @@ -0,0 +1,409 @@ +import * as util from '../../../util/index.mjs'; +import * as math from '../../../math.mjs'; +import { labelHalign, labelValign } from '../../../style/align.mjs'; + +let CRp = {}; + +CRp.eleTextBiggerThanMin = function( ele, scale ){ + if( !scale ){ + let zoom = ele.cy().zoom(); + let pxRatio = this.getPixelRatio(); + let lvl = Math.ceil( math.log2( zoom * pxRatio ) ); // the effective texture level + + scale = Math.pow( 2, lvl ); + } + + let computedSize = ele.pstyle( 'font-size' ).pfValue * scale; + let minSize = ele.pstyle( 'min-zoomed-font-size' ).pfValue; + + if( computedSize < minSize ){ + return false; + } + + return true; +}; + +CRp.drawElementText = function( context, ele, shiftToOriginWithBb, force, prefix, useEleOpacity = true ){ + let r = this; + + if( force == null ){ + if( useEleOpacity && !r.eleTextBiggerThanMin( ele ) ){ return; } + } else if( force === false ){ + return; + } + + if( ele.isNode() ){ + let label = ele.pstyle( 'label' ); + + if( !label || !label.value ){ return; } + + let justification = r.getLabelJustification(ele); + let isTextMetricsGlyph = ele.pstyle('text-metrics').strValue === 'glyph'; + + context.textAlign = justification; + context.textBaseline = isTextMetricsGlyph ? 'alphabetic' : 'bottom'; + } else { + let badLine = ele.element()._private.rscratch.badLine; + let label = ele.pstyle( 'label' ); + let srcLabel = ele.pstyle( 'source-label' ); + let tgtLabel = ele.pstyle( 'target-label' ); + + if( + badLine || ( + ( !label || !label.value ) + && ( !srcLabel || !srcLabel.value ) + && ( !tgtLabel || !tgtLabel.value ) + ) + ){ + return; + } + + context.textAlign = 'center'; + context.textBaseline = 'bottom'; + } + + let applyRotation = !shiftToOriginWithBb; + + let bb; + if( shiftToOriginWithBb ){ + bb = shiftToOriginWithBb; + + context.translate( -bb.x1, -bb.y1 ); + } + + if( prefix == null ){ + r.drawText( context, ele, null, applyRotation, useEleOpacity ); + + if( ele.isEdge() ){ + r.drawText( context, ele, 'source', applyRotation, useEleOpacity ); + + r.drawText( context, ele, 'target', applyRotation, useEleOpacity ); + } + } else { + r.drawText( context, ele, prefix, applyRotation, useEleOpacity ); + } + + if( shiftToOriginWithBb ){ + context.translate( bb.x1, bb.y1 ); + } +}; + +CRp.getFontCache = function( context ){ + let cache; + + this.fontCaches = this.fontCaches || []; + + for( let i = 0; i < this.fontCaches.length; i++ ){ + cache = this.fontCaches[ i ]; + + if( cache.context === context ){ + return cache; + } + } + + cache = { + context: context + }; + this.fontCaches.push( cache ); + + return cache; +}; + +// set up canvas context with font +// returns transformed text string +CRp.setupTextStyle = function( context, ele, useEleOpacity = true ){ + // Font style + let labelStyle = ele.pstyle( 'font-style' ).strValue; + let labelSize = ele.pstyle( 'font-size' ).pfValue + 'px'; + let labelFamily = ele.pstyle( 'font-family' ).strValue; + let labelWeight = ele.pstyle( 'font-weight' ).strValue; + let opacity = (useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1); + let outlineOpacity = ele.pstyle( 'text-outline-opacity' ).value * opacity; + let color = ele.pstyle( 'color' ).value; + let outlineColor = ele.pstyle( 'text-outline-color' ).value; + + context.font = labelStyle + ' ' + labelWeight + ' ' + labelSize + ' ' + labelFamily; + + context.lineJoin = 'round'; // so text outlines aren't jagged + + this.colorFillStyle( context, color[ 0 ], color[ 1 ], color[ 2 ], opacity ); + + this.colorStrokeStyle( context, outlineColor[ 0 ], outlineColor[ 1 ], outlineColor[ 2 ], outlineOpacity ); +}; + +function circle(ctx, x, y, width, height) { + const diameter = Math.min(width, height); + const radius = diameter / 2; + + const centerX = x + width / 2; + const centerY = y + height / 2; + + ctx.beginPath(); + ctx.arc(centerX, centerY, radius, 0, Math.PI * 2); + ctx.closePath(); +} + +function roundRect(ctx, x, y, width, height, radius = 5) { + const r = Math.min(radius, width / 2, height / 2); // prevent overflow + ctx.beginPath(); + ctx.moveTo(x + r, y); + ctx.lineTo(x + width - r, y); + ctx.quadraticCurveTo(x + width, y, x + width, y + r); + ctx.lineTo(x + width, y + height - r); + ctx.quadraticCurveTo(x + width, y + height, x + width - r, y + height); + ctx.lineTo(x + r, y + height); + ctx.quadraticCurveTo(x, y + height, x, y + height - r); + ctx.lineTo(x, y + r); + ctx.quadraticCurveTo(x, y, x + r, y); + ctx.closePath(); +} + +CRp.getTextAngle = function( ele, prefix ){ + let theta; + let _p = ele._private; + let rscratch = _p.rscratch; + let pdash = prefix ? prefix + '-' : ''; + let rotation = ele.pstyle( pdash + 'text-rotation' ); + + if( rotation.strValue === 'autorotate' ){ + let textAngle = util.getPrefixedProperty( rscratch, 'labelAngle', prefix ); + theta = ele.isEdge() ? textAngle : 0; + } else if( rotation.strValue === 'none' ){ + theta = 0; + } else { + theta = rotation.pfValue; + } + + return theta; +}; + +CRp.drawText = function( context, ele, prefix, applyRotation = true, useEleOpacity = true ){ + let _p = ele._private; + let rscratch = _p.rscratch; + let parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1; + + if( useEleOpacity && (parentOpacity === 0 || ele.pstyle( 'text-opacity' ).value === 0) ){ + return; + } + + // use 'main' as an alias for the main label (i.e. null prefix) + if( prefix === 'main' ){ prefix = null; } + + let textX = util.getPrefixedProperty( rscratch, 'labelX', prefix ); + let textY = util.getPrefixedProperty( rscratch, 'labelY', prefix ); + let orgTextX, orgTextY; // used for rotation + let text = this.getLabelText( ele, prefix ); + + if( text != null && text !== '' && !isNaN( textX ) && !isNaN( textY ) ){ + this.setupTextStyle( context, ele, useEleOpacity ); + + let pdash = prefix ? prefix + '-' : ''; + let textW = util.getPrefixedProperty( rscratch, 'labelWidth', prefix ); + let textH = util.getPrefixedProperty( rscratch, 'labelHeight', prefix ); + let labelActualDescent = util.getPrefixedProperty( rscratch, 'labelActualDescent', prefix ); + let marginX = ele.pstyle( pdash + 'text-margin-x' ).pfValue; + let marginY = ele.pstyle( pdash + 'text-margin-y' ).pfValue; + + let isEdge = ele.isEdge(); + + let halign = ele.pstyle( 'text-halign' ).value; + let valign = ele.pstyle( 'text-valign' ).value; + + if( isEdge ){ + halign = 'center'; + valign = 'center'; + } + + textX += marginX; + textY += marginY; + + let theta; + + if( !applyRotation ){ + theta = 0; + } else { + theta = this.getTextAngle(ele, prefix); + } + + if( theta !== 0 ){ + orgTextX = textX; + orgTextY = textY; + + context.translate( orgTextX, orgTextY ); + context.rotate( theta ); + + textX = 0; + textY = 0; + } + + let boxHalign = labelHalign( halign ); + let boxValign = labelValign( valign ); + + switch( boxValign ){ + case 'top': + break; + case 'center': + textY += textH / 2; + break; + case 'bottom': + textY += textH; + break; + } + + let backgroundOpacity = ele.pstyle( 'text-background-opacity' ).value; + let borderOpacity = ele.pstyle( 'text-border-opacity' ).value; + let textBorderWidth = ele.pstyle( 'text-border-width' ).pfValue; + let backgroundPadding = ele.pstyle( 'text-background-padding' ).pfValue; + let styleShape = ele.pstyle( 'text-background-shape' ).strValue; + let rounded = styleShape === 'round-rectangle' || styleShape === 'roundrectangle'; + let circled = styleShape === 'circle'; + let roundRadius = 2; + + if( backgroundOpacity > 0 || ( textBorderWidth > 0 && borderOpacity > 0 ) ){ + let textFill = context.fillStyle; + let textStroke = context.strokeStyle; + let textLineWidth = context.lineWidth; + + let textBackgroundColor = ele.pstyle( 'text-background-color' ).value; + let textBorderColor = ele.pstyle( 'text-border-color' ).value; + let textBorderStyle = ele.pstyle( 'text-border-style' ).value; + + let doFill = backgroundOpacity > 0; + let doStroke = textBorderWidth > 0 && borderOpacity > 0; + + let bgX = textX - backgroundPadding; + switch( boxHalign ){ + case 'left': bgX -= textW; break; + case 'center': bgX -= textW / 2; break; + } + + let bgY = textY - textH - backgroundPadding; + let bgW = textW + 2*backgroundPadding; + let bgH = textH + 2*backgroundPadding; + + if( doFill ){ + context.fillStyle = `rgba(${textBackgroundColor[0]},${textBackgroundColor[1]},${textBackgroundColor[2]},${backgroundOpacity * parentOpacity})`; + } + + if( doStroke ){ + context.strokeStyle = `rgba(${textBorderColor[0]},${textBorderColor[1]},${textBorderColor[2]},${borderOpacity * parentOpacity})`; + context.lineWidth = textBorderWidth; + + if( context.setLineDash ){ + switch( textBorderStyle ){ + case 'dotted': context.setLineDash([1, 1]); break; + case 'dashed': context.setLineDash([4, 2]); break; + case 'double': + context.lineWidth = textBorderWidth / 4; + context.setLineDash([]); + break; + case 'solid': default: context.setLineDash([]); break; + } + } + } + + if( rounded ){ + context.beginPath(); + roundRect(context, bgX, bgY, bgW, bgH, roundRadius); + } else if (circled){ + context.beginPath(); + circle(context, bgX, bgY, bgW, bgH); + } else { + context.beginPath(); + context.rect(bgX, bgY, bgW, bgH); + } + + if( doFill ) context.fill(); + if( doStroke ) context.stroke(); + + // Double border pass for 'double' style + if( doStroke && textBorderStyle === 'double' ){ + let whiteWidth = textBorderWidth / 2; + context.beginPath(); + + if( rounded ){ + roundRect(context, bgX + whiteWidth, bgY + whiteWidth, bgW - 2*whiteWidth, bgH - 2*whiteWidth, roundRadius); + } else { + context.rect(bgX + whiteWidth, bgY + whiteWidth, bgW - 2*whiteWidth, bgH - 2*whiteWidth); + } + + context.stroke(); + } + + context.fillStyle = textFill; + context.strokeStyle = textStroke; + context.lineWidth = textLineWidth; + if( context.setLineDash ) context.setLineDash([]); + } + + let lineWidth = 2 * ele.pstyle( 'text-outline-width' ).pfValue; // *2 b/c the stroke is drawn centred on the middle + + if( lineWidth > 0 ){ + context.lineWidth = lineWidth; + } + + textY -= labelActualDescent; + if( ele.pstyle( 'text-wrap' ).value === 'wrap' ){ + let lines = util.getPrefixedProperty( rscratch, 'labelWrapCachedLines', prefix ); + let lineHeight = util.getPrefixedProperty( rscratch, 'labelLineHeight', prefix ); + let halfTextW = textW/2; + let justification = this.getLabelJustification(ele); + + if( justification === 'auto' ){ + // then it's already ok, so skip all the other ifs + } else if( boxHalign === 'left' ){ // auto justification : right + if( justification === 'left' ){ + textX += -textW; + } else if( justification === 'center' ){ + textX += -halfTextW; + } // else same as auto + } else if( boxHalign === 'center' ){ // auto justfication : center + if( justification === 'left' ){ + textX += -halfTextW; + } else if( justification === 'right' ){ + textX += halfTextW; + } // else same as auto + } else if( boxHalign === 'right' ){ // auto justification : left + if( justification === 'center' ){ + textX += halfTextW; + } else if( justification === 'right' ){ + textX += textW; + } // else same as auto + } + + switch( boxValign ){ + case 'top': + textY -= ( lines.length - 1 ) * lineHeight; + break; + case 'center': + case 'bottom': + textY -= ( lines.length - 1 ) * lineHeight; + break; + } + + for( let l = 0; l < lines.length; l++ ){ + if( lineWidth > 0 ){ + context.strokeText( lines[ l ], textX, textY ); + } + + context.fillText( lines[ l ], textX, textY ); + + textY += lineHeight; + } + + } else { + if( lineWidth > 0 ){ + context.strokeText( text, textX, textY ); + } + + context.fillText( text, textX, textY ); + } + + if( theta !== 0 ){ + context.rotate( -theta ); + context.translate( -orgTextX, -orgTextY ); + } + } +}; + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-nodes.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-nodes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..18b0f33b9d79fc0257a66803aa774052bf693211 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-nodes.mjs @@ -0,0 +1,804 @@ +/* global Path2D */ + +import * as is from '../../../is.mjs'; +import {expandPolygon, joinLines} from '../../../math.mjs'; +import * as util from '../../../util/index.mjs'; +import * as round from "../../../round.mjs"; +import * as math from "../../../math.mjs"; + +let CRp = {}; + +CRp.drawNode = function( context, node, shiftToOriginWithBb, drawLabel = true, shouldDrawOverlay = true, shouldDrawOpacity = true ){ + let r = this; + let nodeWidth, nodeHeight; + let _p = node._private; + let rs = _p.rscratch; + let pos = node.position(); + + if( !is.number( pos.x ) || !is.number( pos.y ) ){ + return; // can't draw node with undefined position + } + + if( shouldDrawOpacity && !node.visible() ){ return; } + + let eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1; + + let usePaths = r.usePaths(); + let path; + let pathCacheHit = false; + + let padding = node.padding(); + + nodeWidth = node.width() + 2 * padding; + nodeHeight = node.height() + 2 * padding; + + // + // setup shift + + let bb; + if( shiftToOriginWithBb ){ + bb = shiftToOriginWithBb; + + context.translate( -bb.x1, -bb.y1 ); + } + + // + // load bg image + + let bgImgProp = node.pstyle( 'background-image' ); + let urls = bgImgProp.value; + let urlDefined = new Array( urls.length ); + let image = new Array( urls.length ); + let numImages = 0; + for( let i = 0; i < urls.length; i++ ){ + let url = urls[i]; + let defd = urlDefined[i] = url != null && url !== 'none'; + + if( defd ){ + let bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, 'background-image-crossorigin', 'value', i); + + numImages++; + + // get image, and if not loaded then ask to redraw when later loaded + image[i] = r.getCachedImage( url, bgImgCrossOrigin, function(){ + _p.backgroundTimestamp = Date.now(); + + node.emitAndNotify('background'); + } ); + } + } + + // + // setup styles + + let darkness = node.pstyle('background-blacken').value; + let borderWidth = node.pstyle('border-width').pfValue; + let bgOpacity = node.pstyle('background-opacity').value * eleOpacity; + let borderColor = node.pstyle('border-color').value; + let borderStyle = node.pstyle('border-style').value; + let borderJoin = node.pstyle('border-join').value; + let borderCap = node.pstyle('border-cap').value; + let borderPosition = node.pstyle('border-position').value; + let borderPattern = node.pstyle('border-dash-pattern').pfValue; + let borderOffset = node.pstyle('border-dash-offset').pfValue; + let borderOpacity = node.pstyle('border-opacity').value * eleOpacity; + let outlineWidth = node.pstyle('outline-width').pfValue; + let outlineColor = node.pstyle('outline-color').value; + let outlineStyle = node.pstyle('outline-style').value; + let outlineOpacity = node.pstyle('outline-opacity').value * eleOpacity; + let outlineOffset = node.pstyle('outline-offset').value; + let cornerRadius = node.pstyle('corner-radius').value; + if (cornerRadius !== 'auto') cornerRadius = node.pstyle('corner-radius').pfValue; + + let setupShapeColor = ( bgOpy = bgOpacity ) => { + r.eleFillStyle( context, node, bgOpy ); + }; + + let setupBorderColor = ( bdrOpy = borderOpacity ) => { + r.colorStrokeStyle( context, borderColor[0], borderColor[1], borderColor[2], bdrOpy ); + }; + + let setupOutlineColor = ( otlnOpy = outlineOpacity ) => { + r.colorStrokeStyle( context, outlineColor[0], outlineColor[1], outlineColor[2], otlnOpy ); + }; + + // + // setup shape + + let getPath = (width, height, shape, points) => { + let pathCache = r.nodePathCache = r.nodePathCache || []; + + let key = util.hashStrings( + shape === 'polygon' ? shape + ',' + points.join(',') : shape, + '' + height, + '' + width, + '' + cornerRadius + ); + + let cachedPath = pathCache[ key ]; + let path; + let cacheHit = false; + + if( cachedPath != null ){ + path = cachedPath; + cacheHit = true; + rs.pathCache = path; + } else { + path = new Path2D(); + pathCache[ key ] = rs.pathCache = path; + } + + return { + path, + cacheHit + }; + }; + + let styleShape = node.pstyle('shape').strValue; + let shapePts = node.pstyle('shape-polygon-points').pfValue; + + if( usePaths ){ + context.translate( pos.x, pos.y ); + + const shapePath = getPath(nodeWidth, nodeHeight, styleShape, shapePts); + path = shapePath.path; + pathCacheHit = shapePath.cacheHit; + } + + let drawShape = () => { + if( !pathCacheHit ){ + + let npos = pos; + + if( usePaths ){ + npos = { + x: 0, + y: 0 + }; + } + + r.nodeShapes[ r.getNodeShape( node ) ].draw( + ( path || context ), + npos.x, + npos.y, + nodeWidth, + nodeHeight, cornerRadius, rs ); + } + + if( usePaths ){ + context.fill( path ); + } else { + context.fill(); + } + }; + + let drawImages = ( nodeOpacity = eleOpacity, inside = true ) => { + let prevBging = _p.backgrounding; + let totalCompleted = 0; + + for( let i = 0; i < image.length; i++ ){ + const bgContainment = node.cy().style().getIndexedStyle(node, 'background-image-containment', 'value', i); + if( inside && bgContainment === 'over' || !inside && bgContainment === 'inside' ){ + totalCompleted++; + continue; + } + + if( urlDefined[i] && image[i].complete && !image[i].error ){ + totalCompleted++; + r.drawInscribedImage( context, image[i], node, i, nodeOpacity ); + } + } + + _p.backgrounding = !(totalCompleted === numImages); + if( prevBging !== _p.backgrounding ){ // update style b/c :backgrounding state changed + node.updateStyle( false ); + } + }; + + let drawPie = ( redrawShape = false, pieOpacity = eleOpacity ) => { + if( r.hasPie( node ) ){ + r.drawPie( context, node, pieOpacity ); + + // redraw/restore path if steps after pie need it + if( redrawShape ){ + + if( !usePaths ){ + r.nodeShapes[ r.getNodeShape( node ) ].draw( + context, + pos.x, + pos.y, + nodeWidth, + nodeHeight, cornerRadius, rs ); + } + } + } + }; + + let drawStripe = (redrawShape = false, stripeOpacity = eleOpacity) => { + if( r.hasStripe( node ) ){ + context.save(); + + if (usePaths) { + context.clip( rs.pathCache ); + } else { + r.nodeShapes[ r.getNodeShape( node ) ].draw( + context, + pos.x, + pos.y, + nodeWidth, + nodeHeight, cornerRadius, rs ); + context.clip(); + } + + r.drawStripe( context, node, stripeOpacity ); + + context.restore(); + + // redraw/restore path if steps after stripes need it + if( redrawShape ){ + + if( !usePaths ){ + r.nodeShapes[ r.getNodeShape( node ) ].draw( + context, + pos.x, + pos.y, + nodeWidth, + nodeHeight, cornerRadius, rs ); + } + } + } + }; + + let darken = ( darkenOpacity = eleOpacity ) => { + let opacity = ( darkness > 0 ? darkness : -darkness ) * darkenOpacity; + let c = darkness > 0 ? 0 : 255; + + if( darkness !== 0 ){ + r.colorFillStyle( context, c, c, c, opacity ); + + if( usePaths ){ + context.fill( path ); + } else { + context.fill(); + } + } + }; + + let drawBorder = () => { + if( borderWidth > 0 ){ + + context.lineWidth = borderWidth; + context.lineCap = borderCap; + context.lineJoin = borderJoin; + + if( context.setLineDash ){ // for very outofdate browsers + switch( borderStyle ){ + case 'dotted': + context.setLineDash( [ 1, 1 ] ); + break; + + case 'dashed': + context.setLineDash( borderPattern ); + context.lineDashOffset = borderOffset; + break; + + case 'solid': + case 'double': + context.setLineDash( [ ] ); + break; + } + } + + if ( borderPosition !== 'center') { + context.save(); + context.lineWidth *= 2; + if (borderPosition === 'inside') { + usePaths ? context.clip(path) : context.clip(); + } else { + const region = new Path2D(); + region.rect( + -nodeWidth / 2 - borderWidth, + -nodeHeight / 2 - borderWidth, + nodeWidth + 2 * borderWidth, + nodeHeight + 2 * borderWidth + ); + region.addPath(path); + context.clip(region, 'evenodd'); + } + usePaths ? context.stroke(path) : context.stroke(); + context.restore(); + } else { + usePaths ? context.stroke(path) : context.stroke(); + } + + if( borderStyle === 'double' ){ + context.lineWidth = borderWidth / 3; + + let gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + + if( usePaths ){ + context.stroke( path ); + } else { + context.stroke(); + } + + context.globalCompositeOperation = gco; + } + + // reset in case we changed the border style + if( context.setLineDash ){ // for very outofdate browsers + context.setLineDash( [ ] ); + } + } + }; + + let drawOutline = () => { + if( outlineWidth > 0 ){ + context.lineWidth = outlineWidth; + context.lineCap = 'butt'; + + if( context.setLineDash ){ // for very outofdate browsers + switch( outlineStyle ){ + case 'dotted': + context.setLineDash( [ 1, 1 ] ); + break; + + case 'dashed': + context.setLineDash( [ 4, 2 ] ); + break; + + case 'solid': + case 'double': + context.setLineDash( [ ] ); + break; + } + } + + let npos = pos; + + if( usePaths ){ + npos = { + x: 0, + y: 0 + }; + } + + let shape = r.getNodeShape( node ); + + let bWidth = borderWidth; + if( borderPosition === 'inside' ) bWidth = 0; + if( borderPosition === 'outside' ) bWidth *= 2; + + let scaleX = (nodeWidth + bWidth + (outlineWidth + outlineOffset)) / nodeWidth; + let scaleY = (nodeHeight + bWidth + (outlineWidth + outlineOffset)) / nodeHeight; + let sWidth = nodeWidth * scaleX; + let sHeight = nodeHeight * scaleY; + + let points = r.nodeShapes[ shape ].points; + let path; + + if (usePaths) { + let outlinePath = getPath(sWidth, sHeight, shape, points); + path = outlinePath.path; + } + + // draw the outline path, either by using expanded points or by scaling + // the dimensions, depending on shape + if (shape === "ellipse") { + r.drawEllipsePath(path || context, npos.x, npos.y, sWidth, sHeight); + } else if ([ + 'round-diamond', 'round-heptagon', 'round-hexagon', 'round-octagon', + 'round-pentagon', 'round-polygon', 'round-triangle', 'round-tag' + ].includes(shape)) { + let sMult = 0; + let offsetX = 0; + let offsetY = 0; + + if (shape === 'round-diamond') { + sMult = (bWidth + outlineOffset + outlineWidth) * 1.4; + } else if (shape === 'round-heptagon') { + sMult = (bWidth + outlineOffset + outlineWidth) * 1.075; + offsetY = -(bWidth/2 + outlineOffset + outlineWidth) / 35; + } else if (shape === 'round-hexagon') { + sMult = (bWidth + outlineOffset + outlineWidth) * 1.12; + } else if (shape === 'round-pentagon') { + sMult = (bWidth + outlineOffset + outlineWidth) * 1.13; + offsetY = -(bWidth/2 + outlineOffset + outlineWidth) / 15; + } else if (shape === 'round-tag') { + sMult = (bWidth + outlineOffset + outlineWidth) * 1.12; + offsetX = (bWidth/2 + outlineWidth + outlineOffset) * .07; + } else if (shape === 'round-triangle') { + sMult = (bWidth + outlineOffset + outlineWidth) * (Math.PI/2); + offsetY = -(bWidth + outlineOffset/2 + outlineWidth) / Math.PI; + } + + if (sMult !== 0) { + scaleX = (nodeWidth + sMult)/nodeWidth; + sWidth = nodeWidth * scaleX; + if ( ! ['round-hexagon', 'round-tag'].includes(shape) ) { + scaleY = (nodeHeight + sMult)/nodeHeight; + sHeight = nodeHeight * scaleY; + } + } + + cornerRadius = cornerRadius === 'auto' ? math.getRoundPolygonRadius( sWidth, sHeight ) : cornerRadius; + + const halfW = sWidth / 2; + const halfH = sHeight / 2; + const radius = cornerRadius + ( bWidth + outlineWidth + outlineOffset ) / 2; + const p = new Array( points.length / 2 ); + const corners = new Array( points.length / 2 ); + + for ( let i = 0; i < points.length / 2; i++ ){ + p[i] = { + x: npos.x + offsetX + halfW * points[ i * 2 ], + y: npos.y + offsetY + halfH * points[ i * 2 + 1 ] + }; + } + + let i, p1, p2, p3, len = p.length; + + p1 = p[ len - 1 ]; + // for each point + for( i = 0; i < len; i++ ){ + p2 = p[ (i) % len ]; + p3 = p[ (i + 1) % len ]; + corners[ i ] = round.getRoundCorner( p1, p2, p3, radius ); + p1 = p2; + p2 = p3; + } + + r.drawRoundPolygonPath(path || context, npos.x + offsetX, npos.y + offsetY, nodeWidth * scaleX, nodeHeight * scaleY, points, corners ); + } else if (['roundrectangle', 'round-rectangle'].includes(shape)) { + cornerRadius = cornerRadius === 'auto' ? math.getRoundRectangleRadius( sWidth, sHeight ) : cornerRadius; + r.drawRoundRectanglePath(path || context, npos.x, npos.y, sWidth, sHeight, cornerRadius + ( bWidth + outlineWidth + outlineOffset ) / 2 ); + } else if (['cutrectangle', 'cut-rectangle'].includes(shape)) { + cornerRadius = cornerRadius === 'auto' ? math.getCutRectangleCornerLength( sWidth, sHeight ) : cornerRadius; + r.drawCutRectanglePath(path || context, npos.x, npos.y, sWidth, sHeight, null ,cornerRadius + ( bWidth + outlineWidth + outlineOffset ) / 4 ); + } else if (['bottomroundrectangle', 'bottom-round-rectangle'].includes(shape)) { + cornerRadius = cornerRadius === 'auto' ? math.getRoundRectangleRadius( sWidth, sHeight ) : cornerRadius; + r.drawBottomRoundRectanglePath(path || context, npos.x, npos.y, sWidth, sHeight, cornerRadius + ( bWidth + outlineWidth + outlineOffset ) / 2 ); + } else if (shape === "barrel") { + r.drawBarrelPath(path || context, npos.x, npos.y, sWidth, sHeight); + } else if (shape.startsWith("polygon") || ['rhomboid', 'right-rhomboid', 'round-tag', 'tag', 'vee'].includes(shape)) { + let pad = (bWidth + outlineWidth + outlineOffset) / nodeWidth; + points = joinLines(expandPolygon(points, pad)); + r.drawPolygonPath(path || context, npos.x, npos.y, nodeWidth, nodeHeight, points); + } else { + let pad = (bWidth + outlineWidth + outlineOffset) / nodeWidth; + points = joinLines(expandPolygon(points, -pad)); + r.drawPolygonPath(path || context, npos.x, npos.y, nodeWidth, nodeHeight, points); + } + + if( usePaths ){ + context.stroke( path ); + } else { + context.stroke(); + } + + if( outlineStyle === 'double' ){ + context.lineWidth = bWidth / 3; + + let gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + + if( usePaths ){ + context.stroke( path ); + } else { + context.stroke(); + } + + context.globalCompositeOperation = gco; + } + + // reset in case we changed the border style + if( context.setLineDash ){ // for very outofdate browsers + context.setLineDash( [ ] ); + } + } + }; + + let drawOverlay = () => { + if( shouldDrawOverlay ){ + r.drawNodeOverlay( context, node, pos, nodeWidth, nodeHeight ); + } + }; + + let drawUnderlay = () => { + if( shouldDrawOverlay ){ + r.drawNodeUnderlay( context, node, pos, nodeWidth, nodeHeight ); + } + }; + + let drawText = () => { + r.drawElementText( context, node, null, drawLabel ); + }; + + let ghost = node.pstyle('ghost').value === 'yes'; + + if( ghost ){ + let gx = node.pstyle('ghost-offset-x').pfValue; + let gy = node.pstyle('ghost-offset-y').pfValue; + let ghostOpacity = node.pstyle('ghost-opacity').value; + let effGhostOpacity = ghostOpacity * eleOpacity; + + context.translate( gx, gy ); + + setupOutlineColor(); + drawOutline(); + setupShapeColor( ghostOpacity * bgOpacity ); + drawShape(); + drawImages( effGhostOpacity, true ); + setupBorderColor( ghostOpacity * borderOpacity ); + drawBorder(); + drawPie( darkness !== 0 || borderWidth !== 0 ); + drawStripe( darkness !== 0 || borderWidth !== 0 ); + drawImages( effGhostOpacity, false ); + darken( effGhostOpacity ); + + context.translate( -gx, -gy ); + } + + if( usePaths ){ + context.translate( -pos.x, -pos.y ); + } + drawUnderlay(); + if( usePaths ){ + context.translate( pos.x, pos.y ); + } + + setupOutlineColor(); + drawOutline(); + setupShapeColor(); + drawShape(); + drawImages(eleOpacity, true); + setupBorderColor(); + drawBorder(); + drawPie( darkness !== 0 || borderWidth !== 0 ); + drawStripe( darkness !== 0 || borderWidth !== 0 ); + drawImages(eleOpacity, false); + + darken(); + + if( usePaths ){ + context.translate( -pos.x, -pos.y ); + } + + drawText(); + + drawOverlay(); + + // + // clean up shift + + if( shiftToOriginWithBb ){ + context.translate( bb.x1, bb.y1 ); + } + +}; + +const drawNodeOverlayUnderlay = function( overlayOrUnderlay ) { + if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { + throw new Error('Invalid state'); + } + + return function( context, node, pos, nodeWidth, nodeHeight ){ + let r = this; + + if( !node.visible() ){ return; } + + let padding = node.pstyle( `${overlayOrUnderlay}-padding` ).pfValue; + let opacity = node.pstyle( `${overlayOrUnderlay}-opacity` ).value; + let color = node.pstyle( `${overlayOrUnderlay}-color` ).value; + let shape = node.pstyle( `${overlayOrUnderlay}-shape` ).value; + let radius = node.pstyle( `${overlayOrUnderlay}-corner-radius` ).value; + + if( opacity > 0 ){ + pos = pos || node.position(); + + if( nodeWidth == null || nodeHeight == null ){ + let padding = node.padding(); + + nodeWidth = node.width() + 2 * padding; + nodeHeight = node.height() + 2 * padding; + } + + r.colorFillStyle( context, color[0], color[1], color[2], opacity ); + + r.nodeShapes[shape].draw( + context, + pos.x, + pos.y, + nodeWidth + padding * 2, + nodeHeight + padding * 2, + radius + ); + + context.fill(); + } + }; +}; + +CRp.drawNodeOverlay = drawNodeOverlayUnderlay('overlay'); + +CRp.drawNodeUnderlay = drawNodeOverlayUnderlay('underlay'); + +// does the node have at least one pie piece? +CRp.hasPie = function( node ){ + node = node[0]; // ensure ele ref + + return node._private.hasPie; +}; + +CRp.hasStripe = function( node ){ + node = node[0]; // ensure ele ref + + return node._private.hasStripe; +}; + +CRp.drawPie = function( context, node, nodeOpacity, pos ){ + node = node[0]; // ensure ele ref + pos = pos || node.position(); + + let cyStyle = node.cy().style(); + let pieSize = node.pstyle( 'pie-size' ); + let hole = node.pstyle('pie-hole'); + let overallStartAngle = node.pstyle('pie-start-angle').pfValue; + let x = pos.x; + let y = pos.y; + let nodeW = node.width(); + let nodeH = node.height(); + let radius = Math.min( nodeW, nodeH ) / 2; // must fit in node + let holeRadius; + let lastPercent = 0; // what % to continue drawing pie slices from on [0, 1] + let usePaths = this.usePaths(); + + if( usePaths ){ + x = 0; + y = 0; + } + + if( pieSize.units === '%' ){ + radius = radius * pieSize.pfValue; + } else if( pieSize.pfValue !== undefined ){ + radius = pieSize.pfValue / 2; // diameter in pixels => radius + } + + if (hole.units === '%') { + holeRadius = radius * hole.pfValue; + } else if (hole.pfValue !== undefined) { + holeRadius = hole.pfValue / 2; // diameter in pixels => radius + } + + if (holeRadius >= radius) { + return; // the pie would be invisible anyway + } + + for( let i = 1; i <= cyStyle.pieBackgroundN; i++ ){ // 1..N + let size = node.pstyle( 'pie-' + i + '-background-size' ).value; + let color = node.pstyle( 'pie-' + i + '-background-color' ).value; + let opacity = node.pstyle( 'pie-' + i + '-background-opacity' ).value * nodeOpacity; + let percent = size / 100; // map integer range [0, 100] to [0, 1] + + // percent can't push beyond 1 + if( percent + lastPercent > 1 ){ + percent = 1 - lastPercent; + } + + let angleStart = (1.5 * Math.PI) + (2 * Math.PI * lastPercent); // start at 12 o'clock and go clockwise + angleStart += overallStartAngle; // shift by the overall pie start angle + let angleDelta = 2 * Math.PI * percent; + let angleEnd = angleStart + angleDelta; + + // ignore if + // - zero size + // - we're already beyond the full circle + // - adding the current slice would go beyond the full circle + if( size === 0 || lastPercent >= 1 || lastPercent + percent > 1 ){ + continue; + } + + if (holeRadius === 0) { // make a pie slice + context.beginPath(); + context.moveTo( x, y ); + context.arc( x, y, radius, angleStart, angleEnd ); + context.closePath(); + } else { // make a pie slice that's like the above but with a hole in the middle + context.beginPath(); + context.arc(x, y, radius, angleStart, angleEnd); + context.arc(x, y, holeRadius, angleEnd, angleStart, true); // true for anticlockwise + context.closePath(); + } + + this.colorFillStyle( context, color[0], color[1], color[2], opacity ); + + context.fill(); + + lastPercent += percent; + } + +}; + +CRp.drawStripe = function( context, node, nodeOpacity, pos ){ + node = node[0]; // ensure ele ref + pos = pos || node.position(); + + let cyStyle = node.cy().style(); + let x = pos.x; + let y = pos.y; + let nodeW = node.width(); + let nodeH = node.height(); + let lastPercent = 0; // what % to continue drawing pie slices from on [0, 1] + let usePaths = this.usePaths(); + + context.save(); + + let direction = node.pstyle('stripe-direction').value; + let stripeSize = node.pstyle('stripe-size'); + + switch (direction) { + case 'vertical': + break; // default + case 'righward': + context.rotate(-Math.PI / 2); + break; + } + + let stripeW = nodeW; + let stripeH = nodeH; + + if( stripeSize.units === '%' ){ + stripeW = stripeW * stripeSize.pfValue; + stripeH = stripeH * stripeSize.pfValue; + } else if( stripeSize.pfValue !== undefined ){ + stripeW = stripeSize.pfValue; + stripeH = stripeSize.pfValue; + } + + if( usePaths ){ + x = 0; + y = 0; + } + + // shift up from the centre of the node to the top-left corner + y -= stripeW / 2; + x -= stripeH / 2; + + for( let i = 1; i <= cyStyle.stripeBackgroundN; i++ ){ // 1..N + let size = node.pstyle( 'stripe-' + i + '-background-size' ).value; + let color = node.pstyle( 'stripe-' + i + '-background-color' ).value; + let opacity = node.pstyle( 'stripe-' + i + '-background-opacity' ).value * nodeOpacity; + let percent = size / 100; // map integer range [0, 100] to [0, 1] + + // percent can't push beyond 1 + if( percent + lastPercent > 1 ){ + percent = 1 - lastPercent; + } + + // ignore if + // - zero size + // - we're already beyond the full chart + // - adding the current slice would go beyond the full chart + if( size === 0 || lastPercent >= 1 || lastPercent + percent > 1 ){ + continue; + } + + // draw rect for the current stripe + context.beginPath(); + context.rect( x, y + stripeH * lastPercent, stripeW, stripeH * percent ); + context.closePath(); + + this.colorFillStyle( context, color[0], color[1], color[2], opacity ); + + context.fill(); + + lastPercent += percent; + } + + context.restore(); + +}; + + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-redraw.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-redraw.mjs new file mode 100644 index 0000000000000000000000000000000000000000..59c8f2ae110b2822d92e2b03e60925f5f8c1e4a2 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-redraw.mjs @@ -0,0 +1,721 @@ +import * as util from '../../../util/index.mjs'; +import * as math from '../../../math.mjs'; + +var CRp = {}; + +var motionBlurDelay = 100; + +// var isFirefox = typeof InstallTrigger !== 'undefined'; + +CRp.getPixelRatio = function(){ + var context = this.data.contexts[0]; + + if( this.forcedPixelRatio != null ){ + return this.forcedPixelRatio; + } + + var containerWindow = this.cy.window(); + + var backingStore = context.backingStorePixelRatio || + context.webkitBackingStorePixelRatio || + context.mozBackingStorePixelRatio || + context.msBackingStorePixelRatio || + context.oBackingStorePixelRatio || + context.backingStorePixelRatio || 1; + + return (containerWindow.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef +}; + +CRp.paintCache = function( context ){ + var caches = this.paintCaches = this.paintCaches || []; + var needToCreateCache = true; + var cache; + + for( var i = 0; i < caches.length; i++ ){ + cache = caches[ i ]; + + if( cache.context === context ){ + needToCreateCache = false; + break; + } + } + + if( needToCreateCache ){ + cache = { + context: context + }; + caches.push( cache ); + } + + return cache; +}; + +CRp.createGradientStyleFor = function( context, shapeStyleName, ele, fill, opacity ){ + let gradientStyle; + let usePaths = this.usePaths(); + + let colors = ele.pstyle(shapeStyleName + '-gradient-stop-colors').value, + positions = ele.pstyle(shapeStyleName + '-gradient-stop-positions').pfValue; + + if (fill === 'radial-gradient') { + if (ele.isEdge()) { + let start = ele.sourceEndpoint(), end = ele.targetEndpoint(), mid = ele.midpoint(); + + let d1 = math.dist( start, mid ); + let d2 = math.dist( end, mid ); + + gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2)); + } else { + let pos = usePaths ? {x: 0, y: 0 } : ele.position(), + width = ele.paddedWidth(), height = ele.paddedHeight(); + gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height)); + } + } else { + if (ele.isEdge()) { + let start = ele.sourceEndpoint(), end = ele.targetEndpoint(); + + gradientStyle = context.createLinearGradient(start.x, start.y, end.x, end.y); + } else { + let pos = usePaths ? { x: 0, y: 0 } : ele.position(), + width = ele.paddedWidth(), height = ele.paddedHeight(), + halfWidth = width / 2, halfHeight = height / 2; + let direction = ele.pstyle('background-gradient-direction').value; + + switch (direction) { + case 'to-bottom': + gradientStyle = context.createLinearGradient(pos.x, pos.y - halfHeight, pos.x, pos.y + halfHeight); + break; + case 'to-top': + gradientStyle = context.createLinearGradient(pos.x, pos.y + halfHeight, pos.x, pos.y - halfHeight); + break; + case 'to-left': + gradientStyle = context.createLinearGradient(pos.x + halfWidth, pos.y, pos.x - halfWidth, pos.y); + break; + case 'to-right': + gradientStyle = context.createLinearGradient(pos.x - halfWidth, pos.y, pos.x + halfWidth, pos.y); + break; + case 'to-bottom-right': + case 'to-right-bottom': + gradientStyle = context.createLinearGradient(pos.x - halfWidth, pos.y - halfHeight, pos.x + halfWidth, pos.y + halfHeight); + break; + case 'to-top-right': + case 'to-right-top': + gradientStyle = context.createLinearGradient(pos.x - halfWidth, pos.y + halfHeight, pos.x + halfWidth, pos.y - halfHeight); + break; + case 'to-bottom-left': + case 'to-left-bottom': + gradientStyle = context.createLinearGradient(pos.x + halfWidth, pos.y - halfHeight, pos.x - halfWidth, pos.y + halfHeight); + break; + case 'to-top-left': + case 'to-left-top': + gradientStyle = context.createLinearGradient(pos.x + halfWidth, pos.y + halfHeight, pos.x - halfWidth, pos.y - halfHeight); + break; + } + } + } + if (!gradientStyle) return null; // invalid gradient style + + let hasPositions = positions.length === colors.length; + + let length = colors.length; + for (let i = 0; i < length; i++) { + gradientStyle.addColorStop(hasPositions ? positions[i] : i / (length - 1), 'rgba(' + colors[i][0] + ',' + colors[i][1] + ',' + colors[i][2] + ',' + opacity + ')'); + } + + return gradientStyle; +}; + +CRp.gradientFillStyle = function( context, ele, fill, opacity ){ + const gradientStyle = this.createGradientStyleFor(context, 'background', ele, fill, opacity); + if (!gradientStyle) return null; // error + context.fillStyle = gradientStyle; +}; + +CRp.colorFillStyle = function( context, r, g, b, a ){ + context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + // turn off for now, seems context does its own caching + + // var cache = this.paintCache(context); + + // var fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + + // if( cache.fillStyle !== fillStyle ){ + // context.fillStyle = cache.fillStyle = fillStyle; + // } +}; + +CRp.eleFillStyle = function( context, ele, opacity ){ + let backgroundFill = ele.pstyle('background-fill').value; + + if (backgroundFill === 'linear-gradient' || backgroundFill === 'radial-gradient') { + this.gradientFillStyle(context, ele, backgroundFill, opacity); + } else { + let backgroundColor = ele.pstyle('background-color').value; + this.colorFillStyle( context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity ); + } +}; + +CRp.gradientStrokeStyle = function( context, ele, fill, opacity ){ + const gradientStyle = this.createGradientStyleFor(context, 'line', ele, fill ,opacity); + if (!gradientStyle) return null; // error + context.strokeStyle = gradientStyle; +}; + +CRp.colorStrokeStyle = function( context, r, g, b, a ){ + context.strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + // turn off for now, seems context does its own caching + + // var cache = this.paintCache(context); + + // var strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + + // if( cache.strokeStyle !== strokeStyle ){ + // context.strokeStyle = cache.strokeStyle = strokeStyle; + // } +}; + +CRp.eleStrokeStyle = function( context, ele, opacity ){ + let lineFill = ele.pstyle('line-fill').value; + + if (lineFill === 'linear-gradient' || lineFill === 'radial-gradient') { + this.gradientStrokeStyle(context, ele, lineFill, opacity); + } else { + let lineColor = ele.pstyle('line-color').value; + this.colorStrokeStyle( context, lineColor[0], lineColor[1], lineColor[2], opacity ); + } +}; + +// Resize canvas +CRp.matchCanvasSize = function( container ){ + var r = this; + var data = r.data; + var bb = r.findContainerClientCoords(); + var width = bb[2]; + var height = bb[3]; + var pixelRatio = r.getPixelRatio(); + var mbPxRatio = r.motionBlurPxRatio; + + if( + container === r.data.bufferCanvases[ r.MOTIONBLUR_BUFFER_NODE ] || + container === r.data.bufferCanvases[ r.MOTIONBLUR_BUFFER_DRAG ] + ){ + pixelRatio = mbPxRatio; + } + + var canvasWidth = width * pixelRatio; + var canvasHeight = height * pixelRatio; + var canvas; + + if( canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight ){ + return; // save cycles if same + } + + r.fontCaches = null; // resizing resets the style + + var canvasContainer = data.canvasContainer; + canvasContainer.style.width = width + 'px'; + canvasContainer.style.height = height + 'px'; + + for( var i = 0; i < r.CANVAS_LAYERS; i++ ){ + canvas = data.canvases[ i ]; + + canvas.width = canvasWidth; + canvas.height = canvasHeight; + + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + } + + for( var i = 0; i < r.BUFFER_COUNT; i++ ){ + canvas = data.bufferCanvases[ i ]; + + canvas.width = canvasWidth; + canvas.height = canvasHeight; + + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + } + + r.textureMult = 1; + if( pixelRatio <= 1 ){ + canvas = data.bufferCanvases[ r.TEXTURE_BUFFER ]; + + r.textureMult = 2; + canvas.width = canvasWidth * r.textureMult; + canvas.height = canvasHeight * r.textureMult; + } + + r.canvasWidth = canvasWidth; + r.canvasHeight = canvasHeight; + r.pixelRatio = pixelRatio; +}; + +CRp.renderTo = function( cxt, zoom, pan, pxRatio ){ + this.render( { + forcedContext: cxt, + forcedZoom: zoom, + forcedPan: pan, + drawAllLayers: true, + forcedPxRatio: pxRatio + } ); +}; + +CRp.clearCanvas = function(){ + var r = this; + var data = r.data; + function clear(context) { + context.clearRect(0, 0, r.canvasWidth, r.canvasHeight); + } + clear(data.contexts[ r.NODE ]); + clear(data.contexts[ r.DRAG ]); +}; + + +CRp.render = function( options ){ + var r = this; + options = options || util.staticEmptyObject(); + + var cy = r.cy; + + var forcedContext = options.forcedContext; + var drawAllLayers = options.drawAllLayers; + var drawOnlyNodeLayer = options.drawOnlyNodeLayer; + var forcedZoom = options.forcedZoom; + var forcedPan = options.forcedPan; + var pixelRatio = options.forcedPxRatio === undefined ? this.getPixelRatio() : options.forcedPxRatio; + var data = r.data; + var needDraw = data.canvasNeedsRedraw; + var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming); + var motionBlur = options.motionBlur !== undefined ? options.motionBlur : r.motionBlur; + var mbPxRatio = r.motionBlurPxRatio; + var hasCompoundNodes = cy.hasCompoundNodes(); + var inNodeDragGesture = r.hoverData.draggingEles; + var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false; + motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection; + var motionBlurFadeEffect = motionBlur; + + if( !forcedContext ){ + if( r.prevPxRatio !== pixelRatio ){ + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize( r.container ); + + r.redrawHint('eles', true); + r.redrawHint('drag', true); + } + + r.prevPxRatio = pixelRatio; + } + + if( !forcedContext && r.motionBlurTimeout ){ + clearTimeout( r.motionBlurTimeout ); + } + + if( motionBlur ){ + if( r.mbFrames == null ){ + r.mbFrames = 0; + } + + r.mbFrames++; + + if( r.mbFrames < 3 ){ // need several frames before even high quality motionblur + motionBlurFadeEffect = false; + } + + // go to lower quality blurry frames when several m/b frames have been rendered (avoids flashing) + if( r.mbFrames > r.minMbLowQualFrames ){ + //r.fullQualityMb = false; + r.motionBlurPxRatio = r.mbPxRBlurry; + } + } + + if( r.clearingMotionBlur ){ + r.motionBlurPxRatio = 1; + } + + // b/c drawToContext() may be async w.r.t. redraw(), keep track of last texture frame + // because a rogue async texture frame would clear needDraw + if( r.textureDrawLastFrame && !textureDraw ){ + needDraw[ r.NODE ] = true; + needDraw[ r.SELECT_BOX ] = true; + } + + var style = cy.style(); + + var zoom = cy.zoom(); + var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom; + var pan = cy.pan(); + var effectivePan = { + x: pan.x, + y: pan.y + }; + + var vp = { + zoom: zoom, + pan: { + x: pan.x, + y: pan.y + } + }; + var prevVp = r.prevViewport; + var viewportIsDiff = prevVp === undefined || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y; + + // we want the low quality motionblur only when the viewport is being manipulated etc (where it's not noticed) + if( !viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes) ){ + r.motionBlurPxRatio = 1; + } + + if( forcedPan ){ + effectivePan = forcedPan; + } + + // apply pixel ratio + + effectiveZoom *= pixelRatio; + effectivePan.x *= pixelRatio; + effectivePan.y *= pixelRatio; + + var eles = r.getCachedZSortedEles(); + + function mbclear( context, x, y, w, h ){ + var gco = context.globalCompositeOperation; + + context.globalCompositeOperation = 'destination-out'; + r.colorFillStyle( context, 255, 255, 255, r.motionBlurTransparency ); + context.fillRect( x, y, w, h ); + + context.globalCompositeOperation = gco; + } + + function setContextTransform( context, clear ){ + var ePan, eZoom, w, h; + + if( !r.clearingMotionBlur && (context === data.bufferContexts[ r.MOTIONBLUR_BUFFER_NODE ] || context === data.bufferContexts[ r.MOTIONBLUR_BUFFER_DRAG ]) ){ + ePan = { + x: pan.x * mbPxRatio, + y: pan.y * mbPxRatio + }; + + eZoom = zoom * mbPxRatio; + + w = r.canvasWidth * mbPxRatio; + h = r.canvasHeight * mbPxRatio; + } else { + ePan = effectivePan; + eZoom = effectiveZoom; + + w = r.canvasWidth; + h = r.canvasHeight; + } + + context.setTransform( 1, 0, 0, 1, 0, 0 ); + + if( clear === 'motionBlur' ){ + mbclear( context, 0, 0, w, h ); + } else if( !forcedContext && (clear === undefined || clear) ){ + context.clearRect( 0, 0, w, h ); + } + + if( !drawAllLayers ){ + context.translate( ePan.x, ePan.y ); + context.scale( eZoom, eZoom ); + } + if( forcedPan ){ + context.translate( forcedPan.x, forcedPan.y ); + } + if( forcedZoom ){ + context.scale( forcedZoom, forcedZoom ); + } + } + + if( !textureDraw ){ + r.textureDrawLastFrame = false; + } + + if( textureDraw ){ + r.textureDrawLastFrame = true; + + if( !r.textureCache ){ + r.textureCache = {}; + + r.textureCache.bb = cy.mutableElements().boundingBox(); + + r.textureCache.texture = r.data.bufferCanvases[ r.TEXTURE_BUFFER ]; + + var cxt = r.data.bufferContexts[ r.TEXTURE_BUFFER ]; + + cxt.setTransform( 1, 0, 0, 1, 0, 0 ); + cxt.clearRect( 0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult ); + + r.render( { + forcedContext: cxt, + drawOnlyNodeLayer: true, + forcedPxRatio: pixelRatio * r.textureMult + } ); + + var vp = r.textureCache.viewport = { + zoom: cy.zoom(), + pan: cy.pan(), + width: r.canvasWidth, + height: r.canvasHeight + }; + + vp.mpan = { + x: (0 - vp.pan.x) / vp.zoom, + y: (0 - vp.pan.y) / vp.zoom + }; + } + + needDraw[ r.DRAG ] = false; + needDraw[ r.NODE ] = false; + + var context = data.contexts[ r.NODE ]; + + var texture = r.textureCache.texture; + var vp = r.textureCache.viewport; + + context.setTransform( 1, 0, 0, 1, 0, 0 ); + + if( motionBlur ){ + mbclear( context, 0, 0, vp.width, vp.height ); + } else { + context.clearRect( 0, 0, vp.width, vp.height ); + } + + var outsideBgColor = style.core( 'outside-texture-bg-color' ).value; + var outsideBgOpacity = style.core( 'outside-texture-bg-opacity' ).value; + r.colorFillStyle( context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity ); + context.fillRect( 0, 0, vp.width, vp.height ); + + var zoom = cy.zoom(); + + setContextTransform( context, false ); + + context.clearRect( vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio ); + context.drawImage( texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio ); + + } else if( r.textureOnViewport && !forcedContext ){ // clear the cache since we don't need it + r.textureCache = null; + } + + var extent = cy.extent(); + var vpManip = (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated()); + var hideEdges = r.hideEdgesOnViewport && vpManip; + + var needMbClear = []; + + needMbClear[ r.NODE ] = !needDraw[ r.NODE ] && motionBlur && !r.clearedForMotionBlur[ r.NODE ] || r.clearingMotionBlur; + if( needMbClear[ r.NODE ] ){ r.clearedForMotionBlur[ r.NODE ] = true; } + + needMbClear[ r.DRAG ] = !needDraw[ r.DRAG ] && motionBlur && !r.clearedForMotionBlur[ r.DRAG ] || r.clearingMotionBlur; + if( needMbClear[ r.DRAG ] ){ r.clearedForMotionBlur[ r.DRAG ] = true; } + + if( needDraw[ r.NODE ] || drawAllLayers || drawOnlyNodeLayer || needMbClear[ r.NODE ] ){ + var useBuffer = motionBlur && !needMbClear[ r.NODE ] && mbPxRatio !== 1; + var context = forcedContext || ( useBuffer ? r.data.bufferContexts[ r.MOTIONBLUR_BUFFER_NODE ] : data.contexts[ r.NODE ] ); + var clear = motionBlur && !useBuffer ? 'motionBlur' : undefined; + + setContextTransform( context, clear ); + + if( hideEdges ){ + r.drawCachedNodes( context, eles.nondrag, pixelRatio, extent ); + } else { + r.drawLayeredElements( context, eles.nondrag, pixelRatio, extent ); + } + + if( r.debug ){ + r.drawDebugPoints( context, eles.nondrag ); + } + + if( !drawAllLayers && !motionBlur ){ + needDraw[ r.NODE ] = false; + } + } + + if( !drawOnlyNodeLayer && (needDraw[ r.DRAG ] || drawAllLayers || needMbClear[ r.DRAG ]) ){ + var useBuffer = motionBlur && !needMbClear[ r.DRAG ] && mbPxRatio !== 1; + var context = forcedContext || ( useBuffer ? r.data.bufferContexts[ r.MOTIONBLUR_BUFFER_DRAG ] : data.contexts[ r.DRAG ] ); + + setContextTransform( context, motionBlur && !useBuffer ? 'motionBlur' : undefined ); + + if( hideEdges ){ + r.drawCachedNodes( context, eles.drag, pixelRatio, extent ); + } else { + r.drawCachedElements( context, eles.drag, pixelRatio, extent ); + } + + if( r.debug ){ + r.drawDebugPoints( context, eles.drag ); + } + + if( !drawAllLayers && !motionBlur ){ + needDraw[ r.DRAG ] = false; + } + } + + this.drawSelectionRectangle(options, setContextTransform); + + // motionblur: blit rendered blurry frames + if( motionBlur && mbPxRatio !== 1 ){ + var cxtNode = data.contexts[ r.NODE ]; + var txtNode = r.data.bufferCanvases[ r.MOTIONBLUR_BUFFER_NODE ]; + + var cxtDrag = data.contexts[ r.DRAG ]; + var txtDrag = r.data.bufferCanvases[ r.MOTIONBLUR_BUFFER_DRAG ]; + + var drawMotionBlur = function( cxt, txt, needClear ){ + cxt.setTransform( 1, 0, 0, 1, 0, 0 ); + + if( needClear || !motionBlurFadeEffect ){ + cxt.clearRect( 0, 0, r.canvasWidth, r.canvasHeight ); + } else { + mbclear( cxt, 0, 0, r.canvasWidth, r.canvasHeight ); + } + + var pxr = mbPxRatio; + + cxt.drawImage( + txt, // img + 0, 0, // sx, sy + r.canvasWidth * pxr, r.canvasHeight * pxr, // sw, sh + 0, 0, // x, y + r.canvasWidth, r.canvasHeight // w, h + ); + }; + + if( needDraw[ r.NODE ] || needMbClear[ r.NODE ] ){ + drawMotionBlur( cxtNode, txtNode, needMbClear[ r.NODE ] ); + needDraw[ r.NODE ] = false; + } + + if( needDraw[ r.DRAG ] || needMbClear[ r.DRAG ] ){ + drawMotionBlur( cxtDrag, txtDrag, needMbClear[ r.DRAG ] ); + needDraw[ r.DRAG ] = false; + } + } + + r.prevViewport = vp; + + if( r.clearingMotionBlur ){ + r.clearingMotionBlur = false; + r.motionBlurCleared = true; + r.motionBlur = true; + } + + if( motionBlur ){ + r.motionBlurTimeout = setTimeout( function(){ + r.motionBlurTimeout = null; + + r.clearedForMotionBlur[ r.NODE ] = false; + r.clearedForMotionBlur[ r.DRAG ] = false; + r.motionBlur = false; + r.clearingMotionBlur = !textureDraw; + r.mbFrames = 0; + + needDraw[ r.NODE ] = true; + needDraw[ r.DRAG ] = true; + + r.redraw(); + }, motionBlurDelay ); + } + + if( !forcedContext ){ + cy.emit('render'); + } + +}; + +let fpsHeight; + +CRp.drawSelectionRectangle = function(options, setContextTransform) { + const r = this; + const cy = r.cy; + const data = r.data; + const style = cy.style(); + + const drawOnlyNodeLayer = options.drawOnlyNodeLayer; + const drawAllLayers = options.drawAllLayers; + const needDraw = data.canvasNeedsRedraw; + const forcedContext = options.forcedContext; + + if( r.showFps || (!drawOnlyNodeLayer && (needDraw[ r.SELECT_BOX ] && !drawAllLayers)) ){ + var context = forcedContext || data.contexts[ r.SELECT_BOX ]; + + setContextTransform( context ); + + if( r.selection[4] == 1 && ( r.hoverData.selecting || r.touchData.selecting ) ){ + var zoom = r.cy.zoom(); + var borderWidth = style.core( 'selection-box-border-width' ).value / zoom; + + context.lineWidth = borderWidth; + context.fillStyle = 'rgba(' + + style.core( 'selection-box-color' ).value[0] + ',' + + style.core( 'selection-box-color' ).value[1] + ',' + + style.core( 'selection-box-color' ).value[2] + ',' + + style.core( 'selection-box-opacity' ).value + ')'; + + context.fillRect( + r.selection[0], + r.selection[1], + r.selection[2] - r.selection[0], + r.selection[3] - r.selection[1] ); + + if( borderWidth > 0 ){ + context.strokeStyle = 'rgba(' + + style.core( 'selection-box-border-color' ).value[0] + ',' + + style.core( 'selection-box-border-color' ).value[1] + ',' + + style.core( 'selection-box-border-color' ).value[2] + ',' + + style.core( 'selection-box-opacity' ).value + ')'; + + context.strokeRect( + r.selection[0], + r.selection[1], + r.selection[2] - r.selection[0], + r.selection[3] - r.selection[1] ); + } + } + + if( data.bgActivePosistion && !r.hoverData.selecting ){ + var zoom = r.cy.zoom(); + var pos = data.bgActivePosistion; + + context.fillStyle = 'rgba(' + + style.core( 'active-bg-color' ).value[0] + ',' + + style.core( 'active-bg-color' ).value[1] + ',' + + style.core( 'active-bg-color' ).value[2] + ',' + + style.core( 'active-bg-opacity' ).value + ')'; + + context.beginPath(); + context.arc( pos.x, pos.y, style.core( 'active-bg-size' ).pfValue / zoom, 0, 2 * Math.PI ); + context.fill(); + } + + var timeToRender = r.lastRedrawTime; + if( r.showFps && timeToRender ){ + timeToRender = Math.round( timeToRender ); + var fps = Math.round( 1000 / timeToRender ); + const text = '1 frame = ' + timeToRender + ' ms = ' + fps + ' fps'; + + context.setTransform( 1, 0, 0, 1, 0, 0 ); + + context.fillStyle = 'rgba(255, 0, 0, 0.75)'; + context.strokeStyle = 'rgba(255, 0, 0, 0.75)'; + // context.lineWidth = 1; + context.font = '30px Arial'; + if(!fpsHeight) { + const dims = context.measureText(text); + fpsHeight = dims.actualBoundingBoxAscent; + } + context.fillText( text, 0, fpsHeight ); + + var maxFps = 60; + context.strokeRect( 0, fpsHeight + 10, 250, 20 ); + context.fillRect( 0, fpsHeight + 10, 250 * Math.min( fps / maxFps, 1 ), 20 ); + } + + if( !drawAllLayers ){ + needDraw[ r.SELECT_BOX ] = false; + } + } +}; + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-shapes.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-shapes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a162b9e0c783bf311044036afdecee68bd660b54 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/drawing-shapes.mjs @@ -0,0 +1,175 @@ +import * as math from '../../../math.mjs'; +import * as round from '../../../round.mjs'; + +var CRp = {}; + +// @O Polygon drawing +CRp.drawPolygonPath = function( + context, x, y, width, height, points ){ + + var halfW = width / 2; + var halfH = height / 2; + + if( context.beginPath ){ context.beginPath(); } + + context.moveTo( x + halfW * points[0], y + halfH * points[1] ); + + for( var i = 1; i < points.length / 2; i++ ){ + context.lineTo( x + halfW * points[ i * 2], y + halfH * points[ i * 2 + 1] ); + } + + context.closePath(); +}; + +CRp.drawRoundPolygonPath = function( + context, x, y, width, height, points, corners ){ + corners.forEach( corner => round.drawPreparedRoundCorner( context, corner ) ); + context.closePath(); +}; + +// Round rectangle drawing +CRp.drawRoundRectanglePath = function( + context, x, y, width, height, radius){ + + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = radius === 'auto' ? math.getRoundRectangleRadius( width, height ) : Math.min(radius, halfHeight, halfWidth); + + if( context.beginPath ){ context.beginPath(); } + + // Start at top middle + context.moveTo( x, y - halfHeight ); + // Arc from middle top to right side + context.arcTo( x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius ); + // Arc from right side to bottom + context.arcTo( x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius ); + // Arc from bottom to left side + context.arcTo( x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius ); + // Arc from left side to topBorder + context.arcTo( x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius ); + // Join line + context.lineTo( x, y - halfHeight ); + + + context.closePath(); +}; + +CRp.drawBottomRoundRectanglePath = function( + context, x, y, width, height, radius){ + + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = radius === 'auto' ? math.getRoundRectangleRadius( width, height ) : radius; + + if( context.beginPath ){ context.beginPath(); } + + // Start at top middle + context.moveTo( x, y - halfHeight ); + context.lineTo( x + halfWidth, y - halfHeight ); + context.lineTo( x + halfWidth, y ); + + context.arcTo( x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); + context.arcTo( x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius ); + + context.lineTo( x - halfWidth, y - halfHeight ); + context.lineTo( x, y - halfHeight ); + + context.closePath(); +}; + +CRp.drawCutRectanglePath = function( + context, x, y, width, height, points, corners ){ + + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerLength = corners === 'auto' ? math.getCutRectangleCornerLength() : corners; + + if( context.beginPath ){ context.beginPath(); } + + context.moveTo( x - halfWidth + cornerLength, y - halfHeight ); + + context.lineTo( x + halfWidth - cornerLength, y - halfHeight ); + context.lineTo( x + halfWidth, y - halfHeight + cornerLength ); + context.lineTo( x + halfWidth, y + halfHeight - cornerLength ); + context.lineTo( x + halfWidth - cornerLength, y + halfHeight ); + context.lineTo( x - halfWidth + cornerLength, y + halfHeight ); + context.lineTo( x - halfWidth, y + halfHeight - cornerLength ); + context.lineTo( x - halfWidth, y - halfHeight + cornerLength ); + + context.closePath(); +}; + +CRp.drawBarrelPath = function( + context, x, y, width, height ){ + + var halfWidth = width / 2; + var halfHeight = height / 2; + + var xBegin = x - halfWidth; + var xEnd = x + halfWidth; + var yBegin = y - halfHeight; + var yEnd = y + halfHeight; + + var barrelCurveConstants = math.getBarrelCurveConstants( width, height ); + var wOffset = barrelCurveConstants.widthOffset; + var hOffset = barrelCurveConstants.heightOffset; + var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset; + + if( context.beginPath ){ context.beginPath(); } + + context.moveTo( xBegin, yBegin + hOffset ); + + context.lineTo( xBegin, yEnd - hOffset ); + context.quadraticCurveTo( xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd ); + + context.lineTo( xEnd - wOffset, yEnd ); + context.quadraticCurveTo( xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset ); + + context.lineTo( xEnd, yBegin + hOffset ); + context.quadraticCurveTo( xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin ); + + context.lineTo( xBegin + wOffset, yBegin ); + context.quadraticCurveTo( xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset ); + + context.closePath(); +}; + + +var sin0 = Math.sin( 0 ); +var cos0 = Math.cos( 0 ); + +var sin = {}; +var cos = {}; + +var ellipseStepSize = Math.PI / 40; + +for( var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize ){ + sin[ i ] = Math.sin( i ); + cos[ i ] = Math.cos( i ); +} + +CRp.drawEllipsePath = function( context, centerX, centerY, width, height ){ + if( context.beginPath ){ context.beginPath(); } + + if( context.ellipse ){ + context.ellipse( centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI ); + } else { + var xPos, yPos; + var rw = width / 2; + var rh = height / 2; + for( var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize ){ + xPos = centerX - (rw * sin[ i ]) * sin0 + (rw * cos[ i ]) * cos0; + yPos = centerY + (rh * cos[ i ]) * sin0 + (rh * sin[ i ]) * cos0; + + if( i === 0 ){ + context.moveTo( xPos, yPos ); + } else { + context.lineTo( xPos, yPos ); + } + } + } + + context.closePath(); + }; + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/ele-texture-cache-lookup.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/ele-texture-cache-lookup.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4f3b2b209058b7fcc73a8f4c4de3fb7a86eff82e --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/ele-texture-cache-lookup.mjs @@ -0,0 +1,178 @@ +import Map from '../../../map.mjs'; +import Set from'../../../set.mjs'; +import * as util from '../../../util/index.mjs'; + +// Allows lookups for (ele, lvl) => cache. +// Uses keys so elements may share the same cache. +class ElementTextureCacheLookup { + constructor(getKey, doesEleInvalidateKey = util.falsify){ + this.idsByKey = new Map(); + this.keyForId = new Map(); + this.cachesByLvl = new Map(); + this.lvls = []; + this.getKey = getKey; + this.doesEleInvalidateKey = doesEleInvalidateKey; + } + + getIdsFor(key){ + if( key == null ){ + util.error(`Can not get id list for null key`); + } + + let { idsByKey } = this; + let ids = this.idsByKey.get(key); + + if( !ids ){ + ids = new Set(); + + idsByKey.set(key, ids); + } + + return ids; + } + + addIdForKey(key, id){ + if( key != null ){ + this.getIdsFor(key).add(id); + } + } + + deleteIdForKey(key, id){ + if( key != null ){ + this.getIdsFor(key).delete(id); + } + } + + getNumberOfIdsForKey(key){ + if( key == null ){ + return 0; + } else { + return this.getIdsFor(key).size; + } + } + + updateKeyMappingFor(ele){ + let id = ele.id(); + let prevKey = this.keyForId.get(id); + let currKey = this.getKey(ele); + + this.deleteIdForKey(prevKey, id); + + this.addIdForKey(currKey, id); + + this.keyForId.set(id, currKey); + } + + deleteKeyMappingFor(ele){ + let id = ele.id(); + let prevKey = this.keyForId.get(id); + + this.deleteIdForKey(prevKey, id); + + this.keyForId.delete(id); + } + + keyHasChangedFor(ele){ + let id = ele.id(); + let prevKey = this.keyForId.get(id); + let newKey = this.getKey(ele); + + return prevKey !== newKey; + } + + isInvalid(ele){ + return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele); + } + + getCachesAt(lvl){ + let { cachesByLvl, lvls } = this; + let caches = cachesByLvl.get(lvl); + + if( !caches ){ + caches = new Map(); + + cachesByLvl.set(lvl, caches); + lvls.push(lvl); + } + + return caches; + } + + getCache(key, lvl){ + return this.getCachesAt(lvl).get(key); + } + + get(ele, lvl){ + let key = this.getKey(ele); + let cache = this.getCache(key, lvl); + + // getting for an element may need to add to the id list b/c eles can share keys + if( cache != null ){ + this.updateKeyMappingFor(ele); + } + + return cache; + } + + getForCachedKey(ele, lvl){ + let key = this.keyForId.get(ele.id()); // n.b. use cached key, not newly computed key + let cache = this.getCache(key, lvl); + + return cache; + } + + hasCache(key, lvl){ + return this.getCachesAt(lvl).has(key); + } + + has(ele, lvl){ + let key = this.getKey(ele); + + return this.hasCache(key, lvl); + } + + setCache(key, lvl, cache){ + cache.key = key; + + this.getCachesAt(lvl).set(key, cache); + } + + set(ele, lvl, cache){ + let key = this.getKey(ele); + + this.setCache(key, lvl, cache); + this.updateKeyMappingFor(ele); + } + + deleteCache(key, lvl){ + this.getCachesAt(lvl).delete(key); + } + + delete(ele, lvl){ + let key = this.getKey(ele); + + this.deleteCache(key, lvl); + } + + invalidateKey(key){ + this.lvls.forEach( lvl => this.deleteCache(key, lvl) ); + } + + // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) + invalidate(ele){ + let id = ele.id(); + let key = this.keyForId.get(id); // n.b. use stored key rather than current (potential key) + + this.deleteKeyMappingFor(ele); + + let entireKeyInvalidated = this.doesEleInvalidateKey(ele); + + if( entireKeyInvalidated ){ // clear mapping for current key + this.invalidateKey(key); + } + + return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0; + } +} + +export default ElementTextureCacheLookup; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/ele-texture-cache.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/ele-texture-cache.mjs new file mode 100644 index 0000000000000000000000000000000000000000..204f9352a2bf0a75c8623e2fbca6b809d10ec85b --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/ele-texture-cache.mjs @@ -0,0 +1,555 @@ +import * as math from '../../../math.mjs'; +import { trueify, falsify, removeFromArray, clearArray, MAX_INT, assign, defaults } from '../../../util/index.mjs'; +import Heap from '../../../heap.mjs'; +import defs from './texture-cache-defs.mjs'; +import ElementTextureCacheLookup from './ele-texture-cache-lookup.mjs'; + +const minTxrH = 25; // the size of the texture cache for small height eles (special case) +const txrStepH = 50; // the min size of the regular cache, and the size it increases with each step up +const minLvl = -4; // when scaling smaller than that we don't need to re-render +export const maxLvl = 3; // when larger than this scale just render directly (caching is not helpful) +export const maxZoom = 7.99; // beyond this zoom level, layered textures are not used +const eleTxrSpacing = 8; // spacing between elements on textures to avoid blitting overlaps +const defTxrWidth = 1024; // default/minimum texture width +const maxTxrW = 1024; // the maximum width of a texture +const maxTxrH = 1024; // the maximum height of a texture +const minUtility = 0.2; // if usage of texture is less than this, it is retired +const maxFullness = 0.8; // fullness of texture after which queue removal is checked +const maxFullnessChecks = 10; // dequeued after this many checks +const deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame +const deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time +const deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing +const deqFastCost = 0.9; // % of frame time to be used when >60fps +const deqRedrawThreshold = 100; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile +const maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch + +const getTxrReasons = { + dequeue: 'dequeue', + downscale: 'downscale', + highQuality: 'highQuality' +}; + +const initDefaults = defaults({ + getKey: null, + doesEleInvalidateKey: falsify, + drawElement: null, + getBoundingBox: null, + getRotationPoint: null, + getRotationOffset: null, + isVisible: trueify, + allowEdgeTxrCaching: true, + allowParentTxrCaching: true +}); + +const ElementTextureCache = function( renderer, initOptions ){ + let self = this; + + self.renderer = renderer; + self.onDequeues = []; + + let opts = initDefaults(initOptions); + + assign(self, opts); + + self.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey); + + self.setupDequeueing(); +}; + +const ETCp = ElementTextureCache.prototype; + +ETCp.reasons = getTxrReasons; + +// the list of textures in which new subtextures for elements can be placed +ETCp.getTextureQueue = function( txrH ){ + let self = this; + self.eleImgCaches = self.eleImgCaches || {}; + + return ( self.eleImgCaches[ txrH ] = self.eleImgCaches[ txrH ] || [] ); +}; + +// the list of usused textures which can be recycled (in use in texture queue) +ETCp.getRetiredTextureQueue = function( txrH ){ + let self = this; + + let rtxtrQs = self.eleImgCaches.retired = self.eleImgCaches.retired || {}; + let rtxtrQ = rtxtrQs[ txrH ] = rtxtrQs[ txrH ] || []; + + return rtxtrQ; +}; + +// queue of element draw requests at different scale levels +ETCp.getElementQueue = function(){ + let self = this; + + let q = self.eleCacheQueue = self.eleCacheQueue || new Heap(function( a, b ){ + return b.reqs - a.reqs; + }); + + return q; +}; + +// queue of element draw requests at different scale levels (element id lookup) +ETCp.getElementKeyToQueue = function(){ + let self = this; + + let k2q = self.eleKeyToCacheQueue = self.eleKeyToCacheQueue || {}; + + return k2q; +}; + +ETCp.getElement = function( ele, bb, pxRatio, lvl, reason ){ + let self = this; + let r = this.renderer; + let zoom = r.cy.zoom(); + let lookup = this.lookup; + + if( !bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed() ){ return null; } + + if( + ( !self.allowEdgeTxrCaching && ele.isEdge() ) + || ( !self.allowParentTxrCaching && ele.isParent() ) + ){ + return null; + } + + if( lvl == null ){ + lvl = Math.ceil( math.log2( zoom * pxRatio ) ); + } + + if( lvl < minLvl ){ + lvl = minLvl; + } else if( zoom >= maxZoom || lvl > maxLvl ){ + return null; + } + + let scale = Math.pow( 2, lvl ); + let eleScaledH = bb.h * scale; + let eleScaledW = bb.w * scale; + let scaledLabelShown = r.eleTextBiggerThanMin( ele, scale ); + + if( !this.isVisible(ele, scaledLabelShown) ){ return null; } + + let eleCache = lookup.get( ele, lvl ); + + // if this get was on an unused/invalidated cache, then restore the texture usage metric + if( eleCache && eleCache.invalidated ){ + eleCache.invalidated = false; + eleCache.texture.invalidatedWidth -= eleCache.width; + } + + if( eleCache ){ + return eleCache; + } + + let txrH; // which texture height this ele belongs to + + if( eleScaledH <= minTxrH ){ + txrH = minTxrH; + } else if( eleScaledH <= txrStepH ){ + txrH = txrStepH; + } else { + txrH = Math.ceil( eleScaledH / txrStepH ) * txrStepH; + } + + if( eleScaledH > maxTxrH || eleScaledW > maxTxrW ){ + return null; // caching large elements is not efficient + } + + let txrQ = self.getTextureQueue( txrH ); + + // first try the second last one in case it has space at the end + let txr = txrQ[ txrQ.length - 2 ]; + + let addNewTxr = function(){ + return self.recycleTexture( txrH, eleScaledW ) || self.addTexture( txrH, eleScaledW ); + }; + + // try the last one if there is no second last one + if( !txr ){ + txr = txrQ[ txrQ.length - 1 ]; + } + + // if the last one doesn't exist, we need a first one + if( !txr ){ + txr = addNewTxr(); + } + + // if there's no room in the current texture, we need a new one + if( txr.width - txr.usedWidth < eleScaledW ){ + txr = addNewTxr(); + } + + let scalableFrom = function( otherCache ){ + return otherCache && otherCache.scaledLabelShown === scaledLabelShown; + }; + + let deqing = reason && reason === getTxrReasons.dequeue; + let highQualityReq = reason && reason === getTxrReasons.highQuality; + let downscaleReq = reason && reason === getTxrReasons.downscale; + + let higherCache; // the nearest cache with a higher level + for( let l = lvl + 1; l <= maxLvl; l++ ){ + let c = lookup.get( ele, l ); + + if( c ){ higherCache = c; break; } + } + + let oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null; + + let downscale = function(){ + txr.context.drawImage( + oneUpCache.texture.canvas, + oneUpCache.x, 0, + oneUpCache.width, oneUpCache.height, + txr.usedWidth, 0, + eleScaledW, eleScaledH + ); + }; + + // reset ele area in texture + txr.context.setTransform( 1, 0, 0, 1, 0, 0 ); + txr.context.clearRect( txr.usedWidth, 0, eleScaledW, txrH ); + + if( scalableFrom(oneUpCache) ){ + // then we can relatively cheaply rescale the existing image w/o rerendering + downscale(); + + } else if( scalableFrom(higherCache) ){ + // then use the higher cache for now and queue the next level down + // to cheaply scale towards the smaller level + + if( highQualityReq ){ + for( let l = higherCache.level; l > lvl; l-- ){ + oneUpCache = self.getElement( ele, bb, pxRatio, l, getTxrReasons.downscale ); + } + + downscale(); + + } else { + self.queueElement( ele, higherCache.level - 1 ); + + return higherCache; + } + } else { + + let lowerCache; // the nearest cache with a lower level + if( !deqing && !highQualityReq && !downscaleReq ){ + for( let l = lvl - 1; l >= minLvl; l-- ){ + let c = lookup.get( ele, l ); + + if( c ){ lowerCache = c; break; } + } + } + + if( scalableFrom(lowerCache) ){ + // then use the lower quality cache for now and queue the better one for later + + self.queueElement( ele, lvl ); + + return lowerCache; + } + + txr.context.translate( txr.usedWidth, 0 ); + txr.context.scale( scale, scale ); + + this.drawElement( txr.context, ele, bb, scaledLabelShown, false ); + + txr.context.scale( 1/scale, 1/scale ); + txr.context.translate( -txr.usedWidth, 0 ); + } + + eleCache = { + x: txr.usedWidth, + texture: txr, + level: lvl, + scale: scale, + width: eleScaledW, + height: eleScaledH, + scaledLabelShown: scaledLabelShown + }; + + txr.usedWidth += Math.ceil( eleScaledW + eleTxrSpacing ); + + txr.eleCaches.push( eleCache ); + + lookup.set( ele, lvl, eleCache ); + + self.checkTextureFullness( txr ); + + return eleCache; +}; + +ETCp.invalidateElements = function( eles ){ + for( let i = 0; i < eles.length; i++ ){ + this.invalidateElement(eles[i]); + } +}; + +ETCp.invalidateElement = function( ele ){ + let self = this; + let lookup = self.lookup; + let caches = []; + let invalid = lookup.isInvalid(ele); + + if( !invalid ){ + return; // override the invalidation request if the element key has not changed + } + + for( let lvl = minLvl; lvl <= maxLvl; lvl++ ){ + let cache = lookup.getForCachedKey( ele, lvl ); + + if( cache ){ + caches.push( cache ); + } + } + + let noOtherElesUseCache = lookup.invalidate(ele); + + if( noOtherElesUseCache ){ + for( let i = 0; i < caches.length; i++ ){ + let cache = caches[i]; + let txr = cache.texture; + + // remove space from the texture it belongs to + txr.invalidatedWidth += cache.width; + + // mark the cache as invalidated + cache.invalidated = true; + + // retire the texture if its utility is low + self.checkTextureUtility( txr ); + } + } + + // remove from queue since the old req was for the old state + self.removeFromQueue( ele ); +}; + +ETCp.checkTextureUtility = function( txr ){ + // invalidate all entries in the cache if the cache size is small + if( txr.invalidatedWidth >= minUtility * txr.width ){ + this.retireTexture( txr ); + } +}; + +ETCp.checkTextureFullness = function( txr ){ + // if texture has been mostly filled and passed over several times, remove + // it from the queue so we don't need to waste time looking at it to put new things + + let self = this; + let txrQ = self.getTextureQueue( txr.height ); + + if( txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks ){ + removeFromArray( txrQ, txr ); + } else { + txr.fullnessChecks++; + } +}; + +ETCp.retireTexture = function( txr ){ + let self = this; + let txrH = txr.height; + let txrQ = self.getTextureQueue( txrH ); + let lookup = this.lookup; + + // retire the texture from the active / searchable queue: + + removeFromArray( txrQ, txr ); + + txr.retired = true; + + // remove the refs from the eles to the caches: + + let eleCaches = txr.eleCaches; + + for( let i = 0; i < eleCaches.length; i++ ){ + let eleCache = eleCaches[i]; + + lookup.deleteCache( eleCache.key, eleCache.level ); + } + + clearArray( eleCaches ); + + // add the texture to a retired queue so it can be recycled in future: + + let rtxtrQ = self.getRetiredTextureQueue( txrH ); + + rtxtrQ.push( txr ); +}; + +ETCp.addTexture = function( txrH, minW ){ + let self = this; + let txrQ = self.getTextureQueue( txrH ); + let txr = {}; + + txrQ.push( txr ); + + txr.eleCaches = []; + + txr.height = txrH; + txr.width = Math.max( defTxrWidth, minW ); + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + + txr.canvas = self.renderer.makeOffscreenCanvas(txr.width, txr.height); + + txr.context = txr.canvas.getContext('2d'); + + return txr; +}; + +ETCp.recycleTexture = function( txrH, minW ){ + let self = this; + let txrQ = self.getTextureQueue( txrH ); + let rtxtrQ = self.getRetiredTextureQueue( txrH ); + + for( let i = 0; i < rtxtrQ.length; i++ ){ + let txr = rtxtrQ[i]; + + if( txr.width >= minW ){ + txr.retired = false; + + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + + clearArray( txr.eleCaches ); + + txr.context.setTransform( 1, 0, 0, 1, 0, 0 ); + txr.context.clearRect( 0, 0, txr.width, txr.height ); + + removeFromArray( rtxtrQ, txr ); + txrQ.push( txr ); + + return txr; + } + } +}; + +ETCp.queueElement = function( ele, lvl ){ + let self = this; + let q = self.getElementQueue(); + let k2q = self.getElementKeyToQueue(); + let key = this.getKey(ele); + let existingReq = k2q[key]; + + if( existingReq ){ + // use the max lvl b/c in between lvls are cheap to make + existingReq.level = Math.max( existingReq.level, lvl ); + + existingReq.eles.merge(ele); + + existingReq.reqs++; + + q.updateItem( existingReq ); + } else { + let req = { + eles: ele.spawn().merge(ele), + level: lvl, + reqs: 1, + key + }; + + q.push( req ); + + k2q[key] = req; + } +}; + +ETCp.dequeue = function( pxRatio /*, extent*/ ){ + let self = this; + let q = self.getElementQueue(); + let k2q = self.getElementKeyToQueue(); + let dequeued = []; + let lookup = self.lookup; + + for( let i = 0; i < maxDeqSize; i++ ){ + if( q.size() > 0 ){ + let req = q.pop(); + let key = req.key; + let ele = req.eles[0]; // all eles have the same key + let cacheExists = lookup.hasCache(ele, req.level); + + // clear out the key to req lookup + k2q[key] = null; + + // dequeueing isn't necessary with an existing cache + if( cacheExists ){ continue; } + + dequeued.push( req ); + + let bb = self.getBoundingBox( ele ); + + self.getElement( ele, bb, pxRatio, req.level, getTxrReasons.dequeue ); + } else { + break; + } + } + + return dequeued; +}; + +ETCp.removeFromQueue = function( ele ){ + let self = this; + let q = self.getElementQueue(); + let k2q = self.getElementKeyToQueue(); + let key = this.getKey(ele); + let req = k2q[key]; + + if( req != null ){ + if( req.eles.length === 1 ){ // remove if last ele in the req + // bring to front of queue + req.reqs = MAX_INT; + q.updateItem(req); + + q.pop(); // remove from queue + + k2q[key] = null; // remove from lookup map + } else { // otherwise just remove ele from req + req.eles.unmerge(ele); + } + } +}; + +ETCp.onDequeue = function( fn ){ this.onDequeues.push( fn ); }; +ETCp.offDequeue = function( fn ){ removeFromArray( this.onDequeues, fn ); }; + +ETCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold, + deqCost: deqCost, + deqAvgCost: deqAvgCost, + deqNoDrawCost: deqNoDrawCost, + deqFastCost: deqFastCost, + deq: function( self, pxRatio, extent ){ + return self.dequeue( pxRatio, extent ); + }, + onDeqd: function( self, deqd ){ + for( let i = 0; i < self.onDequeues.length; i++ ){ + let fn = self.onDequeues[i]; + + fn( deqd ); + } + }, + shouldRedraw: function( self, deqd, pxRatio, extent ){ + for( let i = 0; i < deqd.length; i++ ){ + let eles = deqd[i].eles; + + for( let j = 0; j < eles.length; j++ ){ + let bb = eles[j].boundingBox(); + + if( math.boundingBoxesIntersect( bb, extent ) ){ + return true; + } + } + } + + return false; + }, + priority: function( self ){ + return self.renderer.beforeRenderPriorities.eleTxrDeq; + } +}); + +export default ElementTextureCache; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/export-image.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/export-image.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cbe41bd5685eb9ec7559e4462065b7bb19cdb5b2 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/export-image.mjs @@ -0,0 +1,172 @@ +/* global atob, ArrayBuffer, Uint8Array, Blob */ + +import * as is from '../../../is.mjs'; +import Promise from '../../../promise.mjs'; + +var CRp = {}; + +CRp.createBuffer = function( w, h ){ + var buffer = document.createElement( 'canvas' ); // eslint-disable-line no-undef + buffer.width = w; + buffer.height = h; + + return [ buffer, buffer.getContext( '2d' ) ]; +}; + +CRp.bufferCanvasImage = function( options ){ + var cy = this.cy; + var eles = cy.mutableElements(); + var bb = eles.boundingBox(); + var ctrRect = this.findContainerClientCoords(); + var width = options.full ? Math.ceil( bb.w ) : ctrRect[2]; + var height = options.full ? Math.ceil( bb.h ) : ctrRect[3]; + var specdMaxDims = is.number( options.maxWidth ) || is.number( options.maxHeight ); + var pxRatio = this.getPixelRatio(); + var scale = 1; + + if( options.scale !== undefined ){ + width *= options.scale; + height *= options.scale; + + scale = options.scale; + } else if( specdMaxDims ){ + var maxScaleW = Infinity; + var maxScaleH = Infinity; + + if( is.number( options.maxWidth ) ){ + maxScaleW = scale * options.maxWidth / width; + } + + if( is.number( options.maxHeight ) ){ + maxScaleH = scale * options.maxHeight / height; + } + + scale = Math.min( maxScaleW, maxScaleH ); + + width *= scale; + height *= scale; + } + + if( !specdMaxDims ){ + width *= pxRatio; + height *= pxRatio; + scale *= pxRatio; + } + + var buffCanvas = document.createElement( 'canvas' ); // eslint-disable-line no-undef + + buffCanvas.width = width; + buffCanvas.height = height; + + buffCanvas.style.width = width + 'px'; + buffCanvas.style.height = height + 'px'; + + var buffCxt = buffCanvas.getContext( '2d' ); + + // Rasterize the layers, but only if container has nonzero size + if( width > 0 && height > 0 ){ + + buffCxt.clearRect( 0, 0, width, height ); + + buffCxt.globalCompositeOperation = 'source-over'; + + var zsortedEles = this.getCachedZSortedEles(); + + if( options.full ){ // draw the full bounds of the graph + buffCxt.translate( -bb.x1 * scale, -bb.y1 * scale ); + buffCxt.scale( scale, scale ); + + this.drawElements( buffCxt, zsortedEles ); + + buffCxt.scale( 1/scale, 1/scale ); + buffCxt.translate( bb.x1 * scale, bb.y1 * scale ); + } else { // draw the current view + var pan = cy.pan(); + + var translation = { + x: pan.x * scale, + y: pan.y * scale + }; + + scale *= cy.zoom(); + + buffCxt.translate( translation.x, translation.y ); + buffCxt.scale( scale, scale ); + + this.drawElements( buffCxt, zsortedEles ); + + buffCxt.scale( 1/scale, 1/scale ); + buffCxt.translate( -translation.x, -translation.y ); + } + + // need to fill bg at end like this in order to fill cleared transparent pixels in jpgs + if( options.bg ){ + buffCxt.globalCompositeOperation = 'destination-over'; + + buffCxt.fillStyle = options.bg; + buffCxt.rect( 0, 0, width, height ); + buffCxt.fill(); + } + } + + return buffCanvas; +}; + +function b64ToBlob( b64, mimeType ){ + var bytes = atob( b64 ); + var buff = new ArrayBuffer( bytes.length ); + var buffUint8 = new Uint8Array( buff ); + + for( var i = 0; i < bytes.length; i++ ){ + buffUint8[i] = bytes.charCodeAt(i); + } + + return new Blob( [buff], { type: mimeType } ); +} + +function b64UriToB64( b64uri ){ + var i = b64uri.indexOf(','); + + return b64uri.substr( i + 1 ); +} + +function output( options, canvas, mimeType ){ + let getB64Uri = () => canvas.toDataURL( mimeType, options.quality ); + + switch( options.output ){ + case 'blob-promise': + return new Promise((resolve, reject) => { + try { + canvas.toBlob(blob => { + if( blob != null ){ + resolve(blob); + } else { + reject( new Error('`canvas.toBlob()` sent a null value in its callback') ); + } + }, mimeType, options.quality); + } catch( err ){ + reject(err); + } + }); + + case 'blob': + return b64ToBlob( b64UriToB64( getB64Uri() ), mimeType ); + + case 'base64': + return b64UriToB64( getB64Uri() ); + + case 'base64uri': + default: + return getB64Uri(); + } +} + +CRp.png = function( options ){ + return output( options, this.bufferCanvasImage( options ), 'image/png' ); +}; + +CRp.jpg = function( options ){ + return output( options, this.bufferCanvasImage( options ), 'image/jpeg' ); +}; + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/index.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cbd83dff87086f2d104309fe41ff46d894d547ce --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/index.mjs @@ -0,0 +1,391 @@ +/* +The canvas renderer was written by Yue Dong. + +Modifications tracked on Github. +*/ + +/* global OffscreenCanvas */ + +import * as util from '../../../util/index.mjs'; +import * as is from '../../../is.mjs'; +import { makeBoundingBox } from '../../../math.mjs'; +import { labelHalign, labelValign } from '../../../style/align.mjs'; +import ElementTextureCache from './ele-texture-cache.mjs'; +import LayeredTextureCache from './layered-texture-cache.mjs'; + +import arrowShapes from './arrow-shapes.mjs'; +import drawingElements from './drawing-elements.mjs'; +import drawingEdges from './drawing-edges.mjs'; +import drawingImages from './drawing-images.mjs'; +import drawingLabelText from './drawing-label-text.mjs'; +import drawingNodes from './drawing-nodes.mjs'; +import drawingRedraw from './drawing-redraw.mjs'; +import drawingRedrawWebGL from './webgl/drawing-redraw-webgl.mjs'; +import drawingShapes from './drawing-shapes.mjs'; +import exportImage from './export-image.mjs'; +import nodeShapes from './node-shapes.mjs'; + +var CR = CanvasRenderer; +var CRp = CanvasRenderer.prototype; + +CRp.CANVAS_LAYERS = 3; +// +CRp.SELECT_BOX = 0; +CRp.DRAG = 1; +CRp.NODE = 2; +CRp.WEBGL = 3; + +CRp.CANVAS_TYPES = [ '2d', '2d', '2d', 'webgl2' ]; + +CRp.BUFFER_COUNT = 3; +// +CRp.TEXTURE_BUFFER = 0; +CRp.MOTIONBLUR_BUFFER_NODE = 1; +CRp.MOTIONBLUR_BUFFER_DRAG = 2; + +function CanvasRenderer( options ){ + var r = this; + + var containerWindow = r.cy.window(); + var document = containerWindow.document; + + if( options.webgl ){ + CRp.CANVAS_LAYERS = r.CANVAS_LAYERS = 4; + console.log('webgl rendering enabled'); + } + + r.data = { + canvases: new Array( CRp.CANVAS_LAYERS ), + contexts: new Array( CRp.CANVAS_LAYERS ), + canvasNeedsRedraw: new Array( CRp.CANVAS_LAYERS ), + + bufferCanvases: new Array( CRp.BUFFER_COUNT ), + bufferContexts: new Array( CRp.CANVAS_LAYERS ), + }; + + var tapHlOffAttr = '-webkit-tap-highlight-color'; + var tapHlOffStyle = 'rgba(0,0,0,0)'; + r.data.canvasContainer = document.createElement( 'div' ); // eslint-disable-line no-undef + var containerStyle = r.data.canvasContainer.style; + r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle; + containerStyle.position = 'relative'; + containerStyle.zIndex = '0'; + containerStyle.overflow = 'hidden'; + + var container = options.cy.container(); + container.appendChild( r.data.canvasContainer ); + container.style[tapHlOffAttr] = tapHlOffStyle; + + var styleMap = { + '-webkit-user-select': 'none', + '-moz-user-select': '-moz-none', + 'user-select': 'none', + '-webkit-tap-highlight-color': 'rgba(0,0,0,0)', + 'outline-style': 'none', + }; + + if(is.ms()) { + styleMap['-ms-touch-action'] = 'none'; + styleMap['touch-action'] = 'none'; + } + + for( var i = 0; i < CRp.CANVAS_LAYERS; i++ ){ + var canvas = r.data.canvases[ i ] = document.createElement( 'canvas' ); // eslint-disable-line no-undef + var type = CRp.CANVAS_TYPES[ i ]; + r.data.contexts[ i ] = canvas.getContext( type ); + if( !r.data.contexts[ i ] ) { + util.error( 'Could not create canvas of type ' + type ); + } + Object.keys(styleMap).forEach((k) => { + canvas.style[k] = styleMap[k]; + }); + canvas.style.position = 'absolute'; + canvas.setAttribute( 'data-id', 'layer' + i ); + canvas.style.zIndex = String( CRp.CANVAS_LAYERS - i ); + r.data.canvasContainer.appendChild( canvas ); + + r.data.canvasNeedsRedraw[ i ] = false; + } + r.data.topCanvas = r.data.canvases[0]; + + r.data.canvases[ CRp.NODE ].setAttribute( 'data-id', 'layer' + CRp.NODE + '-node' ); + r.data.canvases[ CRp.SELECT_BOX ].setAttribute( 'data-id', 'layer' + CRp.SELECT_BOX + '-selectbox' ); + r.data.canvases[ CRp.DRAG ].setAttribute( 'data-id', 'layer' + CRp.DRAG + '-drag' ); + if( r.data.canvases[ CRp.WEBGL ] ) { + r.data.canvases[ CRp.WEBGL ].setAttribute( 'data-id', 'layer' + CRp.WEBGL + '-webgl' ); + } + + for( var i = 0; i < CRp.BUFFER_COUNT; i++ ){ + r.data.bufferCanvases[ i ] = document.createElement( 'canvas' ); // eslint-disable-line no-undef + r.data.bufferContexts[ i ] = r.data.bufferCanvases[ i ].getContext( '2d' ); + r.data.bufferCanvases[ i ].style.position = 'absolute'; + r.data.bufferCanvases[ i ].setAttribute( 'data-id', 'buffer' + i ); + r.data.bufferCanvases[ i ].style.zIndex = String( -i - 1 ); + r.data.bufferCanvases[ i ].style.visibility = 'hidden'; + //r.data.canvasContainer.appendChild(r.data.bufferCanvases[i]); + } + + r.pathsEnabled = true; + + let emptyBb = makeBoundingBox(); + + let getBoxCenter = bb => ({ x: (bb.x1 + bb.x2)/2, y: (bb.y1 + bb.y2)/2 }); + + let getCenterOffset = bb => ({ x: -bb.w/2, y: -bb.h/2 }); + + let backgroundTimestampHasChanged = ele => { + let _p = ele[0]._private; + let same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp; + + return !same; + }; + + let getStyleKey = ele => ele[0]._private.nodeKey; + let getLabelKey = ele => ele[0]._private.labelStyleKey; + let getSourceLabelKey = ele => ele[0]._private.sourceLabelStyleKey; + let getTargetLabelKey = ele => ele[0]._private.targetLabelStyleKey; + + let drawElement = (context, ele, bb, scaledLabelShown, useEleOpacity) => r.drawElement( context, ele, bb, false, false, useEleOpacity ); + let drawLabel = (context, ele, bb, scaledLabelShown, useEleOpacity) => r.drawElementText( context, ele, bb, scaledLabelShown, 'main', useEleOpacity ); + let drawSourceLabel = (context, ele, bb, scaledLabelShown, useEleOpacity) => r.drawElementText( context, ele, bb, scaledLabelShown, 'source', useEleOpacity ); + let drawTargetLabel = (context, ele, bb, scaledLabelShown, useEleOpacity) => r.drawElementText( context, ele, bb, scaledLabelShown, 'target', useEleOpacity ); + + let getElementBox = ele => { ele.boundingBox(); return ele[0]._private.bodyBounds; }; + let getLabelBox = ele => { ele.boundingBox(); return ele[0]._private.labelBounds.main || emptyBb; }; + let getSourceLabelBox = ele => { ele.boundingBox(); return ele[0]._private.labelBounds.source || emptyBb; }; + let getTargetLabelBox = ele => { ele.boundingBox(); return ele[0]._private.labelBounds.target || emptyBb; }; + + let isLabelVisibleAtScale = (ele, scaledLabelShown) => scaledLabelShown; + + let getElementRotationPoint = ele => getBoxCenter( getElementBox(ele) ); + + let addTextMargin = (prefix, pt, ele) => { + let pre = prefix ? prefix + '-' : ''; + + return { + x: pt.x + ele.pstyle(pre + 'text-margin-x').pfValue, + y: pt.y + ele.pstyle(pre + 'text-margin-y').pfValue + }; + }; + + let getRsPt = (ele, x, y) => { + let rs = ele[0]._private.rscratch; + + return { x: rs[x], y: rs[y] }; + }; + + let getLabelRotationPoint = ele => addTextMargin('', getRsPt(ele, 'labelX', 'labelY'), ele); + let getSourceLabelRotationPoint = ele => addTextMargin('source', getRsPt(ele, 'sourceLabelX', 'sourceLabelY'), ele); + let getTargetLabelRotationPoint = ele => addTextMargin('target', getRsPt(ele, 'targetLabelX', 'targetLabelY'), ele); + + let getElementRotationOffset = ele => getCenterOffset( getElementBox(ele) ); + let getSourceLabelRotationOffset = ele => getCenterOffset( getSourceLabelBox(ele) ); + let getTargetLabelRotationOffset = ele => getCenterOffset( getTargetLabelBox(ele) ); + + let getLabelRotationOffset = ele => { + let bb = getLabelBox(ele); + let p = getCenterOffset( getLabelBox(ele) ); + + if( ele.isNode() ){ + switch( labelHalign( ele.pstyle('text-halign').value ) ){ + case 'left': + p.x = -bb.w - (bb.leftPad || 0); + break; + case 'right': + p.x = -(bb.rightPad || 0); + break; + } + + switch( labelValign( ele.pstyle('text-valign').value ) ){ + case 'top': + p.y = -bb.h - (bb.topPad || 0); + break; + case 'bottom': + p.y = -(bb.botPad || 0); + break; + } + } + + return p; + }; + + let eleTxrCache = r.data.eleTxrCache = new ElementTextureCache( r, { + getKey: getStyleKey, + doesEleInvalidateKey: backgroundTimestampHasChanged, + drawElement: drawElement, + getBoundingBox: getElementBox, + getRotationPoint: getElementRotationPoint, + getRotationOffset: getElementRotationOffset, + allowEdgeTxrCaching: false, + allowParentTxrCaching: false + } ); + + let lblTxrCache = r.data.lblTxrCache = new ElementTextureCache( r, { + getKey: getLabelKey, + drawElement: drawLabel, + getBoundingBox: getLabelBox, + getRotationPoint: getLabelRotationPoint, + getRotationOffset: getLabelRotationOffset, + isVisible: isLabelVisibleAtScale + } ); + + let slbTxrCache = r.data.slbTxrCache = new ElementTextureCache( r, { + getKey: getSourceLabelKey, + drawElement: drawSourceLabel, + getBoundingBox: getSourceLabelBox, + getRotationPoint: getSourceLabelRotationPoint, + getRotationOffset: getSourceLabelRotationOffset, + isVisible: isLabelVisibleAtScale + } ); + + let tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache( r, { + getKey: getTargetLabelKey, + drawElement: drawTargetLabel, + getBoundingBox: getTargetLabelBox, + getRotationPoint: getTargetLabelRotationPoint, + getRotationOffset: getTargetLabelRotationOffset, + isVisible: isLabelVisibleAtScale + } ); + + let lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache( r ); + + r.onUpdateEleCalcs(function invalidateTextureCaches( willDraw, eles ){ + // each cache should check for sub-key diff to see that the update affects that cache particularly + eleTxrCache.invalidateElements( eles ); + lblTxrCache.invalidateElements( eles ); + slbTxrCache.invalidateElements( eles ); + tlbTxrCache.invalidateElements( eles ); + + // any change invalidates the layers + lyrTxrCache.invalidateElements( eles ); + + // update the old bg timestamp so diffs can be done in the ele txr caches + for( let i = 0; i < eles.length; i++ ){ + let _p = eles[i]._private; + + _p.oldBackgroundTimestamp = _p.backgroundTimestamp; + } + }); + + let refineInLayers = reqs => { + for( var i = 0; i < reqs.length; i++ ){ + lyrTxrCache.enqueueElementRefinement( reqs[i].ele ); + } + }; + + eleTxrCache.onDequeue(refineInLayers); + lblTxrCache.onDequeue(refineInLayers); + slbTxrCache.onDequeue(refineInLayers); + tlbTxrCache.onDequeue(refineInLayers); + + if( options.webgl ) { + r.initWebgl( options, { + getStyleKey, + getLabelKey, + getSourceLabelKey, + getTargetLabelKey, + drawElement, + drawLabel, + drawSourceLabel, + drawTargetLabel, + getElementBox, + getLabelBox, + getSourceLabelBox, + getTargetLabelBox, + getElementRotationPoint, + getElementRotationOffset, + getLabelRotationPoint, + getSourceLabelRotationPoint, + getTargetLabelRotationPoint, + getLabelRotationOffset, + getSourceLabelRotationOffset, + getTargetLabelRotationOffset + } ); + } +} + +CRp.redrawHint = function( group, bool ){ + var r = this; + + switch( group ){ + case 'eles': + r.data.canvasNeedsRedraw[ CRp.NODE ] = bool; + break; + case 'drag': + r.data.canvasNeedsRedraw[ CRp.DRAG ] = bool; + break; + case 'select': + r.data.canvasNeedsRedraw[ CRp.SELECT_BOX ] = bool; + break; + case 'gc': + r.data.gc = true; + break; + } +}; + +// whether to use Path2D caching for drawing +var pathsImpld = typeof Path2D !== 'undefined'; + +CRp.path2dEnabled = function( on ){ + if( on === undefined ){ + return this.pathsEnabled; + } + + this.pathsEnabled = on ? true : false; +}; + +CRp.usePaths = function(){ + return pathsImpld && this.pathsEnabled; +}; + +CRp.setImgSmoothing = function( context, bool ){ + if( context.imageSmoothingEnabled != null ){ + context.imageSmoothingEnabled = bool; + } else { + context.webkitImageSmoothingEnabled = bool; + context.mozImageSmoothingEnabled = bool; + context.msImageSmoothingEnabled = bool; + } +}; + +CRp.getImgSmoothing = function( context ){ + if( context.imageSmoothingEnabled != null ){ + return context.imageSmoothingEnabled; + } else { + return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled; + } +}; + +CRp.makeOffscreenCanvas = function(width, height){ + let canvas; + + if( typeof OffscreenCanvas !== typeof undefined ){ + canvas = new OffscreenCanvas(width, height); + } else { + var containerWindow = this.cy.window(); + var document = containerWindow.document; + canvas = document.createElement('canvas'); // eslint-disable-line no-undef + canvas.width = width; + canvas.height = height; + } + + return canvas; +}; + +[ + arrowShapes, + drawingElements, + drawingEdges, + drawingImages, + drawingLabelText, + drawingNodes, + drawingRedraw, + drawingRedrawWebGL, + drawingShapes, + exportImage, + nodeShapes +].forEach( function( props ){ + util.extend( CRp, props ); +} ); + +export default CR; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/layered-texture-cache.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/layered-texture-cache.mjs new file mode 100644 index 0000000000000000000000000000000000000000..12afb7b755411f167007c6bbaa04007f751402f8 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/layered-texture-cache.mjs @@ -0,0 +1,668 @@ +import * as util from '../../../util/index.mjs'; +import * as math from '../../../math.mjs'; +import Heap from '../../../heap.mjs'; +import * as is from '../../../is.mjs'; +import defs from './texture-cache-defs.mjs'; + +var defNumLayers = 1; // default number of layers to use +var minLvl = -4; // when scaling smaller than that we don't need to re-render +var maxLvl = 2; // when larger than this scale just render directly (caching is not helpful) +var maxZoom = 3.99; // beyond this zoom level, layered textures are not used +var deqRedrawThreshold = 50; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile +var refineEleDebounceTime = 50; // time to debounce sharper ele texture updates +var disableEleImgSmoothing = true; // when drawing eles on layers from an ele cache ; crisper and more performant when true +var deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame +var deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time +var deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing +var deqFastCost = 0.9; // % of frame time to be used when >60fps +var maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch +var invalidThreshold = 250; // time threshold for disabling b/c of invalidations +var maxLayerArea = 4000 * 4000; // layers can't be bigger than this +var maxLayerDim = 32767; // maximum size for the width/height of layer canvases +var alwaysQueue = true; // never draw all the layers in a level on a frame; draw directly until all dequeued +var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm) + +var useEleTxrCaching = true; // whether to use individual ele texture caching underneath this cache + +// var log = function(){ console.log.apply( console, arguments ); }; + +var LayeredTextureCache = function( renderer ){ + var self = this; + var r = self.renderer = renderer; + var cy = r.cy; + + self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ] + + self.firstGet = true; + + self.lastInvalidationTime = util.performanceNow() - 2*invalidThreshold; + + self.skipping = false; + + self.eleTxrDeqs = cy.collection(); + + self.scheduleElementRefinement = util.debounce( function(){ + self.refineElementTextures( self.eleTxrDeqs ); + + self.eleTxrDeqs.unmerge( self.eleTxrDeqs ); + }, refineEleDebounceTime ); + + r.beforeRender(function( willDraw, now ){ + if( now - self.lastInvalidationTime <= invalidThreshold ){ + self.skipping = true; + } else { + self.skipping = false; + } + }, r.beforeRenderPriorities.lyrTxrSkip); + + var qSort = function(a, b){ + return b.reqs - a.reqs; + }; + + self.layersQueue = new Heap( qSort ); + + self.setupDequeueing(); +}; + +var LTCp = LayeredTextureCache.prototype; + +var layerIdPool = 0; +var MAX_INT = Math.pow(2, 53) - 1; + +LTCp.makeLayer = function( bb, lvl ){ + var scale = Math.pow( 2, lvl ); + + var w = Math.ceil( bb.w * scale ); + var h = Math.ceil( bb.h * scale ); + + var canvas = this.renderer.makeOffscreenCanvas(w, h); + + var layer = { + id: (layerIdPool = ++layerIdPool % MAX_INT ), + bb: bb, + level: lvl, + width: w, + height: h, + canvas: canvas, + context: canvas.getContext('2d'), + eles: [], + elesQueue: [], + reqs: 0 + }; + + // log('make layer %s with w %s and h %s and lvl %s', layer.id, layer.width, layer.height, layer.level); + + var cxt = layer.context; + var dx = -layer.bb.x1; + var dy = -layer.bb.y1; + + // do the transform on creation to save cycles (it's the same for all eles) + cxt.scale( scale, scale ); + cxt.translate( dx, dy ); + + return layer; +}; + +LTCp.getLayers = function( eles, pxRatio, lvl ){ + var self = this; + var r = self.renderer; + var cy = r.cy; + var zoom = cy.zoom(); + var firstGet = self.firstGet; + + self.firstGet = false; + + // log('--\nget layers with %s eles', eles.length); + //log eles.map(function(ele){ return ele.id() }) ); + + if( lvl == null ){ + lvl = Math.ceil( math.log2( zoom * pxRatio ) ); + + if( lvl < minLvl ){ + lvl = minLvl; + } else if( zoom >= maxZoom || lvl > maxLvl ){ + return null; + } + } + + self.validateLayersElesOrdering( lvl, eles ); + + var layersByLvl = self.layersByLevel; + var scale = Math.pow( 2, lvl ); + var layers = layersByLvl[ lvl ] = layersByLvl[ lvl ] || []; + var bb; + + var lvlComplete = self.levelIsComplete( lvl, eles ); + var tmpLayers; + + var checkTempLevels = function(){ + var canUseAsTmpLvl = function( l ){ + self.validateLayersElesOrdering( l, eles ); + + if( self.levelIsComplete( l, eles ) ){ + tmpLayers = layersByLvl[l]; + return true; + } + }; + + var checkLvls = function( dir ){ + if( tmpLayers ){ return; } + + for( var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir ){ + if( canUseAsTmpLvl(l) ){ break; } + } + }; + + checkLvls( +1 ); + checkLvls( -1 ); + + // remove the invalid layers; they will be replaced as needed later in this function + for( var i = layers.length - 1; i >= 0; i-- ){ + var layer = layers[i]; + + if( layer.invalid ){ + util.removeFromArray( layers, layer ); + } + } + }; + + if( !lvlComplete ){ + // if the current level is incomplete, then use the closest, best quality layerset temporarily + // and later queue the current layerset so we can get the proper quality level soon + + checkTempLevels(); + + } else { + // log('level complete, using existing layers\n--'); + return layers; + } + + var getBb = function(){ + if( !bb ){ + bb = math.makeBoundingBox(); + + for( var i = 0; i < eles.length; i++ ){ + math.updateBoundingBox( bb, eles[i].boundingBox() ); + } + } + + return bb; + }; + + var makeLayer = function( opts ){ + opts = opts || {}; + + var after = opts.after; + + getBb(); + + var w = Math.ceil( bb.w * scale ); + var h = Math.ceil( bb.h * scale ); + + if( w > maxLayerDim || h > maxLayerDim ){ + return null; + } + + var area = w * h; + + if( area > maxLayerArea ){ + return null; + } + + var layer = self.makeLayer( bb, lvl ); + + if( after != null ){ + var index = layers.indexOf( after ) + 1; + + layers.splice( index, 0, layer ); + } else if( opts.insert === undefined || opts.insert ){ + // no after specified => first layer made so put at start + layers.unshift( layer ); + } + + // if( tmpLayers ){ + //self.queueLayer( layer ); + // } + + return layer; + }; + + if( self.skipping && !firstGet ){ + // log('skip layers'); + return null; + } + + // log('do layers'); + + var layer = null; + var maxElesPerLayer = eles.length / defNumLayers; + var allowLazyQueueing = alwaysQueue && !firstGet; + + for( var i = 0; i < eles.length; i++ ){ + var ele = eles[i]; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + + // log('look at ele', ele.id()); + + var existingLayer = caches[ lvl ]; + + if( existingLayer ){ + // reuse layer for later eles + // log('reuse layer for', ele.id()); + layer = existingLayer; + continue; + } + + if( + !layer + || layer.eles.length >= maxElesPerLayer + || !math.boundingBoxInBoundingBox( layer.bb, ele.boundingBox() ) + ){ + // log('make new layer for ele %s', ele.id()); + + layer = makeLayer({ insert: true, after: layer }); + + // if now layer can be built then we can't use layers at this level + if( !layer ){ return null; } + + // log('new layer with id %s', layer.id); + } + + if( tmpLayers || allowLazyQueueing ){ + // log('queue ele %s in layer %s', ele.id(), layer.id); + self.queueLayer( layer, ele ); + } else { + // log('draw ele %s in layer %s', ele.id(), layer.id); + self.drawEleInLayer( layer, ele, lvl, pxRatio ); + } + + layer.eles.push( ele ); + + caches[ lvl ] = layer; + } + + // log('--'); + + if( tmpLayers ){ // then we only queued the current layerset and can't draw it yet + return tmpLayers; + } + + if( allowLazyQueueing ){ + // log('lazy queue level', lvl); + return null; + } + + return layers; +}; + +// a layer may want to use an ele cache of a higher level to avoid blurriness +// so the layer level might not equal the ele level +LTCp.getEleLevelForLayerLevel = function( lvl, pxRatio ){ + return lvl; +}; + +LTCp.drawEleInLayer = function( layer, ele, lvl, pxRatio ){ + var self = this; + var r = this.renderer; + var context = layer.context; + var bb = ele.boundingBox(); + + if( bb.w === 0 || bb.h === 0 || !ele.visible() ){ return; } + + lvl = self.getEleLevelForLayerLevel( lvl, pxRatio ); + + if( disableEleImgSmoothing ){ r.setImgSmoothing( context, false ); } + + if( useEleTxrCaching ){ + r.drawCachedElement( context, ele, null, null, lvl, useHighQualityEleTxrReqs ); + } else { // if the element is not cacheable, then draw directly + r.drawElement( context, ele ); + } + + if( disableEleImgSmoothing ){ r.setImgSmoothing( context, true ); } +}; + +LTCp.levelIsComplete = function( lvl, eles ){ + var self = this; + var layers = self.layersByLevel[ lvl ]; + + if( !layers || layers.length === 0 ){ return false; } + + var numElesInLayers = 0; + + for( var i = 0; i < layers.length; i++ ){ + var layer = layers[i]; + + // if there are any eles needed to be drawn yet, the level is not complete + if( layer.reqs > 0 ){ return false; } + + // if the layer is invalid, the level is not complete + if( layer.invalid ){ return false; } + + numElesInLayers += layer.eles.length; + } + + // we should have exactly the number of eles passed in to be complete + if( numElesInLayers !== eles.length ){ return false; } + + return true; +}; + +LTCp.validateLayersElesOrdering = function( lvl, eles ){ + var layers = this.layersByLevel[ lvl ]; + + if( !layers ){ return; } + + // if in a layer the eles are not in the same order, then the layer is invalid + // (i.e. there is an ele in between the eles in the layer) + + for( var i = 0; i < layers.length; i++ ){ + var layer = layers[i]; + var offset = -1; + + // find the offset + for( var j = 0; j < eles.length; j++ ){ + if( layer.eles[0] === eles[j] ){ + offset = j; + break; + } + } + + if( offset < 0 ){ + // then the layer has nonexistent elements and is invalid + this.invalidateLayer( layer ); + continue; + } + + // the eles in the layer must be in the same continuous order, else the layer is invalid + + var o = offset; + + for( var j = 0; j < layer.eles.length; j++ ){ + if( layer.eles[j] !== eles[o+j] ){ + // log('invalidate based on ordering', layer.id); + + this.invalidateLayer( layer ); + break; + } + } + } +}; + +LTCp.updateElementsInLayers = function( eles, update ){ + var self = this; + var isEles = is.element( eles[0] ); + + // collect udpated elements (cascaded from the layers) and update each + // layer itself along the way + for( var i = 0; i < eles.length; i++ ){ + var req = isEles ? null : eles[i]; + var ele = isEles ? eles[i] : eles[i].ele; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + + for( var l = minLvl; l <= maxLvl; l++ ){ + var layer = caches[l]; + + if( !layer ){ continue; } + + // if update is a request from the ele cache, then it affects only + // the matching level + if( req && self.getEleLevelForLayerLevel( layer.level ) !== req.level ){ + continue; + } + + update( layer, ele, req ); + } + } +}; + +LTCp.haveLayers = function(){ + var self = this; + var haveLayers = false; + + for( var l = minLvl; l <= maxLvl; l++ ){ + var layers = self.layersByLevel[l]; + + if( layers && layers.length > 0 ){ + haveLayers = true; + break; + } + } + + return haveLayers; +}; + +LTCp.invalidateElements = function( eles ){ + var self = this; + + if( eles.length === 0 ){ return; } + + self.lastInvalidationTime = util.performanceNow(); + + // log('update invalidate layer time from eles'); + + if( eles.length === 0 || !self.haveLayers() ){ return; } + + self.updateElementsInLayers( eles, function invalAssocLayers( layer, ele, req ){ + self.invalidateLayer( layer ); + } ); +}; + +LTCp.invalidateLayer = function( layer ){ + // log('update invalidate layer time'); + + this.lastInvalidationTime = util.performanceNow(); + + if( layer.invalid ){ return; } // save cycles + + var lvl = layer.level; + var eles = layer.eles; + var layers = this.layersByLevel[ lvl ]; + + // log('invalidate layer', layer.id ); + + util.removeFromArray( layers, layer ); + // layer.eles = []; + + layer.elesQueue = []; + + layer.invalid = true; + + if( layer.replacement ){ + layer.replacement.invalid = true; + } + + for( var i = 0; i < eles.length; i++ ){ + var caches = eles[i]._private.rscratch.imgLayerCaches; + + if( caches ){ + caches[ lvl ] = null; + } + } +}; + +LTCp.refineElementTextures = function( eles ){ + var self = this; + + // log('refine', eles.length); + + self.updateElementsInLayers( eles, function refineEachEle( layer, ele, req ){ + var rLyr = layer.replacement; + + if( !rLyr ){ + rLyr = layer.replacement = self.makeLayer( layer.bb, layer.level ); + rLyr.replaces = layer; + rLyr.eles = layer.eles; + + // log('make replacement layer %s for %s with level %s', rLyr.id, layer.id, rLyr.level); + } + + if( !rLyr.reqs ){ + for( var i = 0; i < rLyr.eles.length; i++ ){ + self.queueLayer( rLyr, rLyr.eles[i] ); + } + + // log('queue replacement layer refinement', rLyr.id); + } + } ); +}; + +LTCp.enqueueElementRefinement = function( ele ){ + if( !useEleTxrCaching ){ return; } + + this.eleTxrDeqs.merge( ele ); + this.scheduleElementRefinement(); +}; + +LTCp.queueLayer = function( layer, ele ){ + var self = this; + var q = self.layersQueue; + var elesQ = layer.elesQueue; + var hasId = elesQ.hasId = elesQ.hasId || {}; + + // if a layer is going to be replaced, queuing is a waste of time + if( layer.replacement ){ return; } + + if( ele ){ + if( hasId[ ele.id() ] ){ + return; + } + + elesQ.push( ele ); + hasId[ ele.id() ] = true; + } + + if( layer.reqs ){ + layer.reqs++; + + q.updateItem( layer ); + } else { + layer.reqs = 1; + + q.push( layer ); + } +}; + +LTCp.dequeue = function( pxRatio ){ + var self = this; + var q = self.layersQueue; + var deqd = []; + var eleDeqs = 0; + + while( eleDeqs < maxDeqSize ){ + if( q.size() === 0 ){ break; } + + var layer = q.peek(); + + // if a layer has been or will be replaced, then don't waste time with it + if( layer.replacement ){ + // log('layer %s in queue skipped b/c it already has a replacement', layer.id); + q.pop(); + continue; + } + + // if this is a replacement layer that has been superceded, then forget it + if( layer.replaces && layer !== layer.replaces.replacement ){ + // log('layer is no longer the most uptodate replacement; dequeued', layer.id) + q.pop(); + continue; + } + + if( layer.invalid ){ + // log('replacement layer %s is invalid; dequeued', layer.id); + q.pop(); + continue; + } + + var ele = layer.elesQueue.shift(); + + if( ele ){ + // log('dequeue layer %s', layer.id); + + self.drawEleInLayer( layer, ele, layer.level, pxRatio ); + + eleDeqs++; + } + + if( deqd.length === 0 ){ + // we need only one entry in deqd to queue redrawing etc + deqd.push( true ); + } + + // if the layer has all its eles done, then remove from the queue + if( layer.elesQueue.length === 0 ){ + q.pop(); + + layer.reqs = 0; + + // log('dequeue of layer %s complete', layer.id); + + // when a replacement layer is dequeued, it replaces the old layer in the level + if( layer.replaces ){ + self.applyLayerReplacement( layer ); + } + + self.requestRedraw(); + } + } + + return deqd; +}; + +LTCp.applyLayerReplacement = function( layer ){ + var self = this; + var layersInLevel = self.layersByLevel[ layer.level ]; + var replaced = layer.replaces; + var index = layersInLevel.indexOf( replaced ); + + // if the replaced layer is not in the active list for the level, then replacing + // refs would be a mistake (i.e. overwriting the true active layer) + if( index < 0 || replaced.invalid ){ + // log('replacement layer would have no effect', layer.id); + return; + } + + layersInLevel[ index ] = layer; // replace level ref + + // replace refs in eles + for( var i = 0; i < layer.eles.length; i++ ){ + var _p = layer.eles[i]._private; + var cache = _p.imgLayerCaches = _p.imgLayerCaches || {}; + + if( cache ){ + cache[ layer.level ] = layer; + } + } + + // log('apply replacement layer %s over %s', layer.id, replaced.id); + + self.requestRedraw(); +}; + +LTCp.requestRedraw = util.debounce( function(){ + var r = this.renderer; + + r.redrawHint( 'eles', true ); + r.redrawHint( 'drag', true ); + r.redraw(); +}, 100 ); + +LTCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold, + deqCost: deqCost, + deqAvgCost: deqAvgCost, + deqNoDrawCost: deqNoDrawCost, + deqFastCost: deqFastCost, + deq: function( self, pxRatio ){ + return self.dequeue( pxRatio ); + }, + onDeqd: util.noop, + shouldRedraw: util.trueify, + priority: function( self ){ + return self.renderer.beforeRenderPriorities.lyrTxrDeq; + } +}); + +export default LayeredTextureCache; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/node-shapes.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/node-shapes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..37a77bfa1f9e8da09fe284b11ff8d2670e330de5 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/node-shapes.mjs @@ -0,0 +1,25 @@ +var CRp = {}; + +CRp.nodeShapeImpl = function( name, context, centerX, centerY, width, height, points, corners ){ + switch( name ){ + case 'ellipse': + return this.drawEllipsePath( context, centerX, centerY, width, height ); + case 'polygon': + return this.drawPolygonPath( context, centerX, centerY, width, height, points ); + case 'round-polygon': + return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points, corners ); + case 'roundrectangle': + case 'round-rectangle': + return this.drawRoundRectanglePath( context, centerX, centerY, width, height, corners ); + case 'cutrectangle': + case 'cut-rectangle': + return this.drawCutRectanglePath( context, centerX, centerY, width, height, points, corners ); + case 'bottomroundrectangle': + case 'bottom-round-rectangle': + return this.drawBottomRoundRectanglePath( context, centerX, centerY, width, height, corners ); + case 'barrel': + return this.drawBarrelPath( context, centerX, centerY, width, height ); + } +}; + +export default CRp; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/texture-cache-defs.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/texture-cache-defs.mjs new file mode 100644 index 0000000000000000000000000000000000000000..72619fa17fef4b2e1fb4a15a2a6f6950f4791414 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/texture-cache-defs.mjs @@ -0,0 +1,91 @@ +import * as util from '../../../util/index.mjs'; + +var fullFpsTime = 1000/60; // assume 60 frames per second + +export default { + setupDequeueing: function( opts ){ + return function setupDequeueingImpl(){ + var self = this; + var r = this.renderer; + + if( self.dequeueingSetup ){ + return; + } else { + self.dequeueingSetup = true; + } + + var queueRedraw = util.debounce( function(){ + r.redrawHint( 'eles', true ); + r.redrawHint( 'drag', true ); + + r.redraw(); + }, opts.deqRedrawThreshold ); + + var dequeue = function( willDraw, frameStartTime ){ + var startTime = util.performanceNow(); + var avgRenderTime = r.averageRedrawTime; + var renderTime = r.lastRedrawTime; + var deqd = []; + var extent = r.cy.extent(); + var pixelRatio = r.getPixelRatio(); + + // if we aren't in a tick that causes a draw, then the rendered style + // queue won't automatically be flushed before dequeueing starts + if( !willDraw ){ + r.flushRenderedStyleQueue(); + } + + while( true ){ // eslint-disable-line no-constant-condition + var now = util.performanceNow(); + var duration = now - startTime; + var frameDuration = now - frameStartTime; + + if( renderTime < fullFpsTime ){ + // if we're rendering faster than the ideal fps, then do dequeueing + // during all of the remaining frame time + + var timeAvailable = fullFpsTime - ( willDraw ? avgRenderTime : 0 ); + + if( frameDuration >= opts.deqFastCost * timeAvailable ){ + break; + } + } else { + if( willDraw ){ + if( + duration >= opts.deqCost * renderTime + || duration >= opts.deqAvgCost * avgRenderTime + ){ + break; + } + } else if( frameDuration >= opts.deqNoDrawCost * fullFpsTime ){ + break; + } + } + + var thisDeqd = opts.deq( self, pixelRatio, extent ); + + if( thisDeqd.length > 0 ){ + for( var i = 0; i < thisDeqd.length; i++ ){ + deqd.push( thisDeqd[i] ); + } + } else { + break; + } + } + + // callbacks on dequeue + if( deqd.length > 0 ){ + opts.onDeqd( self, deqd ); + + if( !willDraw && opts.shouldRedraw( self, deqd, pixelRatio, extent ) ){ + queueRedraw(); + } + } + }; + + var priority = opts.priority || util.noop; + + r.beforeRender( dequeue, priority( self ) ); + }; + } +}; diff --git a/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/webgl/atlas.mjs b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/webgl/atlas.mjs new file mode 100644 index 0000000000000000000000000000000000000000..33a9891f4bd2dac43f989804f4ad8d1b688cd257 --- /dev/null +++ b/tools/ui/node_modules/cytoscape/src/extensions/renderer/canvas/webgl/atlas.mjs @@ -0,0 +1,647 @@ +import * as util from './webgl-util.mjs'; +import * as cyutil from '../../../../util/index.mjs'; + +// A "texture atlas" is a big canvas, and sections of it are used as textures for nodes/labels. + +/** + * A single square texture atlas (also known as a "sprite sheet"). + */ +export class Atlas { + + constructor(r, texSize, texRows, createTextureCanvas) { + this.debugID = Math.floor(Math.random() * 10000); + this.r = r; + + this.texSize = texSize; + this.texRows = texRows; + this.texHeight = Math.floor(texSize / texRows); + + this.enableWrapping = true; // hardcoded for now, can be made an option + + this.locked = false; // once an atlas is locked it can no longer be drawn to + this.texture = null; // WebGLTexture object + this.needsBuffer = true; + + // a "location" is an pointer into the atlas with a 'row' and 'x' fields + this.freePointer = { x: 0, row: 0 }; + + // map from the style key to the row/x where the texture starts + // if the texture wraps then there's a second location + this.keyToLocation = new Map(); // styleKey -> [ location, location ] + + this.canvas = createTextureCanvas(r, texSize, texSize); + this.scratch = createTextureCanvas(r, texSize, this.texHeight, 'scratch'); + } + + lock() { + this.locked = true; + } + + getKeys() { + return new Set(this.keyToLocation.keys()); + } + + getScale({ w, h }) { + const { texHeight, texSize: maxTexWidth } = this; + // try to fit to the height of a row + let scale = texHeight / h; // TODO what about pixelRatio? + let texW = w * scale; + let texH = h * scale; + // if the scaled width is too wide then scale to fit max width instead + if(texW > maxTexWidth) { + scale = maxTexWidth / w; + texW = w * scale; + texH = h * scale; + } + return { scale, texW, texH }; + } + + + draw(key, bb, doDrawing) { + if(this.locked) + throw new Error('can\'t draw, atlas is locked'); + + const { texSize, texRows, texHeight } = this; + const { scale, texW, texH } = this.getScale(bb); + + const drawAt = (location, canvas) => { + if(doDrawing && canvas) { + const { context } = canvas; + const { x, row } = location; + const xOffset = x; + const yOffset = texHeight * row; + + context.save(); + context.translate(xOffset, yOffset); + context.scale(scale, scale); + doDrawing(context, bb); + context.restore(); + } + }; + + const locations = [ null, null ]; + + const drawNormal = () => { + // don't need to wrap, draw directly on the canvas + drawAt(this.freePointer, this.canvas); + + locations[0] = { + x: this.freePointer.x, + y: this.freePointer.row * texHeight, + w: texW, + h: texH + }; + locations[1] = { // create a second location with a width of 0, for convenience + x: this.freePointer.x + texW, + y: this.freePointer.row * texHeight, + w: 0, + h: texH + }; + + // move the pointer to the end of the texture + this.freePointer.x += texW; + if(this.freePointer.x == texSize) { + this.freePointer.x = 0; + this.freePointer.row++; + } + }; + + const drawWrapped = () => { + const { scratch, canvas } = this; + + // Draw to the scratch canvas + scratch.clear(); + drawAt({ x:0, row:0 }, scratch); + + const firstTexW = texSize - this.freePointer.x; + const secondTexW = texW - firstTexW; + const h = texHeight; + + { // copy first part of scratch to the first texture + const dx = this.freePointer.x; + const dy = this.freePointer.row * texHeight; + const w = firstTexW; + + canvas.context.drawImage(scratch, + 0, 0, w, h, + dx, dy, w, h + ); + + locations[0] = { + x: dx, + y: dy, + w: w, + h: texH + }; + } + { // copy second part of scratch to the second texture + const sx = firstTexW; + const dy = (this.freePointer.row + 1) * texHeight; + const w = secondTexW; + + if(canvas) { + canvas.context.drawImage(scratch, + sx, 0, w, h, + 0, dy, w, h + ); + } + + locations[1] = { + x: 0, + y: dy, + w: w, + h: texH + }; + } + + this.freePointer.x = secondTexW; + this.freePointer.row++; + }; + + const moveToStartOfNextRow = () => { + this.freePointer.x = 0; + this.freePointer.row++; + }; + + if(this.freePointer.x + texW <= texSize) { // There's enough space in the current row + drawNormal(); + } else if(this.freePointer.row >= texRows-1) { // Need to move to the next row, but there are no more rows, atlas is full. + return false; + } else if(this.freePointer.x === texSize) { // happen to be right at end of current row + moveToStartOfNextRow(); + drawNormal(); + } else if(this.enableWrapping) { // draw part of the texture to the end of the curent row, then wrap to the next row + drawWrapped(); + } else { // move to the start of the next row, then draw normally + moveToStartOfNextRow(); + drawNormal(); + } + + this.keyToLocation.set(key, locations); + this.needsBuffer = true; + return locations; + } + + getOffsets(key) { + return this.keyToLocation.get(key); + } + + isEmpty() { + return this.freePointer.x === 0 && this.freePointer.row === 0; + } + + canFit(bb) { + if(this.locked) + return false; + + const { texSize, texRows } = this; + const { texW } = this.getScale(bb); + if(this.freePointer.x + texW > texSize) { // need to wrap + return this.freePointer.row < texRows - 1; // return true if there's a row to wrap to + } + return true; + } + + // called on every frame + bufferIfNeeded(gl) { + if(!this.texture) { + this.texture = util.createTexture(gl, this.debugID); + } + if(this.needsBuffer) { + this.texture.buffer(this.canvas); + this.needsBuffer = false; + + if(this.locked) { + this.canvas = null; + this.scratch = null; + } + } + } + + dispose() { + if(this.texture) { + this.texture.deleteTexture(); + this.texture = null; + } + this.canvas = null; + this.scratch = null; + this.locked = true; + } + +} + +/** + * A collection of texture atlases, all of the same "render type". + * ('node-body' is an example of a render type.) + * An AtlasCollection can also be notified when a texture is no longer needed, + * and it can garbage collect the unused textures. + */ +export class AtlasCollection { + + constructor(r, texSize, texRows, createTextureCanvas) { + this.r = r; + + this.texSize = texSize; + this.texRows = texRows; + this.createTextureCanvas = createTextureCanvas; + + this.atlases = []; + this.styleKeyToAtlas = new Map(); + this.markedKeys = new Set(); // marked for garbage collection + } + + getKeys() { + return new Set(this.styleKeyToAtlas.keys()); + } + + _createAtlas() { + const { r, texSize, texRows, createTextureCanvas } = this; + return new Atlas(r, texSize, texRows, createTextureCanvas); + } + + _getScratchCanvas() { + if(!this.scratch) { + const { r, texSize, texRows, createTextureCanvas } = this; + const texHeight = Math.floor(texSize / texRows); + this.scratch = createTextureCanvas(r, texSize, texHeight, 'scratch'); + } + return this.scratch; + } + + draw(key, bb, doDrawing) { + let atlas = this.styleKeyToAtlas.get(key); + if(!atlas) { + // check for space at the end of the last atlas + atlas = this.atlases[this.atlases.length - 1]; + if(!atlas || !atlas.canFit(bb)) { + if(atlas) + atlas.lock(); + // create a new atlas + atlas = this._createAtlas(); + this.atlases.push(atlas); + } + + atlas.draw(key, bb, doDrawing); + + this.styleKeyToAtlas.set(key, atlas); + } + return atlas; + } + + getAtlas(key) { + return this.styleKeyToAtlas.get(key); + } + + hasAtlas(key) { + return this.styleKeyToAtlas.has(key); + } + + markKeyForGC(key) { + this.markedKeys.add(key); + } + + gc() { + const { markedKeys } = this; + if(markedKeys.size === 0) { + console.log('nothing to garbage collect'); + return; + } + + const newAtlases = []; + const newStyleKeyToAtlas = new Map(); + + let newAtlas = null; + + for(const atlas of this.atlases) { + const keys = atlas.getKeys(); + const keysToCollect = intersection(markedKeys, keys); + + if(keysToCollect.size === 0) { + // this atlas can still be used + newAtlases.push(atlas); + keys.forEach(k => newStyleKeyToAtlas.set(k, atlas)); + continue; + } + + if(!newAtlas) { + newAtlas = this._createAtlas(); + newAtlases.push(newAtlas); + } + + for(const key of keys) { + if(!keysToCollect.has(key)) { + const [ s1, s2 ] = atlas.getOffsets(key); + if(!newAtlas.canFit({ w: s1.w + s2.w, h: s1.h })) { + newAtlas.lock(); + newAtlas = this._createAtlas(); + newAtlases.push(newAtlas); + } + if(atlas.canvas) { + // if the texture can't be copied then it will have to be redrawn on the next frame + this._copyTextureToNewAtlas(key, atlas, newAtlas); + newStyleKeyToAtlas.set(key, newAtlas); + } + } + } + + atlas.dispose(); + } + + this.atlases = newAtlases; + this.styleKeyToAtlas = newStyleKeyToAtlas; + this.markedKeys = new Set(); + } + + + _copyTextureToNewAtlas(key, oldAtlas, newAtlas) { + const [ s1, s2 ] = oldAtlas.getOffsets(key); + + if(s2.w === 0) { // the texture does not wrap, draw directly to new atlas + newAtlas.draw(key, s1, context => { + context.drawImage(oldAtlas.canvas, + s1.x, s1.y, s1.w, s1.h, + 0, 0, s1.w, s1.h + ); + }); + } else { + // the texture wraps, first draw both parts to a scratch canvas + const scratch = this._getScratchCanvas(); + scratch.clear(); + scratch.context.drawImage(oldAtlas.canvas, + s1.x, s1.y, s1.w, s1.h, + 0, 0, s1.w, s1.h + ); + scratch.context.drawImage(oldAtlas.canvas, + s2.x, s2.y, s2.w, s2.h, + s1.w, 0, s2.w, s2.h + ); + + // now draw the scratch to the new atlas + const w = s1.w + s2.w; + const h = s1.h; + newAtlas.draw(key, { w, h }, context => { + context.drawImage(scratch, + 0, 0, w, h, + 0, 0, w, h // the destination context has already been translated to the correct position + ); + }); + } + } + + getCounts() { + return { + keyCount: this.styleKeyToAtlas.size, + atlasCount: new Set(this.styleKeyToAtlas.values()).size + }; + } + +} + + +function intersection(set1, set2) { + // TODO why no Set.intersection in node 16??? + if(set1.intersection) + return set1.intersection(set2); + else + return new Set([...set1].filter(x => set2.has(x))); +} + + +/** + * Used to manage batches of Atlases for drawing nodes and labels. + * Supports different types of AtlasCollections for different render types, + * for example 'node-body' and 'node-label' would be different render types. + * Render types are kept separate because they will likely need to be garbage collected + * separately and its not entierly guaranteed that their style keys won't collide. + */ +export class AtlasManager { + + constructor(r, globalOptions) { + this.r = r; + + this.globalOptions = globalOptions; + this.atlasSize = globalOptions.webglTexSize; + this.maxAtlasesPerBatch = globalOptions.webglTexPerBatch; + + this.renderTypes = new Map(); // renderType:string -> renderTypeOptions + this.collections = new Map(); // collectionName:string -> AtlasCollection + + this.typeAndIdToKey = new Map(); // [renderType,id] => Array