1 line
4.4 MiB
Plaintext
1 line
4.4 MiB
Plaintext
|
{"version":3,"file":"flowchart-elk-definition-2f51e52a.js","sources":["../src/diagrams/flowchart/elk/render-utils.ts","../../../node_modules/.pnpm/elkjs@0.8.2/node_modules/elkjs/lib/elk.bundled.js","../src/diagrams/flowchart/elk/flowRenderer-elk.js","../src/diagrams/flowchart/elk/styles.ts","../src/diagrams/flowchart/elk/flowchart-elk-definition.ts"],"sourcesContent":["export interface TreeData {\n parentById: Record<string, string>;\n childrenById: Record<string, string[]>;\n}\n\nexport const findCommonAncestor = (id1: string, id2: string, treeData: TreeData) => {\n const { parentById } = treeData;\n const visited = new Set();\n let currentId = id1;\n while (currentId) {\n visited.add(currentId);\n if (currentId === id2) {\n return currentId;\n }\n currentId = parentById[currentId];\n }\n currentId = id2;\n while (currentId) {\n if (visited.has(currentId)) {\n return currentId;\n }\n currentId = parentById[currentId];\n }\n return 'root';\n};\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.ELK = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*******************************************************************************\n * Copyright (c) 2017 Kiel University and others.\n * \n * This program and the accompanying materials are made \n * available under the terms of the Eclipse Public License 2.0 \n * which is available at https://www.eclipse.org/legal/epl-2.0/ \n * \n * SPDX-License-Identifier: EPL-2.0\n *******************************************************************************/\nvar ELK = function () {\n function ELK() {\n var _this = this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$defaultLayoutOpt = _ref.defaultLayoutOptions,\n defaultLayoutOptions = _ref$defaultLayoutOpt === undefined ? {} : _ref$defaultLayoutOpt,\n _ref$algorithms = _ref.algorithms,\n algorithms = _ref$algorithms === undefined ? ['layered', 'stress', 'mrtree', 'radial', 'force', 'disco', 'sporeOverlap', 'sporeCompaction', 'rectpacking'] : _ref$algorithms,\n workerFactory = _ref.workerFactory,\n workerUrl = _ref.workerUrl;\n\n _classCallCheck(this, ELK);\n\n this.defaultLayoutOptions = defaultLayoutOptions;\n this.initialized = false;\n\n // check valid worker construction possible\n if (typeof workerUrl === 'undefined' && typeof workerFactory === 'undefined') {\n throw new Error(\"Cannot construct an ELK witho
|