@altimateai/ui-components 0.0.77-beta.7 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CoachForm.css +1 -1
- package/dist/CoachForm.js +24114 -67797
- package/dist/DbtDocsRenderer.js +1 -1
- package/dist/Stack.js +2274 -2824
- package/dist/Switch.js +87 -128
- package/dist/ToggleGroup.js +4788 -5963
- package/dist/_basePickBy.js +60 -60
- package/dist/_baseUniq.js +152 -152
- package/dist/arc.js +53 -53
- package/dist/architectureDiagram-VXUJARFQ.js +4315 -480
- package/dist/assets/icons/index.js +1 -1
- package/dist/blockDiagram-VD42YOAC.js +1 -1
- package/dist/c4Diagram-YG6GDRKO.js +22 -22
- package/dist/channel.js +2 -2
- package/dist/chatbotV2/index.d.ts +19 -57
- package/dist/chatbotV2/index.js +56 -91
- package/dist/chunk-4BX2VUAB.js +1 -1
- package/dist/chunk-55IACEB6.js +2 -2
- package/dist/chunk-B4BG7PRW.js +1 -1
- package/dist/chunk-DI55MBZ5.js +14 -14
- package/dist/chunk-FMBD7UC4.js +1 -1
- package/dist/chunk-QN33PNHL.js +5 -5
- package/dist/chunk-QZHKN3VN.js +1 -1
- package/dist/chunk-TZMSLE5B.js +1 -1
- package/dist/classDiagram-2ON5EDUG.js +1 -1
- package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
- package/dist/cose-bilkent-S5V4N54A.js +2535 -160
- package/dist/dagre-6UL2VRFP.js +101 -101
- package/dist/dayjs.min.js +2 -2
- package/dist/defaultLocale.js +3 -3
- package/dist/diagram-PSM6KHXK.js +414 -198
- package/dist/diagram-QEK2KX5R.js +26 -26
- package/dist/diagram-S2PKOQOG.js +12 -12
- package/dist/erDiagram-Q2GNP2WA.js +1 -1
- package/dist/flowDiagram-NV44I4VS.js +6 -6
- package/dist/ganttDiagram-LVOFAZNH.js +1718 -843
- package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
- package/dist/graph.js +18 -17
- package/dist/index.d.ts +6 -101
- package/dist/index.js +37 -37
- package/dist/index2.js +684 -216
- package/dist/infoDiagram-F6ZHWCRC.js +14 -14
- package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
- package/dist/kanban-definition-3W4ZIXB7.js +42 -42
- package/dist/layout.js +678 -567
- package/dist/lineage/index.js +1315 -1308
- package/dist/linear.js +1 -1
- package/dist/main.css +1 -1
- package/dist/main.js +151 -151
- package/dist/mermaid-parser.core.js +155 -155
- package/dist/mindmap-definition-VGOIOE7T.js +28 -28
- package/dist/pieDiagram-ADFJNKIX.js +108 -68
- package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
- package/dist/redux-toolkit.modern.js +555 -563
- package/dist/requirementDiagram-UZGBJVZJ.js +14 -14
- package/dist/sankeyDiagram-TZEHDZUN.js +622 -229
- package/dist/sequenceDiagram-WL72ISMW.js +1 -1
- package/dist/shadcn/index.d.ts +40 -24
- package/dist/shadcn/index.js +4733 -6547
- package/dist/stateDiagram-FKZM4ZOC.js +33 -33
- package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
- package/dist/storybook/Typography.stories.tsx +120 -93
- package/dist/timeline-definition-IT6M3QCI.js +63 -63
- package/dist/{types-UHJCpYj0.d.ts → types-ByRPUpXR.d.ts} +116 -25
- package/dist/xychartDiagram-PRI3JC2R.js +491 -449
- package/package.json +1 -1
- package/dist/abap.js +0 -6
- package/dist/actionscript-3.js +0 -6
- package/dist/ada.js +0 -6
- package/dist/andromeeda.js +0 -4
- package/dist/angular-html.js +0 -32
- package/dist/angular-ts.js +0 -21
- package/dist/apache.js +0 -6
- package/dist/apex.js +0 -6
- package/dist/apl.js +0 -16
- package/dist/applescript.js +0 -6
- package/dist/ara.js +0 -6
- package/dist/architectureDiagram-VXUJARFQ2.js +0 -831
- package/dist/asciidoc.js +0 -6
- package/dist/asm.js +0 -6
- package/dist/astro.js +0 -18
- package/dist/aurora-x.js +0 -4
- package/dist/awk.js +0 -6
- package/dist/ayu-dark.js +0 -4
- package/dist/ballerina.js +0 -6
- package/dist/band.js +0 -46
- package/dist/bat.js +0 -6
- package/dist/beancount.js +0 -6
- package/dist/berry.js +0 -6
- package/dist/bibtex.js +0 -6
- package/dist/bicep.js +0 -6
- package/dist/blade.js +0 -20
- package/dist/blockDiagram-VD42YOAC2.js +0 -2266
- package/dist/bsl.js +0 -8
- package/dist/c.js +0 -6
- package/dist/c3.js +0 -6
- package/dist/c4Diagram-YG6GDRKO2.js +0 -1582
- package/dist/cadence.js +0 -6
- package/dist/cairo.js +0 -8
- package/dist/catppuccin-frappe.js +0 -4
- package/dist/catppuccin-latte.js +0 -4
- package/dist/catppuccin-macchiato.js +0 -4
- package/dist/catppuccin-mocha.js +0 -4
- package/dist/chunk-4BX2VUAB2.js +0 -9
- package/dist/chunk-55IACEB62.js +0 -9
- package/dist/chunk-B4BG7PRW2.js +0 -1377
- package/dist/chunk-DI55MBZ52.js +0 -1382
- package/dist/chunk-FMBD7UC42.js +0 -19
- package/dist/chunk-QN33PNHL2.js +0 -20
- package/dist/chunk-QZHKN3VN2.js +0 -15
- package/dist/chunk-TZMSLE5B2.js +0 -64
- package/dist/clarity.js +0 -6
- package/dist/classDiagram-2ON5EDUG2.js +0 -17
- package/dist/classDiagram-v2-WZHVMYZB2.js +0 -17
- package/dist/clojure.js +0 -6
- package/dist/cmake.js +0 -6
- package/dist/cobol.js +0 -10
- package/dist/code-block-37QAKDTI.js +0 -27
- package/dist/codeowners.js +0 -6
- package/dist/codeql.js +0 -6
- package/dist/coffee.js +0 -8
- package/dist/common-lisp.js +0 -6
- package/dist/coq.js +0 -6
- package/dist/cose-bilkent-S5V4N54A2.js +0 -231
- package/dist/cpp.js +0 -18
- package/dist/crystal.js +0 -18
- package/dist/csharp.js +0 -6
- package/dist/css.js +0 -6
- package/dist/csv.js +0 -6
- package/dist/cue.js +0 -6
- package/dist/cypher.js +0 -6
- package/dist/cytoscape-cose-bilkent.js +0 -2380
- package/dist/cytoscape-fcose.js +0 -3840
- package/dist/d.js +0 -6
- package/dist/dagre-6UL2VRFP2.js +0 -447
- package/dist/dark-plus.js +0 -4
- package/dist/dart.js +0 -6
- package/dist/dax.js +0 -6
- package/dist/desktop.js +0 -6
- package/dist/diagram-PSM6KHXK2.js +0 -319
- package/dist/diagram-QEK2KX5R2.js +0 -221
- package/dist/diagram-S2PKOQOG2.js +0 -143
- package/dist/diff.js +0 -6
- package/dist/docker.js +0 -6
- package/dist/dotenv.js +0 -6
- package/dist/dracula-soft.js +0 -4
- package/dist/dracula.js +0 -4
- package/dist/dream-maker.js +0 -6
- package/dist/edge.js +0 -12
- package/dist/elixir.js +0 -8
- package/dist/elm.js +0 -8
- package/dist/emacs-lisp.js +0 -6
- package/dist/erDiagram-Q2GNP2WA2.js +0 -843
- package/dist/erb.js +0 -10
- package/dist/erlang.js +0 -8
- package/dist/everforest-dark.js +0 -4
- package/dist/everforest-light.js +0 -4
- package/dist/fennel.js +0 -6
- package/dist/fish.js +0 -6
- package/dist/flowDiagram-NV44I4VS2.js +0 -1628
- package/dist/fluent.js +0 -6
- package/dist/fortran-fixed-form.js +0 -8
- package/dist/fortran-free-form.js +0 -6
- package/dist/fsharp.js +0 -8
- package/dist/ganttDiagram-JELNMOA3.js +0 -1788
- package/dist/gdresource.js +0 -10
- package/dist/gdscript.js +0 -6
- package/dist/gdshader.js +0 -6
- package/dist/genie.js +0 -6
- package/dist/gherkin.js +0 -6
- package/dist/git-commit.js +0 -8
- package/dist/git-rebase.js +0 -8
- package/dist/gitGraphDiagram-NY62KEGX2.js +0 -713
- package/dist/github-dark-default.js +0 -4
- package/dist/github-dark-dimmed.js +0 -4
- package/dist/github-dark-high-contrast.js +0 -4
- package/dist/github-dark.js +0 -4
- package/dist/github-light-default.js +0 -4
- package/dist/github-light-high-contrast.js +0 -4
- package/dist/github-light.js +0 -4
- package/dist/gleam.js +0 -6
- package/dist/glimmer-js.js +0 -14
- package/dist/glimmer-ts.js +0 -14
- package/dist/glsl.js +0 -8
- package/dist/gn.js +0 -6
- package/dist/gnuplot.js +0 -6
- package/dist/go.js +0 -6
- package/dist/graph2.js +0 -246
- package/dist/graphql.js +0 -14
- package/dist/groovy.js +0 -6
- package/dist/gruvbox-dark-hard.js +0 -4
- package/dist/gruvbox-dark-medium.js +0 -4
- package/dist/gruvbox-dark-soft.js +0 -4
- package/dist/gruvbox-light-hard.js +0 -4
- package/dist/gruvbox-light-medium.js +0 -4
- package/dist/gruvbox-light-soft.js +0 -4
- package/dist/hack.js +0 -10
- package/dist/haml.js +0 -10
- package/dist/handlebars.js +0 -14
- package/dist/haskell.js +0 -6
- package/dist/haxe.js +0 -6
- package/dist/hcl.js +0 -6
- package/dist/hjson.js +0 -6
- package/dist/hlsl.js +0 -6
- package/dist/houston.js +0 -4
- package/dist/html-derivative.js +0 -8
- package/dist/html.js +0 -10
- package/dist/http.js +0 -14
- package/dist/hurl.js +0 -12
- package/dist/hxml.js +0 -8
- package/dist/hy.js +0 -6
- package/dist/imba.js +0 -6
- package/dist/index3.js +0 -689
- package/dist/infoDiagram-WHAUD3N6.js +0 -24
- package/dist/ini.js +0 -6
- package/dist/java.js +0 -6
- package/dist/javascript.js +0 -6
- package/dist/jinja.js +0 -11
- package/dist/jison.js +0 -8
- package/dist/journeyDiagram-XKPGCS4Q2.js +0 -837
- package/dist/json.js +0 -6
- package/dist/json5.js +0 -6
- package/dist/jsonc.js +0 -6
- package/dist/jsonl.js +0 -6
- package/dist/jsonnet.js +0 -6
- package/dist/jssm.js +0 -6
- package/dist/jsx.js +0 -6
- package/dist/julia.js +0 -16
- package/dist/kanagawa-dragon.js +0 -4
- package/dist/kanagawa-lotus.js +0 -4
- package/dist/kanagawa-wave.js +0 -4
- package/dist/kanban-definition-3W4ZIXB72.js +0 -720
- package/dist/katex2.js +0 -11691
- package/dist/kdl.js +0 -6
- package/dist/kotlin.js +0 -6
- package/dist/kusto.js +0 -6
- package/dist/laserwave.js +0 -4
- package/dist/latex.js +0 -8
- package/dist/layout2.js +0 -1224
- package/dist/lean.js +0 -6
- package/dist/less.js +0 -6
- package/dist/light-plus.js +0 -4
- package/dist/liquid.js +0 -14
- package/dist/llvm.js +0 -6
- package/dist/log.js +0 -6
- package/dist/logo.js +0 -6
- package/dist/lua.js +0 -8
- package/dist/luau.js +0 -6
- package/dist/make.js +0 -6
- package/dist/markdown.js +0 -6
- package/dist/marko.js +0 -14
- package/dist/material-theme-darker.js +0 -4
- package/dist/material-theme-lighter.js +0 -4
- package/dist/material-theme-ocean.js +0 -4
- package/dist/material-theme-palenight.js +0 -4
- package/dist/material-theme.js +0 -4
- package/dist/matlab.js +0 -6
- package/dist/mdc.js +0 -12
- package/dist/mdx.js +0 -6
- package/dist/mermaid-4DMBBIKO.js +0 -4
- package/dist/mermaid.js +0 -6
- package/dist/min-dark.js +0 -4
- package/dist/min-light.js +0 -4
- package/dist/mindmap-definition-VGOIOE7T2.js +0 -786
- package/dist/mipsasm.js +0 -6
- package/dist/mojo.js +0 -6
- package/dist/monokai.js +0 -4
- package/dist/moonbit.js +0 -6
- package/dist/move.js +0 -6
- package/dist/narrat.js +0 -6
- package/dist/nextflow.js +0 -6
- package/dist/nginx.js +0 -8
- package/dist/night-owl.js +0 -4
- package/dist/nim.js +0 -20
- package/dist/nix.js +0 -9
- package/dist/nord.js +0 -4
- package/dist/nushell.js +0 -6
- package/dist/objective-c.js +0 -6
- package/dist/objective-cpp.js +0 -6
- package/dist/ocaml.js +0 -6
- package/dist/one-dark-pro.js +0 -4
- package/dist/one-light.js +0 -4
- package/dist/openscad.js +0 -6
- package/dist/pascal.js +0 -6
- package/dist/perl.js +0 -16
- package/dist/php.js +0 -18
- package/dist/pie.js +0 -45
- package/dist/pieDiagram-ADFJNKIX2.js +0 -123
- package/dist/pkl.js +0 -6
- package/dist/plastic.js +0 -4
- package/dist/plsql.js +0 -6
- package/dist/po.js +0 -6
- package/dist/poimandres.js +0 -4
- package/dist/polar.js +0 -6
- package/dist/postcss.js +0 -6
- package/dist/powerquery.js +0 -6
- package/dist/powershell.js +0 -6
- package/dist/prisma.js +0 -6
- package/dist/prolog.js +0 -6
- package/dist/proto.js +0 -6
- package/dist/pug.js +0 -12
- package/dist/puppet.js +0 -6
- package/dist/purescript.js +0 -6
- package/dist/python.js +0 -6
- package/dist/qml.js +0 -8
- package/dist/qmldir.js +0 -6
- package/dist/qss.js +0 -6
- package/dist/quadrantDiagram-AYHSOK5B2.js +0 -1025
- package/dist/r.js +0 -6
- package/dist/racket.js +0 -6
- package/dist/raku.js +0 -6
- package/dist/razor.js +0 -10
- package/dist/red.js +0 -4
- package/dist/reg.js +0 -6
- package/dist/regexp.js +0 -6
- package/dist/rel.js +0 -6
- package/dist/requirementDiagram-UZGBJVZJ2.js +0 -852
- package/dist/riscv.js +0 -6
- package/dist/rose-pine-dawn.js +0 -4
- package/dist/rose-pine-moon.js +0 -4
- package/dist/rose-pine.js +0 -4
- package/dist/rosmsg.js +0 -6
- package/dist/rst.js +0 -22
- package/dist/ruby.js +0 -30
- package/dist/rust.js +0 -6
- package/dist/sankeyDiagram-TZEHDZUN2.js +0 -418
- package/dist/sankeyLinkHorizontal.js +0 -403
- package/dist/sas.js +0 -8
- package/dist/sass.js +0 -6
- package/dist/scala.js +0 -6
- package/dist/scheme.js +0 -6
- package/dist/scss.js +0 -8
- package/dist/sdbl.js +0 -6
- package/dist/sequenceDiagram-WL72ISMW2.js +0 -2523
- package/dist/shaderlab.js +0 -8
- package/dist/shellscript.js +0 -6
- package/dist/shellsession.js +0 -8
- package/dist/slack-dark.js +0 -4
- package/dist/slack-ochin.js +0 -4
- package/dist/smalltalk.js +0 -6
- package/dist/snazzy-light.js +0 -4
- package/dist/solarized-dark.js +0 -4
- package/dist/solarized-light.js +0 -4
- package/dist/solidity.js +0 -6
- package/dist/soy.js +0 -8
- package/dist/sparql.js +0 -8
- package/dist/splunk.js +0 -6
- package/dist/sql.js +0 -6
- package/dist/ssh-config.js +0 -6
- package/dist/stata.js +0 -8
- package/dist/stateDiagram-FKZM4ZOC2.js +0 -264
- package/dist/stateDiagram-v2-4FDKWEC32.js +0 -17
- package/dist/stylus.js +0 -6
- package/dist/svelte.js +0 -14
- package/dist/swift.js +0 -6
- package/dist/synthwave-84.js +0 -4
- package/dist/system-verilog.js +0 -6
- package/dist/systemd.js +0 -6
- package/dist/talonscript.js +0 -6
- package/dist/tasl.js +0 -6
- package/dist/tcl.js +0 -6
- package/dist/templ.js +0 -12
- package/dist/terraform.js +0 -6
- package/dist/tex.js +0 -8
- package/dist/time.js +0 -900
- package/dist/timeline-definition-IT6M3QCI2.js +0 -802
- package/dist/tokyo-night.js +0 -4
- package/dist/toml.js +0 -6
- package/dist/ts-tags.js +0 -41
- package/dist/tsv.js +0 -6
- package/dist/tsx.js +0 -6
- package/dist/turtle.js +0 -6
- package/dist/twig.js +0 -18
- package/dist/typescript.js +0 -6
- package/dist/typespec.js +0 -6
- package/dist/typst.js +0 -6
- package/dist/union.js +0 -8
- package/dist/v.js +0 -6
- package/dist/vala.js +0 -6
- package/dist/vb.js +0 -6
- package/dist/verilog.js +0 -6
- package/dist/vesper.js +0 -4
- package/dist/vhdl.js +0 -6
- package/dist/viml.js +0 -6
- package/dist/vitesse-black.js +0 -4
- package/dist/vitesse-dark.js +0 -4
- package/dist/vitesse-light.js +0 -4
- package/dist/vue-html.js +0 -8
- package/dist/vue-vine.js +0 -18
- package/dist/vue.js +0 -31
- package/dist/vyper.js +0 -6
- package/dist/wasm.js +0 -7
- package/dist/wasm2.js +0 -6
- package/dist/wenyan.js +0 -6
- package/dist/wgsl.js +0 -6
- package/dist/wikitext.js +0 -6
- package/dist/wit.js +0 -6
- package/dist/wolfram.js +0 -6
- package/dist/xml.js +0 -8
- package/dist/xsl.js +0 -8
- package/dist/xychartDiagram-PRI3JC2R2.js +0 -1299
- package/dist/yaml.js +0 -6
- package/dist/zenscript.js +0 -6
- package/dist/zig.js +0 -6
- package/dist/zipObject.js +0 -128
package/dist/cytoscape-fcose.js
DELETED
|
@@ -1,3840 +0,0 @@
|
|
|
1
|
-
import { c as oe, g as Ee } from "./redux-toolkit.modern.js";
|
|
2
|
-
var de = { exports: {} }, ae = { exports: {} }, ne = { exports: {} }, ve;
|
|
3
|
-
function ye() {
|
|
4
|
-
return ve || (ve = 1, function(kt, se) {
|
|
5
|
-
(function(gt, A) {
|
|
6
|
-
kt.exports = A();
|
|
7
|
-
})(oe, function() {
|
|
8
|
-
return (
|
|
9
|
-
/******/
|
|
10
|
-
function(k) {
|
|
11
|
-
var gt = {};
|
|
12
|
-
function A(T) {
|
|
13
|
-
if (gt[T])
|
|
14
|
-
return gt[T].exports;
|
|
15
|
-
var l = gt[T] = {
|
|
16
|
-
/******/
|
|
17
|
-
i: T,
|
|
18
|
-
/******/
|
|
19
|
-
l: !1,
|
|
20
|
-
/******/
|
|
21
|
-
exports: {}
|
|
22
|
-
/******/
|
|
23
|
-
};
|
|
24
|
-
return k[T].call(l.exports, l, l.exports, A), l.l = !0, l.exports;
|
|
25
|
-
}
|
|
26
|
-
return A.m = k, A.c = gt, A.i = function(T) {
|
|
27
|
-
return T;
|
|
28
|
-
}, A.d = function(T, l, n) {
|
|
29
|
-
A.o(T, l) || Object.defineProperty(T, l, {
|
|
30
|
-
/******/
|
|
31
|
-
configurable: !1,
|
|
32
|
-
/******/
|
|
33
|
-
enumerable: !0,
|
|
34
|
-
/******/
|
|
35
|
-
get: n
|
|
36
|
-
/******/
|
|
37
|
-
});
|
|
38
|
-
}, A.n = function(T) {
|
|
39
|
-
var l = T && T.__esModule ? (
|
|
40
|
-
/******/
|
|
41
|
-
function() {
|
|
42
|
-
return T.default;
|
|
43
|
-
}
|
|
44
|
-
) : (
|
|
45
|
-
/******/
|
|
46
|
-
function() {
|
|
47
|
-
return T;
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
return A.d(l, "a", l), l;
|
|
51
|
-
}, A.o = function(T, l) {
|
|
52
|
-
return Object.prototype.hasOwnProperty.call(T, l);
|
|
53
|
-
}, A.p = "", A(A.s = 28);
|
|
54
|
-
}([
|
|
55
|
-
/* 0 */
|
|
56
|
-
/***/
|
|
57
|
-
function(k, gt, A) {
|
|
58
|
-
function T() {
|
|
59
|
-
}
|
|
60
|
-
T.QUALITY = 1, T.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, T.DEFAULT_INCREMENTAL = !1, T.DEFAULT_ANIMATION_ON_LAYOUT = !0, T.DEFAULT_ANIMATION_DURING_LAYOUT = !1, T.DEFAULT_ANIMATION_PERIOD = 50, T.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, T.DEFAULT_GRAPH_MARGIN = 15, T.NODE_DIMENSIONS_INCLUDE_LABELS = !1, T.SIMPLE_NODE_SIZE = 40, T.SIMPLE_NODE_HALF_SIZE = T.SIMPLE_NODE_SIZE / 2, T.EMPTY_COMPOUND_NODE_SIZE = 40, T.MIN_EDGE_LENGTH = 1, T.WORLD_BOUNDARY = 1e6, T.INITIAL_WORLD_BOUNDARY = T.WORLD_BOUNDARY / 1e3, T.WORLD_CENTER_X = 1200, T.WORLD_CENTER_Y = 900, k.exports = T;
|
|
61
|
-
},
|
|
62
|
-
/* 1 */
|
|
63
|
-
/***/
|
|
64
|
-
function(k, gt, A) {
|
|
65
|
-
var T = A(2), l = A(8), n = A(9);
|
|
66
|
-
function r(u, i, y) {
|
|
67
|
-
T.call(this, y), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = y, this.bendpoints = [], this.source = u, this.target = i;
|
|
68
|
-
}
|
|
69
|
-
r.prototype = Object.create(T.prototype);
|
|
70
|
-
for (var a in T)
|
|
71
|
-
r[a] = T[a];
|
|
72
|
-
r.prototype.getSource = function() {
|
|
73
|
-
return this.source;
|
|
74
|
-
}, r.prototype.getTarget = function() {
|
|
75
|
-
return this.target;
|
|
76
|
-
}, r.prototype.isInterGraph = function() {
|
|
77
|
-
return this.isInterGraph;
|
|
78
|
-
}, r.prototype.getLength = function() {
|
|
79
|
-
return this.length;
|
|
80
|
-
}, r.prototype.isOverlapingSourceAndTarget = function() {
|
|
81
|
-
return this.isOverlapingSourceAndTarget;
|
|
82
|
-
}, r.prototype.getBendpoints = function() {
|
|
83
|
-
return this.bendpoints;
|
|
84
|
-
}, r.prototype.getLca = function() {
|
|
85
|
-
return this.lca;
|
|
86
|
-
}, r.prototype.getSourceInLca = function() {
|
|
87
|
-
return this.sourceInLca;
|
|
88
|
-
}, r.prototype.getTargetInLca = function() {
|
|
89
|
-
return this.targetInLca;
|
|
90
|
-
}, r.prototype.getOtherEnd = function(u) {
|
|
91
|
-
if (this.source === u)
|
|
92
|
-
return this.target;
|
|
93
|
-
if (this.target === u)
|
|
94
|
-
return this.source;
|
|
95
|
-
throw "Node is not incident with this edge";
|
|
96
|
-
}, r.prototype.getOtherEndInGraph = function(u, i) {
|
|
97
|
-
for (var y = this.getOtherEnd(u), t = i.getGraphManager().getRoot(); ; ) {
|
|
98
|
-
if (y.getOwner() == i)
|
|
99
|
-
return y;
|
|
100
|
-
if (y.getOwner() == t)
|
|
101
|
-
break;
|
|
102
|
-
y = y.getOwner().getParent();
|
|
103
|
-
}
|
|
104
|
-
return null;
|
|
105
|
-
}, r.prototype.updateLength = function() {
|
|
106
|
-
var u = new Array(4);
|
|
107
|
-
this.isOverlapingSourceAndTarget = l.getIntersection(this.target.getRect(), this.source.getRect(), u), this.isOverlapingSourceAndTarget || (this.lengthX = u[0] - u[2], this.lengthY = u[1] - u[3], Math.abs(this.lengthX) < 1 && (this.lengthX = n.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = n.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
|
|
108
|
-
}, r.prototype.updateLengthSimple = function() {
|
|
109
|
-
this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = n.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = n.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
|
|
110
|
-
}, k.exports = r;
|
|
111
|
-
},
|
|
112
|
-
/* 2 */
|
|
113
|
-
/***/
|
|
114
|
-
function(k, gt, A) {
|
|
115
|
-
function T(l) {
|
|
116
|
-
this.vGraphObject = l;
|
|
117
|
-
}
|
|
118
|
-
k.exports = T;
|
|
119
|
-
},
|
|
120
|
-
/* 3 */
|
|
121
|
-
/***/
|
|
122
|
-
function(k, gt, A) {
|
|
123
|
-
var T = A(2), l = A(10), n = A(13), r = A(0), a = A(16), u = A(5);
|
|
124
|
-
function i(t, s, o, f) {
|
|
125
|
-
o == null && f == null && (f = s), T.call(this, f), t.graphManager != null && (t = t.graphManager), this.estimatedSize = l.MIN_VALUE, this.inclusionTreeDepth = l.MAX_VALUE, this.vGraphObject = f, this.edges = [], this.graphManager = t, o != null && s != null ? this.rect = new n(s.x, s.y, o.width, o.height) : this.rect = new n();
|
|
126
|
-
}
|
|
127
|
-
i.prototype = Object.create(T.prototype);
|
|
128
|
-
for (var y in T)
|
|
129
|
-
i[y] = T[y];
|
|
130
|
-
i.prototype.getEdges = function() {
|
|
131
|
-
return this.edges;
|
|
132
|
-
}, i.prototype.getChild = function() {
|
|
133
|
-
return this.child;
|
|
134
|
-
}, i.prototype.getOwner = function() {
|
|
135
|
-
return this.owner;
|
|
136
|
-
}, i.prototype.getWidth = function() {
|
|
137
|
-
return this.rect.width;
|
|
138
|
-
}, i.prototype.setWidth = function(t) {
|
|
139
|
-
this.rect.width = t;
|
|
140
|
-
}, i.prototype.getHeight = function() {
|
|
141
|
-
return this.rect.height;
|
|
142
|
-
}, i.prototype.setHeight = function(t) {
|
|
143
|
-
this.rect.height = t;
|
|
144
|
-
}, i.prototype.getCenterX = function() {
|
|
145
|
-
return this.rect.x + this.rect.width / 2;
|
|
146
|
-
}, i.prototype.getCenterY = function() {
|
|
147
|
-
return this.rect.y + this.rect.height / 2;
|
|
148
|
-
}, i.prototype.getCenter = function() {
|
|
149
|
-
return new u(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
|
|
150
|
-
}, i.prototype.getLocation = function() {
|
|
151
|
-
return new u(this.rect.x, this.rect.y);
|
|
152
|
-
}, i.prototype.getRect = function() {
|
|
153
|
-
return this.rect;
|
|
154
|
-
}, i.prototype.getDiagonal = function() {
|
|
155
|
-
return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
|
|
156
|
-
}, i.prototype.getHalfTheDiagonal = function() {
|
|
157
|
-
return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
|
|
158
|
-
}, i.prototype.setRect = function(t, s) {
|
|
159
|
-
this.rect.x = t.x, this.rect.y = t.y, this.rect.width = s.width, this.rect.height = s.height;
|
|
160
|
-
}, i.prototype.setCenter = function(t, s) {
|
|
161
|
-
this.rect.x = t - this.rect.width / 2, this.rect.y = s - this.rect.height / 2;
|
|
162
|
-
}, i.prototype.setLocation = function(t, s) {
|
|
163
|
-
this.rect.x = t, this.rect.y = s;
|
|
164
|
-
}, i.prototype.moveBy = function(t, s) {
|
|
165
|
-
this.rect.x += t, this.rect.y += s;
|
|
166
|
-
}, i.prototype.getEdgeListToNode = function(t) {
|
|
167
|
-
var s = [], o = this;
|
|
168
|
-
return o.edges.forEach(function(f) {
|
|
169
|
-
if (f.target == t) {
|
|
170
|
-
if (f.source != o) throw "Incorrect edge source!";
|
|
171
|
-
s.push(f);
|
|
172
|
-
}
|
|
173
|
-
}), s;
|
|
174
|
-
}, i.prototype.getEdgesBetween = function(t) {
|
|
175
|
-
var s = [], o = this;
|
|
176
|
-
return o.edges.forEach(function(f) {
|
|
177
|
-
if (!(f.source == o || f.target == o)) throw "Incorrect edge source and/or target";
|
|
178
|
-
(f.target == t || f.source == t) && s.push(f);
|
|
179
|
-
}), s;
|
|
180
|
-
}, i.prototype.getNeighborsList = function() {
|
|
181
|
-
var t = /* @__PURE__ */ new Set(), s = this;
|
|
182
|
-
return s.edges.forEach(function(o) {
|
|
183
|
-
if (o.source == s)
|
|
184
|
-
t.add(o.target);
|
|
185
|
-
else {
|
|
186
|
-
if (o.target != s)
|
|
187
|
-
throw "Incorrect incidency!";
|
|
188
|
-
t.add(o.source);
|
|
189
|
-
}
|
|
190
|
-
}), t;
|
|
191
|
-
}, i.prototype.withChildren = function() {
|
|
192
|
-
var t = /* @__PURE__ */ new Set(), s, o;
|
|
193
|
-
if (t.add(this), this.child != null)
|
|
194
|
-
for (var f = this.child.getNodes(), h = 0; h < f.length; h++)
|
|
195
|
-
s = f[h], o = s.withChildren(), o.forEach(function(N) {
|
|
196
|
-
t.add(N);
|
|
197
|
-
});
|
|
198
|
-
return t;
|
|
199
|
-
}, i.prototype.getNoOfChildren = function() {
|
|
200
|
-
var t = 0, s;
|
|
201
|
-
if (this.child == null)
|
|
202
|
-
t = 1;
|
|
203
|
-
else
|
|
204
|
-
for (var o = this.child.getNodes(), f = 0; f < o.length; f++)
|
|
205
|
-
s = o[f], t += s.getNoOfChildren();
|
|
206
|
-
return t == 0 && (t = 1), t;
|
|
207
|
-
}, i.prototype.getEstimatedSize = function() {
|
|
208
|
-
if (this.estimatedSize == l.MIN_VALUE)
|
|
209
|
-
throw "assert failed";
|
|
210
|
-
return this.estimatedSize;
|
|
211
|
-
}, i.prototype.calcEstimatedSize = function() {
|
|
212
|
-
return this.child == null ? this.estimatedSize = (this.rect.width + this.rect.height) / 2 : (this.estimatedSize = this.child.calcEstimatedSize(), this.rect.width = this.estimatedSize, this.rect.height = this.estimatedSize, this.estimatedSize);
|
|
213
|
-
}, i.prototype.scatter = function() {
|
|
214
|
-
var t, s, o = -r.INITIAL_WORLD_BOUNDARY, f = r.INITIAL_WORLD_BOUNDARY;
|
|
215
|
-
t = r.WORLD_CENTER_X + a.nextDouble() * (f - o) + o;
|
|
216
|
-
var h = -r.INITIAL_WORLD_BOUNDARY, N = r.INITIAL_WORLD_BOUNDARY;
|
|
217
|
-
s = r.WORLD_CENTER_Y + a.nextDouble() * (N - h) + h, this.rect.x = t, this.rect.y = s;
|
|
218
|
-
}, i.prototype.updateBounds = function() {
|
|
219
|
-
if (this.getChild() == null)
|
|
220
|
-
throw "assert failed";
|
|
221
|
-
if (this.getChild().getNodes().length != 0) {
|
|
222
|
-
var t = this.getChild();
|
|
223
|
-
if (t.updateBounds(!0), this.rect.x = t.getLeft(), this.rect.y = t.getTop(), this.setWidth(t.getRight() - t.getLeft()), this.setHeight(t.getBottom() - t.getTop()), r.NODE_DIMENSIONS_INCLUDE_LABELS) {
|
|
224
|
-
var s = t.getRight() - t.getLeft(), o = t.getBottom() - t.getTop();
|
|
225
|
-
this.labelWidth && (this.labelPosHorizontal == "left" ? (this.rect.x -= this.labelWidth, this.setWidth(s + this.labelWidth)) : this.labelPosHorizontal == "center" && this.labelWidth > s ? (this.rect.x -= (this.labelWidth - s) / 2, this.setWidth(this.labelWidth)) : this.labelPosHorizontal == "right" && this.setWidth(s + this.labelWidth)), this.labelHeight && (this.labelPosVertical == "top" ? (this.rect.y -= this.labelHeight, this.setHeight(o + this.labelHeight)) : this.labelPosVertical == "center" && this.labelHeight > o ? (this.rect.y -= (this.labelHeight - o) / 2, this.setHeight(this.labelHeight)) : this.labelPosVertical == "bottom" && this.setHeight(o + this.labelHeight));
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}, i.prototype.getInclusionTreeDepth = function() {
|
|
229
|
-
if (this.inclusionTreeDepth == l.MAX_VALUE)
|
|
230
|
-
throw "assert failed";
|
|
231
|
-
return this.inclusionTreeDepth;
|
|
232
|
-
}, i.prototype.transform = function(t) {
|
|
233
|
-
var s = this.rect.x;
|
|
234
|
-
s > r.WORLD_BOUNDARY ? s = r.WORLD_BOUNDARY : s < -r.WORLD_BOUNDARY && (s = -r.WORLD_BOUNDARY);
|
|
235
|
-
var o = this.rect.y;
|
|
236
|
-
o > r.WORLD_BOUNDARY ? o = r.WORLD_BOUNDARY : o < -r.WORLD_BOUNDARY && (o = -r.WORLD_BOUNDARY);
|
|
237
|
-
var f = new u(s, o), h = t.inverseTransformPoint(f);
|
|
238
|
-
this.setLocation(h.x, h.y);
|
|
239
|
-
}, i.prototype.getLeft = function() {
|
|
240
|
-
return this.rect.x;
|
|
241
|
-
}, i.prototype.getRight = function() {
|
|
242
|
-
return this.rect.x + this.rect.width;
|
|
243
|
-
}, i.prototype.getTop = function() {
|
|
244
|
-
return this.rect.y;
|
|
245
|
-
}, i.prototype.getBottom = function() {
|
|
246
|
-
return this.rect.y + this.rect.height;
|
|
247
|
-
}, i.prototype.getParent = function() {
|
|
248
|
-
return this.owner == null ? null : this.owner.getParent();
|
|
249
|
-
}, k.exports = i;
|
|
250
|
-
},
|
|
251
|
-
/* 4 */
|
|
252
|
-
/***/
|
|
253
|
-
function(k, gt, A) {
|
|
254
|
-
var T = A(0);
|
|
255
|
-
function l() {
|
|
256
|
-
}
|
|
257
|
-
for (var n in T)
|
|
258
|
-
l[n] = T[n];
|
|
259
|
-
l.MAX_ITERATIONS = 2500, l.DEFAULT_EDGE_LENGTH = 50, l.DEFAULT_SPRING_STRENGTH = 0.45, l.DEFAULT_REPULSION_STRENGTH = 4500, l.DEFAULT_GRAVITY_STRENGTH = 0.4, l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, l.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, l.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, l.COOLING_ADAPTATION_FACTOR = 0.33, l.ADAPTATION_LOWER_NODE_LIMIT = 1e3, l.ADAPTATION_UPPER_NODE_LIMIT = 5e3, l.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, l.MAX_NODE_DISPLACEMENT = l.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, l.CONVERGENCE_CHECK_PERIOD = 100, l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, l.MIN_EDGE_LENGTH = 1, l.GRID_CALCULATION_CHECK_PERIOD = 10, k.exports = l;
|
|
260
|
-
},
|
|
261
|
-
/* 5 */
|
|
262
|
-
/***/
|
|
263
|
-
function(k, gt, A) {
|
|
264
|
-
function T(l, n) {
|
|
265
|
-
l == null && n == null ? (this.x = 0, this.y = 0) : (this.x = l, this.y = n);
|
|
266
|
-
}
|
|
267
|
-
T.prototype.getX = function() {
|
|
268
|
-
return this.x;
|
|
269
|
-
}, T.prototype.getY = function() {
|
|
270
|
-
return this.y;
|
|
271
|
-
}, T.prototype.setX = function(l) {
|
|
272
|
-
this.x = l;
|
|
273
|
-
}, T.prototype.setY = function(l) {
|
|
274
|
-
this.y = l;
|
|
275
|
-
}, T.prototype.getDifference = function(l) {
|
|
276
|
-
return new DimensionD(this.x - l.x, this.y - l.y);
|
|
277
|
-
}, T.prototype.getCopy = function() {
|
|
278
|
-
return new T(this.x, this.y);
|
|
279
|
-
}, T.prototype.translate = function(l) {
|
|
280
|
-
return this.x += l.width, this.y += l.height, this;
|
|
281
|
-
}, k.exports = T;
|
|
282
|
-
},
|
|
283
|
-
/* 6 */
|
|
284
|
-
/***/
|
|
285
|
-
function(k, gt, A) {
|
|
286
|
-
var T = A(2), l = A(10), n = A(0), r = A(7), a = A(3), u = A(1), i = A(13), y = A(12), t = A(11);
|
|
287
|
-
function s(f, h, N) {
|
|
288
|
-
T.call(this, N), this.estimatedSize = l.MIN_VALUE, this.margin = n.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = f, h != null && h instanceof r ? this.graphManager = h : h != null && h instanceof Layout && (this.graphManager = h.graphManager);
|
|
289
|
-
}
|
|
290
|
-
s.prototype = Object.create(T.prototype);
|
|
291
|
-
for (var o in T)
|
|
292
|
-
s[o] = T[o];
|
|
293
|
-
s.prototype.getNodes = function() {
|
|
294
|
-
return this.nodes;
|
|
295
|
-
}, s.prototype.getEdges = function() {
|
|
296
|
-
return this.edges;
|
|
297
|
-
}, s.prototype.getGraphManager = function() {
|
|
298
|
-
return this.graphManager;
|
|
299
|
-
}, s.prototype.getParent = function() {
|
|
300
|
-
return this.parent;
|
|
301
|
-
}, s.prototype.getLeft = function() {
|
|
302
|
-
return this.left;
|
|
303
|
-
}, s.prototype.getRight = function() {
|
|
304
|
-
return this.right;
|
|
305
|
-
}, s.prototype.getTop = function() {
|
|
306
|
-
return this.top;
|
|
307
|
-
}, s.prototype.getBottom = function() {
|
|
308
|
-
return this.bottom;
|
|
309
|
-
}, s.prototype.isConnected = function() {
|
|
310
|
-
return this.isConnected;
|
|
311
|
-
}, s.prototype.add = function(f, h, N) {
|
|
312
|
-
if (h == null && N == null) {
|
|
313
|
-
var c = f;
|
|
314
|
-
if (this.graphManager == null)
|
|
315
|
-
throw "Graph has no graph mgr!";
|
|
316
|
-
if (this.getNodes().indexOf(c) > -1)
|
|
317
|
-
throw "Node already in graph!";
|
|
318
|
-
return c.owner = this, this.getNodes().push(c), c;
|
|
319
|
-
} else {
|
|
320
|
-
var d = f;
|
|
321
|
-
if (!(this.getNodes().indexOf(h) > -1 && this.getNodes().indexOf(N) > -1))
|
|
322
|
-
throw "Source or target not in graph!";
|
|
323
|
-
if (!(h.owner == N.owner && h.owner == this))
|
|
324
|
-
throw "Both owners must be this graph!";
|
|
325
|
-
return h.owner != N.owner ? null : (d.source = h, d.target = N, d.isInterGraph = !1, this.getEdges().push(d), h.edges.push(d), N != h && N.edges.push(d), d);
|
|
326
|
-
}
|
|
327
|
-
}, s.prototype.remove = function(f) {
|
|
328
|
-
var h = f;
|
|
329
|
-
if (f instanceof a) {
|
|
330
|
-
if (h == null)
|
|
331
|
-
throw "Node is null!";
|
|
332
|
-
if (!(h.owner != null && h.owner == this))
|
|
333
|
-
throw "Owner graph is invalid!";
|
|
334
|
-
if (this.graphManager == null)
|
|
335
|
-
throw "Owner graph manager is invalid!";
|
|
336
|
-
for (var N = h.edges.slice(), c, d = N.length, m = 0; m < d; m++)
|
|
337
|
-
c = N[m], c.isInterGraph ? this.graphManager.remove(c) : c.source.owner.remove(c);
|
|
338
|
-
var G = this.nodes.indexOf(h);
|
|
339
|
-
if (G == -1)
|
|
340
|
-
throw "Node not in owner node list!";
|
|
341
|
-
this.nodes.splice(G, 1);
|
|
342
|
-
} else if (f instanceof u) {
|
|
343
|
-
var c = f;
|
|
344
|
-
if (c == null)
|
|
345
|
-
throw "Edge is null!";
|
|
346
|
-
if (!(c.source != null && c.target != null))
|
|
347
|
-
throw "Source and/or target is null!";
|
|
348
|
-
if (!(c.source.owner != null && c.target.owner != null && c.source.owner == this && c.target.owner == this))
|
|
349
|
-
throw "Source and/or target owner is invalid!";
|
|
350
|
-
var L = c.source.edges.indexOf(c), U = c.target.edges.indexOf(c);
|
|
351
|
-
if (!(L > -1 && U > -1))
|
|
352
|
-
throw "Source and/or target doesn't know this edge!";
|
|
353
|
-
c.source.edges.splice(L, 1), c.target != c.source && c.target.edges.splice(U, 1);
|
|
354
|
-
var G = c.source.owner.getEdges().indexOf(c);
|
|
355
|
-
if (G == -1)
|
|
356
|
-
throw "Not in owner's edge list!";
|
|
357
|
-
c.source.owner.getEdges().splice(G, 1);
|
|
358
|
-
}
|
|
359
|
-
}, s.prototype.updateLeftTop = function() {
|
|
360
|
-
for (var f = l.MAX_VALUE, h = l.MAX_VALUE, N, c, d, m = this.getNodes(), G = m.length, L = 0; L < G; L++) {
|
|
361
|
-
var U = m[L];
|
|
362
|
-
N = U.getTop(), c = U.getLeft(), f > N && (f = N), h > c && (h = c);
|
|
363
|
-
}
|
|
364
|
-
return f == l.MAX_VALUE ? null : (m[0].getParent().paddingLeft != null ? d = m[0].getParent().paddingLeft : d = this.margin, this.left = h - d, this.top = f - d, new y(this.left, this.top));
|
|
365
|
-
}, s.prototype.updateBounds = function(f) {
|
|
366
|
-
for (var h = l.MAX_VALUE, N = -l.MAX_VALUE, c = l.MAX_VALUE, d = -l.MAX_VALUE, m, G, L, U, $, V = this.nodes, j = V.length, D = 0; D < j; D++) {
|
|
367
|
-
var et = V[D];
|
|
368
|
-
f && et.child != null && et.updateBounds(), m = et.getLeft(), G = et.getRight(), L = et.getTop(), U = et.getBottom(), h > m && (h = m), N < G && (N = G), c > L && (c = L), d < U && (d = U);
|
|
369
|
-
}
|
|
370
|
-
var e = new i(h, c, N - h, d - c);
|
|
371
|
-
h == l.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), V[0].getParent().paddingLeft != null ? $ = V[0].getParent().paddingLeft : $ = this.margin, this.left = e.x - $, this.right = e.x + e.width + $, this.top = e.y - $, this.bottom = e.y + e.height + $;
|
|
372
|
-
}, s.calculateBounds = function(f) {
|
|
373
|
-
for (var h = l.MAX_VALUE, N = -l.MAX_VALUE, c = l.MAX_VALUE, d = -l.MAX_VALUE, m, G, L, U, $ = f.length, V = 0; V < $; V++) {
|
|
374
|
-
var j = f[V];
|
|
375
|
-
m = j.getLeft(), G = j.getRight(), L = j.getTop(), U = j.getBottom(), h > m && (h = m), N < G && (N = G), c > L && (c = L), d < U && (d = U);
|
|
376
|
-
}
|
|
377
|
-
var D = new i(h, c, N - h, d - c);
|
|
378
|
-
return D;
|
|
379
|
-
}, s.prototype.getInclusionTreeDepth = function() {
|
|
380
|
-
return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
|
|
381
|
-
}, s.prototype.getEstimatedSize = function() {
|
|
382
|
-
if (this.estimatedSize == l.MIN_VALUE)
|
|
383
|
-
throw "assert failed";
|
|
384
|
-
return this.estimatedSize;
|
|
385
|
-
}, s.prototype.calcEstimatedSize = function() {
|
|
386
|
-
for (var f = 0, h = this.nodes, N = h.length, c = 0; c < N; c++) {
|
|
387
|
-
var d = h[c];
|
|
388
|
-
f += d.calcEstimatedSize();
|
|
389
|
-
}
|
|
390
|
-
return f == 0 ? this.estimatedSize = n.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = f / Math.sqrt(this.nodes.length), this.estimatedSize;
|
|
391
|
-
}, s.prototype.updateConnected = function() {
|
|
392
|
-
var f = this;
|
|
393
|
-
if (this.nodes.length == 0) {
|
|
394
|
-
this.isConnected = !0;
|
|
395
|
-
return;
|
|
396
|
-
}
|
|
397
|
-
var h = new t(), N = /* @__PURE__ */ new Set(), c = this.nodes[0], d, m, G = c.withChildren();
|
|
398
|
-
for (G.forEach(function(D) {
|
|
399
|
-
h.push(D), N.add(D);
|
|
400
|
-
}); h.length !== 0; ) {
|
|
401
|
-
c = h.shift(), d = c.getEdges();
|
|
402
|
-
for (var L = d.length, U = 0; U < L; U++) {
|
|
403
|
-
var $ = d[U];
|
|
404
|
-
if (m = $.getOtherEndInGraph(c, this), m != null && !N.has(m)) {
|
|
405
|
-
var V = m.withChildren();
|
|
406
|
-
V.forEach(function(D) {
|
|
407
|
-
h.push(D), N.add(D);
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
if (this.isConnected = !1, N.size >= this.nodes.length) {
|
|
413
|
-
var j = 0;
|
|
414
|
-
N.forEach(function(D) {
|
|
415
|
-
D.owner == f && j++;
|
|
416
|
-
}), j == this.nodes.length && (this.isConnected = !0);
|
|
417
|
-
}
|
|
418
|
-
}, k.exports = s;
|
|
419
|
-
},
|
|
420
|
-
/* 7 */
|
|
421
|
-
/***/
|
|
422
|
-
function(k, gt, A) {
|
|
423
|
-
var T, l = A(1);
|
|
424
|
-
function n(r) {
|
|
425
|
-
T = A(6), this.layout = r, this.graphs = [], this.edges = [];
|
|
426
|
-
}
|
|
427
|
-
n.prototype.addRoot = function() {
|
|
428
|
-
var r = this.layout.newGraph(), a = this.layout.newNode(null), u = this.add(r, a);
|
|
429
|
-
return this.setRootGraph(u), this.rootGraph;
|
|
430
|
-
}, n.prototype.add = function(r, a, u, i, y) {
|
|
431
|
-
if (u == null && i == null && y == null) {
|
|
432
|
-
if (r == null)
|
|
433
|
-
throw "Graph is null!";
|
|
434
|
-
if (a == null)
|
|
435
|
-
throw "Parent node is null!";
|
|
436
|
-
if (this.graphs.indexOf(r) > -1)
|
|
437
|
-
throw "Graph already in this graph mgr!";
|
|
438
|
-
if (this.graphs.push(r), r.parent != null)
|
|
439
|
-
throw "Already has a parent!";
|
|
440
|
-
if (a.child != null)
|
|
441
|
-
throw "Already has a child!";
|
|
442
|
-
return r.parent = a, a.child = r, r;
|
|
443
|
-
} else {
|
|
444
|
-
y = u, i = a, u = r;
|
|
445
|
-
var t = i.getOwner(), s = y.getOwner();
|
|
446
|
-
if (!(t != null && t.getGraphManager() == this))
|
|
447
|
-
throw "Source not in this graph mgr!";
|
|
448
|
-
if (!(s != null && s.getGraphManager() == this))
|
|
449
|
-
throw "Target not in this graph mgr!";
|
|
450
|
-
if (t == s)
|
|
451
|
-
return u.isInterGraph = !1, t.add(u, i, y);
|
|
452
|
-
if (u.isInterGraph = !0, u.source = i, u.target = y, this.edges.indexOf(u) > -1)
|
|
453
|
-
throw "Edge already in inter-graph edge list!";
|
|
454
|
-
if (this.edges.push(u), !(u.source != null && u.target != null))
|
|
455
|
-
throw "Edge source and/or target is null!";
|
|
456
|
-
if (!(u.source.edges.indexOf(u) == -1 && u.target.edges.indexOf(u) == -1))
|
|
457
|
-
throw "Edge already in source and/or target incidency list!";
|
|
458
|
-
return u.source.edges.push(u), u.target.edges.push(u), u;
|
|
459
|
-
}
|
|
460
|
-
}, n.prototype.remove = function(r) {
|
|
461
|
-
if (r instanceof T) {
|
|
462
|
-
var a = r;
|
|
463
|
-
if (a.getGraphManager() != this)
|
|
464
|
-
throw "Graph not in this graph mgr";
|
|
465
|
-
if (!(a == this.rootGraph || a.parent != null && a.parent.graphManager == this))
|
|
466
|
-
throw "Invalid parent node!";
|
|
467
|
-
var u = [];
|
|
468
|
-
u = u.concat(a.getEdges());
|
|
469
|
-
for (var i, y = u.length, t = 0; t < y; t++)
|
|
470
|
-
i = u[t], a.remove(i);
|
|
471
|
-
var s = [];
|
|
472
|
-
s = s.concat(a.getNodes());
|
|
473
|
-
var o;
|
|
474
|
-
y = s.length;
|
|
475
|
-
for (var t = 0; t < y; t++)
|
|
476
|
-
o = s[t], a.remove(o);
|
|
477
|
-
a == this.rootGraph && this.setRootGraph(null);
|
|
478
|
-
var f = this.graphs.indexOf(a);
|
|
479
|
-
this.graphs.splice(f, 1), a.parent = null;
|
|
480
|
-
} else if (r instanceof l) {
|
|
481
|
-
if (i = r, i == null)
|
|
482
|
-
throw "Edge is null!";
|
|
483
|
-
if (!i.isInterGraph)
|
|
484
|
-
throw "Not an inter-graph edge!";
|
|
485
|
-
if (!(i.source != null && i.target != null))
|
|
486
|
-
throw "Source and/or target is null!";
|
|
487
|
-
if (!(i.source.edges.indexOf(i) != -1 && i.target.edges.indexOf(i) != -1))
|
|
488
|
-
throw "Source and/or target doesn't know this edge!";
|
|
489
|
-
var f = i.source.edges.indexOf(i);
|
|
490
|
-
if (i.source.edges.splice(f, 1), f = i.target.edges.indexOf(i), i.target.edges.splice(f, 1), !(i.source.owner != null && i.source.owner.getGraphManager() != null))
|
|
491
|
-
throw "Edge owner graph or owner graph manager is null!";
|
|
492
|
-
if (i.source.owner.getGraphManager().edges.indexOf(i) == -1)
|
|
493
|
-
throw "Not in owner graph manager's edge list!";
|
|
494
|
-
var f = i.source.owner.getGraphManager().edges.indexOf(i);
|
|
495
|
-
i.source.owner.getGraphManager().edges.splice(f, 1);
|
|
496
|
-
}
|
|
497
|
-
}, n.prototype.updateBounds = function() {
|
|
498
|
-
this.rootGraph.updateBounds(!0);
|
|
499
|
-
}, n.prototype.getGraphs = function() {
|
|
500
|
-
return this.graphs;
|
|
501
|
-
}, n.prototype.getAllNodes = function() {
|
|
502
|
-
if (this.allNodes == null) {
|
|
503
|
-
for (var r = [], a = this.getGraphs(), u = a.length, i = 0; i < u; i++)
|
|
504
|
-
r = r.concat(a[i].getNodes());
|
|
505
|
-
this.allNodes = r;
|
|
506
|
-
}
|
|
507
|
-
return this.allNodes;
|
|
508
|
-
}, n.prototype.resetAllNodes = function() {
|
|
509
|
-
this.allNodes = null;
|
|
510
|
-
}, n.prototype.resetAllEdges = function() {
|
|
511
|
-
this.allEdges = null;
|
|
512
|
-
}, n.prototype.resetAllNodesToApplyGravitation = function() {
|
|
513
|
-
this.allNodesToApplyGravitation = null;
|
|
514
|
-
}, n.prototype.getAllEdges = function() {
|
|
515
|
-
if (this.allEdges == null) {
|
|
516
|
-
var r = [], a = this.getGraphs();
|
|
517
|
-
a.length;
|
|
518
|
-
for (var u = 0; u < a.length; u++)
|
|
519
|
-
r = r.concat(a[u].getEdges());
|
|
520
|
-
r = r.concat(this.edges), this.allEdges = r;
|
|
521
|
-
}
|
|
522
|
-
return this.allEdges;
|
|
523
|
-
}, n.prototype.getAllNodesToApplyGravitation = function() {
|
|
524
|
-
return this.allNodesToApplyGravitation;
|
|
525
|
-
}, n.prototype.setAllNodesToApplyGravitation = function(r) {
|
|
526
|
-
if (this.allNodesToApplyGravitation != null)
|
|
527
|
-
throw "assert failed";
|
|
528
|
-
this.allNodesToApplyGravitation = r;
|
|
529
|
-
}, n.prototype.getRoot = function() {
|
|
530
|
-
return this.rootGraph;
|
|
531
|
-
}, n.prototype.setRootGraph = function(r) {
|
|
532
|
-
if (r.getGraphManager() != this)
|
|
533
|
-
throw "Root not in this graph mgr!";
|
|
534
|
-
this.rootGraph = r, r.parent == null && (r.parent = this.layout.newNode("Root node"));
|
|
535
|
-
}, n.prototype.getLayout = function() {
|
|
536
|
-
return this.layout;
|
|
537
|
-
}, n.prototype.isOneAncestorOfOther = function(r, a) {
|
|
538
|
-
if (!(r != null && a != null))
|
|
539
|
-
throw "assert failed";
|
|
540
|
-
if (r == a)
|
|
541
|
-
return !0;
|
|
542
|
-
var u = r.getOwner(), i;
|
|
543
|
-
do {
|
|
544
|
-
if (i = u.getParent(), i == null)
|
|
545
|
-
break;
|
|
546
|
-
if (i == a)
|
|
547
|
-
return !0;
|
|
548
|
-
if (u = i.getOwner(), u == null)
|
|
549
|
-
break;
|
|
550
|
-
} while (!0);
|
|
551
|
-
u = a.getOwner();
|
|
552
|
-
do {
|
|
553
|
-
if (i = u.getParent(), i == null)
|
|
554
|
-
break;
|
|
555
|
-
if (i == r)
|
|
556
|
-
return !0;
|
|
557
|
-
if (u = i.getOwner(), u == null)
|
|
558
|
-
break;
|
|
559
|
-
} while (!0);
|
|
560
|
-
return !1;
|
|
561
|
-
}, n.prototype.calcLowestCommonAncestors = function() {
|
|
562
|
-
for (var r, a, u, i, y, t = this.getAllEdges(), s = t.length, o = 0; o < s; o++) {
|
|
563
|
-
if (r = t[o], a = r.source, u = r.target, r.lca = null, r.sourceInLca = a, r.targetInLca = u, a == u) {
|
|
564
|
-
r.lca = a.getOwner();
|
|
565
|
-
continue;
|
|
566
|
-
}
|
|
567
|
-
for (i = a.getOwner(); r.lca == null; ) {
|
|
568
|
-
for (r.targetInLca = u, y = u.getOwner(); r.lca == null; ) {
|
|
569
|
-
if (y == i) {
|
|
570
|
-
r.lca = y;
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
573
|
-
if (y == this.rootGraph)
|
|
574
|
-
break;
|
|
575
|
-
if (r.lca != null)
|
|
576
|
-
throw "assert failed";
|
|
577
|
-
r.targetInLca = y.getParent(), y = r.targetInLca.getOwner();
|
|
578
|
-
}
|
|
579
|
-
if (i == this.rootGraph)
|
|
580
|
-
break;
|
|
581
|
-
r.lca == null && (r.sourceInLca = i.getParent(), i = r.sourceInLca.getOwner());
|
|
582
|
-
}
|
|
583
|
-
if (r.lca == null)
|
|
584
|
-
throw "assert failed";
|
|
585
|
-
}
|
|
586
|
-
}, n.prototype.calcLowestCommonAncestor = function(r, a) {
|
|
587
|
-
if (r == a)
|
|
588
|
-
return r.getOwner();
|
|
589
|
-
var u = r.getOwner();
|
|
590
|
-
do {
|
|
591
|
-
if (u == null)
|
|
592
|
-
break;
|
|
593
|
-
var i = a.getOwner();
|
|
594
|
-
do {
|
|
595
|
-
if (i == null)
|
|
596
|
-
break;
|
|
597
|
-
if (i == u)
|
|
598
|
-
return i;
|
|
599
|
-
i = i.getParent().getOwner();
|
|
600
|
-
} while (!0);
|
|
601
|
-
u = u.getParent().getOwner();
|
|
602
|
-
} while (!0);
|
|
603
|
-
return u;
|
|
604
|
-
}, n.prototype.calcInclusionTreeDepths = function(r, a) {
|
|
605
|
-
r == null && a == null && (r = this.rootGraph, a = 1);
|
|
606
|
-
for (var u, i = r.getNodes(), y = i.length, t = 0; t < y; t++)
|
|
607
|
-
u = i[t], u.inclusionTreeDepth = a, u.child != null && this.calcInclusionTreeDepths(u.child, a + 1);
|
|
608
|
-
}, n.prototype.includesInvalidEdge = function() {
|
|
609
|
-
for (var r, a = [], u = this.edges.length, i = 0; i < u; i++)
|
|
610
|
-
r = this.edges[i], this.isOneAncestorOfOther(r.source, r.target) && a.push(r);
|
|
611
|
-
for (var i = 0; i < a.length; i++)
|
|
612
|
-
this.remove(a[i]);
|
|
613
|
-
return !1;
|
|
614
|
-
}, k.exports = n;
|
|
615
|
-
},
|
|
616
|
-
/* 8 */
|
|
617
|
-
/***/
|
|
618
|
-
function(k, gt, A) {
|
|
619
|
-
var T = A(12);
|
|
620
|
-
function l() {
|
|
621
|
-
}
|
|
622
|
-
l.calcSeparationAmount = function(n, r, a, u) {
|
|
623
|
-
if (!n.intersects(r))
|
|
624
|
-
throw "assert failed";
|
|
625
|
-
var i = new Array(2);
|
|
626
|
-
this.decideDirectionsForOverlappingNodes(n, r, i), a[0] = Math.min(n.getRight(), r.getRight()) - Math.max(n.x, r.x), a[1] = Math.min(n.getBottom(), r.getBottom()) - Math.max(n.y, r.y), n.getX() <= r.getX() && n.getRight() >= r.getRight() ? a[0] += Math.min(r.getX() - n.getX(), n.getRight() - r.getRight()) : r.getX() <= n.getX() && r.getRight() >= n.getRight() && (a[0] += Math.min(n.getX() - r.getX(), r.getRight() - n.getRight())), n.getY() <= r.getY() && n.getBottom() >= r.getBottom() ? a[1] += Math.min(r.getY() - n.getY(), n.getBottom() - r.getBottom()) : r.getY() <= n.getY() && r.getBottom() >= n.getBottom() && (a[1] += Math.min(n.getY() - r.getY(), r.getBottom() - n.getBottom()));
|
|
627
|
-
var y = Math.abs((r.getCenterY() - n.getCenterY()) / (r.getCenterX() - n.getCenterX()));
|
|
628
|
-
r.getCenterY() === n.getCenterY() && r.getCenterX() === n.getCenterX() && (y = 1);
|
|
629
|
-
var t = y * a[0], s = a[1] / y;
|
|
630
|
-
a[0] < s ? s = a[0] : t = a[1], a[0] = -1 * i[0] * (s / 2 + u), a[1] = -1 * i[1] * (t / 2 + u);
|
|
631
|
-
}, l.decideDirectionsForOverlappingNodes = function(n, r, a) {
|
|
632
|
-
n.getCenterX() < r.getCenterX() ? a[0] = -1 : a[0] = 1, n.getCenterY() < r.getCenterY() ? a[1] = -1 : a[1] = 1;
|
|
633
|
-
}, l.getIntersection2 = function(n, r, a) {
|
|
634
|
-
var u = n.getCenterX(), i = n.getCenterY(), y = r.getCenterX(), t = r.getCenterY();
|
|
635
|
-
if (n.intersects(r))
|
|
636
|
-
return a[0] = u, a[1] = i, a[2] = y, a[3] = t, !0;
|
|
637
|
-
var s = n.getX(), o = n.getY(), f = n.getRight(), h = n.getX(), N = n.getBottom(), c = n.getRight(), d = n.getWidthHalf(), m = n.getHeightHalf(), G = r.getX(), L = r.getY(), U = r.getRight(), $ = r.getX(), V = r.getBottom(), j = r.getRight(), D = r.getWidthHalf(), et = r.getHeightHalf(), e = !1, E = !1;
|
|
638
|
-
if (u === y) {
|
|
639
|
-
if (i > t)
|
|
640
|
-
return a[0] = u, a[1] = o, a[2] = y, a[3] = V, !1;
|
|
641
|
-
if (i < t)
|
|
642
|
-
return a[0] = u, a[1] = N, a[2] = y, a[3] = L, !1;
|
|
643
|
-
} else if (i === t) {
|
|
644
|
-
if (u > y)
|
|
645
|
-
return a[0] = s, a[1] = i, a[2] = U, a[3] = t, !1;
|
|
646
|
-
if (u < y)
|
|
647
|
-
return a[0] = f, a[1] = i, a[2] = G, a[3] = t, !1;
|
|
648
|
-
} else {
|
|
649
|
-
var g = n.height / n.width, p = r.height / r.width, v = (t - i) / (y - u), w = void 0, C = void 0, I = void 0, P = void 0, O = void 0, z = void 0;
|
|
650
|
-
if (-g === v ? u > y ? (a[0] = h, a[1] = N, e = !0) : (a[0] = f, a[1] = o, e = !0) : g === v && (u > y ? (a[0] = s, a[1] = o, e = !0) : (a[0] = c, a[1] = N, e = !0)), -p === v ? y > u ? (a[2] = $, a[3] = V, E = !0) : (a[2] = U, a[3] = L, E = !0) : p === v && (y > u ? (a[2] = G, a[3] = L, E = !0) : (a[2] = j, a[3] = V, E = !0)), e && E)
|
|
651
|
-
return !1;
|
|
652
|
-
if (u > y ? i > t ? (w = this.getCardinalDirection(g, v, 4), C = this.getCardinalDirection(p, v, 2)) : (w = this.getCardinalDirection(-g, v, 3), C = this.getCardinalDirection(-p, v, 1)) : i > t ? (w = this.getCardinalDirection(-g, v, 1), C = this.getCardinalDirection(-p, v, 3)) : (w = this.getCardinalDirection(g, v, 2), C = this.getCardinalDirection(p, v, 4)), !e)
|
|
653
|
-
switch (w) {
|
|
654
|
-
case 1:
|
|
655
|
-
P = o, I = u + -m / v, a[0] = I, a[1] = P;
|
|
656
|
-
break;
|
|
657
|
-
case 2:
|
|
658
|
-
I = c, P = i + d * v, a[0] = I, a[1] = P;
|
|
659
|
-
break;
|
|
660
|
-
case 3:
|
|
661
|
-
P = N, I = u + m / v, a[0] = I, a[1] = P;
|
|
662
|
-
break;
|
|
663
|
-
case 4:
|
|
664
|
-
I = h, P = i + -d * v, a[0] = I, a[1] = P;
|
|
665
|
-
break;
|
|
666
|
-
}
|
|
667
|
-
if (!E)
|
|
668
|
-
switch (C) {
|
|
669
|
-
case 1:
|
|
670
|
-
z = L, O = y + -et / v, a[2] = O, a[3] = z;
|
|
671
|
-
break;
|
|
672
|
-
case 2:
|
|
673
|
-
O = j, z = t + D * v, a[2] = O, a[3] = z;
|
|
674
|
-
break;
|
|
675
|
-
case 3:
|
|
676
|
-
z = V, O = y + et / v, a[2] = O, a[3] = z;
|
|
677
|
-
break;
|
|
678
|
-
case 4:
|
|
679
|
-
O = $, z = t + -D * v, a[2] = O, a[3] = z;
|
|
680
|
-
break;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
return !1;
|
|
684
|
-
}, l.getCardinalDirection = function(n, r, a) {
|
|
685
|
-
return n > r ? a : 1 + a % 4;
|
|
686
|
-
}, l.getIntersection = function(n, r, a, u) {
|
|
687
|
-
if (u == null)
|
|
688
|
-
return this.getIntersection2(n, r, a);
|
|
689
|
-
var i = n.x, y = n.y, t = r.x, s = r.y, o = a.x, f = a.y, h = u.x, N = u.y, c = void 0, d = void 0, m = void 0, G = void 0, L = void 0, U = void 0, $ = void 0, V = void 0, j = void 0;
|
|
690
|
-
return m = s - y, L = i - t, $ = t * y - i * s, G = N - f, U = o - h, V = h * f - o * N, j = m * U - G * L, j === 0 ? null : (c = (L * V - U * $) / j, d = (G * $ - m * V) / j, new T(c, d));
|
|
691
|
-
}, l.angleOfVector = function(n, r, a, u) {
|
|
692
|
-
var i = void 0;
|
|
693
|
-
return n !== a ? (i = Math.atan((u - r) / (a - n)), a < n ? i += Math.PI : u < r && (i += this.TWO_PI)) : u < r ? i = this.ONE_AND_HALF_PI : i = this.HALF_PI, i;
|
|
694
|
-
}, l.doIntersect = function(n, r, a, u) {
|
|
695
|
-
var i = n.x, y = n.y, t = r.x, s = r.y, o = a.x, f = a.y, h = u.x, N = u.y, c = (t - i) * (N - f) - (h - o) * (s - y);
|
|
696
|
-
if (c === 0)
|
|
697
|
-
return !1;
|
|
698
|
-
var d = ((N - f) * (h - i) + (o - h) * (N - y)) / c, m = ((y - s) * (h - i) + (t - i) * (N - y)) / c;
|
|
699
|
-
return 0 < d && d < 1 && 0 < m && m < 1;
|
|
700
|
-
}, l.findCircleLineIntersections = function(n, r, a, u, i, y, t) {
|
|
701
|
-
var s = (a - n) * (a - n) + (u - r) * (u - r), o = 2 * ((n - i) * (a - n) + (r - y) * (u - r)), f = (n - i) * (n - i) + (r - y) * (r - y) - t * t, h = o * o - 4 * s * f;
|
|
702
|
-
if (h >= 0) {
|
|
703
|
-
var N = (-o + Math.sqrt(o * o - 4 * s * f)) / (2 * s), c = (-o - Math.sqrt(o * o - 4 * s * f)) / (2 * s), d = null;
|
|
704
|
-
return N >= 0 && N <= 1 ? [N] : c >= 0 && c <= 1 ? [c] : d;
|
|
705
|
-
} else return null;
|
|
706
|
-
}, l.HALF_PI = 0.5 * Math.PI, l.ONE_AND_HALF_PI = 1.5 * Math.PI, l.TWO_PI = 2 * Math.PI, l.THREE_PI = 3 * Math.PI, k.exports = l;
|
|
707
|
-
},
|
|
708
|
-
/* 9 */
|
|
709
|
-
/***/
|
|
710
|
-
function(k, gt, A) {
|
|
711
|
-
function T() {
|
|
712
|
-
}
|
|
713
|
-
T.sign = function(l) {
|
|
714
|
-
return l > 0 ? 1 : l < 0 ? -1 : 0;
|
|
715
|
-
}, T.floor = function(l) {
|
|
716
|
-
return l < 0 ? Math.ceil(l) : Math.floor(l);
|
|
717
|
-
}, T.ceil = function(l) {
|
|
718
|
-
return l < 0 ? Math.floor(l) : Math.ceil(l);
|
|
719
|
-
}, k.exports = T;
|
|
720
|
-
},
|
|
721
|
-
/* 10 */
|
|
722
|
-
/***/
|
|
723
|
-
function(k, gt, A) {
|
|
724
|
-
function T() {
|
|
725
|
-
}
|
|
726
|
-
T.MAX_VALUE = 2147483647, T.MIN_VALUE = -2147483648, k.exports = T;
|
|
727
|
-
},
|
|
728
|
-
/* 11 */
|
|
729
|
-
/***/
|
|
730
|
-
function(k, gt, A) {
|
|
731
|
-
var T = /* @__PURE__ */ function() {
|
|
732
|
-
function i(y, t) {
|
|
733
|
-
for (var s = 0; s < t.length; s++) {
|
|
734
|
-
var o = t[s];
|
|
735
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(y, o.key, o);
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
return function(y, t, s) {
|
|
739
|
-
return t && i(y.prototype, t), s && i(y, s), y;
|
|
740
|
-
};
|
|
741
|
-
}();
|
|
742
|
-
function l(i, y) {
|
|
743
|
-
if (!(i instanceof y))
|
|
744
|
-
throw new TypeError("Cannot call a class as a function");
|
|
745
|
-
}
|
|
746
|
-
var n = function(y) {
|
|
747
|
-
return { value: y, next: null, prev: null };
|
|
748
|
-
}, r = function(y, t, s, o) {
|
|
749
|
-
return y !== null ? y.next = t : o.head = t, s !== null ? s.prev = t : o.tail = t, t.prev = y, t.next = s, o.length++, t;
|
|
750
|
-
}, a = function(y, t) {
|
|
751
|
-
var s = y.prev, o = y.next;
|
|
752
|
-
return s !== null ? s.next = o : t.head = o, o !== null ? o.prev = s : t.tail = s, y.prev = y.next = null, t.length--, y;
|
|
753
|
-
}, u = function() {
|
|
754
|
-
function i(y) {
|
|
755
|
-
var t = this;
|
|
756
|
-
l(this, i), this.length = 0, this.head = null, this.tail = null, y != null && y.forEach(function(s) {
|
|
757
|
-
return t.push(s);
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
return T(i, [{
|
|
761
|
-
key: "size",
|
|
762
|
-
value: function() {
|
|
763
|
-
return this.length;
|
|
764
|
-
}
|
|
765
|
-
}, {
|
|
766
|
-
key: "insertBefore",
|
|
767
|
-
value: function(t, s) {
|
|
768
|
-
return r(s.prev, n(t), s, this);
|
|
769
|
-
}
|
|
770
|
-
}, {
|
|
771
|
-
key: "insertAfter",
|
|
772
|
-
value: function(t, s) {
|
|
773
|
-
return r(s, n(t), s.next, this);
|
|
774
|
-
}
|
|
775
|
-
}, {
|
|
776
|
-
key: "insertNodeBefore",
|
|
777
|
-
value: function(t, s) {
|
|
778
|
-
return r(s.prev, t, s, this);
|
|
779
|
-
}
|
|
780
|
-
}, {
|
|
781
|
-
key: "insertNodeAfter",
|
|
782
|
-
value: function(t, s) {
|
|
783
|
-
return r(s, t, s.next, this);
|
|
784
|
-
}
|
|
785
|
-
}, {
|
|
786
|
-
key: "push",
|
|
787
|
-
value: function(t) {
|
|
788
|
-
return r(this.tail, n(t), null, this);
|
|
789
|
-
}
|
|
790
|
-
}, {
|
|
791
|
-
key: "unshift",
|
|
792
|
-
value: function(t) {
|
|
793
|
-
return r(null, n(t), this.head, this);
|
|
794
|
-
}
|
|
795
|
-
}, {
|
|
796
|
-
key: "remove",
|
|
797
|
-
value: function(t) {
|
|
798
|
-
return a(t, this);
|
|
799
|
-
}
|
|
800
|
-
}, {
|
|
801
|
-
key: "pop",
|
|
802
|
-
value: function() {
|
|
803
|
-
return a(this.tail, this).value;
|
|
804
|
-
}
|
|
805
|
-
}, {
|
|
806
|
-
key: "popNode",
|
|
807
|
-
value: function() {
|
|
808
|
-
return a(this.tail, this);
|
|
809
|
-
}
|
|
810
|
-
}, {
|
|
811
|
-
key: "shift",
|
|
812
|
-
value: function() {
|
|
813
|
-
return a(this.head, this).value;
|
|
814
|
-
}
|
|
815
|
-
}, {
|
|
816
|
-
key: "shiftNode",
|
|
817
|
-
value: function() {
|
|
818
|
-
return a(this.head, this);
|
|
819
|
-
}
|
|
820
|
-
}, {
|
|
821
|
-
key: "get_object_at",
|
|
822
|
-
value: function(t) {
|
|
823
|
-
if (t <= this.length()) {
|
|
824
|
-
for (var s = 1, o = this.head; s < t; )
|
|
825
|
-
o = o.next, s++;
|
|
826
|
-
return o.value;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
}, {
|
|
830
|
-
key: "set_object_at",
|
|
831
|
-
value: function(t, s) {
|
|
832
|
-
if (t <= this.length()) {
|
|
833
|
-
for (var o = 1, f = this.head; o < t; )
|
|
834
|
-
f = f.next, o++;
|
|
835
|
-
f.value = s;
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
}]), i;
|
|
839
|
-
}();
|
|
840
|
-
k.exports = u;
|
|
841
|
-
},
|
|
842
|
-
/* 12 */
|
|
843
|
-
/***/
|
|
844
|
-
function(k, gt, A) {
|
|
845
|
-
function T(l, n, r) {
|
|
846
|
-
this.x = null, this.y = null, l == null && n == null && r == null ? (this.x = 0, this.y = 0) : typeof l == "number" && typeof n == "number" && r == null ? (this.x = l, this.y = n) : l.constructor.name == "Point" && n == null && r == null && (r = l, this.x = r.x, this.y = r.y);
|
|
847
|
-
}
|
|
848
|
-
T.prototype.getX = function() {
|
|
849
|
-
return this.x;
|
|
850
|
-
}, T.prototype.getY = function() {
|
|
851
|
-
return this.y;
|
|
852
|
-
}, T.prototype.getLocation = function() {
|
|
853
|
-
return new T(this.x, this.y);
|
|
854
|
-
}, T.prototype.setLocation = function(l, n, r) {
|
|
855
|
-
l.constructor.name == "Point" && n == null && r == null ? (r = l, this.setLocation(r.x, r.y)) : typeof l == "number" && typeof n == "number" && r == null && (parseInt(l) == l && parseInt(n) == n ? this.move(l, n) : (this.x = Math.floor(l + 0.5), this.y = Math.floor(n + 0.5)));
|
|
856
|
-
}, T.prototype.move = function(l, n) {
|
|
857
|
-
this.x = l, this.y = n;
|
|
858
|
-
}, T.prototype.translate = function(l, n) {
|
|
859
|
-
this.x += l, this.y += n;
|
|
860
|
-
}, T.prototype.equals = function(l) {
|
|
861
|
-
if (l.constructor.name == "Point") {
|
|
862
|
-
var n = l;
|
|
863
|
-
return this.x == n.x && this.y == n.y;
|
|
864
|
-
}
|
|
865
|
-
return this == l;
|
|
866
|
-
}, T.prototype.toString = function() {
|
|
867
|
-
return new T().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
|
|
868
|
-
}, k.exports = T;
|
|
869
|
-
},
|
|
870
|
-
/* 13 */
|
|
871
|
-
/***/
|
|
872
|
-
function(k, gt, A) {
|
|
873
|
-
function T(l, n, r, a) {
|
|
874
|
-
this.x = 0, this.y = 0, this.width = 0, this.height = 0, l != null && n != null && r != null && a != null && (this.x = l, this.y = n, this.width = r, this.height = a);
|
|
875
|
-
}
|
|
876
|
-
T.prototype.getX = function() {
|
|
877
|
-
return this.x;
|
|
878
|
-
}, T.prototype.setX = function(l) {
|
|
879
|
-
this.x = l;
|
|
880
|
-
}, T.prototype.getY = function() {
|
|
881
|
-
return this.y;
|
|
882
|
-
}, T.prototype.setY = function(l) {
|
|
883
|
-
this.y = l;
|
|
884
|
-
}, T.prototype.getWidth = function() {
|
|
885
|
-
return this.width;
|
|
886
|
-
}, T.prototype.setWidth = function(l) {
|
|
887
|
-
this.width = l;
|
|
888
|
-
}, T.prototype.getHeight = function() {
|
|
889
|
-
return this.height;
|
|
890
|
-
}, T.prototype.setHeight = function(l) {
|
|
891
|
-
this.height = l;
|
|
892
|
-
}, T.prototype.getRight = function() {
|
|
893
|
-
return this.x + this.width;
|
|
894
|
-
}, T.prototype.getBottom = function() {
|
|
895
|
-
return this.y + this.height;
|
|
896
|
-
}, T.prototype.intersects = function(l) {
|
|
897
|
-
return !(this.getRight() < l.x || this.getBottom() < l.y || l.getRight() < this.x || l.getBottom() < this.y);
|
|
898
|
-
}, T.prototype.getCenterX = function() {
|
|
899
|
-
return this.x + this.width / 2;
|
|
900
|
-
}, T.prototype.getMinX = function() {
|
|
901
|
-
return this.getX();
|
|
902
|
-
}, T.prototype.getMaxX = function() {
|
|
903
|
-
return this.getX() + this.width;
|
|
904
|
-
}, T.prototype.getCenterY = function() {
|
|
905
|
-
return this.y + this.height / 2;
|
|
906
|
-
}, T.prototype.getMinY = function() {
|
|
907
|
-
return this.getY();
|
|
908
|
-
}, T.prototype.getMaxY = function() {
|
|
909
|
-
return this.getY() + this.height;
|
|
910
|
-
}, T.prototype.getWidthHalf = function() {
|
|
911
|
-
return this.width / 2;
|
|
912
|
-
}, T.prototype.getHeightHalf = function() {
|
|
913
|
-
return this.height / 2;
|
|
914
|
-
}, k.exports = T;
|
|
915
|
-
},
|
|
916
|
-
/* 14 */
|
|
917
|
-
/***/
|
|
918
|
-
function(k, gt, A) {
|
|
919
|
-
var T = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
920
|
-
return typeof n;
|
|
921
|
-
} : function(n) {
|
|
922
|
-
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
923
|
-
};
|
|
924
|
-
function l() {
|
|
925
|
-
}
|
|
926
|
-
l.lastID = 0, l.createID = function(n) {
|
|
927
|
-
return l.isPrimitive(n) ? n : (n.uniqueID != null || (n.uniqueID = l.getString(), l.lastID++), n.uniqueID);
|
|
928
|
-
}, l.getString = function(n) {
|
|
929
|
-
return n == null && (n = l.lastID), "Object#" + n;
|
|
930
|
-
}, l.isPrimitive = function(n) {
|
|
931
|
-
var r = typeof n > "u" ? "undefined" : T(n);
|
|
932
|
-
return n == null || r != "object" && r != "function";
|
|
933
|
-
}, k.exports = l;
|
|
934
|
-
},
|
|
935
|
-
/* 15 */
|
|
936
|
-
/***/
|
|
937
|
-
function(k, gt, A) {
|
|
938
|
-
function T(o) {
|
|
939
|
-
if (Array.isArray(o)) {
|
|
940
|
-
for (var f = 0, h = Array(o.length); f < o.length; f++)
|
|
941
|
-
h[f] = o[f];
|
|
942
|
-
return h;
|
|
943
|
-
} else
|
|
944
|
-
return Array.from(o);
|
|
945
|
-
}
|
|
946
|
-
var l = A(0), n = A(7), r = A(3), a = A(1), u = A(6), i = A(5), y = A(17), t = A(29);
|
|
947
|
-
function s(o) {
|
|
948
|
-
t.call(this), this.layoutQuality = l.QUALITY, this.createBendsAsNeeded = l.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = l.DEFAULT_INCREMENTAL, this.animationOnLayout = l.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = l.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = l.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = l.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new n(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, o != null && (this.isRemoteUse = o);
|
|
949
|
-
}
|
|
950
|
-
s.RANDOM_SEED = 1, s.prototype = Object.create(t.prototype), s.prototype.getGraphManager = function() {
|
|
951
|
-
return this.graphManager;
|
|
952
|
-
}, s.prototype.getAllNodes = function() {
|
|
953
|
-
return this.graphManager.getAllNodes();
|
|
954
|
-
}, s.prototype.getAllEdges = function() {
|
|
955
|
-
return this.graphManager.getAllEdges();
|
|
956
|
-
}, s.prototype.getAllNodesToApplyGravitation = function() {
|
|
957
|
-
return this.graphManager.getAllNodesToApplyGravitation();
|
|
958
|
-
}, s.prototype.newGraphManager = function() {
|
|
959
|
-
var o = new n(this);
|
|
960
|
-
return this.graphManager = o, o;
|
|
961
|
-
}, s.prototype.newGraph = function(o) {
|
|
962
|
-
return new u(null, this.graphManager, o);
|
|
963
|
-
}, s.prototype.newNode = function(o) {
|
|
964
|
-
return new r(this.graphManager, o);
|
|
965
|
-
}, s.prototype.newEdge = function(o) {
|
|
966
|
-
return new a(null, null, o);
|
|
967
|
-
}, s.prototype.checkLayoutSuccess = function() {
|
|
968
|
-
return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
|
|
969
|
-
}, s.prototype.runLayout = function() {
|
|
970
|
-
this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
|
|
971
|
-
var o;
|
|
972
|
-
return this.checkLayoutSuccess() ? o = !1 : o = this.layout(), l.ANIMATE === "during" ? !1 : (o && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, o);
|
|
973
|
-
}, s.prototype.doPostLayout = function() {
|
|
974
|
-
this.incremental || this.transform(), this.update();
|
|
975
|
-
}, s.prototype.update2 = function() {
|
|
976
|
-
if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
|
|
977
|
-
for (var o = this.graphManager.getAllEdges(), f = 0; f < o.length; f++)
|
|
978
|
-
o[f];
|
|
979
|
-
for (var h = this.graphManager.getRoot().getNodes(), f = 0; f < h.length; f++)
|
|
980
|
-
h[f];
|
|
981
|
-
this.update(this.graphManager.getRoot());
|
|
982
|
-
}
|
|
983
|
-
}, s.prototype.update = function(o) {
|
|
984
|
-
if (o == null)
|
|
985
|
-
this.update2();
|
|
986
|
-
else if (o instanceof r) {
|
|
987
|
-
var f = o;
|
|
988
|
-
if (f.getChild() != null)
|
|
989
|
-
for (var h = f.getChild().getNodes(), N = 0; N < h.length; N++)
|
|
990
|
-
update(h[N]);
|
|
991
|
-
if (f.vGraphObject != null) {
|
|
992
|
-
var c = f.vGraphObject;
|
|
993
|
-
c.update(f);
|
|
994
|
-
}
|
|
995
|
-
} else if (o instanceof a) {
|
|
996
|
-
var d = o;
|
|
997
|
-
if (d.vGraphObject != null) {
|
|
998
|
-
var m = d.vGraphObject;
|
|
999
|
-
m.update(d);
|
|
1000
|
-
}
|
|
1001
|
-
} else if (o instanceof u) {
|
|
1002
|
-
var G = o;
|
|
1003
|
-
if (G.vGraphObject != null) {
|
|
1004
|
-
var L = G.vGraphObject;
|
|
1005
|
-
L.update(G);
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
}, s.prototype.initParameters = function() {
|
|
1009
|
-
this.isSubLayout || (this.layoutQuality = l.QUALITY, this.animationDuringLayout = l.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = l.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = l.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = l.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = l.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = l.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
|
|
1010
|
-
}, s.prototype.transform = function(o) {
|
|
1011
|
-
if (o == null)
|
|
1012
|
-
this.transform(new i(0, 0));
|
|
1013
|
-
else {
|
|
1014
|
-
var f = new y(), h = this.graphManager.getRoot().updateLeftTop();
|
|
1015
|
-
if (h != null) {
|
|
1016
|
-
f.setWorldOrgX(o.x), f.setWorldOrgY(o.y), f.setDeviceOrgX(h.x), f.setDeviceOrgY(h.y);
|
|
1017
|
-
for (var N = this.getAllNodes(), c, d = 0; d < N.length; d++)
|
|
1018
|
-
c = N[d], c.transform(f);
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
}, s.prototype.positionNodesRandomly = function(o) {
|
|
1022
|
-
if (o == null)
|
|
1023
|
-
this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
|
|
1024
|
-
else
|
|
1025
|
-
for (var f, h, N = o.getNodes(), c = 0; c < N.length; c++)
|
|
1026
|
-
f = N[c], h = f.getChild(), h == null || h.getNodes().length == 0 ? f.scatter() : (this.positionNodesRandomly(h), f.updateBounds());
|
|
1027
|
-
}, s.prototype.getFlatForest = function() {
|
|
1028
|
-
for (var o = [], f = !0, h = this.graphManager.getRoot().getNodes(), N = !0, c = 0; c < h.length; c++)
|
|
1029
|
-
h[c].getChild() != null && (N = !1);
|
|
1030
|
-
if (!N)
|
|
1031
|
-
return o;
|
|
1032
|
-
var d = /* @__PURE__ */ new Set(), m = [], G = /* @__PURE__ */ new Map(), L = [];
|
|
1033
|
-
for (L = L.concat(h); L.length > 0 && f; ) {
|
|
1034
|
-
for (m.push(L[0]); m.length > 0 && f; ) {
|
|
1035
|
-
var U = m[0];
|
|
1036
|
-
m.splice(0, 1), d.add(U);
|
|
1037
|
-
for (var $ = U.getEdges(), c = 0; c < $.length; c++) {
|
|
1038
|
-
var V = $[c].getOtherEnd(U);
|
|
1039
|
-
if (G.get(U) != V)
|
|
1040
|
-
if (!d.has(V))
|
|
1041
|
-
m.push(V), G.set(V, U);
|
|
1042
|
-
else {
|
|
1043
|
-
f = !1;
|
|
1044
|
-
break;
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
if (!f)
|
|
1049
|
-
o = [];
|
|
1050
|
-
else {
|
|
1051
|
-
var j = [].concat(T(d));
|
|
1052
|
-
o.push(j);
|
|
1053
|
-
for (var c = 0; c < j.length; c++) {
|
|
1054
|
-
var D = j[c], et = L.indexOf(D);
|
|
1055
|
-
et > -1 && L.splice(et, 1);
|
|
1056
|
-
}
|
|
1057
|
-
d = /* @__PURE__ */ new Set(), G = /* @__PURE__ */ new Map();
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
return o;
|
|
1061
|
-
}, s.prototype.createDummyNodesForBendpoints = function(o) {
|
|
1062
|
-
for (var f = [], h = o.source, N = this.graphManager.calcLowestCommonAncestor(o.source, o.target), c = 0; c < o.bendpoints.length; c++) {
|
|
1063
|
-
var d = this.newNode(null);
|
|
1064
|
-
d.setRect(new Point(0, 0), new Dimension(1, 1)), N.add(d);
|
|
1065
|
-
var m = this.newEdge(null);
|
|
1066
|
-
this.graphManager.add(m, h, d), f.add(d), h = d;
|
|
1067
|
-
}
|
|
1068
|
-
var m = this.newEdge(null);
|
|
1069
|
-
return this.graphManager.add(m, h, o.target), this.edgeToDummyNodes.set(o, f), o.isInterGraph() ? this.graphManager.remove(o) : N.remove(o), f;
|
|
1070
|
-
}, s.prototype.createBendpointsFromDummyNodes = function() {
|
|
1071
|
-
var o = [];
|
|
1072
|
-
o = o.concat(this.graphManager.getAllEdges()), o = [].concat(T(this.edgeToDummyNodes.keys())).concat(o);
|
|
1073
|
-
for (var f = 0; f < o.length; f++) {
|
|
1074
|
-
var h = o[f];
|
|
1075
|
-
if (h.bendpoints.length > 0) {
|
|
1076
|
-
for (var N = this.edgeToDummyNodes.get(h), c = 0; c < N.length; c++) {
|
|
1077
|
-
var d = N[c], m = new i(d.getCenterX(), d.getCenterY()), G = h.bendpoints.get(c);
|
|
1078
|
-
G.x = m.x, G.y = m.y, d.getOwner().remove(d);
|
|
1079
|
-
}
|
|
1080
|
-
this.graphManager.add(h, h.source, h.target);
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
}, s.transform = function(o, f, h, N) {
|
|
1084
|
-
if (h != null && N != null) {
|
|
1085
|
-
var c = f;
|
|
1086
|
-
if (o <= 50) {
|
|
1087
|
-
var d = f / h;
|
|
1088
|
-
c -= (f - d) / 50 * (50 - o);
|
|
1089
|
-
} else {
|
|
1090
|
-
var m = f * N;
|
|
1091
|
-
c += (m - f) / 50 * (o - 50);
|
|
1092
|
-
}
|
|
1093
|
-
return c;
|
|
1094
|
-
} else {
|
|
1095
|
-
var G, L;
|
|
1096
|
-
return o <= 50 ? (G = 9 * f / 500, L = f / 10) : (G = 9 * f / 50, L = -8 * f), G * o + L;
|
|
1097
|
-
}
|
|
1098
|
-
}, s.findCenterOfTree = function(o) {
|
|
1099
|
-
var f = [];
|
|
1100
|
-
f = f.concat(o);
|
|
1101
|
-
var h = [], N = /* @__PURE__ */ new Map(), c = !1, d = null;
|
|
1102
|
-
(f.length == 1 || f.length == 2) && (c = !0, d = f[0]);
|
|
1103
|
-
for (var m = 0; m < f.length; m++) {
|
|
1104
|
-
var G = f[m], L = G.getNeighborsList().size;
|
|
1105
|
-
N.set(G, G.getNeighborsList().size), L == 1 && h.push(G);
|
|
1106
|
-
}
|
|
1107
|
-
var U = [];
|
|
1108
|
-
for (U = U.concat(h); !c; ) {
|
|
1109
|
-
var $ = [];
|
|
1110
|
-
$ = $.concat(U), U = [];
|
|
1111
|
-
for (var m = 0; m < f.length; m++) {
|
|
1112
|
-
var G = f[m], V = f.indexOf(G);
|
|
1113
|
-
V >= 0 && f.splice(V, 1);
|
|
1114
|
-
var j = G.getNeighborsList();
|
|
1115
|
-
j.forEach(function(e) {
|
|
1116
|
-
if (h.indexOf(e) < 0) {
|
|
1117
|
-
var E = N.get(e), g = E - 1;
|
|
1118
|
-
g == 1 && U.push(e), N.set(e, g);
|
|
1119
|
-
}
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
h = h.concat(U), (f.length == 1 || f.length == 2) && (c = !0, d = f[0]);
|
|
1123
|
-
}
|
|
1124
|
-
return d;
|
|
1125
|
-
}, s.prototype.setGraphManager = function(o) {
|
|
1126
|
-
this.graphManager = o;
|
|
1127
|
-
}, k.exports = s;
|
|
1128
|
-
},
|
|
1129
|
-
/* 16 */
|
|
1130
|
-
/***/
|
|
1131
|
-
function(k, gt, A) {
|
|
1132
|
-
function T() {
|
|
1133
|
-
}
|
|
1134
|
-
T.seed = 1, T.x = 0, T.nextDouble = function() {
|
|
1135
|
-
return T.x = Math.sin(T.seed++) * 1e4, T.x - Math.floor(T.x);
|
|
1136
|
-
}, k.exports = T;
|
|
1137
|
-
},
|
|
1138
|
-
/* 17 */
|
|
1139
|
-
/***/
|
|
1140
|
-
function(k, gt, A) {
|
|
1141
|
-
var T = A(5);
|
|
1142
|
-
function l(n, r) {
|
|
1143
|
-
this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
|
|
1144
|
-
}
|
|
1145
|
-
l.prototype.getWorldOrgX = function() {
|
|
1146
|
-
return this.lworldOrgX;
|
|
1147
|
-
}, l.prototype.setWorldOrgX = function(n) {
|
|
1148
|
-
this.lworldOrgX = n;
|
|
1149
|
-
}, l.prototype.getWorldOrgY = function() {
|
|
1150
|
-
return this.lworldOrgY;
|
|
1151
|
-
}, l.prototype.setWorldOrgY = function(n) {
|
|
1152
|
-
this.lworldOrgY = n;
|
|
1153
|
-
}, l.prototype.getWorldExtX = function() {
|
|
1154
|
-
return this.lworldExtX;
|
|
1155
|
-
}, l.prototype.setWorldExtX = function(n) {
|
|
1156
|
-
this.lworldExtX = n;
|
|
1157
|
-
}, l.prototype.getWorldExtY = function() {
|
|
1158
|
-
return this.lworldExtY;
|
|
1159
|
-
}, l.prototype.setWorldExtY = function(n) {
|
|
1160
|
-
this.lworldExtY = n;
|
|
1161
|
-
}, l.prototype.getDeviceOrgX = function() {
|
|
1162
|
-
return this.ldeviceOrgX;
|
|
1163
|
-
}, l.prototype.setDeviceOrgX = function(n) {
|
|
1164
|
-
this.ldeviceOrgX = n;
|
|
1165
|
-
}, l.prototype.getDeviceOrgY = function() {
|
|
1166
|
-
return this.ldeviceOrgY;
|
|
1167
|
-
}, l.prototype.setDeviceOrgY = function(n) {
|
|
1168
|
-
this.ldeviceOrgY = n;
|
|
1169
|
-
}, l.prototype.getDeviceExtX = function() {
|
|
1170
|
-
return this.ldeviceExtX;
|
|
1171
|
-
}, l.prototype.setDeviceExtX = function(n) {
|
|
1172
|
-
this.ldeviceExtX = n;
|
|
1173
|
-
}, l.prototype.getDeviceExtY = function() {
|
|
1174
|
-
return this.ldeviceExtY;
|
|
1175
|
-
}, l.prototype.setDeviceExtY = function(n) {
|
|
1176
|
-
this.ldeviceExtY = n;
|
|
1177
|
-
}, l.prototype.transformX = function(n) {
|
|
1178
|
-
var r = 0, a = this.lworldExtX;
|
|
1179
|
-
return a != 0 && (r = this.ldeviceOrgX + (n - this.lworldOrgX) * this.ldeviceExtX / a), r;
|
|
1180
|
-
}, l.prototype.transformY = function(n) {
|
|
1181
|
-
var r = 0, a = this.lworldExtY;
|
|
1182
|
-
return a != 0 && (r = this.ldeviceOrgY + (n - this.lworldOrgY) * this.ldeviceExtY / a), r;
|
|
1183
|
-
}, l.prototype.inverseTransformX = function(n) {
|
|
1184
|
-
var r = 0, a = this.ldeviceExtX;
|
|
1185
|
-
return a != 0 && (r = this.lworldOrgX + (n - this.ldeviceOrgX) * this.lworldExtX / a), r;
|
|
1186
|
-
}, l.prototype.inverseTransformY = function(n) {
|
|
1187
|
-
var r = 0, a = this.ldeviceExtY;
|
|
1188
|
-
return a != 0 && (r = this.lworldOrgY + (n - this.ldeviceOrgY) * this.lworldExtY / a), r;
|
|
1189
|
-
}, l.prototype.inverseTransformPoint = function(n) {
|
|
1190
|
-
var r = new T(this.inverseTransformX(n.x), this.inverseTransformY(n.y));
|
|
1191
|
-
return r;
|
|
1192
|
-
}, k.exports = l;
|
|
1193
|
-
},
|
|
1194
|
-
/* 18 */
|
|
1195
|
-
/***/
|
|
1196
|
-
function(k, gt, A) {
|
|
1197
|
-
function T(t) {
|
|
1198
|
-
if (Array.isArray(t)) {
|
|
1199
|
-
for (var s = 0, o = Array(t.length); s < t.length; s++)
|
|
1200
|
-
o[s] = t[s];
|
|
1201
|
-
return o;
|
|
1202
|
-
} else
|
|
1203
|
-
return Array.from(t);
|
|
1204
|
-
}
|
|
1205
|
-
var l = A(15), n = A(4), r = A(0), a = A(8), u = A(9);
|
|
1206
|
-
function i() {
|
|
1207
|
-
l.call(this), this.useSmartIdealEdgeLengthCalculation = n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = n.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = n.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = n.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * n.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = n.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = n.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = n.MAX_ITERATIONS;
|
|
1208
|
-
}
|
|
1209
|
-
i.prototype = Object.create(l.prototype);
|
|
1210
|
-
for (var y in l)
|
|
1211
|
-
i[y] = l[y];
|
|
1212
|
-
i.prototype.initParameters = function() {
|
|
1213
|
-
l.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
|
|
1214
|
-
}, i.prototype.calcIdealEdgeLengths = function() {
|
|
1215
|
-
for (var t, s, o, f, h, N, c, d = this.getGraphManager().getAllEdges(), m = 0; m < d.length; m++)
|
|
1216
|
-
t = d[m], s = t.idealLength, t.isInterGraph && (f = t.getSource(), h = t.getTarget(), N = t.getSourceInLca().getEstimatedSize(), c = t.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (t.idealLength += N + c - 2 * r.SIMPLE_NODE_SIZE), o = t.getLca().getInclusionTreeDepth(), t.idealLength += s * n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (f.getInclusionTreeDepth() + h.getInclusionTreeDepth() - 2 * o));
|
|
1217
|
-
}, i.prototype.initSpringEmbedder = function() {
|
|
1218
|
-
var t = this.getAllNodes().length;
|
|
1219
|
-
this.incremental ? (t > n.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * n.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (t - n.ADAPTATION_LOWER_NODE_LIMIT) / (n.ADAPTATION_UPPER_NODE_LIMIT - n.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - n.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = n.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (t > n.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(n.COOLING_ADAPTATION_FACTOR, 1 - (t - n.ADAPTATION_LOWER_NODE_LIMIT) / (n.ADAPTATION_UPPER_NODE_LIMIT - n.ADAPTATION_LOWER_NODE_LIMIT) * (1 - n.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = n.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * n.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
|
|
1220
|
-
}, i.prototype.calcSpringForces = function() {
|
|
1221
|
-
for (var t = this.getAllEdges(), s, o = 0; o < t.length; o++)
|
|
1222
|
-
s = t[o], this.calcSpringForce(s, s.idealLength);
|
|
1223
|
-
}, i.prototype.calcRepulsionForces = function() {
|
|
1224
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, o, f, h, N, c = this.getAllNodes(), d;
|
|
1225
|
-
if (this.useFRGridVariant)
|
|
1226
|
-
for (this.totalIterations % n.GRID_CALCULATION_CHECK_PERIOD == 1 && t && this.updateGrid(), d = /* @__PURE__ */ new Set(), o = 0; o < c.length; o++)
|
|
1227
|
-
h = c[o], this.calculateRepulsionForceOfANode(h, d, t, s), d.add(h);
|
|
1228
|
-
else
|
|
1229
|
-
for (o = 0; o < c.length; o++)
|
|
1230
|
-
for (h = c[o], f = o + 1; f < c.length; f++)
|
|
1231
|
-
N = c[f], h.getOwner() == N.getOwner() && this.calcRepulsionForce(h, N);
|
|
1232
|
-
}, i.prototype.calcGravitationalForces = function() {
|
|
1233
|
-
for (var t, s = this.getAllNodesToApplyGravitation(), o = 0; o < s.length; o++)
|
|
1234
|
-
t = s[o], this.calcGravitationalForce(t);
|
|
1235
|
-
}, i.prototype.moveNodes = function() {
|
|
1236
|
-
for (var t = this.getAllNodes(), s, o = 0; o < t.length; o++)
|
|
1237
|
-
s = t[o], s.move();
|
|
1238
|
-
}, i.prototype.calcSpringForce = function(t, s) {
|
|
1239
|
-
var o = t.getSource(), f = t.getTarget(), h, N, c, d;
|
|
1240
|
-
if (this.uniformLeafNodeSizes && o.getChild() == null && f.getChild() == null)
|
|
1241
|
-
t.updateLengthSimple();
|
|
1242
|
-
else if (t.updateLength(), t.isOverlapingSourceAndTarget)
|
|
1243
|
-
return;
|
|
1244
|
-
h = t.getLength(), h != 0 && (N = t.edgeElasticity * (h - s), c = N * (t.lengthX / h), d = N * (t.lengthY / h), o.springForceX += c, o.springForceY += d, f.springForceX -= c, f.springForceY -= d);
|
|
1245
|
-
}, i.prototype.calcRepulsionForce = function(t, s) {
|
|
1246
|
-
var o = t.getRect(), f = s.getRect(), h = new Array(2), N = new Array(4), c, d, m, G, L, U, $;
|
|
1247
|
-
if (o.intersects(f)) {
|
|
1248
|
-
a.calcSeparationAmount(o, f, h, n.DEFAULT_EDGE_LENGTH / 2), U = 2 * h[0], $ = 2 * h[1];
|
|
1249
|
-
var V = t.noOfChildren * s.noOfChildren / (t.noOfChildren + s.noOfChildren);
|
|
1250
|
-
t.repulsionForceX -= V * U, t.repulsionForceY -= V * $, s.repulsionForceX += V * U, s.repulsionForceY += V * $;
|
|
1251
|
-
} else
|
|
1252
|
-
this.uniformLeafNodeSizes && t.getChild() == null && s.getChild() == null ? (c = f.getCenterX() - o.getCenterX(), d = f.getCenterY() - o.getCenterY()) : (a.getIntersection(o, f, N), c = N[2] - N[0], d = N[3] - N[1]), Math.abs(c) < n.MIN_REPULSION_DIST && (c = u.sign(c) * n.MIN_REPULSION_DIST), Math.abs(d) < n.MIN_REPULSION_DIST && (d = u.sign(d) * n.MIN_REPULSION_DIST), m = c * c + d * d, G = Math.sqrt(m), L = (t.nodeRepulsion / 2 + s.nodeRepulsion / 2) * t.noOfChildren * s.noOfChildren / m, U = L * c / G, $ = L * d / G, t.repulsionForceX -= U, t.repulsionForceY -= $, s.repulsionForceX += U, s.repulsionForceY += $;
|
|
1253
|
-
}, i.prototype.calcGravitationalForce = function(t) {
|
|
1254
|
-
var s, o, f, h, N, c, d, m;
|
|
1255
|
-
s = t.getOwner(), o = (s.getRight() + s.getLeft()) / 2, f = (s.getTop() + s.getBottom()) / 2, h = t.getCenterX() - o, N = t.getCenterY() - f, c = Math.abs(h) + t.getWidth() / 2, d = Math.abs(N) + t.getHeight() / 2, t.getOwner() == this.graphManager.getRoot() ? (m = s.getEstimatedSize() * this.gravityRangeFactor, (c > m || d > m) && (t.gravitationForceX = -this.gravityConstant * h, t.gravitationForceY = -this.gravityConstant * N)) : (m = s.getEstimatedSize() * this.compoundGravityRangeFactor, (c > m || d > m) && (t.gravitationForceX = -this.gravityConstant * h * this.compoundGravityConstant, t.gravitationForceY = -this.gravityConstant * N * this.compoundGravityConstant));
|
|
1256
|
-
}, i.prototype.isConverged = function() {
|
|
1257
|
-
var t, s = !1;
|
|
1258
|
-
return this.totalIterations > this.maxIterations / 3 && (s = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), t = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, t || s;
|
|
1259
|
-
}, i.prototype.animate = function() {
|
|
1260
|
-
this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
|
|
1261
|
-
}, i.prototype.calcNoOfChildrenForAllNodes = function() {
|
|
1262
|
-
for (var t, s = this.graphManager.getAllNodes(), o = 0; o < s.length; o++)
|
|
1263
|
-
t = s[o], t.noOfChildren = t.getNoOfChildren();
|
|
1264
|
-
}, i.prototype.calcGrid = function(t) {
|
|
1265
|
-
var s = 0, o = 0;
|
|
1266
|
-
s = parseInt(Math.ceil((t.getRight() - t.getLeft()) / this.repulsionRange)), o = parseInt(Math.ceil((t.getBottom() - t.getTop()) / this.repulsionRange));
|
|
1267
|
-
for (var f = new Array(s), h = 0; h < s; h++)
|
|
1268
|
-
f[h] = new Array(o);
|
|
1269
|
-
for (var h = 0; h < s; h++)
|
|
1270
|
-
for (var N = 0; N < o; N++)
|
|
1271
|
-
f[h][N] = new Array();
|
|
1272
|
-
return f;
|
|
1273
|
-
}, i.prototype.addNodeToGrid = function(t, s, o) {
|
|
1274
|
-
var f = 0, h = 0, N = 0, c = 0;
|
|
1275
|
-
f = parseInt(Math.floor((t.getRect().x - s) / this.repulsionRange)), h = parseInt(Math.floor((t.getRect().width + t.getRect().x - s) / this.repulsionRange)), N = parseInt(Math.floor((t.getRect().y - o) / this.repulsionRange)), c = parseInt(Math.floor((t.getRect().height + t.getRect().y - o) / this.repulsionRange));
|
|
1276
|
-
for (var d = f; d <= h; d++)
|
|
1277
|
-
for (var m = N; m <= c; m++)
|
|
1278
|
-
this.grid[d][m].push(t), t.setGridCoordinates(f, h, N, c);
|
|
1279
|
-
}, i.prototype.updateGrid = function() {
|
|
1280
|
-
var t, s, o = this.getAllNodes();
|
|
1281
|
-
for (this.grid = this.calcGrid(this.graphManager.getRoot()), t = 0; t < o.length; t++)
|
|
1282
|
-
s = o[t], this.addNodeToGrid(s, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
|
|
1283
|
-
}, i.prototype.calculateRepulsionForceOfANode = function(t, s, o, f) {
|
|
1284
|
-
if (this.totalIterations % n.GRID_CALCULATION_CHECK_PERIOD == 1 && o || f) {
|
|
1285
|
-
var h = /* @__PURE__ */ new Set();
|
|
1286
|
-
t.surrounding = new Array();
|
|
1287
|
-
for (var N, c = this.grid, d = t.startX - 1; d < t.finishX + 2; d++)
|
|
1288
|
-
for (var m = t.startY - 1; m < t.finishY + 2; m++)
|
|
1289
|
-
if (!(d < 0 || m < 0 || d >= c.length || m >= c[0].length)) {
|
|
1290
|
-
for (var G = 0; G < c[d][m].length; G++)
|
|
1291
|
-
if (N = c[d][m][G], !(t.getOwner() != N.getOwner() || t == N) && !s.has(N) && !h.has(N)) {
|
|
1292
|
-
var L = Math.abs(t.getCenterX() - N.getCenterX()) - (t.getWidth() / 2 + N.getWidth() / 2), U = Math.abs(t.getCenterY() - N.getCenterY()) - (t.getHeight() / 2 + N.getHeight() / 2);
|
|
1293
|
-
L <= this.repulsionRange && U <= this.repulsionRange && h.add(N);
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
t.surrounding = [].concat(T(h));
|
|
1297
|
-
}
|
|
1298
|
-
for (d = 0; d < t.surrounding.length; d++)
|
|
1299
|
-
this.calcRepulsionForce(t, t.surrounding[d]);
|
|
1300
|
-
}, i.prototype.calcRepulsionRange = function() {
|
|
1301
|
-
return 0;
|
|
1302
|
-
}, k.exports = i;
|
|
1303
|
-
},
|
|
1304
|
-
/* 19 */
|
|
1305
|
-
/***/
|
|
1306
|
-
function(k, gt, A) {
|
|
1307
|
-
var T = A(1), l = A(4);
|
|
1308
|
-
function n(a, u, i) {
|
|
1309
|
-
T.call(this, a, u, i), this.idealLength = l.DEFAULT_EDGE_LENGTH, this.edgeElasticity = l.DEFAULT_SPRING_STRENGTH;
|
|
1310
|
-
}
|
|
1311
|
-
n.prototype = Object.create(T.prototype);
|
|
1312
|
-
for (var r in T)
|
|
1313
|
-
n[r] = T[r];
|
|
1314
|
-
k.exports = n;
|
|
1315
|
-
},
|
|
1316
|
-
/* 20 */
|
|
1317
|
-
/***/
|
|
1318
|
-
function(k, gt, A) {
|
|
1319
|
-
var T = A(3), l = A(4);
|
|
1320
|
-
function n(a, u, i, y) {
|
|
1321
|
-
T.call(this, a, u, i, y), this.nodeRepulsion = l.DEFAULT_REPULSION_STRENGTH, this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = [];
|
|
1322
|
-
}
|
|
1323
|
-
n.prototype = Object.create(T.prototype);
|
|
1324
|
-
for (var r in T)
|
|
1325
|
-
n[r] = T[r];
|
|
1326
|
-
n.prototype.setGridCoordinates = function(a, u, i, y) {
|
|
1327
|
-
this.startX = a, this.finishX = u, this.startY = i, this.finishY = y;
|
|
1328
|
-
}, k.exports = n;
|
|
1329
|
-
},
|
|
1330
|
-
/* 21 */
|
|
1331
|
-
/***/
|
|
1332
|
-
function(k, gt, A) {
|
|
1333
|
-
function T(l, n) {
|
|
1334
|
-
this.width = 0, this.height = 0, l !== null && n !== null && (this.height = n, this.width = l);
|
|
1335
|
-
}
|
|
1336
|
-
T.prototype.getWidth = function() {
|
|
1337
|
-
return this.width;
|
|
1338
|
-
}, T.prototype.setWidth = function(l) {
|
|
1339
|
-
this.width = l;
|
|
1340
|
-
}, T.prototype.getHeight = function() {
|
|
1341
|
-
return this.height;
|
|
1342
|
-
}, T.prototype.setHeight = function(l) {
|
|
1343
|
-
this.height = l;
|
|
1344
|
-
}, k.exports = T;
|
|
1345
|
-
},
|
|
1346
|
-
/* 22 */
|
|
1347
|
-
/***/
|
|
1348
|
-
function(k, gt, A) {
|
|
1349
|
-
var T = A(14);
|
|
1350
|
-
function l() {
|
|
1351
|
-
this.map = {}, this.keys = [];
|
|
1352
|
-
}
|
|
1353
|
-
l.prototype.put = function(n, r) {
|
|
1354
|
-
var a = T.createID(n);
|
|
1355
|
-
this.contains(a) || (this.map[a] = r, this.keys.push(n));
|
|
1356
|
-
}, l.prototype.contains = function(n) {
|
|
1357
|
-
return T.createID(n), this.map[n] != null;
|
|
1358
|
-
}, l.prototype.get = function(n) {
|
|
1359
|
-
var r = T.createID(n);
|
|
1360
|
-
return this.map[r];
|
|
1361
|
-
}, l.prototype.keySet = function() {
|
|
1362
|
-
return this.keys;
|
|
1363
|
-
}, k.exports = l;
|
|
1364
|
-
},
|
|
1365
|
-
/* 23 */
|
|
1366
|
-
/***/
|
|
1367
|
-
function(k, gt, A) {
|
|
1368
|
-
var T = A(14);
|
|
1369
|
-
function l() {
|
|
1370
|
-
this.set = {};
|
|
1371
|
-
}
|
|
1372
|
-
l.prototype.add = function(n) {
|
|
1373
|
-
var r = T.createID(n);
|
|
1374
|
-
this.contains(r) || (this.set[r] = n);
|
|
1375
|
-
}, l.prototype.remove = function(n) {
|
|
1376
|
-
delete this.set[T.createID(n)];
|
|
1377
|
-
}, l.prototype.clear = function() {
|
|
1378
|
-
this.set = {};
|
|
1379
|
-
}, l.prototype.contains = function(n) {
|
|
1380
|
-
return this.set[T.createID(n)] == n;
|
|
1381
|
-
}, l.prototype.isEmpty = function() {
|
|
1382
|
-
return this.size() === 0;
|
|
1383
|
-
}, l.prototype.size = function() {
|
|
1384
|
-
return Object.keys(this.set).length;
|
|
1385
|
-
}, l.prototype.addAllTo = function(n) {
|
|
1386
|
-
for (var r = Object.keys(this.set), a = r.length, u = 0; u < a; u++)
|
|
1387
|
-
n.push(this.set[r[u]]);
|
|
1388
|
-
}, l.prototype.size = function() {
|
|
1389
|
-
return Object.keys(this.set).length;
|
|
1390
|
-
}, l.prototype.addAll = function(n) {
|
|
1391
|
-
for (var r = n.length, a = 0; a < r; a++) {
|
|
1392
|
-
var u = n[a];
|
|
1393
|
-
this.add(u);
|
|
1394
|
-
}
|
|
1395
|
-
}, k.exports = l;
|
|
1396
|
-
},
|
|
1397
|
-
/* 24 */
|
|
1398
|
-
/***/
|
|
1399
|
-
function(k, gt, A) {
|
|
1400
|
-
function T() {
|
|
1401
|
-
}
|
|
1402
|
-
T.multMat = function(l, n) {
|
|
1403
|
-
for (var r = [], a = 0; a < l.length; a++) {
|
|
1404
|
-
r[a] = [];
|
|
1405
|
-
for (var u = 0; u < n[0].length; u++) {
|
|
1406
|
-
r[a][u] = 0;
|
|
1407
|
-
for (var i = 0; i < l[0].length; i++)
|
|
1408
|
-
r[a][u] += l[a][i] * n[i][u];
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
return r;
|
|
1412
|
-
}, T.transpose = function(l) {
|
|
1413
|
-
for (var n = [], r = 0; r < l[0].length; r++) {
|
|
1414
|
-
n[r] = [];
|
|
1415
|
-
for (var a = 0; a < l.length; a++)
|
|
1416
|
-
n[r][a] = l[a][r];
|
|
1417
|
-
}
|
|
1418
|
-
return n;
|
|
1419
|
-
}, T.multCons = function(l, n) {
|
|
1420
|
-
for (var r = [], a = 0; a < l.length; a++)
|
|
1421
|
-
r[a] = l[a] * n;
|
|
1422
|
-
return r;
|
|
1423
|
-
}, T.minusOp = function(l, n) {
|
|
1424
|
-
for (var r = [], a = 0; a < l.length; a++)
|
|
1425
|
-
r[a] = l[a] - n[a];
|
|
1426
|
-
return r;
|
|
1427
|
-
}, T.dotProduct = function(l, n) {
|
|
1428
|
-
for (var r = 0, a = 0; a < l.length; a++)
|
|
1429
|
-
r += l[a] * n[a];
|
|
1430
|
-
return r;
|
|
1431
|
-
}, T.mag = function(l) {
|
|
1432
|
-
return Math.sqrt(this.dotProduct(l, l));
|
|
1433
|
-
}, T.normalize = function(l) {
|
|
1434
|
-
for (var n = [], r = this.mag(l), a = 0; a < l.length; a++)
|
|
1435
|
-
n[a] = l[a] / r;
|
|
1436
|
-
return n;
|
|
1437
|
-
}, T.multGamma = function(l) {
|
|
1438
|
-
for (var n = [], r = 0, a = 0; a < l.length; a++)
|
|
1439
|
-
r += l[a];
|
|
1440
|
-
r *= -1 / l.length;
|
|
1441
|
-
for (var u = 0; u < l.length; u++)
|
|
1442
|
-
n[u] = r + l[u];
|
|
1443
|
-
return n;
|
|
1444
|
-
}, T.multL = function(l, n, r) {
|
|
1445
|
-
for (var a = [], u = [], i = [], y = 0; y < n[0].length; y++) {
|
|
1446
|
-
for (var t = 0, s = 0; s < n.length; s++)
|
|
1447
|
-
t += -0.5 * n[s][y] * l[s];
|
|
1448
|
-
u[y] = t;
|
|
1449
|
-
}
|
|
1450
|
-
for (var o = 0; o < r.length; o++) {
|
|
1451
|
-
for (var f = 0, h = 0; h < r.length; h++)
|
|
1452
|
-
f += r[o][h] * u[h];
|
|
1453
|
-
i[o] = f;
|
|
1454
|
-
}
|
|
1455
|
-
for (var N = 0; N < n.length; N++) {
|
|
1456
|
-
for (var c = 0, d = 0; d < n[0].length; d++)
|
|
1457
|
-
c += n[N][d] * i[d];
|
|
1458
|
-
a[N] = c;
|
|
1459
|
-
}
|
|
1460
|
-
return a;
|
|
1461
|
-
}, k.exports = T;
|
|
1462
|
-
},
|
|
1463
|
-
/* 25 */
|
|
1464
|
-
/***/
|
|
1465
|
-
function(k, gt, A) {
|
|
1466
|
-
var T = /* @__PURE__ */ function() {
|
|
1467
|
-
function a(u, i) {
|
|
1468
|
-
for (var y = 0; y < i.length; y++) {
|
|
1469
|
-
var t = i[y];
|
|
1470
|
-
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(u, t.key, t);
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
return function(u, i, y) {
|
|
1474
|
-
return i && a(u.prototype, i), y && a(u, y), u;
|
|
1475
|
-
};
|
|
1476
|
-
}();
|
|
1477
|
-
function l(a, u) {
|
|
1478
|
-
if (!(a instanceof u))
|
|
1479
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1480
|
-
}
|
|
1481
|
-
var n = A(11), r = function() {
|
|
1482
|
-
function a(u, i) {
|
|
1483
|
-
l(this, a), (i !== null || i !== void 0) && (this.compareFunction = this._defaultCompareFunction);
|
|
1484
|
-
var y = void 0;
|
|
1485
|
-
u instanceof n ? y = u.size() : y = u.length, this._quicksort(u, 0, y - 1);
|
|
1486
|
-
}
|
|
1487
|
-
return T(a, [{
|
|
1488
|
-
key: "_quicksort",
|
|
1489
|
-
value: function(i, y, t) {
|
|
1490
|
-
if (y < t) {
|
|
1491
|
-
var s = this._partition(i, y, t);
|
|
1492
|
-
this._quicksort(i, y, s), this._quicksort(i, s + 1, t);
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
}, {
|
|
1496
|
-
key: "_partition",
|
|
1497
|
-
value: function(i, y, t) {
|
|
1498
|
-
for (var s = this._get(i, y), o = y, f = t; ; ) {
|
|
1499
|
-
for (; this.compareFunction(s, this._get(i, f)); )
|
|
1500
|
-
f--;
|
|
1501
|
-
for (; this.compareFunction(this._get(i, o), s); )
|
|
1502
|
-
o++;
|
|
1503
|
-
if (o < f)
|
|
1504
|
-
this._swap(i, o, f), o++, f--;
|
|
1505
|
-
else return f;
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
}, {
|
|
1509
|
-
key: "_get",
|
|
1510
|
-
value: function(i, y) {
|
|
1511
|
-
return i instanceof n ? i.get_object_at(y) : i[y];
|
|
1512
|
-
}
|
|
1513
|
-
}, {
|
|
1514
|
-
key: "_set",
|
|
1515
|
-
value: function(i, y, t) {
|
|
1516
|
-
i instanceof n ? i.set_object_at(y, t) : i[y] = t;
|
|
1517
|
-
}
|
|
1518
|
-
}, {
|
|
1519
|
-
key: "_swap",
|
|
1520
|
-
value: function(i, y, t) {
|
|
1521
|
-
var s = this._get(i, y);
|
|
1522
|
-
this._set(i, y, this._get(i, t)), this._set(i, t, s);
|
|
1523
|
-
}
|
|
1524
|
-
}, {
|
|
1525
|
-
key: "_defaultCompareFunction",
|
|
1526
|
-
value: function(i, y) {
|
|
1527
|
-
return y > i;
|
|
1528
|
-
}
|
|
1529
|
-
}]), a;
|
|
1530
|
-
}();
|
|
1531
|
-
k.exports = r;
|
|
1532
|
-
},
|
|
1533
|
-
/* 26 */
|
|
1534
|
-
/***/
|
|
1535
|
-
function(k, gt, A) {
|
|
1536
|
-
function T() {
|
|
1537
|
-
}
|
|
1538
|
-
T.svd = function(l) {
|
|
1539
|
-
this.U = null, this.V = null, this.s = null, this.m = 0, this.n = 0, this.m = l.length, this.n = l[0].length;
|
|
1540
|
-
var n = Math.min(this.m, this.n);
|
|
1541
|
-
this.s = function(Et) {
|
|
1542
|
-
for (var Nt = []; Et-- > 0; )
|
|
1543
|
-
Nt.push(0);
|
|
1544
|
-
return Nt;
|
|
1545
|
-
}(Math.min(this.m + 1, this.n)), this.U = function(Et) {
|
|
1546
|
-
var Nt = function Xt(xt) {
|
|
1547
|
-
if (xt.length == 0)
|
|
1548
|
-
return 0;
|
|
1549
|
-
for (var Ht = [], It = 0; It < xt[0]; It++)
|
|
1550
|
-
Ht.push(Xt(xt.slice(1)));
|
|
1551
|
-
return Ht;
|
|
1552
|
-
};
|
|
1553
|
-
return Nt(Et);
|
|
1554
|
-
}([this.m, n]), this.V = function(Et) {
|
|
1555
|
-
var Nt = function Xt(xt) {
|
|
1556
|
-
if (xt.length == 0)
|
|
1557
|
-
return 0;
|
|
1558
|
-
for (var Ht = [], It = 0; It < xt[0]; It++)
|
|
1559
|
-
Ht.push(Xt(xt.slice(1)));
|
|
1560
|
-
return Ht;
|
|
1561
|
-
};
|
|
1562
|
-
return Nt(Et);
|
|
1563
|
-
}([this.n, this.n]);
|
|
1564
|
-
for (var r = function(Et) {
|
|
1565
|
-
for (var Nt = []; Et-- > 0; )
|
|
1566
|
-
Nt.push(0);
|
|
1567
|
-
return Nt;
|
|
1568
|
-
}(this.n), a = function(Et) {
|
|
1569
|
-
for (var Nt = []; Et-- > 0; )
|
|
1570
|
-
Nt.push(0);
|
|
1571
|
-
return Nt;
|
|
1572
|
-
}(this.m), u = !0, i = Math.min(this.m - 1, this.n), y = Math.max(0, Math.min(this.n - 2, this.m)), t = 0; t < Math.max(i, y); t++) {
|
|
1573
|
-
if (t < i) {
|
|
1574
|
-
this.s[t] = 0;
|
|
1575
|
-
for (var s = t; s < this.m; s++)
|
|
1576
|
-
this.s[t] = T.hypot(this.s[t], l[s][t]);
|
|
1577
|
-
if (this.s[t] !== 0) {
|
|
1578
|
-
l[t][t] < 0 && (this.s[t] = -this.s[t]);
|
|
1579
|
-
for (var o = t; o < this.m; o++)
|
|
1580
|
-
l[o][t] /= this.s[t];
|
|
1581
|
-
l[t][t] += 1;
|
|
1582
|
-
}
|
|
1583
|
-
this.s[t] = -this.s[t];
|
|
1584
|
-
}
|
|
1585
|
-
for (var f = t + 1; f < this.n; f++) {
|
|
1586
|
-
if (/* @__PURE__ */ function(Et, Nt) {
|
|
1587
|
-
return Et && Nt;
|
|
1588
|
-
}(t < i, this.s[t] !== 0)) {
|
|
1589
|
-
for (var h = 0, N = t; N < this.m; N++)
|
|
1590
|
-
h += l[N][t] * l[N][f];
|
|
1591
|
-
h = -h / l[t][t];
|
|
1592
|
-
for (var c = t; c < this.m; c++)
|
|
1593
|
-
l[c][f] += h * l[c][t];
|
|
1594
|
-
}
|
|
1595
|
-
r[f] = l[t][f];
|
|
1596
|
-
}
|
|
1597
|
-
if (/* @__PURE__ */ function(Et, Nt) {
|
|
1598
|
-
return Nt;
|
|
1599
|
-
}(u, t < i))
|
|
1600
|
-
for (var d = t; d < this.m; d++)
|
|
1601
|
-
this.U[d][t] = l[d][t];
|
|
1602
|
-
if (t < y) {
|
|
1603
|
-
r[t] = 0;
|
|
1604
|
-
for (var m = t + 1; m < this.n; m++)
|
|
1605
|
-
r[t] = T.hypot(r[t], r[m]);
|
|
1606
|
-
if (r[t] !== 0) {
|
|
1607
|
-
r[t + 1] < 0 && (r[t] = -r[t]);
|
|
1608
|
-
for (var G = t + 1; G < this.n; G++)
|
|
1609
|
-
r[G] /= r[t];
|
|
1610
|
-
r[t + 1] += 1;
|
|
1611
|
-
}
|
|
1612
|
-
if (r[t] = -r[t], /* @__PURE__ */ function(Et, Nt) {
|
|
1613
|
-
return Et && Nt;
|
|
1614
|
-
}(t + 1 < this.m, r[t] !== 0)) {
|
|
1615
|
-
for (var L = t + 1; L < this.m; L++)
|
|
1616
|
-
a[L] = 0;
|
|
1617
|
-
for (var U = t + 1; U < this.n; U++)
|
|
1618
|
-
for (var $ = t + 1; $ < this.m; $++)
|
|
1619
|
-
a[$] += r[U] * l[$][U];
|
|
1620
|
-
for (var V = t + 1; V < this.n; V++)
|
|
1621
|
-
for (var j = -r[V] / r[t + 1], D = t + 1; D < this.m; D++)
|
|
1622
|
-
l[D][V] += j * a[D];
|
|
1623
|
-
}
|
|
1624
|
-
for (var et = t + 1; et < this.n; et++)
|
|
1625
|
-
this.V[et][t] = r[et];
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
var e = Math.min(this.n, this.m + 1);
|
|
1629
|
-
i < this.n && (this.s[i] = l[i][i]), this.m < e && (this.s[e - 1] = 0), y + 1 < e && (r[y] = l[y][e - 1]), r[e - 1] = 0;
|
|
1630
|
-
{
|
|
1631
|
-
for (var E = i; E < n; E++) {
|
|
1632
|
-
for (var g = 0; g < this.m; g++)
|
|
1633
|
-
this.U[g][E] = 0;
|
|
1634
|
-
this.U[E][E] = 1;
|
|
1635
|
-
}
|
|
1636
|
-
for (var p = i - 1; p >= 0; p--)
|
|
1637
|
-
if (this.s[p] !== 0) {
|
|
1638
|
-
for (var v = p + 1; v < n; v++) {
|
|
1639
|
-
for (var w = 0, C = p; C < this.m; C++)
|
|
1640
|
-
w += this.U[C][p] * this.U[C][v];
|
|
1641
|
-
w = -w / this.U[p][p];
|
|
1642
|
-
for (var I = p; I < this.m; I++)
|
|
1643
|
-
this.U[I][v] += w * this.U[I][p];
|
|
1644
|
-
}
|
|
1645
|
-
for (var P = p; P < this.m; P++)
|
|
1646
|
-
this.U[P][p] = -this.U[P][p];
|
|
1647
|
-
this.U[p][p] = 1 + this.U[p][p];
|
|
1648
|
-
for (var O = 0; O < p - 1; O++)
|
|
1649
|
-
this.U[O][p] = 0;
|
|
1650
|
-
} else {
|
|
1651
|
-
for (var z = 0; z < this.m; z++)
|
|
1652
|
-
this.U[z][p] = 0;
|
|
1653
|
-
this.U[p][p] = 1;
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
for (var b = this.n - 1; b >= 0; b--) {
|
|
1657
|
-
if (/* @__PURE__ */ function(Et, Nt) {
|
|
1658
|
-
return Et && Nt;
|
|
1659
|
-
}(b < y, r[b] !== 0))
|
|
1660
|
-
for (var F = b + 1; F < n; F++) {
|
|
1661
|
-
for (var J = 0, Y = b + 1; Y < this.n; Y++)
|
|
1662
|
-
J += this.V[Y][b] * this.V[Y][F];
|
|
1663
|
-
J = -J / this.V[b + 1][b];
|
|
1664
|
-
for (var M = b + 1; M < this.n; M++)
|
|
1665
|
-
this.V[M][F] += J * this.V[M][b];
|
|
1666
|
-
}
|
|
1667
|
-
for (var S = 0; S < this.n; S++)
|
|
1668
|
-
this.V[S][b] = 0;
|
|
1669
|
-
this.V[b][b] = 1;
|
|
1670
|
-
}
|
|
1671
|
-
for (var H = e - 1, q = Math.pow(2, -52), nt = Math.pow(2, -966); e > 0; ) {
|
|
1672
|
-
var B = void 0, Dt = void 0;
|
|
1673
|
-
for (B = e - 2; B >= -1 && B !== -1; B--)
|
|
1674
|
-
if (Math.abs(r[B]) <= nt + q * (Math.abs(this.s[B]) + Math.abs(this.s[B + 1]))) {
|
|
1675
|
-
r[B] = 0;
|
|
1676
|
-
break;
|
|
1677
|
-
}
|
|
1678
|
-
if (B === e - 2)
|
|
1679
|
-
Dt = 4;
|
|
1680
|
-
else {
|
|
1681
|
-
var yt = void 0;
|
|
1682
|
-
for (yt = e - 1; yt >= B && yt !== B; yt--) {
|
|
1683
|
-
var ut = (yt !== e ? Math.abs(r[yt]) : 0) + (yt !== B + 1 ? Math.abs(r[yt - 1]) : 0);
|
|
1684
|
-
if (Math.abs(this.s[yt]) <= nt + q * ut) {
|
|
1685
|
-
this.s[yt] = 0;
|
|
1686
|
-
break;
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
yt === B ? Dt = 3 : yt === e - 1 ? Dt = 1 : (Dt = 2, B = yt);
|
|
1690
|
-
}
|
|
1691
|
-
switch (B++, Dt) {
|
|
1692
|
-
case 1:
|
|
1693
|
-
{
|
|
1694
|
-
var _ = r[e - 2];
|
|
1695
|
-
r[e - 2] = 0;
|
|
1696
|
-
for (var lt = e - 2; lt >= B; lt--) {
|
|
1697
|
-
var pt = T.hypot(this.s[lt], _), mt = this.s[lt] / pt, Mt = _ / pt;
|
|
1698
|
-
this.s[lt] = pt, lt !== B && (_ = -Mt * r[lt - 1], r[lt - 1] = mt * r[lt - 1]);
|
|
1699
|
-
for (var dt = 0; dt < this.n; dt++)
|
|
1700
|
-
pt = mt * this.V[dt][lt] + Mt * this.V[dt][e - 1], this.V[dt][e - 1] = -Mt * this.V[dt][lt] + mt * this.V[dt][e - 1], this.V[dt][lt] = pt;
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
break;
|
|
1704
|
-
case 2:
|
|
1705
|
-
{
|
|
1706
|
-
var At = r[B - 1];
|
|
1707
|
-
r[B - 1] = 0;
|
|
1708
|
-
for (var wt = B; wt < e; wt++) {
|
|
1709
|
-
var bt = T.hypot(this.s[wt], At), Gt = this.s[wt] / bt, Ft = At / bt;
|
|
1710
|
-
this.s[wt] = bt, At = -Ft * r[wt], r[wt] = Gt * r[wt];
|
|
1711
|
-
for (var Rt = 0; Rt < this.m; Rt++)
|
|
1712
|
-
bt = Gt * this.U[Rt][wt] + Ft * this.U[Rt][B - 1], this.U[Rt][B - 1] = -Ft * this.U[Rt][wt] + Gt * this.U[Rt][B - 1], this.U[Rt][wt] = bt;
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
break;
|
|
1716
|
-
case 3:
|
|
1717
|
-
{
|
|
1718
|
-
var Pt = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[e - 1]), Math.abs(this.s[e - 2])), Math.abs(r[e - 2])), Math.abs(this.s[B])), Math.abs(r[B])), Yt = this.s[e - 1] / Pt, R = this.s[e - 2] / Pt, x = r[e - 2] / Pt, X = this.s[B] / Pt, Z = r[B] / Pt, W = ((R + Yt) * (R - Yt) + x * x) / 2, tt = Yt * x * (Yt * x), ht = 0;
|
|
1719
|
-
/* @__PURE__ */ (function(Et, Nt) {
|
|
1720
|
-
return Et || Nt;
|
|
1721
|
-
})(W !== 0, tt !== 0) && (ht = Math.sqrt(W * W + tt), W < 0 && (ht = -ht), ht = tt / (W + ht));
|
|
1722
|
-
for (var rt = (X + Yt) * (X - Yt) + ht, K = X * Z, Q = B; Q < e - 1; Q++) {
|
|
1723
|
-
var ft = T.hypot(rt, K), Lt = rt / ft, vt = K / ft;
|
|
1724
|
-
Q !== B && (r[Q - 1] = ft), rt = Lt * this.s[Q] + vt * r[Q], r[Q] = Lt * r[Q] - vt * this.s[Q], K = vt * this.s[Q + 1], this.s[Q + 1] = Lt * this.s[Q + 1];
|
|
1725
|
-
for (var Ot = 0; Ot < this.n; Ot++)
|
|
1726
|
-
ft = Lt * this.V[Ot][Q] + vt * this.V[Ot][Q + 1], this.V[Ot][Q + 1] = -vt * this.V[Ot][Q] + Lt * this.V[Ot][Q + 1], this.V[Ot][Q] = ft;
|
|
1727
|
-
if (ft = T.hypot(rt, K), Lt = rt / ft, vt = K / ft, this.s[Q] = ft, rt = Lt * r[Q] + vt * this.s[Q + 1], this.s[Q + 1] = -vt * r[Q] + Lt * this.s[Q + 1], K = vt * r[Q + 1], r[Q + 1] = Lt * r[Q + 1], Q < this.m - 1)
|
|
1728
|
-
for (var ot = 0; ot < this.m; ot++)
|
|
1729
|
-
ft = Lt * this.U[ot][Q] + vt * this.U[ot][Q + 1], this.U[ot][Q + 1] = -vt * this.U[ot][Q] + Lt * this.U[ot][Q + 1], this.U[ot][Q] = ft;
|
|
1730
|
-
}
|
|
1731
|
-
r[e - 2] = rt;
|
|
1732
|
-
}
|
|
1733
|
-
break;
|
|
1734
|
-
case 4:
|
|
1735
|
-
{
|
|
1736
|
-
if (this.s[B] <= 0) {
|
|
1737
|
-
this.s[B] = this.s[B] < 0 ? -this.s[B] : 0;
|
|
1738
|
-
for (var it = 0; it <= H; it++)
|
|
1739
|
-
this.V[it][B] = -this.V[it][B];
|
|
1740
|
-
}
|
|
1741
|
-
for (; B < H && !(this.s[B] >= this.s[B + 1]); ) {
|
|
1742
|
-
var Tt = this.s[B];
|
|
1743
|
-
if (this.s[B] = this.s[B + 1], this.s[B + 1] = Tt, B < this.n - 1)
|
|
1744
|
-
for (var st = 0; st < this.n; st++)
|
|
1745
|
-
Tt = this.V[st][B + 1], this.V[st][B + 1] = this.V[st][B], this.V[st][B] = Tt;
|
|
1746
|
-
if (B < this.m - 1)
|
|
1747
|
-
for (var at = 0; at < this.m; at++)
|
|
1748
|
-
Tt = this.U[at][B + 1], this.U[at][B + 1] = this.U[at][B], this.U[at][B] = Tt;
|
|
1749
|
-
B++;
|
|
1750
|
-
}
|
|
1751
|
-
e--;
|
|
1752
|
-
}
|
|
1753
|
-
break;
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
var Ut = { U: this.U, V: this.V, S: this.s };
|
|
1757
|
-
return Ut;
|
|
1758
|
-
}, T.hypot = function(l, n) {
|
|
1759
|
-
var r = void 0;
|
|
1760
|
-
return Math.abs(l) > Math.abs(n) ? (r = n / l, r = Math.abs(l) * Math.sqrt(1 + r * r)) : n != 0 ? (r = l / n, r = Math.abs(n) * Math.sqrt(1 + r * r)) : r = 0, r;
|
|
1761
|
-
}, k.exports = T;
|
|
1762
|
-
},
|
|
1763
|
-
/* 27 */
|
|
1764
|
-
/***/
|
|
1765
|
-
function(k, gt, A) {
|
|
1766
|
-
var T = /* @__PURE__ */ function() {
|
|
1767
|
-
function r(a, u) {
|
|
1768
|
-
for (var i = 0; i < u.length; i++) {
|
|
1769
|
-
var y = u[i];
|
|
1770
|
-
y.enumerable = y.enumerable || !1, y.configurable = !0, "value" in y && (y.writable = !0), Object.defineProperty(a, y.key, y);
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
return function(a, u, i) {
|
|
1774
|
-
return u && r(a.prototype, u), i && r(a, i), a;
|
|
1775
|
-
};
|
|
1776
|
-
}();
|
|
1777
|
-
function l(r, a) {
|
|
1778
|
-
if (!(r instanceof a))
|
|
1779
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1780
|
-
}
|
|
1781
|
-
var n = function() {
|
|
1782
|
-
function r(a, u) {
|
|
1783
|
-
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, y = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, t = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
|
|
1784
|
-
l(this, r), this.sequence1 = a, this.sequence2 = u, this.match_score = i, this.mismatch_penalty = y, this.gap_penalty = t, this.iMax = a.length + 1, this.jMax = u.length + 1, this.grid = new Array(this.iMax);
|
|
1785
|
-
for (var s = 0; s < this.iMax; s++) {
|
|
1786
|
-
this.grid[s] = new Array(this.jMax);
|
|
1787
|
-
for (var o = 0; o < this.jMax; o++)
|
|
1788
|
-
this.grid[s][o] = 0;
|
|
1789
|
-
}
|
|
1790
|
-
this.tracebackGrid = new Array(this.iMax);
|
|
1791
|
-
for (var f = 0; f < this.iMax; f++) {
|
|
1792
|
-
this.tracebackGrid[f] = new Array(this.jMax);
|
|
1793
|
-
for (var h = 0; h < this.jMax; h++)
|
|
1794
|
-
this.tracebackGrid[f][h] = [null, null, null];
|
|
1795
|
-
}
|
|
1796
|
-
this.alignments = [], this.score = -1, this.computeGrids();
|
|
1797
|
-
}
|
|
1798
|
-
return T(r, [{
|
|
1799
|
-
key: "getScore",
|
|
1800
|
-
value: function() {
|
|
1801
|
-
return this.score;
|
|
1802
|
-
}
|
|
1803
|
-
}, {
|
|
1804
|
-
key: "getAlignments",
|
|
1805
|
-
value: function() {
|
|
1806
|
-
return this.alignments;
|
|
1807
|
-
}
|
|
1808
|
-
// Main dynamic programming procedure
|
|
1809
|
-
}, {
|
|
1810
|
-
key: "computeGrids",
|
|
1811
|
-
value: function() {
|
|
1812
|
-
for (var u = 1; u < this.jMax; u++)
|
|
1813
|
-
this.grid[0][u] = this.grid[0][u - 1] + this.gap_penalty, this.tracebackGrid[0][u] = [!1, !1, !0];
|
|
1814
|
-
for (var i = 1; i < this.iMax; i++)
|
|
1815
|
-
this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty, this.tracebackGrid[i][0] = [!1, !0, !1];
|
|
1816
|
-
for (var y = 1; y < this.iMax; y++)
|
|
1817
|
-
for (var t = 1; t < this.jMax; t++) {
|
|
1818
|
-
var s = void 0;
|
|
1819
|
-
this.sequence1[y - 1] === this.sequence2[t - 1] ? s = this.grid[y - 1][t - 1] + this.match_score : s = this.grid[y - 1][t - 1] + this.mismatch_penalty;
|
|
1820
|
-
var o = this.grid[y - 1][t] + this.gap_penalty, f = this.grid[y][t - 1] + this.gap_penalty, h = [s, o, f], N = this.arrayAllMaxIndexes(h);
|
|
1821
|
-
this.grid[y][t] = h[N[0]], this.tracebackGrid[y][t] = [N.includes(0), N.includes(1), N.includes(2)];
|
|
1822
|
-
}
|
|
1823
|
-
this.score = this.grid[this.iMax - 1][this.jMax - 1];
|
|
1824
|
-
}
|
|
1825
|
-
// Gets all possible valid sequence combinations
|
|
1826
|
-
}, {
|
|
1827
|
-
key: "alignmentTraceback",
|
|
1828
|
-
value: function() {
|
|
1829
|
-
var u = [];
|
|
1830
|
-
for (u.push({
|
|
1831
|
-
pos: [this.sequence1.length, this.sequence2.length],
|
|
1832
|
-
seq1: "",
|
|
1833
|
-
seq2: ""
|
|
1834
|
-
}); u[0]; ) {
|
|
1835
|
-
var i = u[0], y = this.tracebackGrid[i.pos[0]][i.pos[1]];
|
|
1836
|
-
y[0] && u.push({
|
|
1837
|
-
pos: [i.pos[0] - 1, i.pos[1] - 1],
|
|
1838
|
-
seq1: this.sequence1[i.pos[0] - 1] + i.seq1,
|
|
1839
|
-
seq2: this.sequence2[i.pos[1] - 1] + i.seq2
|
|
1840
|
-
}), y[1] && u.push({
|
|
1841
|
-
pos: [i.pos[0] - 1, i.pos[1]],
|
|
1842
|
-
seq1: this.sequence1[i.pos[0] - 1] + i.seq1,
|
|
1843
|
-
seq2: "-" + i.seq2
|
|
1844
|
-
}), y[2] && u.push({
|
|
1845
|
-
pos: [i.pos[0], i.pos[1] - 1],
|
|
1846
|
-
seq1: "-" + i.seq1,
|
|
1847
|
-
seq2: this.sequence2[i.pos[1] - 1] + i.seq2
|
|
1848
|
-
}), i.pos[0] === 0 && i.pos[1] === 0 && this.alignments.push({
|
|
1849
|
-
sequence1: i.seq1,
|
|
1850
|
-
sequence2: i.seq2
|
|
1851
|
-
}), u.shift();
|
|
1852
|
-
}
|
|
1853
|
-
return this.alignments;
|
|
1854
|
-
}
|
|
1855
|
-
// Helper Functions
|
|
1856
|
-
}, {
|
|
1857
|
-
key: "getAllIndexes",
|
|
1858
|
-
value: function(u, i) {
|
|
1859
|
-
for (var y = [], t = -1; (t = u.indexOf(i, t + 1)) !== -1; )
|
|
1860
|
-
y.push(t);
|
|
1861
|
-
return y;
|
|
1862
|
-
}
|
|
1863
|
-
}, {
|
|
1864
|
-
key: "arrayAllMaxIndexes",
|
|
1865
|
-
value: function(u) {
|
|
1866
|
-
return this.getAllIndexes(u, Math.max.apply(null, u));
|
|
1867
|
-
}
|
|
1868
|
-
}]), r;
|
|
1869
|
-
}();
|
|
1870
|
-
k.exports = n;
|
|
1871
|
-
},
|
|
1872
|
-
/* 28 */
|
|
1873
|
-
/***/
|
|
1874
|
-
function(k, gt, A) {
|
|
1875
|
-
var T = function() {
|
|
1876
|
-
};
|
|
1877
|
-
T.FDLayout = A(18), T.FDLayoutConstants = A(4), T.FDLayoutEdge = A(19), T.FDLayoutNode = A(20), T.DimensionD = A(21), T.HashMap = A(22), T.HashSet = A(23), T.IGeometry = A(8), T.IMath = A(9), T.Integer = A(10), T.Point = A(12), T.PointD = A(5), T.RandomSeed = A(16), T.RectangleD = A(13), T.Transform = A(17), T.UniqueIDGeneretor = A(14), T.Quicksort = A(25), T.LinkedList = A(11), T.LGraphObject = A(2), T.LGraph = A(6), T.LEdge = A(1), T.LGraphManager = A(7), T.LNode = A(3), T.Layout = A(15), T.LayoutConstants = A(0), T.NeedlemanWunsch = A(27), T.Matrix = A(24), T.SVD = A(26), k.exports = T;
|
|
1878
|
-
},
|
|
1879
|
-
/* 29 */
|
|
1880
|
-
/***/
|
|
1881
|
-
function(k, gt, A) {
|
|
1882
|
-
function T() {
|
|
1883
|
-
this.listeners = [];
|
|
1884
|
-
}
|
|
1885
|
-
var l = T.prototype;
|
|
1886
|
-
l.addListener = function(n, r) {
|
|
1887
|
-
this.listeners.push({
|
|
1888
|
-
event: n,
|
|
1889
|
-
callback: r
|
|
1890
|
-
});
|
|
1891
|
-
}, l.removeListener = function(n, r) {
|
|
1892
|
-
for (var a = this.listeners.length; a >= 0; a--) {
|
|
1893
|
-
var u = this.listeners[a];
|
|
1894
|
-
u.event === n && u.callback === r && this.listeners.splice(a, 1);
|
|
1895
|
-
}
|
|
1896
|
-
}, l.emit = function(n, r) {
|
|
1897
|
-
for (var a = 0; a < this.listeners.length; a++) {
|
|
1898
|
-
var u = this.listeners[a];
|
|
1899
|
-
n === u.event && u.callback(r);
|
|
1900
|
-
}
|
|
1901
|
-
}, k.exports = T;
|
|
1902
|
-
}
|
|
1903
|
-
/******/
|
|
1904
|
-
])
|
|
1905
|
-
);
|
|
1906
|
-
});
|
|
1907
|
-
}(ne)), ne.exports;
|
|
1908
|
-
}
|
|
1909
|
-
var ce;
|
|
1910
|
-
function Te() {
|
|
1911
|
-
return ce || (ce = 1, function(kt, se) {
|
|
1912
|
-
(function(gt, A) {
|
|
1913
|
-
kt.exports = A(ye());
|
|
1914
|
-
})(oe, function(k) {
|
|
1915
|
-
return (
|
|
1916
|
-
/******/
|
|
1917
|
-
(() => {
|
|
1918
|
-
var gt = {
|
|
1919
|
-
/***/
|
|
1920
|
-
45: (
|
|
1921
|
-
/***/
|
|
1922
|
-
(n, r, a) => {
|
|
1923
|
-
var u = {};
|
|
1924
|
-
u.layoutBase = a(551), u.CoSEConstants = a(806), u.CoSEEdge = a(767), u.CoSEGraph = a(880), u.CoSEGraphManager = a(578), u.CoSELayout = a(765), u.CoSENode = a(991), u.ConstraintHandler = a(902), n.exports = u;
|
|
1925
|
-
}
|
|
1926
|
-
),
|
|
1927
|
-
/***/
|
|
1928
|
-
806: (
|
|
1929
|
-
/***/
|
|
1930
|
-
(n, r, a) => {
|
|
1931
|
-
var u = a(551).FDLayoutConstants;
|
|
1932
|
-
function i() {
|
|
1933
|
-
}
|
|
1934
|
-
for (var y in u)
|
|
1935
|
-
i[y] = u[y];
|
|
1936
|
-
i.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, i.DEFAULT_RADIAL_SEPARATION = u.DEFAULT_EDGE_LENGTH, i.DEFAULT_COMPONENT_SEPERATION = 60, i.TILE = !0, i.TILING_PADDING_VERTICAL = 10, i.TILING_PADDING_HORIZONTAL = 10, i.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, i.ENFORCE_CONSTRAINTS = !0, i.APPLY_LAYOUT = !0, i.RELAX_MOVEMENT_ON_CONSTRAINTS = !0, i.TREE_REDUCTION_ON_INCREMENTAL = !0, i.PURE_INCREMENTAL = i.DEFAULT_INCREMENTAL, n.exports = i;
|
|
1937
|
-
}
|
|
1938
|
-
),
|
|
1939
|
-
/***/
|
|
1940
|
-
767: (
|
|
1941
|
-
/***/
|
|
1942
|
-
(n, r, a) => {
|
|
1943
|
-
var u = a(551).FDLayoutEdge;
|
|
1944
|
-
function i(t, s, o) {
|
|
1945
|
-
u.call(this, t, s, o);
|
|
1946
|
-
}
|
|
1947
|
-
i.prototype = Object.create(u.prototype);
|
|
1948
|
-
for (var y in u)
|
|
1949
|
-
i[y] = u[y];
|
|
1950
|
-
n.exports = i;
|
|
1951
|
-
}
|
|
1952
|
-
),
|
|
1953
|
-
/***/
|
|
1954
|
-
880: (
|
|
1955
|
-
/***/
|
|
1956
|
-
(n, r, a) => {
|
|
1957
|
-
var u = a(551).LGraph;
|
|
1958
|
-
function i(t, s, o) {
|
|
1959
|
-
u.call(this, t, s, o);
|
|
1960
|
-
}
|
|
1961
|
-
i.prototype = Object.create(u.prototype);
|
|
1962
|
-
for (var y in u)
|
|
1963
|
-
i[y] = u[y];
|
|
1964
|
-
n.exports = i;
|
|
1965
|
-
}
|
|
1966
|
-
),
|
|
1967
|
-
/***/
|
|
1968
|
-
578: (
|
|
1969
|
-
/***/
|
|
1970
|
-
(n, r, a) => {
|
|
1971
|
-
var u = a(551).LGraphManager;
|
|
1972
|
-
function i(t) {
|
|
1973
|
-
u.call(this, t);
|
|
1974
|
-
}
|
|
1975
|
-
i.prototype = Object.create(u.prototype);
|
|
1976
|
-
for (var y in u)
|
|
1977
|
-
i[y] = u[y];
|
|
1978
|
-
n.exports = i;
|
|
1979
|
-
}
|
|
1980
|
-
),
|
|
1981
|
-
/***/
|
|
1982
|
-
765: (
|
|
1983
|
-
/***/
|
|
1984
|
-
(n, r, a) => {
|
|
1985
|
-
var u = a(551).FDLayout, i = a(578), y = a(880), t = a(991), s = a(767), o = a(806), f = a(902), h = a(551).FDLayoutConstants, N = a(551).LayoutConstants, c = a(551).Point, d = a(551).PointD, m = a(551).DimensionD, G = a(551).Layout, L = a(551).Integer, U = a(551).IGeometry, $ = a(551).LGraph, V = a(551).Transform, j = a(551).LinkedList;
|
|
1986
|
-
function D() {
|
|
1987
|
-
u.call(this), this.toBeTiled = {}, this.constraints = {};
|
|
1988
|
-
}
|
|
1989
|
-
D.prototype = Object.create(u.prototype);
|
|
1990
|
-
for (var et in u)
|
|
1991
|
-
D[et] = u[et];
|
|
1992
|
-
D.prototype.newGraphManager = function() {
|
|
1993
|
-
var e = new i(this);
|
|
1994
|
-
return this.graphManager = e, e;
|
|
1995
|
-
}, D.prototype.newGraph = function(e) {
|
|
1996
|
-
return new y(null, this.graphManager, e);
|
|
1997
|
-
}, D.prototype.newNode = function(e) {
|
|
1998
|
-
return new t(this.graphManager, e);
|
|
1999
|
-
}, D.prototype.newEdge = function(e) {
|
|
2000
|
-
return new s(null, null, e);
|
|
2001
|
-
}, D.prototype.initParameters = function() {
|
|
2002
|
-
u.prototype.initParameters.call(this, arguments), this.isSubLayout || (o.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = o.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = h.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = h.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = h.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
|
|
2003
|
-
}, D.prototype.initSpringEmbedder = function() {
|
|
2004
|
-
u.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / h.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = 0.04, this.coolingAdjuster = 1;
|
|
2005
|
-
}, D.prototype.layout = function() {
|
|
2006
|
-
var e = N.DEFAULT_CREATE_BENDS_AS_NEEDED;
|
|
2007
|
-
return e && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
|
|
2008
|
-
}, D.prototype.classicLayout = function() {
|
|
2009
|
-
if (this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(), this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity), this.calcNoOfChildrenForAllNodes(), this.graphManager.calcLowestCommonAncestors(), this.graphManager.calcInclusionTreeDepths(), this.graphManager.getRoot().calcEstimatedSize(), this.calcIdealEdgeLengths(), this.incremental) {
|
|
2010
|
-
if (o.TREE_REDUCTION_ON_INCREMENTAL) {
|
|
2011
|
-
this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
|
|
2012
|
-
var E = new Set(this.getAllNodes()), g = this.nodesWithGravity.filter(function(w) {
|
|
2013
|
-
return E.has(w);
|
|
2014
|
-
});
|
|
2015
|
-
this.graphManager.setAllNodesToApplyGravitation(g);
|
|
2016
|
-
}
|
|
2017
|
-
} else {
|
|
2018
|
-
var e = this.getFlatForest();
|
|
2019
|
-
if (e.length > 0)
|
|
2020
|
-
this.positionNodesRadially(e);
|
|
2021
|
-
else {
|
|
2022
|
-
this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
|
|
2023
|
-
var E = new Set(this.getAllNodes()), g = this.nodesWithGravity.filter(function(p) {
|
|
2024
|
-
return E.has(p);
|
|
2025
|
-
});
|
|
2026
|
-
this.graphManager.setAllNodesToApplyGravitation(g), this.positionNodesRandomly();
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2029
|
-
return Object.keys(this.constraints).length > 0 && (f.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), o.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
|
|
2030
|
-
}, D.prototype.tick = function() {
|
|
2031
|
-
if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
|
|
2032
|
-
if (this.prunedNodesAll.length > 0)
|
|
2033
|
-
this.isTreeGrowing = !0;
|
|
2034
|
-
else
|
|
2035
|
-
return !0;
|
|
2036
|
-
if (this.totalIterations % h.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
|
|
2037
|
-
if (this.isConverged())
|
|
2038
|
-
if (this.prunedNodesAll.length > 0)
|
|
2039
|
-
this.isTreeGrowing = !0;
|
|
2040
|
-
else
|
|
2041
|
-
return !0;
|
|
2042
|
-
this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 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));
|
|
2043
|
-
}
|
|
2044
|
-
if (this.isTreeGrowing) {
|
|
2045
|
-
if (this.growTreeIterations % 10 == 0)
|
|
2046
|
-
if (this.prunedNodesAll.length > 0) {
|
|
2047
|
-
this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
|
|
2048
|
-
var e = new Set(this.getAllNodes()), E = this.nodesWithGravity.filter(function(v) {
|
|
2049
|
-
return e.has(v);
|
|
2050
|
-
});
|
|
2051
|
-
this.graphManager.setAllNodesToApplyGravitation(E), this.graphManager.updateBounds(), this.updateGrid(), o.PURE_INCREMENTAL ? this.coolingFactor = h.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = h.DEFAULT_COOLING_FACTOR_INCREMENTAL;
|
|
2052
|
-
} else
|
|
2053
|
-
this.isTreeGrowing = !1, this.isGrowthFinished = !0;
|
|
2054
|
-
this.growTreeIterations++;
|
|
2055
|
-
}
|
|
2056
|
-
if (this.isGrowthFinished) {
|
|
2057
|
-
if (this.isConverged())
|
|
2058
|
-
return !0;
|
|
2059
|
-
this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), o.PURE_INCREMENTAL ? this.coolingFactor = h.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : this.coolingFactor = h.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
|
|
2060
|
-
}
|
|
2061
|
-
var g = !this.isTreeGrowing && !this.isGrowthFinished, p = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
|
|
2062
|
-
return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(g, p), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
|
|
2063
|
-
}, D.prototype.getPositionsData = function() {
|
|
2064
|
-
for (var e = this.graphManager.getAllNodes(), E = {}, g = 0; g < e.length; g++) {
|
|
2065
|
-
var p = e[g].rect, v = e[g].id;
|
|
2066
|
-
E[v] = {
|
|
2067
|
-
id: v,
|
|
2068
|
-
x: p.getCenterX(),
|
|
2069
|
-
y: p.getCenterY(),
|
|
2070
|
-
w: p.width,
|
|
2071
|
-
h: p.height
|
|
2072
|
-
};
|
|
2073
|
-
}
|
|
2074
|
-
return E;
|
|
2075
|
-
}, D.prototype.runSpringEmbedder = function() {
|
|
2076
|
-
this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
|
|
2077
|
-
var e = !1;
|
|
2078
|
-
if (h.ANIMATE === "during")
|
|
2079
|
-
this.emit("layoutstarted");
|
|
2080
|
-
else {
|
|
2081
|
-
for (; !e; )
|
|
2082
|
-
e = this.tick();
|
|
2083
|
-
this.graphManager.updateBounds();
|
|
2084
|
-
}
|
|
2085
|
-
}, D.prototype.moveNodes = function() {
|
|
2086
|
-
for (var e = this.getAllNodes(), E, g = 0; g < e.length; g++)
|
|
2087
|
-
E = e[g], E.calculateDisplacement();
|
|
2088
|
-
Object.keys(this.constraints).length > 0 && this.updateDisplacements();
|
|
2089
|
-
for (var g = 0; g < e.length; g++)
|
|
2090
|
-
E = e[g], E.move();
|
|
2091
|
-
}, D.prototype.initConstraintVariables = function() {
|
|
2092
|
-
var e = this;
|
|
2093
|
-
this.idToNodeMap = /* @__PURE__ */ new Map(), this.fixedNodeSet = /* @__PURE__ */ new Set();
|
|
2094
|
-
for (var E = this.graphManager.getAllNodes(), g = 0; g < E.length; g++) {
|
|
2095
|
-
var p = E[g];
|
|
2096
|
-
this.idToNodeMap.set(p.id, p);
|
|
2097
|
-
}
|
|
2098
|
-
var v = function M(S) {
|
|
2099
|
-
for (var H = S.getChild().getNodes(), q, nt = 0, B = 0; B < H.length; B++)
|
|
2100
|
-
q = H[B], q.getChild() == null ? e.fixedNodeSet.has(q.id) && (nt += 100) : nt += M(q);
|
|
2101
|
-
return nt;
|
|
2102
|
-
};
|
|
2103
|
-
if (this.constraints.fixedNodeConstraint) {
|
|
2104
|
-
this.constraints.fixedNodeConstraint.forEach(function(H) {
|
|
2105
|
-
e.fixedNodeSet.add(H.nodeId);
|
|
2106
|
-
});
|
|
2107
|
-
for (var E = this.graphManager.getAllNodes(), p, g = 0; g < E.length; g++)
|
|
2108
|
-
if (p = E[g], p.getChild() != null) {
|
|
2109
|
-
var w = v(p);
|
|
2110
|
-
w > 0 && (p.fixedNodeWeight = w);
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
if (this.constraints.relativePlacementConstraint) {
|
|
2114
|
-
var C = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map();
|
|
2115
|
-
if (this.dummyToNodeForVerticalAlignment = /* @__PURE__ */ new Map(), this.dummyToNodeForHorizontalAlignment = /* @__PURE__ */ new Map(), this.fixedNodesOnHorizontal = /* @__PURE__ */ new Set(), this.fixedNodesOnVertical = /* @__PURE__ */ new Set(), this.fixedNodeSet.forEach(function(M) {
|
|
2116
|
-
e.fixedNodesOnHorizontal.add(M), e.fixedNodesOnVertical.add(M);
|
|
2117
|
-
}), this.constraints.alignmentConstraint) {
|
|
2118
|
-
if (this.constraints.alignmentConstraint.vertical)
|
|
2119
|
-
for (var P = this.constraints.alignmentConstraint.vertical, g = 0; g < P.length; g++)
|
|
2120
|
-
this.dummyToNodeForVerticalAlignment.set("dummy" + g, []), P[g].forEach(function(S) {
|
|
2121
|
-
C.set(S, "dummy" + g), e.dummyToNodeForVerticalAlignment.get("dummy" + g).push(S), e.fixedNodeSet.has(S) && e.fixedNodesOnHorizontal.add("dummy" + g);
|
|
2122
|
-
});
|
|
2123
|
-
if (this.constraints.alignmentConstraint.horizontal)
|
|
2124
|
-
for (var O = this.constraints.alignmentConstraint.horizontal, g = 0; g < O.length; g++)
|
|
2125
|
-
this.dummyToNodeForHorizontalAlignment.set("dummy" + g, []), O[g].forEach(function(S) {
|
|
2126
|
-
I.set(S, "dummy" + g), e.dummyToNodeForHorizontalAlignment.get("dummy" + g).push(S), e.fixedNodeSet.has(S) && e.fixedNodesOnVertical.add("dummy" + g);
|
|
2127
|
-
});
|
|
2128
|
-
}
|
|
2129
|
-
if (o.RELAX_MOVEMENT_ON_CONSTRAINTS)
|
|
2130
|
-
this.shuffle = function(M) {
|
|
2131
|
-
var S, H, q;
|
|
2132
|
-
for (q = M.length - 1; q >= 2 * M.length / 3; q--)
|
|
2133
|
-
S = Math.floor(Math.random() * (q + 1)), H = M[q], M[q] = M[S], M[S] = H;
|
|
2134
|
-
return M;
|
|
2135
|
-
}, this.nodesInRelativeHorizontal = [], this.nodesInRelativeVertical = [], this.nodeToRelativeConstraintMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToRelativeConstraintMapVertical = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapVertical = /* @__PURE__ */ new Map(), this.constraints.relativePlacementConstraint.forEach(function(M) {
|
|
2136
|
-
if (M.left) {
|
|
2137
|
-
var S = C.has(M.left) ? C.get(M.left) : M.left, H = C.has(M.right) ? C.get(M.right) : M.right;
|
|
2138
|
-
e.nodesInRelativeHorizontal.includes(S) || (e.nodesInRelativeHorizontal.push(S), e.nodeToRelativeConstraintMapHorizontal.set(S, []), e.dummyToNodeForVerticalAlignment.has(S) ? e.nodeToTempPositionMapHorizontal.set(S, e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(S)[0]).getCenterX()) : e.nodeToTempPositionMapHorizontal.set(S, e.idToNodeMap.get(S).getCenterX())), e.nodesInRelativeHorizontal.includes(H) || (e.nodesInRelativeHorizontal.push(H), e.nodeToRelativeConstraintMapHorizontal.set(H, []), e.dummyToNodeForVerticalAlignment.has(H) ? e.nodeToTempPositionMapHorizontal.set(H, e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()) : e.nodeToTempPositionMapHorizontal.set(H, e.idToNodeMap.get(H).getCenterX())), e.nodeToRelativeConstraintMapHorizontal.get(S).push({ right: H, gap: M.gap }), e.nodeToRelativeConstraintMapHorizontal.get(H).push({ left: S, gap: M.gap });
|
|
2139
|
-
} else {
|
|
2140
|
-
var q = I.has(M.top) ? I.get(M.top) : M.top, nt = I.has(M.bottom) ? I.get(M.bottom) : M.bottom;
|
|
2141
|
-
e.nodesInRelativeVertical.includes(q) || (e.nodesInRelativeVertical.push(q), e.nodeToRelativeConstraintMapVertical.set(q, []), e.dummyToNodeForHorizontalAlignment.has(q) ? e.nodeToTempPositionMapVertical.set(q, e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(q)[0]).getCenterY()) : e.nodeToTempPositionMapVertical.set(q, e.idToNodeMap.get(q).getCenterY())), e.nodesInRelativeVertical.includes(nt) || (e.nodesInRelativeVertical.push(nt), e.nodeToRelativeConstraintMapVertical.set(nt, []), e.dummyToNodeForHorizontalAlignment.has(nt) ? e.nodeToTempPositionMapVertical.set(nt, e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(nt)[0]).getCenterY()) : e.nodeToTempPositionMapVertical.set(nt, e.idToNodeMap.get(nt).getCenterY())), e.nodeToRelativeConstraintMapVertical.get(q).push({ bottom: nt, gap: M.gap }), e.nodeToRelativeConstraintMapVertical.get(nt).push({ top: q, gap: M.gap });
|
|
2142
|
-
}
|
|
2143
|
-
});
|
|
2144
|
-
else {
|
|
2145
|
-
var z = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
|
|
2146
|
-
this.constraints.relativePlacementConstraint.forEach(function(M) {
|
|
2147
|
-
if (M.left) {
|
|
2148
|
-
var S = C.has(M.left) ? C.get(M.left) : M.left, H = C.has(M.right) ? C.get(M.right) : M.right;
|
|
2149
|
-
z.has(S) ? z.get(S).push(H) : z.set(S, [H]), z.has(H) ? z.get(H).push(S) : z.set(H, [S]);
|
|
2150
|
-
} else {
|
|
2151
|
-
var q = I.has(M.top) ? I.get(M.top) : M.top, nt = I.has(M.bottom) ? I.get(M.bottom) : M.bottom;
|
|
2152
|
-
b.has(q) ? b.get(q).push(nt) : b.set(q, [nt]), b.has(nt) ? b.get(nt).push(q) : b.set(nt, [q]);
|
|
2153
|
-
}
|
|
2154
|
-
});
|
|
2155
|
-
var F = function(S, H) {
|
|
2156
|
-
var q = [], nt = [], B = new j(), Dt = /* @__PURE__ */ new Set(), yt = 0;
|
|
2157
|
-
return S.forEach(function(ut, _) {
|
|
2158
|
-
if (!Dt.has(_)) {
|
|
2159
|
-
q[yt] = [], nt[yt] = !1;
|
|
2160
|
-
var lt = _;
|
|
2161
|
-
for (B.push(lt), Dt.add(lt), q[yt].push(lt); B.length != 0; ) {
|
|
2162
|
-
lt = B.shift(), H.has(lt) && (nt[yt] = !0);
|
|
2163
|
-
var pt = S.get(lt);
|
|
2164
|
-
pt.forEach(function(mt) {
|
|
2165
|
-
Dt.has(mt) || (B.push(mt), Dt.add(mt), q[yt].push(mt));
|
|
2166
|
-
});
|
|
2167
|
-
}
|
|
2168
|
-
yt++;
|
|
2169
|
-
}
|
|
2170
|
-
}), { components: q, isFixed: nt };
|
|
2171
|
-
}, J = F(z, e.fixedNodesOnHorizontal);
|
|
2172
|
-
this.componentsOnHorizontal = J.components, this.fixedComponentsOnHorizontal = J.isFixed;
|
|
2173
|
-
var Y = F(b, e.fixedNodesOnVertical);
|
|
2174
|
-
this.componentsOnVertical = Y.components, this.fixedComponentsOnVertical = Y.isFixed;
|
|
2175
|
-
}
|
|
2176
|
-
}
|
|
2177
|
-
}, D.prototype.updateDisplacements = function() {
|
|
2178
|
-
var e = this;
|
|
2179
|
-
if (this.constraints.fixedNodeConstraint && this.constraints.fixedNodeConstraint.forEach(function(Y) {
|
|
2180
|
-
var M = e.idToNodeMap.get(Y.nodeId);
|
|
2181
|
-
M.displacementX = 0, M.displacementY = 0;
|
|
2182
|
-
}), this.constraints.alignmentConstraint) {
|
|
2183
|
-
if (this.constraints.alignmentConstraint.vertical)
|
|
2184
|
-
for (var E = this.constraints.alignmentConstraint.vertical, g = 0; g < E.length; g++) {
|
|
2185
|
-
for (var p = 0, v = 0; v < E[g].length; v++) {
|
|
2186
|
-
if (this.fixedNodeSet.has(E[g][v])) {
|
|
2187
|
-
p = 0;
|
|
2188
|
-
break;
|
|
2189
|
-
}
|
|
2190
|
-
p += this.idToNodeMap.get(E[g][v]).displacementX;
|
|
2191
|
-
}
|
|
2192
|
-
for (var w = p / E[g].length, v = 0; v < E[g].length; v++)
|
|
2193
|
-
this.idToNodeMap.get(E[g][v]).displacementX = w;
|
|
2194
|
-
}
|
|
2195
|
-
if (this.constraints.alignmentConstraint.horizontal)
|
|
2196
|
-
for (var C = this.constraints.alignmentConstraint.horizontal, g = 0; g < C.length; g++) {
|
|
2197
|
-
for (var I = 0, v = 0; v < C[g].length; v++) {
|
|
2198
|
-
if (this.fixedNodeSet.has(C[g][v])) {
|
|
2199
|
-
I = 0;
|
|
2200
|
-
break;
|
|
2201
|
-
}
|
|
2202
|
-
I += this.idToNodeMap.get(C[g][v]).displacementY;
|
|
2203
|
-
}
|
|
2204
|
-
for (var P = I / C[g].length, v = 0; v < C[g].length; v++)
|
|
2205
|
-
this.idToNodeMap.get(C[g][v]).displacementY = P;
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
if (this.constraints.relativePlacementConstraint)
|
|
2209
|
-
if (o.RELAX_MOVEMENT_ON_CONSTRAINTS)
|
|
2210
|
-
this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(Y) {
|
|
2211
|
-
if (!e.fixedNodesOnHorizontal.has(Y)) {
|
|
2212
|
-
var M = 0;
|
|
2213
|
-
e.dummyToNodeForVerticalAlignment.has(Y) ? M = e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(Y)[0]).displacementX : M = e.idToNodeMap.get(Y).displacementX, e.nodeToRelativeConstraintMapHorizontal.get(Y).forEach(function(S) {
|
|
2214
|
-
if (S.right) {
|
|
2215
|
-
var H = e.nodeToTempPositionMapHorizontal.get(S.right) - e.nodeToTempPositionMapHorizontal.get(Y) - M;
|
|
2216
|
-
H < S.gap && (M -= S.gap - H);
|
|
2217
|
-
} else {
|
|
2218
|
-
var H = e.nodeToTempPositionMapHorizontal.get(Y) - e.nodeToTempPositionMapHorizontal.get(S.left) + M;
|
|
2219
|
-
H < S.gap && (M += S.gap - H);
|
|
2220
|
-
}
|
|
2221
|
-
}), e.nodeToTempPositionMapHorizontal.set(Y, e.nodeToTempPositionMapHorizontal.get(Y) + M), e.dummyToNodeForVerticalAlignment.has(Y) ? e.dummyToNodeForVerticalAlignment.get(Y).forEach(function(S) {
|
|
2222
|
-
e.idToNodeMap.get(S).displacementX = M;
|
|
2223
|
-
}) : e.idToNodeMap.get(Y).displacementX = M;
|
|
2224
|
-
}
|
|
2225
|
-
}), this.nodesInRelativeVertical.forEach(function(Y) {
|
|
2226
|
-
if (!e.fixedNodesOnHorizontal.has(Y)) {
|
|
2227
|
-
var M = 0;
|
|
2228
|
-
e.dummyToNodeForHorizontalAlignment.has(Y) ? M = e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(Y)[0]).displacementY : M = e.idToNodeMap.get(Y).displacementY, e.nodeToRelativeConstraintMapVertical.get(Y).forEach(function(S) {
|
|
2229
|
-
if (S.bottom) {
|
|
2230
|
-
var H = e.nodeToTempPositionMapVertical.get(S.bottom) - e.nodeToTempPositionMapVertical.get(Y) - M;
|
|
2231
|
-
H < S.gap && (M -= S.gap - H);
|
|
2232
|
-
} else {
|
|
2233
|
-
var H = e.nodeToTempPositionMapVertical.get(Y) - e.nodeToTempPositionMapVertical.get(S.top) + M;
|
|
2234
|
-
H < S.gap && (M += S.gap - H);
|
|
2235
|
-
}
|
|
2236
|
-
}), e.nodeToTempPositionMapVertical.set(Y, e.nodeToTempPositionMapVertical.get(Y) + M), e.dummyToNodeForHorizontalAlignment.has(Y) ? e.dummyToNodeForHorizontalAlignment.get(Y).forEach(function(S) {
|
|
2237
|
-
e.idToNodeMap.get(S).displacementY = M;
|
|
2238
|
-
}) : e.idToNodeMap.get(Y).displacementY = M;
|
|
2239
|
-
}
|
|
2240
|
-
});
|
|
2241
|
-
else {
|
|
2242
|
-
for (var g = 0; g < this.componentsOnHorizontal.length; g++) {
|
|
2243
|
-
var O = this.componentsOnHorizontal[g];
|
|
2244
|
-
if (this.fixedComponentsOnHorizontal[g])
|
|
2245
|
-
for (var v = 0; v < O.length; v++)
|
|
2246
|
-
this.dummyToNodeForVerticalAlignment.has(O[v]) ? this.dummyToNodeForVerticalAlignment.get(O[v]).forEach(function(S) {
|
|
2247
|
-
e.idToNodeMap.get(S).displacementX = 0;
|
|
2248
|
-
}) : this.idToNodeMap.get(O[v]).displacementX = 0;
|
|
2249
|
-
else {
|
|
2250
|
-
for (var z = 0, b = 0, v = 0; v < O.length; v++)
|
|
2251
|
-
if (this.dummyToNodeForVerticalAlignment.has(O[v])) {
|
|
2252
|
-
var F = this.dummyToNodeForVerticalAlignment.get(O[v]);
|
|
2253
|
-
z += F.length * this.idToNodeMap.get(F[0]).displacementX, b += F.length;
|
|
2254
|
-
} else
|
|
2255
|
-
z += this.idToNodeMap.get(O[v]).displacementX, b++;
|
|
2256
|
-
for (var J = z / b, v = 0; v < O.length; v++)
|
|
2257
|
-
this.dummyToNodeForVerticalAlignment.has(O[v]) ? this.dummyToNodeForVerticalAlignment.get(O[v]).forEach(function(S) {
|
|
2258
|
-
e.idToNodeMap.get(S).displacementX = J;
|
|
2259
|
-
}) : this.idToNodeMap.get(O[v]).displacementX = J;
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
for (var g = 0; g < this.componentsOnVertical.length; g++) {
|
|
2263
|
-
var O = this.componentsOnVertical[g];
|
|
2264
|
-
if (this.fixedComponentsOnVertical[g])
|
|
2265
|
-
for (var v = 0; v < O.length; v++)
|
|
2266
|
-
this.dummyToNodeForHorizontalAlignment.has(O[v]) ? this.dummyToNodeForHorizontalAlignment.get(O[v]).forEach(function(H) {
|
|
2267
|
-
e.idToNodeMap.get(H).displacementY = 0;
|
|
2268
|
-
}) : this.idToNodeMap.get(O[v]).displacementY = 0;
|
|
2269
|
-
else {
|
|
2270
|
-
for (var z = 0, b = 0, v = 0; v < O.length; v++)
|
|
2271
|
-
if (this.dummyToNodeForHorizontalAlignment.has(O[v])) {
|
|
2272
|
-
var F = this.dummyToNodeForHorizontalAlignment.get(O[v]);
|
|
2273
|
-
z += F.length * this.idToNodeMap.get(F[0]).displacementY, b += F.length;
|
|
2274
|
-
} else
|
|
2275
|
-
z += this.idToNodeMap.get(O[v]).displacementY, b++;
|
|
2276
|
-
for (var J = z / b, v = 0; v < O.length; v++)
|
|
2277
|
-
this.dummyToNodeForHorizontalAlignment.has(O[v]) ? this.dummyToNodeForHorizontalAlignment.get(O[v]).forEach(function(B) {
|
|
2278
|
-
e.idToNodeMap.get(B).displacementY = J;
|
|
2279
|
-
}) : this.idToNodeMap.get(O[v]).displacementY = J;
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
}, D.prototype.calculateNodesToApplyGravitationTo = function() {
|
|
2284
|
-
var e = [], E, g = this.graphManager.getGraphs(), p = g.length, v;
|
|
2285
|
-
for (v = 0; v < p; v++)
|
|
2286
|
-
E = g[v], E.updateConnected(), E.isConnected || (e = e.concat(E.getNodes()));
|
|
2287
|
-
return e;
|
|
2288
|
-
}, D.prototype.createBendpoints = function() {
|
|
2289
|
-
var e = [];
|
|
2290
|
-
e = e.concat(this.graphManager.getAllEdges());
|
|
2291
|
-
var E = /* @__PURE__ */ new Set(), g;
|
|
2292
|
-
for (g = 0; g < e.length; g++) {
|
|
2293
|
-
var p = e[g];
|
|
2294
|
-
if (!E.has(p)) {
|
|
2295
|
-
var v = p.getSource(), w = p.getTarget();
|
|
2296
|
-
if (v == w)
|
|
2297
|
-
p.getBendpoints().push(new d()), p.getBendpoints().push(new d()), this.createDummyNodesForBendpoints(p), E.add(p);
|
|
2298
|
-
else {
|
|
2299
|
-
var C = [];
|
|
2300
|
-
if (C = C.concat(v.getEdgeListToNode(w)), C = C.concat(w.getEdgeListToNode(v)), !E.has(C[0])) {
|
|
2301
|
-
if (C.length > 1) {
|
|
2302
|
-
var I;
|
|
2303
|
-
for (I = 0; I < C.length; I++) {
|
|
2304
|
-
var P = C[I];
|
|
2305
|
-
P.getBendpoints().push(new d()), this.createDummyNodesForBendpoints(P);
|
|
2306
|
-
}
|
|
2307
|
-
}
|
|
2308
|
-
C.forEach(function(O) {
|
|
2309
|
-
E.add(O);
|
|
2310
|
-
});
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
if (E.size == e.length)
|
|
2315
|
-
break;
|
|
2316
|
-
}
|
|
2317
|
-
}, D.prototype.positionNodesRadially = function(e) {
|
|
2318
|
-
for (var E = new c(0, 0), g = Math.ceil(Math.sqrt(e.length)), p = 0, v = 0, w = 0, C = new d(0, 0), I = 0; I < e.length; I++) {
|
|
2319
|
-
I % g == 0 && (w = 0, v = p, I != 0 && (v += o.DEFAULT_COMPONENT_SEPERATION), p = 0);
|
|
2320
|
-
var P = e[I], O = G.findCenterOfTree(P);
|
|
2321
|
-
E.x = w, E.y = v, C = D.radialLayout(P, O, E), C.y > p && (p = Math.floor(C.y)), w = Math.floor(C.x + o.DEFAULT_COMPONENT_SEPERATION);
|
|
2322
|
-
}
|
|
2323
|
-
this.transform(new d(N.WORLD_CENTER_X - C.x / 2, N.WORLD_CENTER_Y - C.y / 2));
|
|
2324
|
-
}, D.radialLayout = function(e, E, g) {
|
|
2325
|
-
var p = Math.max(this.maxDiagonalInTree(e), o.DEFAULT_RADIAL_SEPARATION);
|
|
2326
|
-
D.branchRadialLayout(E, null, 0, 359, 0, p);
|
|
2327
|
-
var v = $.calculateBounds(e), w = new V();
|
|
2328
|
-
w.setDeviceOrgX(v.getMinX()), w.setDeviceOrgY(v.getMinY()), w.setWorldOrgX(g.x), w.setWorldOrgY(g.y);
|
|
2329
|
-
for (var C = 0; C < e.length; C++) {
|
|
2330
|
-
var I = e[C];
|
|
2331
|
-
I.transform(w);
|
|
2332
|
-
}
|
|
2333
|
-
var P = new d(v.getMaxX(), v.getMaxY());
|
|
2334
|
-
return w.inverseTransformPoint(P);
|
|
2335
|
-
}, D.branchRadialLayout = function(e, E, g, p, v, w) {
|
|
2336
|
-
var C = (p - g + 1) / 2;
|
|
2337
|
-
C < 0 && (C += 180);
|
|
2338
|
-
var I = (C + g) % 360, P = I * U.TWO_PI / 360, O = v * Math.cos(P), z = v * Math.sin(P);
|
|
2339
|
-
e.setCenter(O, z);
|
|
2340
|
-
var b = [];
|
|
2341
|
-
b = b.concat(e.getEdges());
|
|
2342
|
-
var F = b.length;
|
|
2343
|
-
E != null && F--;
|
|
2344
|
-
for (var J = 0, Y = b.length, M, S = e.getEdgesBetween(E); S.length > 1; ) {
|
|
2345
|
-
var H = S[0];
|
|
2346
|
-
S.splice(0, 1);
|
|
2347
|
-
var q = b.indexOf(H);
|
|
2348
|
-
q >= 0 && b.splice(q, 1), Y--, F--;
|
|
2349
|
-
}
|
|
2350
|
-
E != null ? M = (b.indexOf(S[0]) + 1) % Y : M = 0;
|
|
2351
|
-
for (var nt = Math.abs(p - g) / F, B = M; J != F; B = ++B % Y) {
|
|
2352
|
-
var Dt = b[B].getOtherEnd(e);
|
|
2353
|
-
if (Dt != E) {
|
|
2354
|
-
var yt = (g + J * nt) % 360, ut = (yt + nt) % 360;
|
|
2355
|
-
D.branchRadialLayout(Dt, e, yt, ut, v + w, w), J++;
|
|
2356
|
-
}
|
|
2357
|
-
}
|
|
2358
|
-
}, D.maxDiagonalInTree = function(e) {
|
|
2359
|
-
for (var E = L.MIN_VALUE, g = 0; g < e.length; g++) {
|
|
2360
|
-
var p = e[g], v = p.getDiagonal();
|
|
2361
|
-
v > E && (E = v);
|
|
2362
|
-
}
|
|
2363
|
-
return E;
|
|
2364
|
-
}, D.prototype.calcRepulsionRange = function() {
|
|
2365
|
-
return 2 * (this.level + 1) * this.idealEdgeLength;
|
|
2366
|
-
}, D.prototype.groupZeroDegreeMembers = function() {
|
|
2367
|
-
var e = this, E = {};
|
|
2368
|
-
this.memberGroups = {}, this.idToDummyNode = {};
|
|
2369
|
-
for (var g = [], p = this.graphManager.getAllNodes(), v = 0; v < p.length; v++) {
|
|
2370
|
-
var w = p[v], C = w.getParent();
|
|
2371
|
-
this.getNodeDegreeWithChildren(w) === 0 && (C.id == null || !this.getToBeTiled(C)) && g.push(w);
|
|
2372
|
-
}
|
|
2373
|
-
for (var v = 0; v < g.length; v++) {
|
|
2374
|
-
var w = g[v], I = w.getParent().id;
|
|
2375
|
-
typeof E[I] > "u" && (E[I] = []), E[I] = E[I].concat(w);
|
|
2376
|
-
}
|
|
2377
|
-
Object.keys(E).forEach(function(P) {
|
|
2378
|
-
if (E[P].length > 1) {
|
|
2379
|
-
var O = "DummyCompound_" + P;
|
|
2380
|
-
e.memberGroups[O] = E[P];
|
|
2381
|
-
var z = E[P][0].getParent(), b = new t(e.graphManager);
|
|
2382
|
-
b.id = O, b.paddingLeft = z.paddingLeft || 0, b.paddingRight = z.paddingRight || 0, b.paddingBottom = z.paddingBottom || 0, b.paddingTop = z.paddingTop || 0, e.idToDummyNode[O] = b;
|
|
2383
|
-
var F = e.getGraphManager().add(e.newGraph(), b), J = z.getChild();
|
|
2384
|
-
J.add(b);
|
|
2385
|
-
for (var Y = 0; Y < E[P].length; Y++) {
|
|
2386
|
-
var M = E[P][Y];
|
|
2387
|
-
J.remove(M), F.add(M);
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
});
|
|
2391
|
-
}, D.prototype.clearCompounds = function() {
|
|
2392
|
-
var e = {}, E = {};
|
|
2393
|
-
this.performDFSOnCompounds();
|
|
2394
|
-
for (var g = 0; g < this.compoundOrder.length; g++)
|
|
2395
|
-
E[this.compoundOrder[g].id] = this.compoundOrder[g], e[this.compoundOrder[g].id] = [].concat(this.compoundOrder[g].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[g].getChild()), this.compoundOrder[g].child = null;
|
|
2396
|
-
this.graphManager.resetAllNodes(), this.tileCompoundMembers(e, E);
|
|
2397
|
-
}, D.prototype.clearZeroDegreeMembers = function() {
|
|
2398
|
-
var e = this, E = this.tiledZeroDegreePack = [];
|
|
2399
|
-
Object.keys(this.memberGroups).forEach(function(g) {
|
|
2400
|
-
var p = e.idToDummyNode[g];
|
|
2401
|
-
if (E[g] = e.tileNodes(e.memberGroups[g], p.paddingLeft + p.paddingRight), p.rect.width = E[g].width, p.rect.height = E[g].height, p.setCenter(E[g].centerX, E[g].centerY), p.labelMarginLeft = 0, p.labelMarginTop = 0, o.NODE_DIMENSIONS_INCLUDE_LABELS) {
|
|
2402
|
-
var v = p.rect.width, w = p.rect.height;
|
|
2403
|
-
p.labelWidth && (p.labelPosHorizontal == "left" ? (p.rect.x -= p.labelWidth, p.setWidth(v + p.labelWidth), p.labelMarginLeft = p.labelWidth) : p.labelPosHorizontal == "center" && p.labelWidth > v ? (p.rect.x -= (p.labelWidth - v) / 2, p.setWidth(p.labelWidth), p.labelMarginLeft = (p.labelWidth - v) / 2) : p.labelPosHorizontal == "right" && p.setWidth(v + p.labelWidth)), p.labelHeight && (p.labelPosVertical == "top" ? (p.rect.y -= p.labelHeight, p.setHeight(w + p.labelHeight), p.labelMarginTop = p.labelHeight) : p.labelPosVertical == "center" && p.labelHeight > w ? (p.rect.y -= (p.labelHeight - w) / 2, p.setHeight(p.labelHeight), p.labelMarginTop = (p.labelHeight - w) / 2) : p.labelPosVertical == "bottom" && p.setHeight(w + p.labelHeight));
|
|
2404
|
-
}
|
|
2405
|
-
});
|
|
2406
|
-
}, D.prototype.repopulateCompounds = function() {
|
|
2407
|
-
for (var e = this.compoundOrder.length - 1; e >= 0; e--) {
|
|
2408
|
-
var E = this.compoundOrder[e], g = E.id, p = E.paddingLeft, v = E.paddingTop, w = E.labelMarginLeft, C = E.labelMarginTop;
|
|
2409
|
-
this.adjustLocations(this.tiledMemberPack[g], E.rect.x, E.rect.y, p, v, w, C);
|
|
2410
|
-
}
|
|
2411
|
-
}, D.prototype.repopulateZeroDegreeMembers = function() {
|
|
2412
|
-
var e = this, E = this.tiledZeroDegreePack;
|
|
2413
|
-
Object.keys(E).forEach(function(g) {
|
|
2414
|
-
var p = e.idToDummyNode[g], v = p.paddingLeft, w = p.paddingTop, C = p.labelMarginLeft, I = p.labelMarginTop;
|
|
2415
|
-
e.adjustLocations(E[g], p.rect.x, p.rect.y, v, w, C, I);
|
|
2416
|
-
});
|
|
2417
|
-
}, D.prototype.getToBeTiled = function(e) {
|
|
2418
|
-
var E = e.id;
|
|
2419
|
-
if (this.toBeTiled[E] != null)
|
|
2420
|
-
return this.toBeTiled[E];
|
|
2421
|
-
var g = e.getChild();
|
|
2422
|
-
if (g == null)
|
|
2423
|
-
return this.toBeTiled[E] = !1, !1;
|
|
2424
|
-
for (var p = g.getNodes(), v = 0; v < p.length; v++) {
|
|
2425
|
-
var w = p[v];
|
|
2426
|
-
if (this.getNodeDegree(w) > 0)
|
|
2427
|
-
return this.toBeTiled[E] = !1, !1;
|
|
2428
|
-
if (w.getChild() == null) {
|
|
2429
|
-
this.toBeTiled[w.id] = !1;
|
|
2430
|
-
continue;
|
|
2431
|
-
}
|
|
2432
|
-
if (!this.getToBeTiled(w))
|
|
2433
|
-
return this.toBeTiled[E] = !1, !1;
|
|
2434
|
-
}
|
|
2435
|
-
return this.toBeTiled[E] = !0, !0;
|
|
2436
|
-
}, D.prototype.getNodeDegree = function(e) {
|
|
2437
|
-
e.id;
|
|
2438
|
-
for (var E = e.getEdges(), g = 0, p = 0; p < E.length; p++) {
|
|
2439
|
-
var v = E[p];
|
|
2440
|
-
v.getSource().id !== v.getTarget().id && (g = g + 1);
|
|
2441
|
-
}
|
|
2442
|
-
return g;
|
|
2443
|
-
}, D.prototype.getNodeDegreeWithChildren = function(e) {
|
|
2444
|
-
var E = this.getNodeDegree(e);
|
|
2445
|
-
if (e.getChild() == null)
|
|
2446
|
-
return E;
|
|
2447
|
-
for (var g = e.getChild().getNodes(), p = 0; p < g.length; p++) {
|
|
2448
|
-
var v = g[p];
|
|
2449
|
-
E += this.getNodeDegreeWithChildren(v);
|
|
2450
|
-
}
|
|
2451
|
-
return E;
|
|
2452
|
-
}, D.prototype.performDFSOnCompounds = function() {
|
|
2453
|
-
this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
|
|
2454
|
-
}, D.prototype.fillCompexOrderByDFS = function(e) {
|
|
2455
|
-
for (var E = 0; E < e.length; E++) {
|
|
2456
|
-
var g = e[E];
|
|
2457
|
-
g.getChild() != null && this.fillCompexOrderByDFS(g.getChild().getNodes()), this.getToBeTiled(g) && this.compoundOrder.push(g);
|
|
2458
|
-
}
|
|
2459
|
-
}, D.prototype.adjustLocations = function(e, E, g, p, v, w, C) {
|
|
2460
|
-
E += p + w, g += v + C;
|
|
2461
|
-
for (var I = E, P = 0; P < e.rows.length; P++) {
|
|
2462
|
-
var O = e.rows[P];
|
|
2463
|
-
E = I;
|
|
2464
|
-
for (var z = 0, b = 0; b < O.length; b++) {
|
|
2465
|
-
var F = O[b];
|
|
2466
|
-
F.rect.x = E, F.rect.y = g, E += F.rect.width + e.horizontalPadding, F.rect.height > z && (z = F.rect.height);
|
|
2467
|
-
}
|
|
2468
|
-
g += z + e.verticalPadding;
|
|
2469
|
-
}
|
|
2470
|
-
}, D.prototype.tileCompoundMembers = function(e, E) {
|
|
2471
|
-
var g = this;
|
|
2472
|
-
this.tiledMemberPack = [], Object.keys(e).forEach(function(p) {
|
|
2473
|
-
var v = E[p];
|
|
2474
|
-
if (g.tiledMemberPack[p] = g.tileNodes(e[p], v.paddingLeft + v.paddingRight), v.rect.width = g.tiledMemberPack[p].width, v.rect.height = g.tiledMemberPack[p].height, v.setCenter(g.tiledMemberPack[p].centerX, g.tiledMemberPack[p].centerY), v.labelMarginLeft = 0, v.labelMarginTop = 0, o.NODE_DIMENSIONS_INCLUDE_LABELS) {
|
|
2475
|
-
var w = v.rect.width, C = v.rect.height;
|
|
2476
|
-
v.labelWidth && (v.labelPosHorizontal == "left" ? (v.rect.x -= v.labelWidth, v.setWidth(w + v.labelWidth), v.labelMarginLeft = v.labelWidth) : v.labelPosHorizontal == "center" && v.labelWidth > w ? (v.rect.x -= (v.labelWidth - w) / 2, v.setWidth(v.labelWidth), v.labelMarginLeft = (v.labelWidth - w) / 2) : v.labelPosHorizontal == "right" && v.setWidth(w + v.labelWidth)), v.labelHeight && (v.labelPosVertical == "top" ? (v.rect.y -= v.labelHeight, v.setHeight(C + v.labelHeight), v.labelMarginTop = v.labelHeight) : v.labelPosVertical == "center" && v.labelHeight > C ? (v.rect.y -= (v.labelHeight - C) / 2, v.setHeight(v.labelHeight), v.labelMarginTop = (v.labelHeight - C) / 2) : v.labelPosVertical == "bottom" && v.setHeight(C + v.labelHeight));
|
|
2477
|
-
}
|
|
2478
|
-
});
|
|
2479
|
-
}, D.prototype.tileNodes = function(e, E) {
|
|
2480
|
-
var g = this.tileNodesByFavoringDim(e, E, !0), p = this.tileNodesByFavoringDim(e, E, !1), v = this.getOrgRatio(g), w = this.getOrgRatio(p), C;
|
|
2481
|
-
return w < v ? C = p : C = g, C;
|
|
2482
|
-
}, D.prototype.getOrgRatio = function(e) {
|
|
2483
|
-
var E = e.width, g = e.height, p = E / g;
|
|
2484
|
-
return p < 1 && (p = 1 / p), p;
|
|
2485
|
-
}, D.prototype.calcIdealRowWidth = function(e, E) {
|
|
2486
|
-
var g = o.TILING_PADDING_VERTICAL, p = o.TILING_PADDING_HORIZONTAL, v = e.length, w = 0, C = 0, I = 0;
|
|
2487
|
-
e.forEach(function(Y) {
|
|
2488
|
-
w += Y.getWidth(), C += Y.getHeight(), Y.getWidth() > I && (I = Y.getWidth());
|
|
2489
|
-
});
|
|
2490
|
-
var P = w / v, O = C / v, z = Math.pow(g - p, 2) + 4 * (P + p) * (O + g) * v, b = (p - g + Math.sqrt(z)) / (2 * (P + p)), F;
|
|
2491
|
-
E ? (F = Math.ceil(b), F == b && F++) : F = Math.floor(b);
|
|
2492
|
-
var J = F * (P + p) - p;
|
|
2493
|
-
return I > J && (J = I), J += p * 2, J;
|
|
2494
|
-
}, D.prototype.tileNodesByFavoringDim = function(e, E, g) {
|
|
2495
|
-
var p = o.TILING_PADDING_VERTICAL, v = o.TILING_PADDING_HORIZONTAL, w = o.TILING_COMPARE_BY, C = {
|
|
2496
|
-
rows: [],
|
|
2497
|
-
rowWidth: [],
|
|
2498
|
-
rowHeight: [],
|
|
2499
|
-
width: 0,
|
|
2500
|
-
height: E,
|
|
2501
|
-
// assume minHeight equals to minWidth
|
|
2502
|
-
verticalPadding: p,
|
|
2503
|
-
horizontalPadding: v,
|
|
2504
|
-
centerX: 0,
|
|
2505
|
-
centerY: 0
|
|
2506
|
-
};
|
|
2507
|
-
w && (C.idealRowWidth = this.calcIdealRowWidth(e, g));
|
|
2508
|
-
var I = function(M) {
|
|
2509
|
-
return M.rect.width * M.rect.height;
|
|
2510
|
-
}, P = function(M, S) {
|
|
2511
|
-
return I(S) - I(M);
|
|
2512
|
-
};
|
|
2513
|
-
e.sort(function(Y, M) {
|
|
2514
|
-
var S = P;
|
|
2515
|
-
return C.idealRowWidth ? (S = w, S(Y.id, M.id)) : S(Y, M);
|
|
2516
|
-
});
|
|
2517
|
-
for (var O = 0, z = 0, b = 0; b < e.length; b++) {
|
|
2518
|
-
var F = e[b];
|
|
2519
|
-
O += F.getCenterX(), z += F.getCenterY();
|
|
2520
|
-
}
|
|
2521
|
-
C.centerX = O / e.length, C.centerY = z / e.length;
|
|
2522
|
-
for (var b = 0; b < e.length; b++) {
|
|
2523
|
-
var F = e[b];
|
|
2524
|
-
if (C.rows.length == 0)
|
|
2525
|
-
this.insertNodeToRow(C, F, 0, E);
|
|
2526
|
-
else if (this.canAddHorizontal(C, F.rect.width, F.rect.height)) {
|
|
2527
|
-
var J = C.rows.length - 1;
|
|
2528
|
-
C.idealRowWidth || (J = this.getShortestRowIndex(C)), this.insertNodeToRow(C, F, J, E);
|
|
2529
|
-
} else
|
|
2530
|
-
this.insertNodeToRow(C, F, C.rows.length, E);
|
|
2531
|
-
this.shiftToLastRow(C);
|
|
2532
|
-
}
|
|
2533
|
-
return C;
|
|
2534
|
-
}, D.prototype.insertNodeToRow = function(e, E, g, p) {
|
|
2535
|
-
var v = p;
|
|
2536
|
-
if (g == e.rows.length) {
|
|
2537
|
-
var w = [];
|
|
2538
|
-
e.rows.push(w), e.rowWidth.push(v), e.rowHeight.push(0);
|
|
2539
|
-
}
|
|
2540
|
-
var C = e.rowWidth[g] + E.rect.width;
|
|
2541
|
-
e.rows[g].length > 0 && (C += e.horizontalPadding), e.rowWidth[g] = C, e.width < C && (e.width = C);
|
|
2542
|
-
var I = E.rect.height;
|
|
2543
|
-
g > 0 && (I += e.verticalPadding);
|
|
2544
|
-
var P = 0;
|
|
2545
|
-
I > e.rowHeight[g] && (P = e.rowHeight[g], e.rowHeight[g] = I, P = e.rowHeight[g] - P), e.height += P, e.rows[g].push(E);
|
|
2546
|
-
}, D.prototype.getShortestRowIndex = function(e) {
|
|
2547
|
-
for (var E = -1, g = Number.MAX_VALUE, p = 0; p < e.rows.length; p++)
|
|
2548
|
-
e.rowWidth[p] < g && (E = p, g = e.rowWidth[p]);
|
|
2549
|
-
return E;
|
|
2550
|
-
}, D.prototype.getLongestRowIndex = function(e) {
|
|
2551
|
-
for (var E = -1, g = Number.MIN_VALUE, p = 0; p < e.rows.length; p++)
|
|
2552
|
-
e.rowWidth[p] > g && (E = p, g = e.rowWidth[p]);
|
|
2553
|
-
return E;
|
|
2554
|
-
}, D.prototype.canAddHorizontal = function(e, E, g) {
|
|
2555
|
-
if (e.idealRowWidth) {
|
|
2556
|
-
var p = e.rows.length - 1, v = e.rowWidth[p];
|
|
2557
|
-
return v + E + e.horizontalPadding <= e.idealRowWidth;
|
|
2558
|
-
}
|
|
2559
|
-
var w = this.getShortestRowIndex(e);
|
|
2560
|
-
if (w < 0)
|
|
2561
|
-
return !0;
|
|
2562
|
-
var C = e.rowWidth[w];
|
|
2563
|
-
if (C + e.horizontalPadding + E <= e.width) return !0;
|
|
2564
|
-
var I = 0;
|
|
2565
|
-
e.rowHeight[w] < g && w > 0 && (I = g + e.verticalPadding - e.rowHeight[w]);
|
|
2566
|
-
var P;
|
|
2567
|
-
e.width - C >= E + e.horizontalPadding ? P = (e.height + I) / (C + E + e.horizontalPadding) : P = (e.height + I) / e.width, I = g + e.verticalPadding;
|
|
2568
|
-
var O;
|
|
2569
|
-
return e.width < E ? O = (e.height + I) / E : O = (e.height + I) / e.width, O < 1 && (O = 1 / O), P < 1 && (P = 1 / P), P < O;
|
|
2570
|
-
}, D.prototype.shiftToLastRow = function(e) {
|
|
2571
|
-
var E = this.getLongestRowIndex(e), g = e.rowWidth.length - 1, p = e.rows[E], v = p[p.length - 1], w = v.width + e.horizontalPadding;
|
|
2572
|
-
if (e.width - e.rowWidth[g] > w && E != g) {
|
|
2573
|
-
p.splice(-1, 1), e.rows[g].push(v), e.rowWidth[E] = e.rowWidth[E] - w, e.rowWidth[g] = e.rowWidth[g] + w, e.width = e.rowWidth[instance.getLongestRowIndex(e)];
|
|
2574
|
-
for (var C = Number.MIN_VALUE, I = 0; I < p.length; I++)
|
|
2575
|
-
p[I].height > C && (C = p[I].height);
|
|
2576
|
-
E > 0 && (C += e.verticalPadding);
|
|
2577
|
-
var P = e.rowHeight[E] + e.rowHeight[g];
|
|
2578
|
-
e.rowHeight[E] = C, e.rowHeight[g] < v.height + e.verticalPadding && (e.rowHeight[g] = v.height + e.verticalPadding);
|
|
2579
|
-
var O = e.rowHeight[E] + e.rowHeight[g];
|
|
2580
|
-
e.height += O - P, this.shiftToLastRow(e);
|
|
2581
|
-
}
|
|
2582
|
-
}, D.prototype.tilingPreLayout = function() {
|
|
2583
|
-
o.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
|
|
2584
|
-
}, D.prototype.tilingPostLayout = function() {
|
|
2585
|
-
o.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
|
|
2586
|
-
}, D.prototype.reduceTrees = function() {
|
|
2587
|
-
for (var e = [], E = !0, g; E; ) {
|
|
2588
|
-
var p = this.graphManager.getAllNodes(), v = [];
|
|
2589
|
-
E = !1;
|
|
2590
|
-
for (var w = 0; w < p.length; w++)
|
|
2591
|
-
if (g = p[w], g.getEdges().length == 1 && !g.getEdges()[0].isInterGraph && g.getChild() == null) {
|
|
2592
|
-
if (o.PURE_INCREMENTAL) {
|
|
2593
|
-
var C = g.getEdges()[0].getOtherEnd(g), I = new m(g.getCenterX() - C.getCenterX(), g.getCenterY() - C.getCenterY());
|
|
2594
|
-
v.push([g, g.getEdges()[0], g.getOwner(), I]);
|
|
2595
|
-
} else
|
|
2596
|
-
v.push([g, g.getEdges()[0], g.getOwner()]);
|
|
2597
|
-
E = !0;
|
|
2598
|
-
}
|
|
2599
|
-
if (E == !0) {
|
|
2600
|
-
for (var P = [], O = 0; O < v.length; O++)
|
|
2601
|
-
v[O][0].getEdges().length == 1 && (P.push(v[O]), v[O][0].getOwner().remove(v[O][0]));
|
|
2602
|
-
e.push(P), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
|
|
2603
|
-
}
|
|
2604
|
-
}
|
|
2605
|
-
this.prunedNodesAll = e;
|
|
2606
|
-
}, D.prototype.growTree = function(e) {
|
|
2607
|
-
for (var E = e.length, g = e[E - 1], p, v = 0; v < g.length; v++)
|
|
2608
|
-
p = g[v], this.findPlaceforPrunedNode(p), p[2].add(p[0]), p[2].add(p[1], p[1].source, p[1].target);
|
|
2609
|
-
e.splice(e.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
|
|
2610
|
-
}, D.prototype.findPlaceforPrunedNode = function(e) {
|
|
2611
|
-
var E, g, p = e[0];
|
|
2612
|
-
if (p == e[1].source ? g = e[1].target : g = e[1].source, o.PURE_INCREMENTAL)
|
|
2613
|
-
p.setCenter(g.getCenterX() + e[3].getWidth(), g.getCenterY() + e[3].getHeight());
|
|
2614
|
-
else {
|
|
2615
|
-
var v = g.startX, w = g.finishX, C = g.startY, I = g.finishY, P = 0, O = 0, z = 0, b = 0, F = [P, z, O, b];
|
|
2616
|
-
if (C > 0)
|
|
2617
|
-
for (var J = v; J <= w; J++)
|
|
2618
|
-
F[0] += this.grid[J][C - 1].length + this.grid[J][C].length - 1;
|
|
2619
|
-
if (w < this.grid.length - 1)
|
|
2620
|
-
for (var J = C; J <= I; J++)
|
|
2621
|
-
F[1] += this.grid[w + 1][J].length + this.grid[w][J].length - 1;
|
|
2622
|
-
if (I < this.grid[0].length - 1)
|
|
2623
|
-
for (var J = v; J <= w; J++)
|
|
2624
|
-
F[2] += this.grid[J][I + 1].length + this.grid[J][I].length - 1;
|
|
2625
|
-
if (v > 0)
|
|
2626
|
-
for (var J = C; J <= I; J++)
|
|
2627
|
-
F[3] += this.grid[v - 1][J].length + this.grid[v][J].length - 1;
|
|
2628
|
-
for (var Y = L.MAX_VALUE, M, S, H = 0; H < F.length; H++)
|
|
2629
|
-
F[H] < Y ? (Y = F[H], M = 1, S = H) : F[H] == Y && M++;
|
|
2630
|
-
if (M == 3 && Y == 0)
|
|
2631
|
-
F[0] == 0 && F[1] == 0 && F[2] == 0 ? E = 1 : F[0] == 0 && F[1] == 0 && F[3] == 0 ? E = 0 : F[0] == 0 && F[2] == 0 && F[3] == 0 ? E = 3 : F[1] == 0 && F[2] == 0 && F[3] == 0 && (E = 2);
|
|
2632
|
-
else if (M == 2 && Y == 0) {
|
|
2633
|
-
var q = Math.floor(Math.random() * 2);
|
|
2634
|
-
F[0] == 0 && F[1] == 0 ? q == 0 ? E = 0 : E = 1 : F[0] == 0 && F[2] == 0 ? q == 0 ? E = 0 : E = 2 : F[0] == 0 && F[3] == 0 ? q == 0 ? E = 0 : E = 3 : F[1] == 0 && F[2] == 0 ? q == 0 ? E = 1 : E = 2 : F[1] == 0 && F[3] == 0 ? q == 0 ? E = 1 : E = 3 : q == 0 ? E = 2 : E = 3;
|
|
2635
|
-
} else if (M == 4 && Y == 0) {
|
|
2636
|
-
var q = Math.floor(Math.random() * 4);
|
|
2637
|
-
E = q;
|
|
2638
|
-
} else
|
|
2639
|
-
E = S;
|
|
2640
|
-
E == 0 ? p.setCenter(g.getCenterX(), g.getCenterY() - g.getHeight() / 2 - h.DEFAULT_EDGE_LENGTH - p.getHeight() / 2) : E == 1 ? p.setCenter(g.getCenterX() + g.getWidth() / 2 + h.DEFAULT_EDGE_LENGTH + p.getWidth() / 2, g.getCenterY()) : E == 2 ? p.setCenter(g.getCenterX(), g.getCenterY() + g.getHeight() / 2 + h.DEFAULT_EDGE_LENGTH + p.getHeight() / 2) : p.setCenter(g.getCenterX() - g.getWidth() / 2 - h.DEFAULT_EDGE_LENGTH - p.getWidth() / 2, g.getCenterY());
|
|
2641
|
-
}
|
|
2642
|
-
}, n.exports = D;
|
|
2643
|
-
}
|
|
2644
|
-
),
|
|
2645
|
-
/***/
|
|
2646
|
-
991: (
|
|
2647
|
-
/***/
|
|
2648
|
-
(n, r, a) => {
|
|
2649
|
-
var u = a(551).FDLayoutNode, i = a(551).IMath;
|
|
2650
|
-
function y(s, o, f, h) {
|
|
2651
|
-
u.call(this, s, o, f, h);
|
|
2652
|
-
}
|
|
2653
|
-
y.prototype = Object.create(u.prototype);
|
|
2654
|
-
for (var t in u)
|
|
2655
|
-
y[t] = u[t];
|
|
2656
|
-
y.prototype.calculateDisplacement = function() {
|
|
2657
|
-
var s = this.graphManager.getLayout();
|
|
2658
|
-
this.getChild() != null && this.fixedNodeWeight ? (this.displacementX += s.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight, this.displacementY += s.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight) : (this.displacementX += s.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY += s.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren), Math.abs(this.displacementX) > s.coolingFactor * s.maxNodeDisplacement && (this.displacementX = s.coolingFactor * s.maxNodeDisplacement * i.sign(this.displacementX)), Math.abs(this.displacementY) > s.coolingFactor * s.maxNodeDisplacement && (this.displacementY = s.coolingFactor * s.maxNodeDisplacement * i.sign(this.displacementY)), this.child && this.child.getNodes().length > 0 && this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
|
|
2659
|
-
}, y.prototype.propogateDisplacementToChildren = function(s, o) {
|
|
2660
|
-
for (var f = this.getChild().getNodes(), h, N = 0; N < f.length; N++)
|
|
2661
|
-
h = f[N], h.getChild() == null ? (h.displacementX += s, h.displacementY += o) : h.propogateDisplacementToChildren(s, o);
|
|
2662
|
-
}, y.prototype.move = function() {
|
|
2663
|
-
var s = this.graphManager.getLayout();
|
|
2664
|
-
(this.child == null || this.child.getNodes().length == 0) && (this.moveBy(this.displacementX, this.displacementY), s.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;
|
|
2665
|
-
}, y.prototype.setPred1 = function(s) {
|
|
2666
|
-
this.pred1 = s;
|
|
2667
|
-
}, y.prototype.getPred1 = function() {
|
|
2668
|
-
return pred1;
|
|
2669
|
-
}, y.prototype.getPred2 = function() {
|
|
2670
|
-
return pred2;
|
|
2671
|
-
}, y.prototype.setNext = function(s) {
|
|
2672
|
-
this.next = s;
|
|
2673
|
-
}, y.prototype.getNext = function() {
|
|
2674
|
-
return next;
|
|
2675
|
-
}, y.prototype.setProcessed = function(s) {
|
|
2676
|
-
this.processed = s;
|
|
2677
|
-
}, y.prototype.isProcessed = function() {
|
|
2678
|
-
return processed;
|
|
2679
|
-
}, n.exports = y;
|
|
2680
|
-
}
|
|
2681
|
-
),
|
|
2682
|
-
/***/
|
|
2683
|
-
902: (
|
|
2684
|
-
/***/
|
|
2685
|
-
(n, r, a) => {
|
|
2686
|
-
function u(f) {
|
|
2687
|
-
if (Array.isArray(f)) {
|
|
2688
|
-
for (var h = 0, N = Array(f.length); h < f.length; h++)
|
|
2689
|
-
N[h] = f[h];
|
|
2690
|
-
return N;
|
|
2691
|
-
} else
|
|
2692
|
-
return Array.from(f);
|
|
2693
|
-
}
|
|
2694
|
-
var i = a(806), y = a(551).LinkedList, t = a(551).Matrix, s = a(551).SVD;
|
|
2695
|
-
function o() {
|
|
2696
|
-
}
|
|
2697
|
-
o.handleConstraints = function(f) {
|
|
2698
|
-
var h = {};
|
|
2699
|
-
h.fixedNodeConstraint = f.constraints.fixedNodeConstraint, h.alignmentConstraint = f.constraints.alignmentConstraint, h.relativePlacementConstraint = f.constraints.relativePlacementConstraint;
|
|
2700
|
-
for (var N = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), d = [], m = [], G = f.getAllNodes(), L = 0, U = 0; U < G.length; U++) {
|
|
2701
|
-
var $ = G[U];
|
|
2702
|
-
$.getChild() == null && (c.set($.id, L++), d.push($.getCenterX()), m.push($.getCenterY()), N.set($.id, $));
|
|
2703
|
-
}
|
|
2704
|
-
h.relativePlacementConstraint && h.relativePlacementConstraint.forEach(function(R) {
|
|
2705
|
-
!R.gap && R.gap != 0 && (R.left ? R.gap = i.DEFAULT_EDGE_LENGTH + N.get(R.left).getWidth() / 2 + N.get(R.right).getWidth() / 2 : R.gap = i.DEFAULT_EDGE_LENGTH + N.get(R.top).getHeight() / 2 + N.get(R.bottom).getHeight() / 2);
|
|
2706
|
-
});
|
|
2707
|
-
var V = function(x, X) {
|
|
2708
|
-
return { x: x.x - X.x, y: x.y - X.y };
|
|
2709
|
-
}, j = function(x) {
|
|
2710
|
-
var X = 0, Z = 0;
|
|
2711
|
-
return x.forEach(function(W) {
|
|
2712
|
-
X += d[c.get(W)], Z += m[c.get(W)];
|
|
2713
|
-
}), { x: X / x.size, y: Z / x.size };
|
|
2714
|
-
}, D = function(x, X, Z, W, tt) {
|
|
2715
|
-
function ht(ot, it) {
|
|
2716
|
-
var Tt = new Set(ot), st = !0, at = !1, Ut = void 0;
|
|
2717
|
-
try {
|
|
2718
|
-
for (var Et = it[Symbol.iterator](), Nt; !(st = (Nt = Et.next()).done); st = !0) {
|
|
2719
|
-
var Xt = Nt.value;
|
|
2720
|
-
Tt.add(Xt);
|
|
2721
|
-
}
|
|
2722
|
-
} catch (xt) {
|
|
2723
|
-
at = !0, Ut = xt;
|
|
2724
|
-
} finally {
|
|
2725
|
-
try {
|
|
2726
|
-
!st && Et.return && Et.return();
|
|
2727
|
-
} finally {
|
|
2728
|
-
if (at)
|
|
2729
|
-
throw Ut;
|
|
2730
|
-
}
|
|
2731
|
-
}
|
|
2732
|
-
return Tt;
|
|
2733
|
-
}
|
|
2734
|
-
var rt = /* @__PURE__ */ new Map();
|
|
2735
|
-
x.forEach(function(ot, it) {
|
|
2736
|
-
rt.set(it, 0);
|
|
2737
|
-
}), x.forEach(function(ot, it) {
|
|
2738
|
-
ot.forEach(function(Tt) {
|
|
2739
|
-
rt.set(Tt.id, rt.get(Tt.id) + 1);
|
|
2740
|
-
});
|
|
2741
|
-
});
|
|
2742
|
-
var K = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), ft = new y();
|
|
2743
|
-
rt.forEach(function(ot, it) {
|
|
2744
|
-
ot == 0 ? (ft.push(it), Z || (X == "horizontal" ? K.set(it, c.has(it) ? d[c.get(it)] : W.get(it)) : K.set(it, c.has(it) ? m[c.get(it)] : W.get(it)))) : K.set(it, Number.NEGATIVE_INFINITY), Z && Q.set(it, /* @__PURE__ */ new Set([it]));
|
|
2745
|
-
}), Z && tt.forEach(function(ot) {
|
|
2746
|
-
var it = [];
|
|
2747
|
-
if (ot.forEach(function(at) {
|
|
2748
|
-
Z.has(at) && it.push(at);
|
|
2749
|
-
}), it.length > 0) {
|
|
2750
|
-
var Tt = 0;
|
|
2751
|
-
it.forEach(function(at) {
|
|
2752
|
-
X == "horizontal" ? (K.set(at, c.has(at) ? d[c.get(at)] : W.get(at)), Tt += K.get(at)) : (K.set(at, c.has(at) ? m[c.get(at)] : W.get(at)), Tt += K.get(at));
|
|
2753
|
-
}), Tt = Tt / it.length, ot.forEach(function(at) {
|
|
2754
|
-
Z.has(at) || K.set(at, Tt);
|
|
2755
|
-
});
|
|
2756
|
-
} else {
|
|
2757
|
-
var st = 0;
|
|
2758
|
-
ot.forEach(function(at) {
|
|
2759
|
-
X == "horizontal" ? st += c.has(at) ? d[c.get(at)] : W.get(at) : st += c.has(at) ? m[c.get(at)] : W.get(at);
|
|
2760
|
-
}), st = st / ot.length, ot.forEach(function(at) {
|
|
2761
|
-
K.set(at, st);
|
|
2762
|
-
});
|
|
2763
|
-
}
|
|
2764
|
-
});
|
|
2765
|
-
for (var Lt = function() {
|
|
2766
|
-
var it = ft.shift(), Tt = x.get(it);
|
|
2767
|
-
Tt.forEach(function(st) {
|
|
2768
|
-
if (K.get(st.id) < K.get(it) + st.gap)
|
|
2769
|
-
if (Z && Z.has(st.id)) {
|
|
2770
|
-
var at = void 0;
|
|
2771
|
-
if (X == "horizontal" ? at = c.has(st.id) ? d[c.get(st.id)] : W.get(st.id) : at = c.has(st.id) ? m[c.get(st.id)] : W.get(st.id), K.set(st.id, at), at < K.get(it) + st.gap) {
|
|
2772
|
-
var Ut = K.get(it) + st.gap - at;
|
|
2773
|
-
Q.get(it).forEach(function(Et) {
|
|
2774
|
-
K.set(Et, K.get(Et) - Ut);
|
|
2775
|
-
});
|
|
2776
|
-
}
|
|
2777
|
-
} else
|
|
2778
|
-
K.set(st.id, K.get(it) + st.gap);
|
|
2779
|
-
rt.set(st.id, rt.get(st.id) - 1), rt.get(st.id) == 0 && ft.push(st.id), Z && Q.set(st.id, ht(Q.get(it), Q.get(st.id)));
|
|
2780
|
-
});
|
|
2781
|
-
}; ft.length != 0; )
|
|
2782
|
-
Lt();
|
|
2783
|
-
if (Z) {
|
|
2784
|
-
var vt = /* @__PURE__ */ new Set();
|
|
2785
|
-
x.forEach(function(ot, it) {
|
|
2786
|
-
ot.length == 0 && vt.add(it);
|
|
2787
|
-
});
|
|
2788
|
-
var Ot = [];
|
|
2789
|
-
Q.forEach(function(ot, it) {
|
|
2790
|
-
if (vt.has(it)) {
|
|
2791
|
-
var Tt = !1, st = !0, at = !1, Ut = void 0;
|
|
2792
|
-
try {
|
|
2793
|
-
for (var Et = ot[Symbol.iterator](), Nt; !(st = (Nt = Et.next()).done); st = !0) {
|
|
2794
|
-
var Xt = Nt.value;
|
|
2795
|
-
Z.has(Xt) && (Tt = !0);
|
|
2796
|
-
}
|
|
2797
|
-
} catch (It) {
|
|
2798
|
-
at = !0, Ut = It;
|
|
2799
|
-
} finally {
|
|
2800
|
-
try {
|
|
2801
|
-
!st && Et.return && Et.return();
|
|
2802
|
-
} finally {
|
|
2803
|
-
if (at)
|
|
2804
|
-
throw Ut;
|
|
2805
|
-
}
|
|
2806
|
-
}
|
|
2807
|
-
if (!Tt) {
|
|
2808
|
-
var xt = !1, Ht = void 0;
|
|
2809
|
-
Ot.forEach(function(It, Vt) {
|
|
2810
|
-
It.has([].concat(u(ot))[0]) && (xt = !0, Ht = Vt);
|
|
2811
|
-
}), xt ? ot.forEach(function(It) {
|
|
2812
|
-
Ot[Ht].add(It);
|
|
2813
|
-
}) : Ot.push(new Set(ot));
|
|
2814
|
-
}
|
|
2815
|
-
}
|
|
2816
|
-
}), Ot.forEach(function(ot, it) {
|
|
2817
|
-
var Tt = Number.POSITIVE_INFINITY, st = Number.POSITIVE_INFINITY, at = Number.NEGATIVE_INFINITY, Ut = Number.NEGATIVE_INFINITY, Et = !0, Nt = !1, Xt = void 0;
|
|
2818
|
-
try {
|
|
2819
|
-
for (var xt = ot[Symbol.iterator](), Ht; !(Et = (Ht = xt.next()).done); Et = !0) {
|
|
2820
|
-
var It = Ht.value, Vt = void 0;
|
|
2821
|
-
X == "horizontal" ? Vt = c.has(It) ? d[c.get(It)] : W.get(It) : Vt = c.has(It) ? m[c.get(It)] : W.get(It);
|
|
2822
|
-
var Qt = K.get(It);
|
|
2823
|
-
Vt < Tt && (Tt = Vt), Vt > at && (at = Vt), Qt < st && (st = Qt), Qt > Ut && (Ut = Qt);
|
|
2824
|
-
}
|
|
2825
|
-
} catch ($t) {
|
|
2826
|
-
Nt = !0, Xt = $t;
|
|
2827
|
-
} finally {
|
|
2828
|
-
try {
|
|
2829
|
-
!Et && xt.return && xt.return();
|
|
2830
|
-
} finally {
|
|
2831
|
-
if (Nt)
|
|
2832
|
-
throw Xt;
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
var _t = (Tt + at) / 2 - (st + Ut) / 2, Bt = !0, qt = !1, Kt = void 0;
|
|
2836
|
-
try {
|
|
2837
|
-
for (var Zt = ot[Symbol.iterator](), jt; !(Bt = (jt = Zt.next()).done); Bt = !0) {
|
|
2838
|
-
var Jt = jt.value;
|
|
2839
|
-
K.set(Jt, K.get(Jt) + _t);
|
|
2840
|
-
}
|
|
2841
|
-
} catch ($t) {
|
|
2842
|
-
qt = !0, Kt = $t;
|
|
2843
|
-
} finally {
|
|
2844
|
-
try {
|
|
2845
|
-
!Bt && Zt.return && Zt.return();
|
|
2846
|
-
} finally {
|
|
2847
|
-
if (qt)
|
|
2848
|
-
throw Kt;
|
|
2849
|
-
}
|
|
2850
|
-
}
|
|
2851
|
-
});
|
|
2852
|
-
}
|
|
2853
|
-
return K;
|
|
2854
|
-
}, et = function(x) {
|
|
2855
|
-
var X = 0, Z = 0, W = 0, tt = 0;
|
|
2856
|
-
if (x.forEach(function(Q) {
|
|
2857
|
-
Q.left ? d[c.get(Q.left)] - d[c.get(Q.right)] >= 0 ? X++ : Z++ : m[c.get(Q.top)] - m[c.get(Q.bottom)] >= 0 ? W++ : tt++;
|
|
2858
|
-
}), X > Z && W > tt)
|
|
2859
|
-
for (var ht = 0; ht < c.size; ht++)
|
|
2860
|
-
d[ht] = -1 * d[ht], m[ht] = -1 * m[ht];
|
|
2861
|
-
else if (X > Z)
|
|
2862
|
-
for (var rt = 0; rt < c.size; rt++)
|
|
2863
|
-
d[rt] = -1 * d[rt];
|
|
2864
|
-
else if (W > tt)
|
|
2865
|
-
for (var K = 0; K < c.size; K++)
|
|
2866
|
-
m[K] = -1 * m[K];
|
|
2867
|
-
}, e = function(x) {
|
|
2868
|
-
var X = [], Z = new y(), W = /* @__PURE__ */ new Set(), tt = 0;
|
|
2869
|
-
return x.forEach(function(ht, rt) {
|
|
2870
|
-
if (!W.has(rt)) {
|
|
2871
|
-
X[tt] = [];
|
|
2872
|
-
var K = rt;
|
|
2873
|
-
for (Z.push(K), W.add(K), X[tt].push(K); Z.length != 0; ) {
|
|
2874
|
-
K = Z.shift();
|
|
2875
|
-
var Q = x.get(K);
|
|
2876
|
-
Q.forEach(function(ft) {
|
|
2877
|
-
W.has(ft.id) || (Z.push(ft.id), W.add(ft.id), X[tt].push(ft.id));
|
|
2878
|
-
});
|
|
2879
|
-
}
|
|
2880
|
-
tt++;
|
|
2881
|
-
}
|
|
2882
|
-
}), X;
|
|
2883
|
-
}, E = function(x) {
|
|
2884
|
-
var X = /* @__PURE__ */ new Map();
|
|
2885
|
-
return x.forEach(function(Z, W) {
|
|
2886
|
-
X.set(W, []);
|
|
2887
|
-
}), x.forEach(function(Z, W) {
|
|
2888
|
-
Z.forEach(function(tt) {
|
|
2889
|
-
X.get(W).push(tt), X.get(tt.id).push({ id: W, gap: tt.gap, direction: tt.direction });
|
|
2890
|
-
});
|
|
2891
|
-
}), X;
|
|
2892
|
-
}, g = function(x) {
|
|
2893
|
-
var X = /* @__PURE__ */ new Map();
|
|
2894
|
-
return x.forEach(function(Z, W) {
|
|
2895
|
-
X.set(W, []);
|
|
2896
|
-
}), x.forEach(function(Z, W) {
|
|
2897
|
-
Z.forEach(function(tt) {
|
|
2898
|
-
X.get(tt.id).push({ id: W, gap: tt.gap, direction: tt.direction });
|
|
2899
|
-
});
|
|
2900
|
-
}), X;
|
|
2901
|
-
}, p = [], v = [], w = !1, C = !1, I = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), z = [];
|
|
2902
|
-
if (h.fixedNodeConstraint && h.fixedNodeConstraint.forEach(function(R) {
|
|
2903
|
-
I.add(R.nodeId);
|
|
2904
|
-
}), h.relativePlacementConstraint && (h.relativePlacementConstraint.forEach(function(R) {
|
|
2905
|
-
R.left ? (P.has(R.left) ? P.get(R.left).push({ id: R.right, gap: R.gap, direction: "horizontal" }) : P.set(R.left, [{ id: R.right, gap: R.gap, direction: "horizontal" }]), P.has(R.right) || P.set(R.right, [])) : (P.has(R.top) ? P.get(R.top).push({ id: R.bottom, gap: R.gap, direction: "vertical" }) : P.set(R.top, [{ id: R.bottom, gap: R.gap, direction: "vertical" }]), P.has(R.bottom) || P.set(R.bottom, []));
|
|
2906
|
-
}), O = E(P), z = e(O)), i.TRANSFORM_ON_CONSTRAINT_HANDLING) {
|
|
2907
|
-
if (h.fixedNodeConstraint && h.fixedNodeConstraint.length > 1)
|
|
2908
|
-
h.fixedNodeConstraint.forEach(function(R, x) {
|
|
2909
|
-
p[x] = [R.position.x, R.position.y], v[x] = [d[c.get(R.nodeId)], m[c.get(R.nodeId)]];
|
|
2910
|
-
}), w = !0;
|
|
2911
|
-
else if (h.alignmentConstraint)
|
|
2912
|
-
(function() {
|
|
2913
|
-
var R = 0;
|
|
2914
|
-
if (h.alignmentConstraint.vertical) {
|
|
2915
|
-
for (var x = h.alignmentConstraint.vertical, X = function(K) {
|
|
2916
|
-
var Q = /* @__PURE__ */ new Set();
|
|
2917
|
-
x[K].forEach(function(vt) {
|
|
2918
|
-
Q.add(vt);
|
|
2919
|
-
});
|
|
2920
|
-
var ft = new Set([].concat(u(Q)).filter(function(vt) {
|
|
2921
|
-
return I.has(vt);
|
|
2922
|
-
})), Lt = void 0;
|
|
2923
|
-
ft.size > 0 ? Lt = d[c.get(ft.values().next().value)] : Lt = j(Q).x, x[K].forEach(function(vt) {
|
|
2924
|
-
p[R] = [Lt, m[c.get(vt)]], v[R] = [d[c.get(vt)], m[c.get(vt)]], R++;
|
|
2925
|
-
});
|
|
2926
|
-
}, Z = 0; Z < x.length; Z++)
|
|
2927
|
-
X(Z);
|
|
2928
|
-
w = !0;
|
|
2929
|
-
}
|
|
2930
|
-
if (h.alignmentConstraint.horizontal) {
|
|
2931
|
-
for (var W = h.alignmentConstraint.horizontal, tt = function(K) {
|
|
2932
|
-
var Q = /* @__PURE__ */ new Set();
|
|
2933
|
-
W[K].forEach(function(vt) {
|
|
2934
|
-
Q.add(vt);
|
|
2935
|
-
});
|
|
2936
|
-
var ft = new Set([].concat(u(Q)).filter(function(vt) {
|
|
2937
|
-
return I.has(vt);
|
|
2938
|
-
})), Lt = void 0;
|
|
2939
|
-
ft.size > 0 ? Lt = d[c.get(ft.values().next().value)] : Lt = j(Q).y, W[K].forEach(function(vt) {
|
|
2940
|
-
p[R] = [d[c.get(vt)], Lt], v[R] = [d[c.get(vt)], m[c.get(vt)]], R++;
|
|
2941
|
-
});
|
|
2942
|
-
}, ht = 0; ht < W.length; ht++)
|
|
2943
|
-
tt(ht);
|
|
2944
|
-
w = !0;
|
|
2945
|
-
}
|
|
2946
|
-
h.relativePlacementConstraint && (C = !0);
|
|
2947
|
-
})();
|
|
2948
|
-
else if (h.relativePlacementConstraint) {
|
|
2949
|
-
for (var b = 0, F = 0, J = 0; J < z.length; J++)
|
|
2950
|
-
z[J].length > b && (b = z[J].length, F = J);
|
|
2951
|
-
if (b < O.size / 2)
|
|
2952
|
-
et(h.relativePlacementConstraint), w = !1, C = !1;
|
|
2953
|
-
else {
|
|
2954
|
-
var Y = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), S = [];
|
|
2955
|
-
z[F].forEach(function(R) {
|
|
2956
|
-
P.get(R).forEach(function(x) {
|
|
2957
|
-
x.direction == "horizontal" ? (Y.has(R) ? Y.get(R).push(x) : Y.set(R, [x]), Y.has(x.id) || Y.set(x.id, []), S.push({ left: R, right: x.id })) : (M.has(R) ? M.get(R).push(x) : M.set(R, [x]), M.has(x.id) || M.set(x.id, []), S.push({ top: R, bottom: x.id }));
|
|
2958
|
-
});
|
|
2959
|
-
}), et(S), C = !1;
|
|
2960
|
-
var H = D(Y, "horizontal"), q = D(M, "vertical");
|
|
2961
|
-
z[F].forEach(function(R, x) {
|
|
2962
|
-
v[x] = [d[c.get(R)], m[c.get(R)]], p[x] = [], H.has(R) ? p[x][0] = H.get(R) : p[x][0] = d[c.get(R)], q.has(R) ? p[x][1] = q.get(R) : p[x][1] = m[c.get(R)];
|
|
2963
|
-
}), w = !0;
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
|
-
if (w) {
|
|
2967
|
-
for (var nt = void 0, B = t.transpose(p), Dt = t.transpose(v), yt = 0; yt < B.length; yt++)
|
|
2968
|
-
B[yt] = t.multGamma(B[yt]), Dt[yt] = t.multGamma(Dt[yt]);
|
|
2969
|
-
var ut = t.multMat(B, t.transpose(Dt)), _ = s.svd(ut);
|
|
2970
|
-
nt = t.multMat(_.V, t.transpose(_.U));
|
|
2971
|
-
for (var lt = 0; lt < c.size; lt++) {
|
|
2972
|
-
var pt = [d[lt], m[lt]], mt = [nt[0][0], nt[1][0]], Mt = [nt[0][1], nt[1][1]];
|
|
2973
|
-
d[lt] = t.dotProduct(pt, mt), m[lt] = t.dotProduct(pt, Mt);
|
|
2974
|
-
}
|
|
2975
|
-
C && et(h.relativePlacementConstraint);
|
|
2976
|
-
}
|
|
2977
|
-
}
|
|
2978
|
-
if (i.ENFORCE_CONSTRAINTS) {
|
|
2979
|
-
if (h.fixedNodeConstraint && h.fixedNodeConstraint.length > 0) {
|
|
2980
|
-
var dt = { x: 0, y: 0 };
|
|
2981
|
-
h.fixedNodeConstraint.forEach(function(R, x) {
|
|
2982
|
-
var X = { x: d[c.get(R.nodeId)], y: m[c.get(R.nodeId)] }, Z = R.position, W = V(Z, X);
|
|
2983
|
-
dt.x += W.x, dt.y += W.y;
|
|
2984
|
-
}), dt.x /= h.fixedNodeConstraint.length, dt.y /= h.fixedNodeConstraint.length, d.forEach(function(R, x) {
|
|
2985
|
-
d[x] += dt.x;
|
|
2986
|
-
}), m.forEach(function(R, x) {
|
|
2987
|
-
m[x] += dt.y;
|
|
2988
|
-
}), h.fixedNodeConstraint.forEach(function(R) {
|
|
2989
|
-
d[c.get(R.nodeId)] = R.position.x, m[c.get(R.nodeId)] = R.position.y;
|
|
2990
|
-
});
|
|
2991
|
-
}
|
|
2992
|
-
if (h.alignmentConstraint) {
|
|
2993
|
-
if (h.alignmentConstraint.vertical)
|
|
2994
|
-
for (var At = h.alignmentConstraint.vertical, wt = function(x) {
|
|
2995
|
-
var X = /* @__PURE__ */ new Set();
|
|
2996
|
-
At[x].forEach(function(tt) {
|
|
2997
|
-
X.add(tt);
|
|
2998
|
-
});
|
|
2999
|
-
var Z = new Set([].concat(u(X)).filter(function(tt) {
|
|
3000
|
-
return I.has(tt);
|
|
3001
|
-
})), W = void 0;
|
|
3002
|
-
Z.size > 0 ? W = d[c.get(Z.values().next().value)] : W = j(X).x, X.forEach(function(tt) {
|
|
3003
|
-
I.has(tt) || (d[c.get(tt)] = W);
|
|
3004
|
-
});
|
|
3005
|
-
}, bt = 0; bt < At.length; bt++)
|
|
3006
|
-
wt(bt);
|
|
3007
|
-
if (h.alignmentConstraint.horizontal)
|
|
3008
|
-
for (var Gt = h.alignmentConstraint.horizontal, Ft = function(x) {
|
|
3009
|
-
var X = /* @__PURE__ */ new Set();
|
|
3010
|
-
Gt[x].forEach(function(tt) {
|
|
3011
|
-
X.add(tt);
|
|
3012
|
-
});
|
|
3013
|
-
var Z = new Set([].concat(u(X)).filter(function(tt) {
|
|
3014
|
-
return I.has(tt);
|
|
3015
|
-
})), W = void 0;
|
|
3016
|
-
Z.size > 0 ? W = m[c.get(Z.values().next().value)] : W = j(X).y, X.forEach(function(tt) {
|
|
3017
|
-
I.has(tt) || (m[c.get(tt)] = W);
|
|
3018
|
-
});
|
|
3019
|
-
}, Rt = 0; Rt < Gt.length; Rt++)
|
|
3020
|
-
Ft(Rt);
|
|
3021
|
-
}
|
|
3022
|
-
h.relativePlacementConstraint && function() {
|
|
3023
|
-
var R = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map(), ht = /* @__PURE__ */ new Set(), rt = /* @__PURE__ */ new Set();
|
|
3024
|
-
if (I.forEach(function(St) {
|
|
3025
|
-
ht.add(St), rt.add(St);
|
|
3026
|
-
}), h.alignmentConstraint) {
|
|
3027
|
-
if (h.alignmentConstraint.vertical)
|
|
3028
|
-
for (var K = h.alignmentConstraint.vertical, Q = function(ct) {
|
|
3029
|
-
X.set("dummy" + ct, []), K[ct].forEach(function(Ct) {
|
|
3030
|
-
R.set(Ct, "dummy" + ct), X.get("dummy" + ct).push(Ct), I.has(Ct) && ht.add("dummy" + ct);
|
|
3031
|
-
}), W.set("dummy" + ct, d[c.get(K[ct][0])]);
|
|
3032
|
-
}, ft = 0; ft < K.length; ft++)
|
|
3033
|
-
Q(ft);
|
|
3034
|
-
if (h.alignmentConstraint.horizontal)
|
|
3035
|
-
for (var Lt = h.alignmentConstraint.horizontal, vt = function(ct) {
|
|
3036
|
-
Z.set("dummy" + ct, []), Lt[ct].forEach(function(Ct) {
|
|
3037
|
-
x.set(Ct, "dummy" + ct), Z.get("dummy" + ct).push(Ct), I.has(Ct) && rt.add("dummy" + ct);
|
|
3038
|
-
}), tt.set("dummy" + ct, m[c.get(Lt[ct][0])]);
|
|
3039
|
-
}, Ot = 0; Ot < Lt.length; Ot++)
|
|
3040
|
-
vt(Ot);
|
|
3041
|
-
}
|
|
3042
|
-
var ot = /* @__PURE__ */ new Map(), it = /* @__PURE__ */ new Map(), Tt = function(ct) {
|
|
3043
|
-
P.get(ct).forEach(function(Ct) {
|
|
3044
|
-
var zt = void 0, Wt = void 0;
|
|
3045
|
-
Ct.direction == "horizontal" ? (zt = R.get(ct) ? R.get(ct) : ct, R.get(Ct.id) ? Wt = { id: R.get(Ct.id), gap: Ct.gap, direction: Ct.direction } : Wt = Ct, ot.has(zt) ? ot.get(zt).push(Wt) : ot.set(zt, [Wt]), ot.has(Wt.id) || ot.set(Wt.id, [])) : (zt = x.get(ct) ? x.get(ct) : ct, x.get(Ct.id) ? Wt = { id: x.get(Ct.id), gap: Ct.gap, direction: Ct.direction } : Wt = Ct, it.has(zt) ? it.get(zt).push(Wt) : it.set(zt, [Wt]), it.has(Wt.id) || it.set(Wt.id, []));
|
|
3046
|
-
});
|
|
3047
|
-
}, st = !0, at = !1, Ut = void 0;
|
|
3048
|
-
try {
|
|
3049
|
-
for (var Et = P.keys()[Symbol.iterator](), Nt; !(st = (Nt = Et.next()).done); st = !0) {
|
|
3050
|
-
var Xt = Nt.value;
|
|
3051
|
-
Tt(Xt);
|
|
3052
|
-
}
|
|
3053
|
-
} catch (St) {
|
|
3054
|
-
at = !0, Ut = St;
|
|
3055
|
-
} finally {
|
|
3056
|
-
try {
|
|
3057
|
-
!st && Et.return && Et.return();
|
|
3058
|
-
} finally {
|
|
3059
|
-
if (at)
|
|
3060
|
-
throw Ut;
|
|
3061
|
-
}
|
|
3062
|
-
}
|
|
3063
|
-
var xt = E(ot), Ht = E(it), It = e(xt), Vt = e(Ht), Qt = g(ot), _t = g(it), Bt = [], qt = [];
|
|
3064
|
-
It.forEach(function(St, ct) {
|
|
3065
|
-
Bt[ct] = [], St.forEach(function(Ct) {
|
|
3066
|
-
Qt.get(Ct).length == 0 && Bt[ct].push(Ct);
|
|
3067
|
-
});
|
|
3068
|
-
}), Vt.forEach(function(St, ct) {
|
|
3069
|
-
qt[ct] = [], St.forEach(function(Ct) {
|
|
3070
|
-
_t.get(Ct).length == 0 && qt[ct].push(Ct);
|
|
3071
|
-
});
|
|
3072
|
-
});
|
|
3073
|
-
var Kt = D(ot, "horizontal", ht, W, Bt), Zt = D(it, "vertical", rt, tt, qt), jt = function(ct) {
|
|
3074
|
-
X.get(ct) ? X.get(ct).forEach(function(Ct) {
|
|
3075
|
-
d[c.get(Ct)] = Kt.get(ct);
|
|
3076
|
-
}) : d[c.get(ct)] = Kt.get(ct);
|
|
3077
|
-
}, Jt = !0, $t = !1, he = void 0;
|
|
3078
|
-
try {
|
|
3079
|
-
for (var te = Kt.keys()[Symbol.iterator](), le; !(Jt = (le = te.next()).done); Jt = !0) {
|
|
3080
|
-
var ee = le.value;
|
|
3081
|
-
jt(ee);
|
|
3082
|
-
}
|
|
3083
|
-
} catch (St) {
|
|
3084
|
-
$t = !0, he = St;
|
|
3085
|
-
} finally {
|
|
3086
|
-
try {
|
|
3087
|
-
!Jt && te.return && te.return();
|
|
3088
|
-
} finally {
|
|
3089
|
-
if ($t)
|
|
3090
|
-
throw he;
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
var pe = function(ct) {
|
|
3094
|
-
Z.get(ct) ? Z.get(ct).forEach(function(Ct) {
|
|
3095
|
-
m[c.get(Ct)] = Zt.get(ct);
|
|
3096
|
-
}) : m[c.get(ct)] = Zt.get(ct);
|
|
3097
|
-
}, re = !0, fe = !1, ue = void 0;
|
|
3098
|
-
try {
|
|
3099
|
-
for (var ie = Zt.keys()[Symbol.iterator](), ge; !(re = (ge = ie.next()).done); re = !0) {
|
|
3100
|
-
var ee = ge.value;
|
|
3101
|
-
pe(ee);
|
|
3102
|
-
}
|
|
3103
|
-
} catch (St) {
|
|
3104
|
-
fe = !0, ue = St;
|
|
3105
|
-
} finally {
|
|
3106
|
-
try {
|
|
3107
|
-
!re && ie.return && ie.return();
|
|
3108
|
-
} finally {
|
|
3109
|
-
if (fe)
|
|
3110
|
-
throw ue;
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
}();
|
|
3114
|
-
}
|
|
3115
|
-
for (var Pt = 0; Pt < G.length; Pt++) {
|
|
3116
|
-
var Yt = G[Pt];
|
|
3117
|
-
Yt.getChild() == null && Yt.setCenter(d[c.get(Yt.id)], m[c.get(Yt.id)]);
|
|
3118
|
-
}
|
|
3119
|
-
}, n.exports = o;
|
|
3120
|
-
}
|
|
3121
|
-
),
|
|
3122
|
-
/***/
|
|
3123
|
-
551: (
|
|
3124
|
-
/***/
|
|
3125
|
-
(n) => {
|
|
3126
|
-
n.exports = k;
|
|
3127
|
-
}
|
|
3128
|
-
)
|
|
3129
|
-
/******/
|
|
3130
|
-
}, A = {};
|
|
3131
|
-
function T(n) {
|
|
3132
|
-
var r = A[n];
|
|
3133
|
-
if (r !== void 0)
|
|
3134
|
-
return r.exports;
|
|
3135
|
-
var a = A[n] = {
|
|
3136
|
-
/******/
|
|
3137
|
-
// no module.id needed
|
|
3138
|
-
/******/
|
|
3139
|
-
// no module.loaded needed
|
|
3140
|
-
/******/
|
|
3141
|
-
exports: {}
|
|
3142
|
-
/******/
|
|
3143
|
-
};
|
|
3144
|
-
return gt[n](a, a.exports, T), a.exports;
|
|
3145
|
-
}
|
|
3146
|
-
var l = T(45);
|
|
3147
|
-
return l;
|
|
3148
|
-
})()
|
|
3149
|
-
);
|
|
3150
|
-
});
|
|
3151
|
-
}(ae)), ae.exports;
|
|
3152
|
-
}
|
|
3153
|
-
(function(kt, se) {
|
|
3154
|
-
(function(gt, A) {
|
|
3155
|
-
kt.exports = A(Te());
|
|
3156
|
-
})(oe, function(k) {
|
|
3157
|
-
return (
|
|
3158
|
-
/******/
|
|
3159
|
-
(() => {
|
|
3160
|
-
var gt = {
|
|
3161
|
-
/***/
|
|
3162
|
-
658: (
|
|
3163
|
-
/***/
|
|
3164
|
-
(n) => {
|
|
3165
|
-
n.exports = Object.assign != null ? Object.assign.bind(Object) : function(r) {
|
|
3166
|
-
for (var a = arguments.length, u = Array(a > 1 ? a - 1 : 0), i = 1; i < a; i++)
|
|
3167
|
-
u[i - 1] = arguments[i];
|
|
3168
|
-
return u.forEach(function(y) {
|
|
3169
|
-
Object.keys(y).forEach(function(t) {
|
|
3170
|
-
return r[t] = y[t];
|
|
3171
|
-
});
|
|
3172
|
-
}), r;
|
|
3173
|
-
};
|
|
3174
|
-
}
|
|
3175
|
-
),
|
|
3176
|
-
/***/
|
|
3177
|
-
548: (
|
|
3178
|
-
/***/
|
|
3179
|
-
(n, r, a) => {
|
|
3180
|
-
var u = /* @__PURE__ */ function() {
|
|
3181
|
-
function t(s, o) {
|
|
3182
|
-
var f = [], h = !0, N = !1, c = void 0;
|
|
3183
|
-
try {
|
|
3184
|
-
for (var d = s[Symbol.iterator](), m; !(h = (m = d.next()).done) && (f.push(m.value), !(o && f.length === o)); h = !0)
|
|
3185
|
-
;
|
|
3186
|
-
} catch (G) {
|
|
3187
|
-
N = !0, c = G;
|
|
3188
|
-
} finally {
|
|
3189
|
-
try {
|
|
3190
|
-
!h && d.return && d.return();
|
|
3191
|
-
} finally {
|
|
3192
|
-
if (N) throw c;
|
|
3193
|
-
}
|
|
3194
|
-
}
|
|
3195
|
-
return f;
|
|
3196
|
-
}
|
|
3197
|
-
return function(s, o) {
|
|
3198
|
-
if (Array.isArray(s))
|
|
3199
|
-
return s;
|
|
3200
|
-
if (Symbol.iterator in Object(s))
|
|
3201
|
-
return t(s, o);
|
|
3202
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
3203
|
-
};
|
|
3204
|
-
}(), i = a(140).layoutBase.LinkedList, y = {};
|
|
3205
|
-
y.getTopMostNodes = function(t) {
|
|
3206
|
-
for (var s = {}, o = 0; o < t.length; o++)
|
|
3207
|
-
s[t[o].id()] = !0;
|
|
3208
|
-
var f = t.filter(function(h, N) {
|
|
3209
|
-
typeof h == "number" && (h = N);
|
|
3210
|
-
for (var c = h.parent()[0]; c != null; ) {
|
|
3211
|
-
if (s[c.id()])
|
|
3212
|
-
return !1;
|
|
3213
|
-
c = c.parent()[0];
|
|
3214
|
-
}
|
|
3215
|
-
return !0;
|
|
3216
|
-
});
|
|
3217
|
-
return f;
|
|
3218
|
-
}, y.connectComponents = function(t, s, o, f) {
|
|
3219
|
-
var h = new i(), N = /* @__PURE__ */ new Set(), c = [], d = void 0, m = void 0, G = void 0, L = !1, U = 1, $ = [], V = [], j = function() {
|
|
3220
|
-
var et = t.collection();
|
|
3221
|
-
V.push(et);
|
|
3222
|
-
var e = o[0], E = t.collection();
|
|
3223
|
-
E.merge(e).merge(e.descendants().intersection(s)), c.push(e), E.forEach(function(v) {
|
|
3224
|
-
h.push(v), N.add(v), et.merge(v);
|
|
3225
|
-
});
|
|
3226
|
-
for (var g = function() {
|
|
3227
|
-
e = h.shift();
|
|
3228
|
-
var w = t.collection();
|
|
3229
|
-
e.neighborhood().nodes().forEach(function(O) {
|
|
3230
|
-
s.intersection(e.edgesWith(O)).length > 0 && w.merge(O);
|
|
3231
|
-
});
|
|
3232
|
-
for (var C = 0; C < w.length; C++) {
|
|
3233
|
-
var I = w[C];
|
|
3234
|
-
if (d = o.intersection(I.union(I.ancestors())), d != null && !N.has(d[0])) {
|
|
3235
|
-
var P = d.union(d.descendants());
|
|
3236
|
-
P.forEach(function(O) {
|
|
3237
|
-
h.push(O), N.add(O), et.merge(O), o.has(O) && c.push(O);
|
|
3238
|
-
});
|
|
3239
|
-
}
|
|
3240
|
-
}
|
|
3241
|
-
}; h.length != 0; )
|
|
3242
|
-
g();
|
|
3243
|
-
if (et.forEach(function(v) {
|
|
3244
|
-
s.intersection(v.connectedEdges()).forEach(function(w) {
|
|
3245
|
-
et.has(w.source()) && et.has(w.target()) && et.merge(w);
|
|
3246
|
-
});
|
|
3247
|
-
}), c.length == o.length && (L = !0), !L || L && U > 1) {
|
|
3248
|
-
m = c[0], G = m.connectedEdges().length, c.forEach(function(v) {
|
|
3249
|
-
v.connectedEdges().length < G && (G = v.connectedEdges().length, m = v);
|
|
3250
|
-
}), $.push(m.id());
|
|
3251
|
-
var p = t.collection();
|
|
3252
|
-
p.merge(c[0]), c.forEach(function(v) {
|
|
3253
|
-
p.merge(v);
|
|
3254
|
-
}), c = [], o = o.difference(p), U++;
|
|
3255
|
-
}
|
|
3256
|
-
};
|
|
3257
|
-
do
|
|
3258
|
-
j();
|
|
3259
|
-
while (!L);
|
|
3260
|
-
return f && $.length > 0 && f.set("dummy" + (f.size + 1), $), V;
|
|
3261
|
-
}, y.relocateComponent = function(t, s, o) {
|
|
3262
|
-
if (!o.fixedNodeConstraint) {
|
|
3263
|
-
var f = Number.POSITIVE_INFINITY, h = Number.NEGATIVE_INFINITY, N = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY;
|
|
3264
|
-
if (o.quality == "draft") {
|
|
3265
|
-
var d = !0, m = !1, G = void 0;
|
|
3266
|
-
try {
|
|
3267
|
-
for (var L = s.nodeIndexes[Symbol.iterator](), U; !(d = (U = L.next()).done); d = !0) {
|
|
3268
|
-
var $ = U.value, V = u($, 2), j = V[0], D = V[1], et = o.cy.getElementById(j);
|
|
3269
|
-
if (et) {
|
|
3270
|
-
var e = et.boundingBox(), E = s.xCoords[D] - e.w / 2, g = s.xCoords[D] + e.w / 2, p = s.yCoords[D] - e.h / 2, v = s.yCoords[D] + e.h / 2;
|
|
3271
|
-
E < f && (f = E), g > h && (h = g), p < N && (N = p), v > c && (c = v);
|
|
3272
|
-
}
|
|
3273
|
-
}
|
|
3274
|
-
} catch (O) {
|
|
3275
|
-
m = !0, G = O;
|
|
3276
|
-
} finally {
|
|
3277
|
-
try {
|
|
3278
|
-
!d && L.return && L.return();
|
|
3279
|
-
} finally {
|
|
3280
|
-
if (m)
|
|
3281
|
-
throw G;
|
|
3282
|
-
}
|
|
3283
|
-
}
|
|
3284
|
-
var w = t.x - (h + f) / 2, C = t.y - (c + N) / 2;
|
|
3285
|
-
s.xCoords = s.xCoords.map(function(O) {
|
|
3286
|
-
return O + w;
|
|
3287
|
-
}), s.yCoords = s.yCoords.map(function(O) {
|
|
3288
|
-
return O + C;
|
|
3289
|
-
});
|
|
3290
|
-
} else {
|
|
3291
|
-
Object.keys(s).forEach(function(O) {
|
|
3292
|
-
var z = s[O], b = z.getRect().x, F = z.getRect().x + z.getRect().width, J = z.getRect().y, Y = z.getRect().y + z.getRect().height;
|
|
3293
|
-
b < f && (f = b), F > h && (h = F), J < N && (N = J), Y > c && (c = Y);
|
|
3294
|
-
});
|
|
3295
|
-
var I = t.x - (h + f) / 2, P = t.y - (c + N) / 2;
|
|
3296
|
-
Object.keys(s).forEach(function(O) {
|
|
3297
|
-
var z = s[O];
|
|
3298
|
-
z.setCenter(z.getCenterX() + I, z.getCenterY() + P);
|
|
3299
|
-
});
|
|
3300
|
-
}
|
|
3301
|
-
}
|
|
3302
|
-
}, y.calcBoundingBox = function(t, s, o, f) {
|
|
3303
|
-
for (var h = Number.MAX_SAFE_INTEGER, N = Number.MIN_SAFE_INTEGER, c = Number.MAX_SAFE_INTEGER, d = Number.MIN_SAFE_INTEGER, m = void 0, G = void 0, L = void 0, U = void 0, $ = t.descendants().not(":parent"), V = $.length, j = 0; j < V; j++) {
|
|
3304
|
-
var D = $[j];
|
|
3305
|
-
m = s[f.get(D.id())] - D.width() / 2, G = s[f.get(D.id())] + D.width() / 2, L = o[f.get(D.id())] - D.height() / 2, U = o[f.get(D.id())] + D.height() / 2, h > m && (h = m), N < G && (N = G), c > L && (c = L), d < U && (d = U);
|
|
3306
|
-
}
|
|
3307
|
-
var et = {};
|
|
3308
|
-
return et.topLeftX = h, et.topLeftY = c, et.width = N - h, et.height = d - c, et;
|
|
3309
|
-
}, y.calcParentsWithoutChildren = function(t, s) {
|
|
3310
|
-
var o = t.collection();
|
|
3311
|
-
return s.nodes(":parent").forEach(function(f) {
|
|
3312
|
-
var h = !1;
|
|
3313
|
-
f.children().forEach(function(N) {
|
|
3314
|
-
N.css("display") != "none" && (h = !0);
|
|
3315
|
-
}), h || o.merge(f);
|
|
3316
|
-
}), o;
|
|
3317
|
-
}, n.exports = y;
|
|
3318
|
-
}
|
|
3319
|
-
),
|
|
3320
|
-
/***/
|
|
3321
|
-
816: (
|
|
3322
|
-
/***/
|
|
3323
|
-
(n, r, a) => {
|
|
3324
|
-
var u = a(548), i = a(140).CoSELayout, y = a(140).CoSENode, t = a(140).layoutBase.PointD, s = a(140).layoutBase.DimensionD, o = a(140).layoutBase.LayoutConstants, f = a(140).layoutBase.FDLayoutConstants, h = a(140).CoSEConstants, N = function(d, m) {
|
|
3325
|
-
var G = d.cy, L = d.eles, U = L.nodes(), $ = L.edges(), V = void 0, j = void 0, D = void 0, et = {};
|
|
3326
|
-
d.randomize && (V = m.nodeIndexes, j = m.xCoords, D = m.yCoords);
|
|
3327
|
-
var e = function(O) {
|
|
3328
|
-
return typeof O == "function";
|
|
3329
|
-
}, E = function(O, z) {
|
|
3330
|
-
return e(O) ? O(z) : O;
|
|
3331
|
-
}, g = u.calcParentsWithoutChildren(G, L), p = function P(O, z, b, F) {
|
|
3332
|
-
for (var J = z.length, Y = 0; Y < J; Y++) {
|
|
3333
|
-
var M = z[Y], S = null;
|
|
3334
|
-
M.intersection(g).length == 0 && (S = M.children());
|
|
3335
|
-
var H = void 0, q = M.layoutDimensions({
|
|
3336
|
-
nodeDimensionsIncludeLabels: F.nodeDimensionsIncludeLabels
|
|
3337
|
-
});
|
|
3338
|
-
if (M.outerWidth() != null && M.outerHeight() != null)
|
|
3339
|
-
if (F.randomize)
|
|
3340
|
-
if (!M.isParent())
|
|
3341
|
-
H = O.add(new y(b.graphManager, new t(j[V.get(M.id())] - q.w / 2, D[V.get(M.id())] - q.h / 2), new s(parseFloat(q.w), parseFloat(q.h))));
|
|
3342
|
-
else {
|
|
3343
|
-
var nt = u.calcBoundingBox(M, j, D, V);
|
|
3344
|
-
M.intersection(g).length == 0 ? H = O.add(new y(b.graphManager, new t(nt.topLeftX, nt.topLeftY), new s(nt.width, nt.height))) : H = O.add(new y(b.graphManager, new t(nt.topLeftX, nt.topLeftY), new s(parseFloat(q.w), parseFloat(q.h))));
|
|
3345
|
-
}
|
|
3346
|
-
else
|
|
3347
|
-
H = O.add(new y(b.graphManager, new t(M.position("x") - q.w / 2, M.position("y") - q.h / 2), new s(parseFloat(q.w), parseFloat(q.h))));
|
|
3348
|
-
else
|
|
3349
|
-
H = O.add(new y(this.graphManager));
|
|
3350
|
-
if (H.id = M.data("id"), H.nodeRepulsion = E(F.nodeRepulsion, M), H.paddingLeft = parseInt(M.css("padding")), H.paddingTop = parseInt(M.css("padding")), H.paddingRight = parseInt(M.css("padding")), H.paddingBottom = parseInt(M.css("padding")), F.nodeDimensionsIncludeLabels && (H.labelWidth = M.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).w, H.labelHeight = M.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).h, H.labelPosVertical = M.css("text-valign"), H.labelPosHorizontal = M.css("text-halign")), et[M.data("id")] = H, isNaN(H.rect.x) && (H.rect.x = 0), isNaN(H.rect.y) && (H.rect.y = 0), S != null && S.length > 0) {
|
|
3351
|
-
var B = void 0;
|
|
3352
|
-
B = b.getGraphManager().add(b.newGraph(), H), P(B, S, b, F);
|
|
3353
|
-
}
|
|
3354
|
-
}
|
|
3355
|
-
}, v = function(O, z, b) {
|
|
3356
|
-
for (var F = 0, J = 0, Y = 0; Y < b.length; Y++) {
|
|
3357
|
-
var M = b[Y], S = et[M.data("source")], H = et[M.data("target")];
|
|
3358
|
-
if (S && H && S !== H && S.getEdgesBetween(H).length == 0) {
|
|
3359
|
-
var q = z.add(O.newEdge(), S, H);
|
|
3360
|
-
q.id = M.id(), q.idealLength = E(d.idealEdgeLength, M), q.edgeElasticity = E(d.edgeElasticity, M), F += q.idealLength, J++;
|
|
3361
|
-
}
|
|
3362
|
-
}
|
|
3363
|
-
d.idealEdgeLength != null && (J > 0 ? h.DEFAULT_EDGE_LENGTH = f.DEFAULT_EDGE_LENGTH = F / J : e(d.idealEdgeLength) ? h.DEFAULT_EDGE_LENGTH = f.DEFAULT_EDGE_LENGTH = 50 : h.DEFAULT_EDGE_LENGTH = f.DEFAULT_EDGE_LENGTH = d.idealEdgeLength, h.MIN_REPULSION_DIST = f.MIN_REPULSION_DIST = f.DEFAULT_EDGE_LENGTH / 10, h.DEFAULT_RADIAL_SEPARATION = f.DEFAULT_EDGE_LENGTH);
|
|
3364
|
-
}, w = function(O, z) {
|
|
3365
|
-
z.fixedNodeConstraint && (O.constraints.fixedNodeConstraint = z.fixedNodeConstraint), z.alignmentConstraint && (O.constraints.alignmentConstraint = z.alignmentConstraint), z.relativePlacementConstraint && (O.constraints.relativePlacementConstraint = z.relativePlacementConstraint);
|
|
3366
|
-
};
|
|
3367
|
-
d.nestingFactor != null && (h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = d.nestingFactor), d.gravity != null && (h.DEFAULT_GRAVITY_STRENGTH = f.DEFAULT_GRAVITY_STRENGTH = d.gravity), d.numIter != null && (h.MAX_ITERATIONS = f.MAX_ITERATIONS = d.numIter), d.gravityRange != null && (h.DEFAULT_GRAVITY_RANGE_FACTOR = f.DEFAULT_GRAVITY_RANGE_FACTOR = d.gravityRange), d.gravityCompound != null && (h.DEFAULT_COMPOUND_GRAVITY_STRENGTH = f.DEFAULT_COMPOUND_GRAVITY_STRENGTH = d.gravityCompound), d.gravityRangeCompound != null && (h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = d.gravityRangeCompound), d.initialEnergyOnIncremental != null && (h.DEFAULT_COOLING_FACTOR_INCREMENTAL = f.DEFAULT_COOLING_FACTOR_INCREMENTAL = d.initialEnergyOnIncremental), d.tilingCompareBy != null && (h.TILING_COMPARE_BY = d.tilingCompareBy), d.quality == "proof" ? o.QUALITY = 2 : o.QUALITY = 0, h.NODE_DIMENSIONS_INCLUDE_LABELS = f.NODE_DIMENSIONS_INCLUDE_LABELS = o.NODE_DIMENSIONS_INCLUDE_LABELS = d.nodeDimensionsIncludeLabels, h.DEFAULT_INCREMENTAL = f.DEFAULT_INCREMENTAL = o.DEFAULT_INCREMENTAL = !d.randomize, h.ANIMATE = f.ANIMATE = o.ANIMATE = d.animate, h.TILE = d.tile, h.TILING_PADDING_VERTICAL = typeof d.tilingPaddingVertical == "function" ? d.tilingPaddingVertical.call() : d.tilingPaddingVertical, h.TILING_PADDING_HORIZONTAL = typeof d.tilingPaddingHorizontal == "function" ? d.tilingPaddingHorizontal.call() : d.tilingPaddingHorizontal, h.DEFAULT_INCREMENTAL = f.DEFAULT_INCREMENTAL = o.DEFAULT_INCREMENTAL = !0, h.PURE_INCREMENTAL = !d.randomize, o.DEFAULT_UNIFORM_LEAF_NODE_SIZES = d.uniformNodeDimensions, d.step == "transformed" && (h.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, h.ENFORCE_CONSTRAINTS = !1, h.APPLY_LAYOUT = !1), d.step == "enforced" && (h.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, h.ENFORCE_CONSTRAINTS = !0, h.APPLY_LAYOUT = !1), d.step == "cose" && (h.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, h.ENFORCE_CONSTRAINTS = !1, h.APPLY_LAYOUT = !0), d.step == "all" && (d.randomize ? h.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : h.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, h.ENFORCE_CONSTRAINTS = !0, h.APPLY_LAYOUT = !0), d.fixedNodeConstraint || d.alignmentConstraint || d.relativePlacementConstraint ? h.TREE_REDUCTION_ON_INCREMENTAL = !1 : h.TREE_REDUCTION_ON_INCREMENTAL = !0;
|
|
3368
|
-
var C = new i(), I = C.newGraphManager();
|
|
3369
|
-
return p(I.addRoot(), u.getTopMostNodes(U), C, d), v(C, I, $), w(C, d), C.runLayout(), et;
|
|
3370
|
-
};
|
|
3371
|
-
n.exports = { coseLayout: N };
|
|
3372
|
-
}
|
|
3373
|
-
),
|
|
3374
|
-
/***/
|
|
3375
|
-
212: (
|
|
3376
|
-
/***/
|
|
3377
|
-
(n, r, a) => {
|
|
3378
|
-
var u = /* @__PURE__ */ function() {
|
|
3379
|
-
function d(m, G) {
|
|
3380
|
-
for (var L = 0; L < G.length; L++) {
|
|
3381
|
-
var U = G[L];
|
|
3382
|
-
U.enumerable = U.enumerable || !1, U.configurable = !0, "value" in U && (U.writable = !0), Object.defineProperty(m, U.key, U);
|
|
3383
|
-
}
|
|
3384
|
-
}
|
|
3385
|
-
return function(m, G, L) {
|
|
3386
|
-
return G && d(m.prototype, G), L && d(m, L), m;
|
|
3387
|
-
};
|
|
3388
|
-
}();
|
|
3389
|
-
function i(d, m) {
|
|
3390
|
-
if (!(d instanceof m))
|
|
3391
|
-
throw new TypeError("Cannot call a class as a function");
|
|
3392
|
-
}
|
|
3393
|
-
var y = a(658), t = a(548), s = a(657), o = s.spectralLayout, f = a(816), h = f.coseLayout, N = Object.freeze({
|
|
3394
|
-
// 'draft', 'default' or 'proof'
|
|
3395
|
-
// - 'draft' only applies spectral layout
|
|
3396
|
-
// - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)
|
|
3397
|
-
// - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate)
|
|
3398
|
-
quality: "default",
|
|
3399
|
-
// Use random node positions at beginning of layout
|
|
3400
|
-
// if this is set to false, then quality option must be "proof"
|
|
3401
|
-
randomize: !0,
|
|
3402
|
-
// Whether or not to animate the layout
|
|
3403
|
-
animate: !0,
|
|
3404
|
-
// Duration of animation in ms, if enabled
|
|
3405
|
-
animationDuration: 1e3,
|
|
3406
|
-
// Easing of animation, if enabled
|
|
3407
|
-
animationEasing: void 0,
|
|
3408
|
-
// Fit the viewport to the repositioned nodes
|
|
3409
|
-
fit: !0,
|
|
3410
|
-
// Padding around layout
|
|
3411
|
-
padding: 30,
|
|
3412
|
-
// Whether to include labels in node dimensions. Valid in "proof" quality
|
|
3413
|
-
nodeDimensionsIncludeLabels: !1,
|
|
3414
|
-
// Whether or not simple nodes (non-compound nodes) are of uniform dimensions
|
|
3415
|
-
uniformNodeDimensions: !1,
|
|
3416
|
-
// Whether to pack disconnected components - valid only if randomize: true
|
|
3417
|
-
packComponents: !0,
|
|
3418
|
-
// Layout step - all, transformed, enforced, cose - for debug purpose only
|
|
3419
|
-
step: "all",
|
|
3420
|
-
/* spectral layout options */
|
|
3421
|
-
// False for random, true for greedy
|
|
3422
|
-
samplingType: !0,
|
|
3423
|
-
// Sample size to construct distance matrix
|
|
3424
|
-
sampleSize: 25,
|
|
3425
|
-
// Separation amount between nodes
|
|
3426
|
-
nodeSeparation: 75,
|
|
3427
|
-
// Power iteration tolerance
|
|
3428
|
-
piTol: 1e-7,
|
|
3429
|
-
/* CoSE layout options */
|
|
3430
|
-
// Node repulsion (non overlapping) multiplier
|
|
3431
|
-
nodeRepulsion: function(m) {
|
|
3432
|
-
return 4500;
|
|
3433
|
-
},
|
|
3434
|
-
// Ideal edge (non nested) length
|
|
3435
|
-
idealEdgeLength: function(m) {
|
|
3436
|
-
return 50;
|
|
3437
|
-
},
|
|
3438
|
-
// Divisor to compute edge forces
|
|
3439
|
-
edgeElasticity: function(m) {
|
|
3440
|
-
return 0.45;
|
|
3441
|
-
},
|
|
3442
|
-
// Nesting factor (multiplier) to compute ideal edge length for nested edges
|
|
3443
|
-
nestingFactor: 0.1,
|
|
3444
|
-
// Gravity force (constant)
|
|
3445
|
-
gravity: 0.25,
|
|
3446
|
-
// Maximum number of iterations to perform
|
|
3447
|
-
numIter: 2500,
|
|
3448
|
-
// For enabling tiling
|
|
3449
|
-
tile: !0,
|
|
3450
|
-
// The function that specifies the criteria for comparing nodes while sorting them during tiling operation.
|
|
3451
|
-
// Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.
|
|
3452
|
-
tilingCompareBy: void 0,
|
|
3453
|
-
// Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
|
|
3454
|
-
tilingPaddingVertical: 10,
|
|
3455
|
-
// Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
|
|
3456
|
-
tilingPaddingHorizontal: 10,
|
|
3457
|
-
// Gravity range (constant) for compounds
|
|
3458
|
-
gravityRangeCompound: 1.5,
|
|
3459
|
-
// Gravity force (constant) for compounds
|
|
3460
|
-
gravityCompound: 1,
|
|
3461
|
-
// Gravity range (constant)
|
|
3462
|
-
gravityRange: 3.8,
|
|
3463
|
-
// Initial cooling factor for incremental layout
|
|
3464
|
-
initialEnergyOnIncremental: 0.3,
|
|
3465
|
-
/* constraint options */
|
|
3466
|
-
// Fix required nodes to predefined positions
|
|
3467
|
-
// [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]
|
|
3468
|
-
fixedNodeConstraint: void 0,
|
|
3469
|
-
// Align required nodes in vertical/horizontal direction
|
|
3470
|
-
// {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}
|
|
3471
|
-
alignmentConstraint: void 0,
|
|
3472
|
-
// Place two nodes relatively in vertical/horizontal direction
|
|
3473
|
-
// [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]
|
|
3474
|
-
relativePlacementConstraint: void 0,
|
|
3475
|
-
/* layout event callbacks */
|
|
3476
|
-
ready: function() {
|
|
3477
|
-
},
|
|
3478
|
-
// on layoutready
|
|
3479
|
-
stop: function() {
|
|
3480
|
-
}
|
|
3481
|
-
// on layoutstop
|
|
3482
|
-
}), c = function() {
|
|
3483
|
-
function d(m) {
|
|
3484
|
-
i(this, d), this.options = y({}, N, m);
|
|
3485
|
-
}
|
|
3486
|
-
return u(d, [{
|
|
3487
|
-
key: "run",
|
|
3488
|
-
value: function() {
|
|
3489
|
-
var G = this, L = this.options, U = L.cy, $ = L.eles, V = [], j = [], D = void 0, et = [];
|
|
3490
|
-
L.fixedNodeConstraint && (!Array.isArray(L.fixedNodeConstraint) || L.fixedNodeConstraint.length == 0) && (L.fixedNodeConstraint = void 0), L.alignmentConstraint && (L.alignmentConstraint.vertical && (!Array.isArray(L.alignmentConstraint.vertical) || L.alignmentConstraint.vertical.length == 0) && (L.alignmentConstraint.vertical = void 0), L.alignmentConstraint.horizontal && (!Array.isArray(L.alignmentConstraint.horizontal) || L.alignmentConstraint.horizontal.length == 0) && (L.alignmentConstraint.horizontal = void 0)), L.relativePlacementConstraint && (!Array.isArray(L.relativePlacementConstraint) || L.relativePlacementConstraint.length == 0) && (L.relativePlacementConstraint = void 0);
|
|
3491
|
-
var e = L.fixedNodeConstraint || L.alignmentConstraint || L.relativePlacementConstraint;
|
|
3492
|
-
e && (L.tile = !1, L.packComponents = !1);
|
|
3493
|
-
var E = void 0, g = !1;
|
|
3494
|
-
if (U.layoutUtilities && L.packComponents && (E = U.layoutUtilities("get"), E || (E = U.layoutUtilities()), g = !0), $.nodes().length > 0)
|
|
3495
|
-
if (g) {
|
|
3496
|
-
var w = t.getTopMostNodes(L.eles.nodes());
|
|
3497
|
-
if (D = t.connectComponents(U, L.eles, w), D.forEach(function(ut) {
|
|
3498
|
-
var _ = ut.boundingBox();
|
|
3499
|
-
et.push({ x: _.x1 + _.w / 2, y: _.y1 + _.h / 2 });
|
|
3500
|
-
}), L.randomize && D.forEach(function(ut) {
|
|
3501
|
-
L.eles = ut, V.push(o(L));
|
|
3502
|
-
}), L.quality == "default" || L.quality == "proof") {
|
|
3503
|
-
var C = U.collection();
|
|
3504
|
-
if (L.tile) {
|
|
3505
|
-
var I = /* @__PURE__ */ new Map(), P = [], O = [], z = 0, b = { nodeIndexes: I, xCoords: P, yCoords: O }, F = [];
|
|
3506
|
-
if (D.forEach(function(ut, _) {
|
|
3507
|
-
ut.edges().length == 0 && (ut.nodes().forEach(function(lt, pt) {
|
|
3508
|
-
C.merge(ut.nodes()[pt]), lt.isParent() || (b.nodeIndexes.set(ut.nodes()[pt].id(), z++), b.xCoords.push(ut.nodes()[0].position().x), b.yCoords.push(ut.nodes()[0].position().y));
|
|
3509
|
-
}), F.push(_));
|
|
3510
|
-
}), C.length > 1) {
|
|
3511
|
-
var J = C.boundingBox();
|
|
3512
|
-
et.push({ x: J.x1 + J.w / 2, y: J.y1 + J.h / 2 }), D.push(C), V.push(b);
|
|
3513
|
-
for (var Y = F.length - 1; Y >= 0; Y--)
|
|
3514
|
-
D.splice(F[Y], 1), V.splice(F[Y], 1), et.splice(F[Y], 1);
|
|
3515
|
-
}
|
|
3516
|
-
}
|
|
3517
|
-
D.forEach(function(ut, _) {
|
|
3518
|
-
L.eles = ut, j.push(h(L, V[_])), t.relocateComponent(et[_], j[_], L);
|
|
3519
|
-
});
|
|
3520
|
-
} else
|
|
3521
|
-
D.forEach(function(ut, _) {
|
|
3522
|
-
t.relocateComponent(et[_], V[_], L);
|
|
3523
|
-
});
|
|
3524
|
-
var M = /* @__PURE__ */ new Set();
|
|
3525
|
-
if (D.length > 1) {
|
|
3526
|
-
var S = [], H = $.filter(function(ut) {
|
|
3527
|
-
return ut.css("display") == "none";
|
|
3528
|
-
});
|
|
3529
|
-
D.forEach(function(ut, _) {
|
|
3530
|
-
var lt = void 0;
|
|
3531
|
-
if (L.quality == "draft" && (lt = V[_].nodeIndexes), ut.nodes().not(H).length > 0) {
|
|
3532
|
-
var pt = {};
|
|
3533
|
-
pt.edges = [], pt.nodes = [];
|
|
3534
|
-
var mt = void 0;
|
|
3535
|
-
ut.nodes().not(H).forEach(function(Mt) {
|
|
3536
|
-
if (L.quality == "draft")
|
|
3537
|
-
if (!Mt.isParent())
|
|
3538
|
-
mt = lt.get(Mt.id()), pt.nodes.push({ x: V[_].xCoords[mt] - Mt.boundingbox().w / 2, y: V[_].yCoords[mt] - Mt.boundingbox().h / 2, width: Mt.boundingbox().w, height: Mt.boundingbox().h });
|
|
3539
|
-
else {
|
|
3540
|
-
var dt = t.calcBoundingBox(Mt, V[_].xCoords, V[_].yCoords, lt);
|
|
3541
|
-
pt.nodes.push({ x: dt.topLeftX, y: dt.topLeftY, width: dt.width, height: dt.height });
|
|
3542
|
-
}
|
|
3543
|
-
else
|
|
3544
|
-
j[_][Mt.id()] && pt.nodes.push({ x: j[_][Mt.id()].getLeft(), y: j[_][Mt.id()].getTop(), width: j[_][Mt.id()].getWidth(), height: j[_][Mt.id()].getHeight() });
|
|
3545
|
-
}), ut.edges().forEach(function(Mt) {
|
|
3546
|
-
var dt = Mt.source(), At = Mt.target();
|
|
3547
|
-
if (dt.css("display") != "none" && At.css("display") != "none")
|
|
3548
|
-
if (L.quality == "draft") {
|
|
3549
|
-
var wt = lt.get(dt.id()), bt = lt.get(At.id()), Gt = [], Ft = [];
|
|
3550
|
-
if (dt.isParent()) {
|
|
3551
|
-
var Rt = t.calcBoundingBox(dt, V[_].xCoords, V[_].yCoords, lt);
|
|
3552
|
-
Gt.push(Rt.topLeftX + Rt.width / 2), Gt.push(Rt.topLeftY + Rt.height / 2);
|
|
3553
|
-
} else
|
|
3554
|
-
Gt.push(V[_].xCoords[wt]), Gt.push(V[_].yCoords[wt]);
|
|
3555
|
-
if (At.isParent()) {
|
|
3556
|
-
var Pt = t.calcBoundingBox(At, V[_].xCoords, V[_].yCoords, lt);
|
|
3557
|
-
Ft.push(Pt.topLeftX + Pt.width / 2), Ft.push(Pt.topLeftY + Pt.height / 2);
|
|
3558
|
-
} else
|
|
3559
|
-
Ft.push(V[_].xCoords[bt]), Ft.push(V[_].yCoords[bt]);
|
|
3560
|
-
pt.edges.push({ startX: Gt[0], startY: Gt[1], endX: Ft[0], endY: Ft[1] });
|
|
3561
|
-
} else
|
|
3562
|
-
j[_][dt.id()] && j[_][At.id()] && pt.edges.push({ startX: j[_][dt.id()].getCenterX(), startY: j[_][dt.id()].getCenterY(), endX: j[_][At.id()].getCenterX(), endY: j[_][At.id()].getCenterY() });
|
|
3563
|
-
}), pt.nodes.length > 0 && (S.push(pt), M.add(_));
|
|
3564
|
-
}
|
|
3565
|
-
});
|
|
3566
|
-
var q = E.packComponents(S, L.randomize).shifts;
|
|
3567
|
-
if (L.quality == "draft")
|
|
3568
|
-
V.forEach(function(ut, _) {
|
|
3569
|
-
var lt = ut.xCoords.map(function(mt) {
|
|
3570
|
-
return mt + q[_].dx;
|
|
3571
|
-
}), pt = ut.yCoords.map(function(mt) {
|
|
3572
|
-
return mt + q[_].dy;
|
|
3573
|
-
});
|
|
3574
|
-
ut.xCoords = lt, ut.yCoords = pt;
|
|
3575
|
-
});
|
|
3576
|
-
else {
|
|
3577
|
-
var nt = 0;
|
|
3578
|
-
M.forEach(function(ut) {
|
|
3579
|
-
Object.keys(j[ut]).forEach(function(_) {
|
|
3580
|
-
var lt = j[ut][_];
|
|
3581
|
-
lt.setCenter(lt.getCenterX() + q[nt].dx, lt.getCenterY() + q[nt].dy);
|
|
3582
|
-
}), nt++;
|
|
3583
|
-
});
|
|
3584
|
-
}
|
|
3585
|
-
}
|
|
3586
|
-
} else {
|
|
3587
|
-
var p = L.eles.boundingBox();
|
|
3588
|
-
if (et.push({ x: p.x1 + p.w / 2, y: p.y1 + p.h / 2 }), L.randomize) {
|
|
3589
|
-
var v = o(L);
|
|
3590
|
-
V.push(v);
|
|
3591
|
-
}
|
|
3592
|
-
L.quality == "default" || L.quality == "proof" ? (j.push(h(L, V[0])), t.relocateComponent(et[0], j[0], L)) : t.relocateComponent(et[0], V[0], L);
|
|
3593
|
-
}
|
|
3594
|
-
var B = function(_, lt) {
|
|
3595
|
-
if (L.quality == "default" || L.quality == "proof") {
|
|
3596
|
-
typeof _ == "number" && (_ = lt);
|
|
3597
|
-
var pt = void 0, mt = void 0, Mt = _.data("id");
|
|
3598
|
-
return j.forEach(function(At) {
|
|
3599
|
-
Mt in At && (pt = { x: At[Mt].getRect().getCenterX(), y: At[Mt].getRect().getCenterY() }, mt = At[Mt]);
|
|
3600
|
-
}), L.nodeDimensionsIncludeLabels && (mt.labelWidth && (mt.labelPosHorizontal == "left" ? pt.x += mt.labelWidth / 2 : mt.labelPosHorizontal == "right" && (pt.x -= mt.labelWidth / 2)), mt.labelHeight && (mt.labelPosVertical == "top" ? pt.y += mt.labelHeight / 2 : mt.labelPosVertical == "bottom" && (pt.y -= mt.labelHeight / 2))), pt == null && (pt = { x: _.position("x"), y: _.position("y") }), {
|
|
3601
|
-
x: pt.x,
|
|
3602
|
-
y: pt.y
|
|
3603
|
-
};
|
|
3604
|
-
} else {
|
|
3605
|
-
var dt = void 0;
|
|
3606
|
-
return V.forEach(function(At) {
|
|
3607
|
-
var wt = At.nodeIndexes.get(_.id());
|
|
3608
|
-
wt != null && (dt = { x: At.xCoords[wt], y: At.yCoords[wt] });
|
|
3609
|
-
}), dt == null && (dt = { x: _.position("x"), y: _.position("y") }), {
|
|
3610
|
-
x: dt.x,
|
|
3611
|
-
y: dt.y
|
|
3612
|
-
};
|
|
3613
|
-
}
|
|
3614
|
-
};
|
|
3615
|
-
if (L.quality == "default" || L.quality == "proof" || L.randomize) {
|
|
3616
|
-
var Dt = t.calcParentsWithoutChildren(U, $), yt = $.filter(function(ut) {
|
|
3617
|
-
return ut.css("display") == "none";
|
|
3618
|
-
});
|
|
3619
|
-
L.eles = $.not(yt), $.nodes().not(":parent").not(yt).layoutPositions(G, L, B), Dt.length > 0 && Dt.forEach(function(ut) {
|
|
3620
|
-
ut.position(B(ut));
|
|
3621
|
-
});
|
|
3622
|
-
} else
|
|
3623
|
-
console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
|
|
3624
|
-
}
|
|
3625
|
-
}]), d;
|
|
3626
|
-
}();
|
|
3627
|
-
n.exports = c;
|
|
3628
|
-
}
|
|
3629
|
-
),
|
|
3630
|
-
/***/
|
|
3631
|
-
657: (
|
|
3632
|
-
/***/
|
|
3633
|
-
(n, r, a) => {
|
|
3634
|
-
var u = a(548), i = a(140).layoutBase.Matrix, y = a(140).layoutBase.SVD, t = function(o) {
|
|
3635
|
-
var f = o.cy, h = o.eles, N = h.nodes(), c = h.nodes(":parent"), d = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), L = [], U = [], $ = [], V = [], j = [], D = [], et = [], e = [], E = void 0, g = 1e8, p = 1e-9, v = o.piTol, w = o.samplingType, C = o.nodeSeparation, I = void 0, P = function() {
|
|
3636
|
-
for (var x = 0, X = 0, Z = !1; X < I; ) {
|
|
3637
|
-
x = Math.floor(Math.random() * E), Z = !1;
|
|
3638
|
-
for (var W = 0; W < X; W++)
|
|
3639
|
-
if (V[W] == x) {
|
|
3640
|
-
Z = !0;
|
|
3641
|
-
break;
|
|
3642
|
-
}
|
|
3643
|
-
if (!Z)
|
|
3644
|
-
V[X] = x, X++;
|
|
3645
|
-
else
|
|
3646
|
-
continue;
|
|
3647
|
-
}
|
|
3648
|
-
}, O = function(x, X, Z) {
|
|
3649
|
-
for (var W = [], tt = 0, ht = 0, rt = 0, K = void 0, Q = [], ft = 0, Lt = 1, vt = 0; vt < E; vt++)
|
|
3650
|
-
Q[vt] = g;
|
|
3651
|
-
for (W[ht] = x, Q[x] = 0; ht >= tt; ) {
|
|
3652
|
-
rt = W[tt++];
|
|
3653
|
-
for (var Ot = L[rt], ot = 0; ot < Ot.length; ot++)
|
|
3654
|
-
K = m.get(Ot[ot]), Q[K] == g && (Q[K] = Q[rt] + 1, W[++ht] = K);
|
|
3655
|
-
D[rt][X] = Q[rt] * C;
|
|
3656
|
-
}
|
|
3657
|
-
if (Z) {
|
|
3658
|
-
for (var it = 0; it < E; it++)
|
|
3659
|
-
D[it][X] < j[it] && (j[it] = D[it][X]);
|
|
3660
|
-
for (var Tt = 0; Tt < E; Tt++)
|
|
3661
|
-
j[Tt] > ft && (ft = j[Tt], Lt = Tt);
|
|
3662
|
-
}
|
|
3663
|
-
return Lt;
|
|
3664
|
-
}, z = function(x) {
|
|
3665
|
-
var X = void 0;
|
|
3666
|
-
if (x) {
|
|
3667
|
-
X = Math.floor(Math.random() * E);
|
|
3668
|
-
for (var W = 0; W < E; W++)
|
|
3669
|
-
j[W] = g;
|
|
3670
|
-
for (var tt = 0; tt < I; tt++)
|
|
3671
|
-
V[tt] = X, X = O(X, tt, x);
|
|
3672
|
-
} else {
|
|
3673
|
-
P();
|
|
3674
|
-
for (var Z = 0; Z < I; Z++)
|
|
3675
|
-
O(V[Z], Z, x);
|
|
3676
|
-
}
|
|
3677
|
-
for (var ht = 0; ht < E; ht++)
|
|
3678
|
-
for (var rt = 0; rt < I; rt++)
|
|
3679
|
-
D[ht][rt] *= D[ht][rt];
|
|
3680
|
-
for (var K = 0; K < I; K++)
|
|
3681
|
-
et[K] = [];
|
|
3682
|
-
for (var Q = 0; Q < I; Q++)
|
|
3683
|
-
for (var ft = 0; ft < I; ft++)
|
|
3684
|
-
et[Q][ft] = D[V[ft]][Q];
|
|
3685
|
-
}, b = function() {
|
|
3686
|
-
for (var x = y.svd(et), X = x.S, Z = x.U, W = x.V, tt = X[0] * X[0] * X[0], ht = [], rt = 0; rt < I; rt++) {
|
|
3687
|
-
ht[rt] = [];
|
|
3688
|
-
for (var K = 0; K < I; K++)
|
|
3689
|
-
ht[rt][K] = 0, rt == K && (ht[rt][K] = X[rt] / (X[rt] * X[rt] + tt / (X[rt] * X[rt])));
|
|
3690
|
-
}
|
|
3691
|
-
e = i.multMat(i.multMat(W, ht), i.transpose(Z));
|
|
3692
|
-
}, F = function() {
|
|
3693
|
-
for (var x = void 0, X = void 0, Z = [], W = [], tt = [], ht = [], rt = 0; rt < E; rt++)
|
|
3694
|
-
Z[rt] = Math.random(), W[rt] = Math.random();
|
|
3695
|
-
Z = i.normalize(Z), W = i.normalize(W);
|
|
3696
|
-
for (var K = p, Q = p, ft = void 0; ; ) {
|
|
3697
|
-
for (var Lt = 0; Lt < E; Lt++)
|
|
3698
|
-
tt[Lt] = Z[Lt];
|
|
3699
|
-
if (Z = i.multGamma(i.multL(i.multGamma(tt), D, e)), x = i.dotProduct(tt, Z), Z = i.normalize(Z), K = i.dotProduct(tt, Z), ft = Math.abs(K / Q), ft <= 1 + v && ft >= 1)
|
|
3700
|
-
break;
|
|
3701
|
-
Q = K;
|
|
3702
|
-
}
|
|
3703
|
-
for (var vt = 0; vt < E; vt++)
|
|
3704
|
-
tt[vt] = Z[vt];
|
|
3705
|
-
for (Q = p; ; ) {
|
|
3706
|
-
for (var Ot = 0; Ot < E; Ot++)
|
|
3707
|
-
ht[Ot] = W[Ot];
|
|
3708
|
-
if (ht = i.minusOp(ht, i.multCons(tt, i.dotProduct(tt, ht))), W = i.multGamma(i.multL(i.multGamma(ht), D, e)), X = i.dotProduct(ht, W), W = i.normalize(W), K = i.dotProduct(ht, W), ft = Math.abs(K / Q), ft <= 1 + v && ft >= 1)
|
|
3709
|
-
break;
|
|
3710
|
-
Q = K;
|
|
3711
|
-
}
|
|
3712
|
-
for (var ot = 0; ot < E; ot++)
|
|
3713
|
-
ht[ot] = W[ot];
|
|
3714
|
-
U = i.multCons(tt, Math.sqrt(Math.abs(x))), $ = i.multCons(ht, Math.sqrt(Math.abs(X)));
|
|
3715
|
-
};
|
|
3716
|
-
u.connectComponents(f, h, u.getTopMostNodes(N), d), c.forEach(function(R) {
|
|
3717
|
-
u.connectComponents(f, h, u.getTopMostNodes(R.descendants().intersection(h)), d);
|
|
3718
|
-
});
|
|
3719
|
-
for (var J = 0, Y = 0; Y < N.length; Y++)
|
|
3720
|
-
N[Y].isParent() || m.set(N[Y].id(), J++);
|
|
3721
|
-
var M = !0, S = !1, H = void 0;
|
|
3722
|
-
try {
|
|
3723
|
-
for (var q = d.keys()[Symbol.iterator](), nt; !(M = (nt = q.next()).done); M = !0) {
|
|
3724
|
-
var B = nt.value;
|
|
3725
|
-
m.set(B, J++);
|
|
3726
|
-
}
|
|
3727
|
-
} catch (R) {
|
|
3728
|
-
S = !0, H = R;
|
|
3729
|
-
} finally {
|
|
3730
|
-
try {
|
|
3731
|
-
!M && q.return && q.return();
|
|
3732
|
-
} finally {
|
|
3733
|
-
if (S)
|
|
3734
|
-
throw H;
|
|
3735
|
-
}
|
|
3736
|
-
}
|
|
3737
|
-
for (var Dt = 0; Dt < m.size; Dt++)
|
|
3738
|
-
L[Dt] = [];
|
|
3739
|
-
c.forEach(function(R) {
|
|
3740
|
-
for (var x = R.children().intersection(h); x.nodes(":childless").length == 0; )
|
|
3741
|
-
x = x.nodes()[0].children().intersection(h);
|
|
3742
|
-
var X = 0, Z = x.nodes(":childless")[0].connectedEdges().length;
|
|
3743
|
-
x.nodes(":childless").forEach(function(W, tt) {
|
|
3744
|
-
W.connectedEdges().length < Z && (Z = W.connectedEdges().length, X = tt);
|
|
3745
|
-
}), G.set(R.id(), x.nodes(":childless")[X].id());
|
|
3746
|
-
}), N.forEach(function(R) {
|
|
3747
|
-
var x = void 0;
|
|
3748
|
-
R.isParent() ? x = m.get(G.get(R.id())) : x = m.get(R.id()), R.neighborhood().nodes().forEach(function(X) {
|
|
3749
|
-
h.intersection(R.edgesWith(X)).length > 0 && (X.isParent() ? L[x].push(G.get(X.id())) : L[x].push(X.id()));
|
|
3750
|
-
});
|
|
3751
|
-
});
|
|
3752
|
-
var yt = function(x) {
|
|
3753
|
-
var X = m.get(x), Z = void 0;
|
|
3754
|
-
d.get(x).forEach(function(W) {
|
|
3755
|
-
f.getElementById(W).isParent() ? Z = G.get(W) : Z = W, L[X].push(Z), L[m.get(Z)].push(x);
|
|
3756
|
-
});
|
|
3757
|
-
}, ut = !0, _ = !1, lt = void 0;
|
|
3758
|
-
try {
|
|
3759
|
-
for (var pt = d.keys()[Symbol.iterator](), mt; !(ut = (mt = pt.next()).done); ut = !0) {
|
|
3760
|
-
var Mt = mt.value;
|
|
3761
|
-
yt(Mt);
|
|
3762
|
-
}
|
|
3763
|
-
} catch (R) {
|
|
3764
|
-
_ = !0, lt = R;
|
|
3765
|
-
} finally {
|
|
3766
|
-
try {
|
|
3767
|
-
!ut && pt.return && pt.return();
|
|
3768
|
-
} finally {
|
|
3769
|
-
if (_)
|
|
3770
|
-
throw lt;
|
|
3771
|
-
}
|
|
3772
|
-
}
|
|
3773
|
-
E = m.size;
|
|
3774
|
-
var dt = void 0;
|
|
3775
|
-
if (E > 2) {
|
|
3776
|
-
I = E < o.sampleSize ? E : o.sampleSize;
|
|
3777
|
-
for (var At = 0; At < E; At++)
|
|
3778
|
-
D[At] = [];
|
|
3779
|
-
for (var wt = 0; wt < I; wt++)
|
|
3780
|
-
e[wt] = [];
|
|
3781
|
-
return o.quality == "draft" || o.step == "all" ? (z(w), b(), F(), dt = { nodeIndexes: m, xCoords: U, yCoords: $ }) : (m.forEach(function(R, x) {
|
|
3782
|
-
U.push(f.getElementById(x).position("x")), $.push(f.getElementById(x).position("y"));
|
|
3783
|
-
}), dt = { nodeIndexes: m, xCoords: U, yCoords: $ }), dt;
|
|
3784
|
-
} else {
|
|
3785
|
-
var bt = m.keys(), Gt = f.getElementById(bt.next().value), Ft = Gt.position(), Rt = Gt.outerWidth();
|
|
3786
|
-
if (U.push(Ft.x), $.push(Ft.y), E == 2) {
|
|
3787
|
-
var Pt = f.getElementById(bt.next().value), Yt = Pt.outerWidth();
|
|
3788
|
-
U.push(Ft.x + Rt / 2 + Yt / 2 + o.idealEdgeLength), $.push(Ft.y);
|
|
3789
|
-
}
|
|
3790
|
-
return dt = { nodeIndexes: m, xCoords: U, yCoords: $ }, dt;
|
|
3791
|
-
}
|
|
3792
|
-
};
|
|
3793
|
-
n.exports = { spectralLayout: t };
|
|
3794
|
-
}
|
|
3795
|
-
),
|
|
3796
|
-
/***/
|
|
3797
|
-
579: (
|
|
3798
|
-
/***/
|
|
3799
|
-
(n, r, a) => {
|
|
3800
|
-
var u = a(212), i = function(t) {
|
|
3801
|
-
t && t("layout", "fcose", u);
|
|
3802
|
-
};
|
|
3803
|
-
typeof cytoscape < "u" && i(cytoscape), n.exports = i;
|
|
3804
|
-
}
|
|
3805
|
-
),
|
|
3806
|
-
/***/
|
|
3807
|
-
140: (
|
|
3808
|
-
/***/
|
|
3809
|
-
(n) => {
|
|
3810
|
-
n.exports = k;
|
|
3811
|
-
}
|
|
3812
|
-
)
|
|
3813
|
-
/******/
|
|
3814
|
-
}, A = {};
|
|
3815
|
-
function T(n) {
|
|
3816
|
-
var r = A[n];
|
|
3817
|
-
if (r !== void 0)
|
|
3818
|
-
return r.exports;
|
|
3819
|
-
var a = A[n] = {
|
|
3820
|
-
/******/
|
|
3821
|
-
// no module.id needed
|
|
3822
|
-
/******/
|
|
3823
|
-
// no module.loaded needed
|
|
3824
|
-
/******/
|
|
3825
|
-
exports: {}
|
|
3826
|
-
/******/
|
|
3827
|
-
};
|
|
3828
|
-
return gt[n](a, a.exports, T), a.exports;
|
|
3829
|
-
}
|
|
3830
|
-
var l = T(579);
|
|
3831
|
-
return l;
|
|
3832
|
-
})()
|
|
3833
|
-
);
|
|
3834
|
-
});
|
|
3835
|
-
})(de);
|
|
3836
|
-
var Ne = de.exports;
|
|
3837
|
-
const Le = /* @__PURE__ */ Ee(Ne);
|
|
3838
|
-
export {
|
|
3839
|
-
Le as f
|
|
3840
|
-
};
|