@kong-ui-public/documentation 1.4.31-pr.2751.7a3f18384.0 → 1.4.32-pr.2694.d983d66d0.0
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/package.json +2 -2
- package/dist/_basePickBy-BCsiP0lE-DJBdvZNn.js +0 -151
- package/dist/_baseUniq-CsvgMmt0-CCBG5z_B.js +0 -614
- package/dist/arc-DYb5Ak6k-js8YHzj6.js +0 -83
- package/dist/architecture-U656AL7Q-LZu-yAfZ-CQD6AyxA.js +0 -5
- package/dist/architectureDiagram-KFL7JDKH-BK_an8l5-D20M_MXF.js +0 -4665
- package/dist/astro-Uf8_VxKJ-CZxoSljj.js +0 -16
- package/dist/blockDiagram-ZYB65J3Q-C0KtqCEe-pwEm3-ie.js +0 -2265
- package/dist/c-DASdrs7p-DASdrs7p.js +0 -6
- package/dist/c4Diagram-AAMF2YG6-DYHWlrmc-C6NWDsTV.js +0 -1581
- package/dist/channel-3QVQMCTA-BwyrTaJi.js +0 -5
- package/dist/chunk-ANTBXLJU-BhR1MDfy-Bec7kb00.js +0 -9
- package/dist/chunk-FHKO5MBM-z_nuC8Da-Dge2Nbr5.js +0 -15
- package/dist/chunk-GLLZNHP4-DgwBbAOT-BUrsAxH8.js +0 -19
- package/dist/chunk-JBRWN2VN-CHua2TSC-BYWS19Oz.js +0 -1374
- package/dist/chunk-LXBSTHXV-CoED0jHL-Cc8w4JL1.js +0 -1382
- package/dist/chunk-NRVI72HA-DxsqT4Dt-Bo_vu9qn.js +0 -20
- package/dist/chunk-OMD6QJNC-_VI6zVGr-Bb4P7zNG.js +0 -64
- package/dist/chunk-WVR4S24B-C4HIWky3-CkJ0DHSJ.js +0 -8
- package/dist/classDiagram-3BZAVTQC-DrmNjTt_-CS9fxl_R.js +0 -16
- package/dist/classDiagram-v2-QTMF73CY-DrmNjTt_-CS9fxl_R.js +0 -16
- package/dist/clone-C0dvnYv6-BozdSvey.js +0 -8
- package/dist/csharp-CYWRhZ2R-CYWRhZ2R.js +0 -6
- package/dist/css-D1aVdRIU-D1aVdRIU.js +0 -6
- package/dist/csv-DvCncUGQ-Tno401i9.js +0 -6
- package/dist/cytoscape.esm-CjI2IsL8-DYIumutE.js +0 -18721
- package/dist/dagre-2BBEFEWP-Bh_bYuL8-Cej31YXN.js +0 -447
- package/dist/defaultLocale-D7EN2tov-CK6dgF7Y.js +0 -171
- package/dist/diagram-4IRLE6MV-34TaesxP-XfF-gcP2.js +0 -533
- package/dist/diagram-GUPCWM2R-Cr4-5_uX-B8mxM1Uc.js +0 -143
- package/dist/diagram-RP2FKANI-COpvHjzI-C-_mZxuk.js +0 -221
- package/dist/diff-XmNrvgM1-XmNrvgM1.js +0 -6
- package/dist/docker-DWH2onkn-DWH2onkn.js +0 -6
- package/dist/documentation.es.js +0 -7
- package/dist/documentation.umd.js +0 -2865
- package/dist/erDiagram-HZWUO2LU-Cu2MerRS-KziSgDQg.js +0 -840
- package/dist/flowDiagram-THRYKUMA-CfrQTB8C-BYn8LF24.js +0 -1627
- package/dist/ganttDiagram-WV7ZQ7D5-gkieebY_-C7YOriZ4.js +0 -2504
- package/dist/git-commit-BspYIY3P-VkbIfR3L.js +0 -8
- package/dist/git-rebase--zLBTjUa-DEW2tfKx.js +0 -8
- package/dist/gitGraph-F6HP7TQM-suE5ufvy-CQDQV2yP.js +0 -5
- package/dist/gitGraphDiagram-OJR772UL-CYA7EIoU-Bqc1qZk4.js +0 -712
- package/dist/go-BErP6iv1-BErP6iv1.js +0 -6
- package/dist/graph-B_1gOUDz-Dm6REFzZ.js +0 -247
- package/dist/graphql-DWpQF4JI-C-3VJmtp.js +0 -14
- package/dist/haml-CMN0hQaL-BV5BsZTy.js +0 -10
- package/dist/handlebars-Cc-7fXX5-B9YgDKzT.js +0 -14
- package/dist/haskell-CtlGos0K-CtlGos0K.js +0 -6
- package/dist/html-B0P_v3yU-BojM9zZg.js +0 -10
- package/dist/html-derivative-BJFFAxYV-iD6NAoKm.js +0 -8
- package/dist/http-Dcjm_K1m-1LFSbOE1.js +0 -14
- package/dist/index-BDD0CD9m.js +0 -37385
- package/dist/info-NVLQJR56-CdsHk-Jf-tf8zb8tD.js +0 -5
- package/dist/infoDiagram-6WOFNB3A-ajp3t5Lm-D80dGo5F.js +0 -24
- package/dist/ini-BUcvsX-U-BUcvsX-U.js +0 -6
- package/dist/init-DjUOC4st-C8Nwz6AJ.js +0 -16
- package/dist/java-B7odJ7Ap-B7odJ7Ap.js +0 -6
- package/dist/javascript-fa8UlHZE-fa8UlHZE.js +0 -6
- package/dist/journeyDiagram-FFXJYRFH-kgCEEPLo-CakI8CyJ.js +0 -834
- package/dist/json-71t8ZF9g-71t8ZF9g.js +0 -6
- package/dist/json5-Z7F6rA6a-Z7F6rA6a.js +0 -6
- package/dist/jsonc-Dphhs4m2-Dphhs4m2.js +0 -6
- package/dist/jsonl-D9jj92Gg-D9jj92Gg.js +0 -6
- package/dist/jsx-Bkesy5tT-Bkesy5tT.js +0 -6
- package/dist/kanban-definition-KOZQBZVT-CmM4CHe6-rjuufCiO.js +0 -720
- package/dist/katex-C0Lgw_Sx-CbX2I1cQ.js +0 -11687
- package/dist/kotlin-DCgZY7Ii-DCgZY7Ii.js +0 -6
- package/dist/latex-CZXk8SiZ-DbjDPp_f.js +0 -11
- package/dist/layout-9vIfpCf3-FfABA43y.js +0 -1321
- package/dist/less-DQA4v-Nm-DQA4v-Nm.js +0 -6
- package/dist/linear-C-k9vokG-Md9dfBfB.js +0 -259
- package/dist/liquid-CvufO3kO-D90bBAdm.js +0 -14
- package/dist/lua-BVfhNLDr-DAa90qLN.js +0 -8
- package/dist/make-BjuHP00g-BjuHP00g.js +0 -6
- package/dist/markdown-B6guhLWd-B6guhLWd.js +0 -6
- package/dist/material-theme-lighter-BUBw43Yz-BUBw43Yz.js +0 -4
- package/dist/material-theme-palenight-C1RVm8K1-C1RVm8K1.js +0 -4
- package/dist/mdc-Bq810vct-Dr8CpN8f.js +0 -12
- package/dist/mdx-DIoECIFU-DIoECIFU.js +0 -6
- package/dist/mermaid-BZ7WHNIe-BZ7WHNIe.js +0 -6
- package/dist/mermaid-parser.core-DHL9WXVx-DeKF3RZx.js +0 -12890
- package/dist/mindmap-definition-LNHGMQRG-BsypuFYj-DSVrvuog.js +0 -3231
- package/dist/nginx-Can2eAjw-DKMoypYC.js +0 -8
- package/dist/objective-c-BGg9R27G-BGg9R27G.js +0 -6
- package/dist/ordinal-DfAQgscy-BEJTu10r.js +0 -61
- package/dist/packet-BFZMPI3H-BcK9kJ-B-BxxCPBGn.js +0 -5
- package/dist/pascal-l2bqd7Dz-l2bqd7Dz.js +0 -6
- package/dist/perl-DaMQyPwp-Cxx4wmV7.js +0 -16
- package/dist/php-BL3EfPBi-BZu5YwDX.js +0 -18
- package/dist/pie-7BOR55EZ-Vt5px0F3-BM7egbMh.js +0 -5
- package/dist/pieDiagram-DBDJKBY4-Bam6gKTi-BOqYeC6c.js +0 -161
- package/dist/plsql-oVq_K_wH-oVq_K_wH.js +0 -6
- package/dist/postcss-BZ3MNRIJ-BZ3MNRIJ.js +0 -6
- package/dist/powershell-Diwyv8Eh-Diwyv8Eh.js +0 -6
- package/dist/proto-o9HLmF90-o9HLmF90.js +0 -6
- package/dist/pug-HKe4Luo3-BYb0El_4.js +0 -12
- package/dist/python-xYxLFJY--xYxLFJY-.js +0 -6
- package/dist/quadrantDiagram-YPSRARAO-CJwMw09m-CN2OO-Le.js +0 -1024
- package/dist/r-F-9I-ITZ-F-9I-ITZ.js +0 -6
- package/dist/radar-NHE76QYJ-Br11XWE4-4RP4MPFA.js +0 -5
- package/dist/reg-CMUdAgIP-CMUdAgIP.js +0 -6
- package/dist/requirementDiagram-EGVEC5DT-DkRytT0X-C2zigskn.js +0 -850
- package/dist/rst-B8JEEtLI-Dyxh6LOj.js +0 -22
- package/dist/ruby-FDlfLkNa-nf7VLvCK.js +0 -50
- package/dist/rust-Pc7DCsZD-Pc7DCsZD.js +0 -6
- package/dist/sankeyDiagram-HRAUVNP4-08s1UHMk-2j8idkNs.js +0 -810
- package/dist/sass-iCyS6eP9-iCyS6eP9.js +0 -6
- package/dist/scss-DhHc4lxB-D1lMETuy.js +0 -8
- package/dist/sequenceDiagram-WFGC7UMF-6_s7-CN7-D-oTpLFJ.js +0 -2283
- package/dist/shellscript-Dn0-btNd-Dn0-btNd.js +0 -6
- package/dist/shellsession-8OLo3sB6-DD6AdPYk.js +0 -8
- package/dist/splunk-CTqDjQdo-CTqDjQdo.js +0 -6
- package/dist/sql-DCkt643--DCkt643-.js +0 -6
- package/dist/ssh-config-DHHGll-v-DHHGll-v.js +0 -6
- package/dist/stateDiagram-UUKSUZ4H-eWajY90l-BlM614AN.js +0 -263
- package/dist/stateDiagram-v2-EYPG3UTE-Dh7Ngu1O-YVMiocHE.js +0 -16
- package/dist/style.css +0 -1
- package/dist/stylus-n_9f0QQ5-n_9f0QQ5.js +0 -6
- package/dist/svelte-01qw6Rxm-Cjp5Srko.js +0 -14
- package/dist/swift-BAWqNR8A-BAWqNR8A.js +0 -6
- package/dist/timeline-definition-3HZDQTIS-4TPEOhE8-fDDLVlO8.js +0 -799
- package/dist/toml-CQSfOn0e-CQSfOn0e.js +0 -6
- package/dist/treemap-KMMF4GRG-nu7WEuPi-C1YG24W8.js +0 -5
- package/dist/tsx-DiGsgWT8-DiGsgWT8.js +0 -6
- package/dist/twig-DxrNSc26-BIWbKTFO.js +0 -18
- package/dist/types/components/DiscardChangesPrompt.vue.d.ts +0 -35
- package/dist/types/components/DiscardChangesPrompt.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationContent.vue.d.ts +0 -175
- package/dist/types/components/DocumentationContent.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationDisplay.vue.d.ts +0 -94
- package/dist/types/components/DocumentationDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +0 -31
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +0 -1
- package/dist/types/components/ProductDocumentModal.vue.d.ts +0 -72
- package/dist/types/components/ProductDocumentModal.vue.d.ts.map +0 -1
- package/dist/types/composables/index.d.ts +0 -6
- package/dist/types/composables/index.d.ts.map +0 -1
- package/dist/types/composables/useI18n.d.ts +0 -9
- package/dist/types/composables/useI18n.d.ts.map +0 -1
- package/dist/types/external-links.d.ts +0 -5
- package/dist/types/external-links.d.ts.map +0 -1
- package/dist/types/helpers.d.ts +0 -8
- package/dist/types/helpers.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/types/document-list.d.ts +0 -28
- package/dist/types/types/document-list.d.ts.map +0 -1
- package/dist/types/types/document-modal.d.ts +0 -8
- package/dist/types/types/document-modal.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -3
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/typescript-buWNZFwO-buWNZFwO.js +0 -6
- package/dist/v-wa8Orrdd-wa8Orrdd.js +0 -6
- package/dist/vb-E2_-jk4M-E2_-jk4M.js +0 -6
- package/dist/viml-B-zWOd7Z-B-zWOd7Z.js +0 -6
- package/dist/vue-DdqTpW8B-BrYVXV7A.js +0 -31
- package/dist/vue-html-B9t4RWro-D1UeMTSX.js +0 -10
- package/dist/wasm-Bv5f0gKv-Bv5f0gKv.js +0 -6
- package/dist/wgsl-DnPoPGDU-DnPoPGDU.js +0 -6
- package/dist/xml-ChBsf5uy-0Ovnixsj.js +0 -8
- package/dist/xsl-BefjlXrd-CZ7IlB9K.js +0 -8
- package/dist/xychartDiagram-FDP5SA34-BbtKlU7T-D1BI5nWs.js +0 -1340
- package/dist/yaml-Bbg74JKr-Bbg74JKr.js +0 -6
|
@@ -1,3231 +0,0 @@
|
|
|
1
|
-
import { _ as G, l as q, g as et, aU as Et, bm as vt, aC as K, ad as Q, bn as _t, bo as mt, bp as Nt, a9 as At, br as Tt, aW as Dt, aO as Lt } from "./index-BDD0CD9m.js";
|
|
2
|
-
import { e as ut } from "./cytoscape.esm-CjI2IsL8-DYIumutE.js";
|
|
3
|
-
var it = { exports: {} }, rt = { exports: {} }, nt = { exports: {} }, Ot = nt.exports, lt;
|
|
4
|
-
function It() {
|
|
5
|
-
return lt || (lt = 1, function(O, M) {
|
|
6
|
-
(function(p, T) {
|
|
7
|
-
O.exports = T();
|
|
8
|
-
})(Ot, function() {
|
|
9
|
-
return (
|
|
10
|
-
/******/
|
|
11
|
-
function(p) {
|
|
12
|
-
var T = {};
|
|
13
|
-
function y(i) {
|
|
14
|
-
if (T[i])
|
|
15
|
-
return T[i].exports;
|
|
16
|
-
var t = T[i] = {
|
|
17
|
-
/******/
|
|
18
|
-
i,
|
|
19
|
-
/******/
|
|
20
|
-
l: !1,
|
|
21
|
-
/******/
|
|
22
|
-
exports: {}
|
|
23
|
-
/******/
|
|
24
|
-
};
|
|
25
|
-
return p[i].call(t.exports, t, t.exports, y), t.l = !0, t.exports;
|
|
26
|
-
}
|
|
27
|
-
return y.m = p, y.c = T, y.i = function(i) {
|
|
28
|
-
return i;
|
|
29
|
-
}, y.d = function(i, t, e) {
|
|
30
|
-
y.o(i, t) || Object.defineProperty(i, t, {
|
|
31
|
-
/******/
|
|
32
|
-
configurable: !1,
|
|
33
|
-
/******/
|
|
34
|
-
enumerable: !0,
|
|
35
|
-
/******/
|
|
36
|
-
get: e
|
|
37
|
-
/******/
|
|
38
|
-
});
|
|
39
|
-
}, y.n = function(i) {
|
|
40
|
-
var t = i && i.__esModule ? (
|
|
41
|
-
/******/
|
|
42
|
-
function() {
|
|
43
|
-
return i.default;
|
|
44
|
-
}
|
|
45
|
-
) : (
|
|
46
|
-
/******/
|
|
47
|
-
function() {
|
|
48
|
-
return i;
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
return y.d(t, "a", t), t;
|
|
52
|
-
}, y.o = function(i, t) {
|
|
53
|
-
return Object.prototype.hasOwnProperty.call(i, t);
|
|
54
|
-
}, y.p = "", y(y.s = 26);
|
|
55
|
-
}([
|
|
56
|
-
/* 0 */
|
|
57
|
-
/***/
|
|
58
|
-
function(p, T, y) {
|
|
59
|
-
function i() {
|
|
60
|
-
}
|
|
61
|
-
i.QUALITY = 1, i.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, i.DEFAULT_INCREMENTAL = !1, i.DEFAULT_ANIMATION_ON_LAYOUT = !0, i.DEFAULT_ANIMATION_DURING_LAYOUT = !1, i.DEFAULT_ANIMATION_PERIOD = 50, i.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, i.DEFAULT_GRAPH_MARGIN = 15, i.NODE_DIMENSIONS_INCLUDE_LABELS = !1, i.SIMPLE_NODE_SIZE = 40, i.SIMPLE_NODE_HALF_SIZE = i.SIMPLE_NODE_SIZE / 2, i.EMPTY_COMPOUND_NODE_SIZE = 40, i.MIN_EDGE_LENGTH = 1, i.WORLD_BOUNDARY = 1e6, i.INITIAL_WORLD_BOUNDARY = i.WORLD_BOUNDARY / 1e3, i.WORLD_CENTER_X = 1200, i.WORLD_CENTER_Y = 900, p.exports = i;
|
|
62
|
-
},
|
|
63
|
-
/* 1 */
|
|
64
|
-
/***/
|
|
65
|
-
function(p, T, y) {
|
|
66
|
-
var i = y(2), t = y(8), e = y(9);
|
|
67
|
-
function r(h, s, f) {
|
|
68
|
-
i.call(this, f), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = f, this.bendpoints = [], this.source = h, this.target = s;
|
|
69
|
-
}
|
|
70
|
-
r.prototype = Object.create(i.prototype);
|
|
71
|
-
for (var a in i)
|
|
72
|
-
r[a] = i[a];
|
|
73
|
-
r.prototype.getSource = function() {
|
|
74
|
-
return this.source;
|
|
75
|
-
}, r.prototype.getTarget = function() {
|
|
76
|
-
return this.target;
|
|
77
|
-
}, r.prototype.isInterGraph = function() {
|
|
78
|
-
return this.isInterGraph;
|
|
79
|
-
}, r.prototype.getLength = function() {
|
|
80
|
-
return this.length;
|
|
81
|
-
}, r.prototype.isOverlapingSourceAndTarget = function() {
|
|
82
|
-
return this.isOverlapingSourceAndTarget;
|
|
83
|
-
}, r.prototype.getBendpoints = function() {
|
|
84
|
-
return this.bendpoints;
|
|
85
|
-
}, r.prototype.getLca = function() {
|
|
86
|
-
return this.lca;
|
|
87
|
-
}, r.prototype.getSourceInLca = function() {
|
|
88
|
-
return this.sourceInLca;
|
|
89
|
-
}, r.prototype.getTargetInLca = function() {
|
|
90
|
-
return this.targetInLca;
|
|
91
|
-
}, r.prototype.getOtherEnd = function(h) {
|
|
92
|
-
if (this.source === h)
|
|
93
|
-
return this.target;
|
|
94
|
-
if (this.target === h)
|
|
95
|
-
return this.source;
|
|
96
|
-
throw "Node is not incident with this edge";
|
|
97
|
-
}, r.prototype.getOtherEndInGraph = function(h, s) {
|
|
98
|
-
for (var f = this.getOtherEnd(h), o = s.getGraphManager().getRoot(); ; ) {
|
|
99
|
-
if (f.getOwner() == s)
|
|
100
|
-
return f;
|
|
101
|
-
if (f.getOwner() == o)
|
|
102
|
-
break;
|
|
103
|
-
f = f.getOwner().getParent();
|
|
104
|
-
}
|
|
105
|
-
return null;
|
|
106
|
-
}, r.prototype.updateLength = function() {
|
|
107
|
-
var h = new Array(4);
|
|
108
|
-
this.isOverlapingSourceAndTarget = t.getIntersection(this.target.getRect(), this.source.getRect(), h), this.isOverlapingSourceAndTarget || (this.lengthX = h[0] - h[2], this.lengthY = h[1] - h[3], Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
|
|
109
|
-
}, r.prototype.updateLengthSimple = function() {
|
|
110
|
-
this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
|
|
111
|
-
}, p.exports = r;
|
|
112
|
-
},
|
|
113
|
-
/* 2 */
|
|
114
|
-
/***/
|
|
115
|
-
function(p, T, y) {
|
|
116
|
-
function i(t) {
|
|
117
|
-
this.vGraphObject = t;
|
|
118
|
-
}
|
|
119
|
-
p.exports = i;
|
|
120
|
-
},
|
|
121
|
-
/* 3 */
|
|
122
|
-
/***/
|
|
123
|
-
function(p, T, y) {
|
|
124
|
-
var i = y(2), t = y(10), e = y(13), r = y(0), a = y(16), h = y(4);
|
|
125
|
-
function s(o, d, c, E) {
|
|
126
|
-
c == null && E == null && (E = d), i.call(this, E), o.graphManager != null && (o = o.graphManager), this.estimatedSize = t.MIN_VALUE, this.inclusionTreeDepth = t.MAX_VALUE, this.vGraphObject = E, this.edges = [], this.graphManager = o, c != null && d != null ? this.rect = new e(d.x, d.y, c.width, c.height) : this.rect = new e();
|
|
127
|
-
}
|
|
128
|
-
s.prototype = Object.create(i.prototype);
|
|
129
|
-
for (var f in i)
|
|
130
|
-
s[f] = i[f];
|
|
131
|
-
s.prototype.getEdges = function() {
|
|
132
|
-
return this.edges;
|
|
133
|
-
}, s.prototype.getChild = function() {
|
|
134
|
-
return this.child;
|
|
135
|
-
}, s.prototype.getOwner = function() {
|
|
136
|
-
return this.owner;
|
|
137
|
-
}, s.prototype.getWidth = function() {
|
|
138
|
-
return this.rect.width;
|
|
139
|
-
}, s.prototype.setWidth = function(o) {
|
|
140
|
-
this.rect.width = o;
|
|
141
|
-
}, s.prototype.getHeight = function() {
|
|
142
|
-
return this.rect.height;
|
|
143
|
-
}, s.prototype.setHeight = function(o) {
|
|
144
|
-
this.rect.height = o;
|
|
145
|
-
}, s.prototype.getCenterX = function() {
|
|
146
|
-
return this.rect.x + this.rect.width / 2;
|
|
147
|
-
}, s.prototype.getCenterY = function() {
|
|
148
|
-
return this.rect.y + this.rect.height / 2;
|
|
149
|
-
}, s.prototype.getCenter = function() {
|
|
150
|
-
return new h(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
|
|
151
|
-
}, s.prototype.getLocation = function() {
|
|
152
|
-
return new h(this.rect.x, this.rect.y);
|
|
153
|
-
}, s.prototype.getRect = function() {
|
|
154
|
-
return this.rect;
|
|
155
|
-
}, s.prototype.getDiagonal = function() {
|
|
156
|
-
return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
|
|
157
|
-
}, s.prototype.getHalfTheDiagonal = function() {
|
|
158
|
-
return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
|
|
159
|
-
}, s.prototype.setRect = function(o, d) {
|
|
160
|
-
this.rect.x = o.x, this.rect.y = o.y, this.rect.width = d.width, this.rect.height = d.height;
|
|
161
|
-
}, s.prototype.setCenter = function(o, d) {
|
|
162
|
-
this.rect.x = o - this.rect.width / 2, this.rect.y = d - this.rect.height / 2;
|
|
163
|
-
}, s.prototype.setLocation = function(o, d) {
|
|
164
|
-
this.rect.x = o, this.rect.y = d;
|
|
165
|
-
}, s.prototype.moveBy = function(o, d) {
|
|
166
|
-
this.rect.x += o, this.rect.y += d;
|
|
167
|
-
}, s.prototype.getEdgeListToNode = function(o) {
|
|
168
|
-
var d = [], c = this;
|
|
169
|
-
return c.edges.forEach(function(E) {
|
|
170
|
-
if (E.target == o) {
|
|
171
|
-
if (E.source != c) throw "Incorrect edge source!";
|
|
172
|
-
d.push(E);
|
|
173
|
-
}
|
|
174
|
-
}), d;
|
|
175
|
-
}, s.prototype.getEdgesBetween = function(o) {
|
|
176
|
-
var d = [], c = this;
|
|
177
|
-
return c.edges.forEach(function(E) {
|
|
178
|
-
if (!(E.source == c || E.target == c)) throw "Incorrect edge source and/or target";
|
|
179
|
-
(E.target == o || E.source == o) && d.push(E);
|
|
180
|
-
}), d;
|
|
181
|
-
}, s.prototype.getNeighborsList = function() {
|
|
182
|
-
var o = /* @__PURE__ */ new Set(), d = this;
|
|
183
|
-
return d.edges.forEach(function(c) {
|
|
184
|
-
if (c.source == d)
|
|
185
|
-
o.add(c.target);
|
|
186
|
-
else {
|
|
187
|
-
if (c.target != d)
|
|
188
|
-
throw "Incorrect incidency!";
|
|
189
|
-
o.add(c.source);
|
|
190
|
-
}
|
|
191
|
-
}), o;
|
|
192
|
-
}, s.prototype.withChildren = function() {
|
|
193
|
-
var o = /* @__PURE__ */ new Set(), d, c;
|
|
194
|
-
if (o.add(this), this.child != null)
|
|
195
|
-
for (var E = this.child.getNodes(), m = 0; m < E.length; m++)
|
|
196
|
-
d = E[m], c = d.withChildren(), c.forEach(function(v) {
|
|
197
|
-
o.add(v);
|
|
198
|
-
});
|
|
199
|
-
return o;
|
|
200
|
-
}, s.prototype.getNoOfChildren = function() {
|
|
201
|
-
var o = 0, d;
|
|
202
|
-
if (this.child == null)
|
|
203
|
-
o = 1;
|
|
204
|
-
else
|
|
205
|
-
for (var c = this.child.getNodes(), E = 0; E < c.length; E++)
|
|
206
|
-
d = c[E], o += d.getNoOfChildren();
|
|
207
|
-
return o == 0 && (o = 1), o;
|
|
208
|
-
}, s.prototype.getEstimatedSize = function() {
|
|
209
|
-
if (this.estimatedSize == t.MIN_VALUE)
|
|
210
|
-
throw "assert failed";
|
|
211
|
-
return this.estimatedSize;
|
|
212
|
-
}, s.prototype.calcEstimatedSize = function() {
|
|
213
|
-
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);
|
|
214
|
-
}, s.prototype.scatter = function() {
|
|
215
|
-
var o, d, c = -r.INITIAL_WORLD_BOUNDARY, E = r.INITIAL_WORLD_BOUNDARY;
|
|
216
|
-
o = r.WORLD_CENTER_X + a.nextDouble() * (E - c) + c;
|
|
217
|
-
var m = -r.INITIAL_WORLD_BOUNDARY, v = r.INITIAL_WORLD_BOUNDARY;
|
|
218
|
-
d = r.WORLD_CENTER_Y + a.nextDouble() * (v - m) + m, this.rect.x = o, this.rect.y = d;
|
|
219
|
-
}, s.prototype.updateBounds = function() {
|
|
220
|
-
if (this.getChild() == null)
|
|
221
|
-
throw "assert failed";
|
|
222
|
-
if (this.getChild().getNodes().length != 0) {
|
|
223
|
-
var o = this.getChild();
|
|
224
|
-
if (o.updateBounds(!0), this.rect.x = o.getLeft(), this.rect.y = o.getTop(), this.setWidth(o.getRight() - o.getLeft()), this.setHeight(o.getBottom() - o.getTop()), r.NODE_DIMENSIONS_INCLUDE_LABELS) {
|
|
225
|
-
var d = o.getRight() - o.getLeft(), c = o.getBottom() - o.getTop();
|
|
226
|
-
this.labelWidth > d && (this.rect.x -= (this.labelWidth - d) / 2, this.setWidth(this.labelWidth)), this.labelHeight > c && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - c) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - c), this.setHeight(this.labelHeight));
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}, s.prototype.getInclusionTreeDepth = function() {
|
|
230
|
-
if (this.inclusionTreeDepth == t.MAX_VALUE)
|
|
231
|
-
throw "assert failed";
|
|
232
|
-
return this.inclusionTreeDepth;
|
|
233
|
-
}, s.prototype.transform = function(o) {
|
|
234
|
-
var d = this.rect.x;
|
|
235
|
-
d > r.WORLD_BOUNDARY ? d = r.WORLD_BOUNDARY : d < -r.WORLD_BOUNDARY && (d = -r.WORLD_BOUNDARY);
|
|
236
|
-
var c = this.rect.y;
|
|
237
|
-
c > r.WORLD_BOUNDARY ? c = r.WORLD_BOUNDARY : c < -r.WORLD_BOUNDARY && (c = -r.WORLD_BOUNDARY);
|
|
238
|
-
var E = new h(d, c), m = o.inverseTransformPoint(E);
|
|
239
|
-
this.setLocation(m.x, m.y);
|
|
240
|
-
}, s.prototype.getLeft = function() {
|
|
241
|
-
return this.rect.x;
|
|
242
|
-
}, s.prototype.getRight = function() {
|
|
243
|
-
return this.rect.x + this.rect.width;
|
|
244
|
-
}, s.prototype.getTop = function() {
|
|
245
|
-
return this.rect.y;
|
|
246
|
-
}, s.prototype.getBottom = function() {
|
|
247
|
-
return this.rect.y + this.rect.height;
|
|
248
|
-
}, s.prototype.getParent = function() {
|
|
249
|
-
return this.owner == null ? null : this.owner.getParent();
|
|
250
|
-
}, p.exports = s;
|
|
251
|
-
},
|
|
252
|
-
/* 4 */
|
|
253
|
-
/***/
|
|
254
|
-
function(p, T, y) {
|
|
255
|
-
function i(t, e) {
|
|
256
|
-
t == null && e == null ? (this.x = 0, this.y = 0) : (this.x = t, this.y = e);
|
|
257
|
-
}
|
|
258
|
-
i.prototype.getX = function() {
|
|
259
|
-
return this.x;
|
|
260
|
-
}, i.prototype.getY = function() {
|
|
261
|
-
return this.y;
|
|
262
|
-
}, i.prototype.setX = function(t) {
|
|
263
|
-
this.x = t;
|
|
264
|
-
}, i.prototype.setY = function(t) {
|
|
265
|
-
this.y = t;
|
|
266
|
-
}, i.prototype.getDifference = function(t) {
|
|
267
|
-
return new DimensionD(this.x - t.x, this.y - t.y);
|
|
268
|
-
}, i.prototype.getCopy = function() {
|
|
269
|
-
return new i(this.x, this.y);
|
|
270
|
-
}, i.prototype.translate = function(t) {
|
|
271
|
-
return this.x += t.width, this.y += t.height, this;
|
|
272
|
-
}, p.exports = i;
|
|
273
|
-
},
|
|
274
|
-
/* 5 */
|
|
275
|
-
/***/
|
|
276
|
-
function(p, T, y) {
|
|
277
|
-
var i = y(2), t = y(10), e = y(0), r = y(6), a = y(3), h = y(1), s = y(13), f = y(12), o = y(11);
|
|
278
|
-
function d(E, m, v) {
|
|
279
|
-
i.call(this, v), this.estimatedSize = t.MIN_VALUE, this.margin = e.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = E, m != null && m instanceof r ? this.graphManager = m : m != null && m instanceof Layout && (this.graphManager = m.graphManager);
|
|
280
|
-
}
|
|
281
|
-
d.prototype = Object.create(i.prototype);
|
|
282
|
-
for (var c in i)
|
|
283
|
-
d[c] = i[c];
|
|
284
|
-
d.prototype.getNodes = function() {
|
|
285
|
-
return this.nodes;
|
|
286
|
-
}, d.prototype.getEdges = function() {
|
|
287
|
-
return this.edges;
|
|
288
|
-
}, d.prototype.getGraphManager = function() {
|
|
289
|
-
return this.graphManager;
|
|
290
|
-
}, d.prototype.getParent = function() {
|
|
291
|
-
return this.parent;
|
|
292
|
-
}, d.prototype.getLeft = function() {
|
|
293
|
-
return this.left;
|
|
294
|
-
}, d.prototype.getRight = function() {
|
|
295
|
-
return this.right;
|
|
296
|
-
}, d.prototype.getTop = function() {
|
|
297
|
-
return this.top;
|
|
298
|
-
}, d.prototype.getBottom = function() {
|
|
299
|
-
return this.bottom;
|
|
300
|
-
}, d.prototype.isConnected = function() {
|
|
301
|
-
return this.isConnected;
|
|
302
|
-
}, d.prototype.add = function(E, m, v) {
|
|
303
|
-
if (m == null && v == null) {
|
|
304
|
-
var N = E;
|
|
305
|
-
if (this.graphManager == null)
|
|
306
|
-
throw "Graph has no graph mgr!";
|
|
307
|
-
if (this.getNodes().indexOf(N) > -1)
|
|
308
|
-
throw "Node already in graph!";
|
|
309
|
-
return N.owner = this, this.getNodes().push(N), N;
|
|
310
|
-
} else {
|
|
311
|
-
var D = E;
|
|
312
|
-
if (!(this.getNodes().indexOf(m) > -1 && this.getNodes().indexOf(v) > -1))
|
|
313
|
-
throw "Source or target not in graph!";
|
|
314
|
-
if (!(m.owner == v.owner && m.owner == this))
|
|
315
|
-
throw "Both owners must be this graph!";
|
|
316
|
-
return m.owner != v.owner ? null : (D.source = m, D.target = v, D.isInterGraph = !1, this.getEdges().push(D), m.edges.push(D), v != m && v.edges.push(D), D);
|
|
317
|
-
}
|
|
318
|
-
}, d.prototype.remove = function(E) {
|
|
319
|
-
var m = E;
|
|
320
|
-
if (E instanceof a) {
|
|
321
|
-
if (m == null)
|
|
322
|
-
throw "Node is null!";
|
|
323
|
-
if (!(m.owner != null && m.owner == this))
|
|
324
|
-
throw "Owner graph is invalid!";
|
|
325
|
-
if (this.graphManager == null)
|
|
326
|
-
throw "Owner graph manager is invalid!";
|
|
327
|
-
for (var v = m.edges.slice(), N, D = v.length, g = 0; g < D; g++)
|
|
328
|
-
N = v[g], N.isInterGraph ? this.graphManager.remove(N) : N.source.owner.remove(N);
|
|
329
|
-
var L = this.nodes.indexOf(m);
|
|
330
|
-
if (L == -1)
|
|
331
|
-
throw "Node not in owner node list!";
|
|
332
|
-
this.nodes.splice(L, 1);
|
|
333
|
-
} else if (E instanceof h) {
|
|
334
|
-
var N = E;
|
|
335
|
-
if (N == null)
|
|
336
|
-
throw "Edge is null!";
|
|
337
|
-
if (!(N.source != null && N.target != null))
|
|
338
|
-
throw "Source and/or target is null!";
|
|
339
|
-
if (!(N.source.owner != null && N.target.owner != null && N.source.owner == this && N.target.owner == this))
|
|
340
|
-
throw "Source and/or target owner is invalid!";
|
|
341
|
-
var n = N.source.edges.indexOf(N), u = N.target.edges.indexOf(N);
|
|
342
|
-
if (!(n > -1 && u > -1))
|
|
343
|
-
throw "Source and/or target doesn't know this edge!";
|
|
344
|
-
N.source.edges.splice(n, 1), N.target != N.source && N.target.edges.splice(u, 1);
|
|
345
|
-
var L = N.source.owner.getEdges().indexOf(N);
|
|
346
|
-
if (L == -1)
|
|
347
|
-
throw "Not in owner's edge list!";
|
|
348
|
-
N.source.owner.getEdges().splice(L, 1);
|
|
349
|
-
}
|
|
350
|
-
}, d.prototype.updateLeftTop = function() {
|
|
351
|
-
for (var E = t.MAX_VALUE, m = t.MAX_VALUE, v, N, D, g = this.getNodes(), L = g.length, n = 0; n < L; n++) {
|
|
352
|
-
var u = g[n];
|
|
353
|
-
v = u.getTop(), N = u.getLeft(), E > v && (E = v), m > N && (m = N);
|
|
354
|
-
}
|
|
355
|
-
return E == t.MAX_VALUE ? null : (g[0].getParent().paddingLeft != null ? D = g[0].getParent().paddingLeft : D = this.margin, this.left = m - D, this.top = E - D, new f(this.left, this.top));
|
|
356
|
-
}, d.prototype.updateBounds = function(E) {
|
|
357
|
-
for (var m = t.MAX_VALUE, v = -t.MAX_VALUE, N = t.MAX_VALUE, D = -t.MAX_VALUE, g, L, n, u, l, _ = this.nodes, A = _.length, I = 0; I < A; I++) {
|
|
358
|
-
var w = _[I];
|
|
359
|
-
E && w.child != null && w.updateBounds(), g = w.getLeft(), L = w.getRight(), n = w.getTop(), u = w.getBottom(), m > g && (m = g), v < L && (v = L), N > n && (N = n), D < u && (D = u);
|
|
360
|
-
}
|
|
361
|
-
var R = new s(m, N, v - m, D - N);
|
|
362
|
-
m == t.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), _[0].getParent().paddingLeft != null ? l = _[0].getParent().paddingLeft : l = this.margin, this.left = R.x - l, this.right = R.x + R.width + l, this.top = R.y - l, this.bottom = R.y + R.height + l;
|
|
363
|
-
}, d.calculateBounds = function(E) {
|
|
364
|
-
for (var m = t.MAX_VALUE, v = -t.MAX_VALUE, N = t.MAX_VALUE, D = -t.MAX_VALUE, g, L, n, u, l = E.length, _ = 0; _ < l; _++) {
|
|
365
|
-
var A = E[_];
|
|
366
|
-
g = A.getLeft(), L = A.getRight(), n = A.getTop(), u = A.getBottom(), m > g && (m = g), v < L && (v = L), N > n && (N = n), D < u && (D = u);
|
|
367
|
-
}
|
|
368
|
-
var I = new s(m, N, v - m, D - N);
|
|
369
|
-
return I;
|
|
370
|
-
}, d.prototype.getInclusionTreeDepth = function() {
|
|
371
|
-
return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
|
|
372
|
-
}, d.prototype.getEstimatedSize = function() {
|
|
373
|
-
if (this.estimatedSize == t.MIN_VALUE)
|
|
374
|
-
throw "assert failed";
|
|
375
|
-
return this.estimatedSize;
|
|
376
|
-
}, d.prototype.calcEstimatedSize = function() {
|
|
377
|
-
for (var E = 0, m = this.nodes, v = m.length, N = 0; N < v; N++) {
|
|
378
|
-
var D = m[N];
|
|
379
|
-
E += D.calcEstimatedSize();
|
|
380
|
-
}
|
|
381
|
-
return E == 0 ? this.estimatedSize = e.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = E / Math.sqrt(this.nodes.length), this.estimatedSize;
|
|
382
|
-
}, d.prototype.updateConnected = function() {
|
|
383
|
-
var E = this;
|
|
384
|
-
if (this.nodes.length == 0) {
|
|
385
|
-
this.isConnected = !0;
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
var m = new o(), v = /* @__PURE__ */ new Set(), N = this.nodes[0], D, g, L = N.withChildren();
|
|
389
|
-
for (L.forEach(function(I) {
|
|
390
|
-
m.push(I), v.add(I);
|
|
391
|
-
}); m.length !== 0; ) {
|
|
392
|
-
N = m.shift(), D = N.getEdges();
|
|
393
|
-
for (var n = D.length, u = 0; u < n; u++) {
|
|
394
|
-
var l = D[u];
|
|
395
|
-
if (g = l.getOtherEndInGraph(N, this), g != null && !v.has(g)) {
|
|
396
|
-
var _ = g.withChildren();
|
|
397
|
-
_.forEach(function(I) {
|
|
398
|
-
m.push(I), v.add(I);
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
if (this.isConnected = !1, v.size >= this.nodes.length) {
|
|
404
|
-
var A = 0;
|
|
405
|
-
v.forEach(function(I) {
|
|
406
|
-
I.owner == E && A++;
|
|
407
|
-
}), A == this.nodes.length && (this.isConnected = !0);
|
|
408
|
-
}
|
|
409
|
-
}, p.exports = d;
|
|
410
|
-
},
|
|
411
|
-
/* 6 */
|
|
412
|
-
/***/
|
|
413
|
-
function(p, T, y) {
|
|
414
|
-
var i, t = y(1);
|
|
415
|
-
function e(r) {
|
|
416
|
-
i = y(5), this.layout = r, this.graphs = [], this.edges = [];
|
|
417
|
-
}
|
|
418
|
-
e.prototype.addRoot = function() {
|
|
419
|
-
var r = this.layout.newGraph(), a = this.layout.newNode(null), h = this.add(r, a);
|
|
420
|
-
return this.setRootGraph(h), this.rootGraph;
|
|
421
|
-
}, e.prototype.add = function(r, a, h, s, f) {
|
|
422
|
-
if (h == null && s == null && f == null) {
|
|
423
|
-
if (r == null)
|
|
424
|
-
throw "Graph is null!";
|
|
425
|
-
if (a == null)
|
|
426
|
-
throw "Parent node is null!";
|
|
427
|
-
if (this.graphs.indexOf(r) > -1)
|
|
428
|
-
throw "Graph already in this graph mgr!";
|
|
429
|
-
if (this.graphs.push(r), r.parent != null)
|
|
430
|
-
throw "Already has a parent!";
|
|
431
|
-
if (a.child != null)
|
|
432
|
-
throw "Already has a child!";
|
|
433
|
-
return r.parent = a, a.child = r, r;
|
|
434
|
-
} else {
|
|
435
|
-
f = h, s = a, h = r;
|
|
436
|
-
var o = s.getOwner(), d = f.getOwner();
|
|
437
|
-
if (!(o != null && o.getGraphManager() == this))
|
|
438
|
-
throw "Source not in this graph mgr!";
|
|
439
|
-
if (!(d != null && d.getGraphManager() == this))
|
|
440
|
-
throw "Target not in this graph mgr!";
|
|
441
|
-
if (o == d)
|
|
442
|
-
return h.isInterGraph = !1, o.add(h, s, f);
|
|
443
|
-
if (h.isInterGraph = !0, h.source = s, h.target = f, this.edges.indexOf(h) > -1)
|
|
444
|
-
throw "Edge already in inter-graph edge list!";
|
|
445
|
-
if (this.edges.push(h), !(h.source != null && h.target != null))
|
|
446
|
-
throw "Edge source and/or target is null!";
|
|
447
|
-
if (!(h.source.edges.indexOf(h) == -1 && h.target.edges.indexOf(h) == -1))
|
|
448
|
-
throw "Edge already in source and/or target incidency list!";
|
|
449
|
-
return h.source.edges.push(h), h.target.edges.push(h), h;
|
|
450
|
-
}
|
|
451
|
-
}, e.prototype.remove = function(r) {
|
|
452
|
-
if (r instanceof i) {
|
|
453
|
-
var a = r;
|
|
454
|
-
if (a.getGraphManager() != this)
|
|
455
|
-
throw "Graph not in this graph mgr";
|
|
456
|
-
if (!(a == this.rootGraph || a.parent != null && a.parent.graphManager == this))
|
|
457
|
-
throw "Invalid parent node!";
|
|
458
|
-
var h = [];
|
|
459
|
-
h = h.concat(a.getEdges());
|
|
460
|
-
for (var s, f = h.length, o = 0; o < f; o++)
|
|
461
|
-
s = h[o], a.remove(s);
|
|
462
|
-
var d = [];
|
|
463
|
-
d = d.concat(a.getNodes());
|
|
464
|
-
var c;
|
|
465
|
-
f = d.length;
|
|
466
|
-
for (var o = 0; o < f; o++)
|
|
467
|
-
c = d[o], a.remove(c);
|
|
468
|
-
a == this.rootGraph && this.setRootGraph(null);
|
|
469
|
-
var E = this.graphs.indexOf(a);
|
|
470
|
-
this.graphs.splice(E, 1), a.parent = null;
|
|
471
|
-
} else if (r instanceof t) {
|
|
472
|
-
if (s = r, s == null)
|
|
473
|
-
throw "Edge is null!";
|
|
474
|
-
if (!s.isInterGraph)
|
|
475
|
-
throw "Not an inter-graph edge!";
|
|
476
|
-
if (!(s.source != null && s.target != null))
|
|
477
|
-
throw "Source and/or target is null!";
|
|
478
|
-
if (!(s.source.edges.indexOf(s) != -1 && s.target.edges.indexOf(s) != -1))
|
|
479
|
-
throw "Source and/or target doesn't know this edge!";
|
|
480
|
-
var E = s.source.edges.indexOf(s);
|
|
481
|
-
if (s.source.edges.splice(E, 1), E = s.target.edges.indexOf(s), s.target.edges.splice(E, 1), !(s.source.owner != null && s.source.owner.getGraphManager() != null))
|
|
482
|
-
throw "Edge owner graph or owner graph manager is null!";
|
|
483
|
-
if (s.source.owner.getGraphManager().edges.indexOf(s) == -1)
|
|
484
|
-
throw "Not in owner graph manager's edge list!";
|
|
485
|
-
var E = s.source.owner.getGraphManager().edges.indexOf(s);
|
|
486
|
-
s.source.owner.getGraphManager().edges.splice(E, 1);
|
|
487
|
-
}
|
|
488
|
-
}, e.prototype.updateBounds = function() {
|
|
489
|
-
this.rootGraph.updateBounds(!0);
|
|
490
|
-
}, e.prototype.getGraphs = function() {
|
|
491
|
-
return this.graphs;
|
|
492
|
-
}, e.prototype.getAllNodes = function() {
|
|
493
|
-
if (this.allNodes == null) {
|
|
494
|
-
for (var r = [], a = this.getGraphs(), h = a.length, s = 0; s < h; s++)
|
|
495
|
-
r = r.concat(a[s].getNodes());
|
|
496
|
-
this.allNodes = r;
|
|
497
|
-
}
|
|
498
|
-
return this.allNodes;
|
|
499
|
-
}, e.prototype.resetAllNodes = function() {
|
|
500
|
-
this.allNodes = null;
|
|
501
|
-
}, e.prototype.resetAllEdges = function() {
|
|
502
|
-
this.allEdges = null;
|
|
503
|
-
}, e.prototype.resetAllNodesToApplyGravitation = function() {
|
|
504
|
-
this.allNodesToApplyGravitation = null;
|
|
505
|
-
}, e.prototype.getAllEdges = function() {
|
|
506
|
-
if (this.allEdges == null) {
|
|
507
|
-
var r = [], a = this.getGraphs();
|
|
508
|
-
a.length;
|
|
509
|
-
for (var h = 0; h < a.length; h++)
|
|
510
|
-
r = r.concat(a[h].getEdges());
|
|
511
|
-
r = r.concat(this.edges), this.allEdges = r;
|
|
512
|
-
}
|
|
513
|
-
return this.allEdges;
|
|
514
|
-
}, e.prototype.getAllNodesToApplyGravitation = function() {
|
|
515
|
-
return this.allNodesToApplyGravitation;
|
|
516
|
-
}, e.prototype.setAllNodesToApplyGravitation = function(r) {
|
|
517
|
-
if (this.allNodesToApplyGravitation != null)
|
|
518
|
-
throw "assert failed";
|
|
519
|
-
this.allNodesToApplyGravitation = r;
|
|
520
|
-
}, e.prototype.getRoot = function() {
|
|
521
|
-
return this.rootGraph;
|
|
522
|
-
}, e.prototype.setRootGraph = function(r) {
|
|
523
|
-
if (r.getGraphManager() != this)
|
|
524
|
-
throw "Root not in this graph mgr!";
|
|
525
|
-
this.rootGraph = r, r.parent == null && (r.parent = this.layout.newNode("Root node"));
|
|
526
|
-
}, e.prototype.getLayout = function() {
|
|
527
|
-
return this.layout;
|
|
528
|
-
}, e.prototype.isOneAncestorOfOther = function(r, a) {
|
|
529
|
-
if (!(r != null && a != null))
|
|
530
|
-
throw "assert failed";
|
|
531
|
-
if (r == a)
|
|
532
|
-
return !0;
|
|
533
|
-
var h = r.getOwner(), s;
|
|
534
|
-
do {
|
|
535
|
-
if (s = h.getParent(), s == null)
|
|
536
|
-
break;
|
|
537
|
-
if (s == a)
|
|
538
|
-
return !0;
|
|
539
|
-
if (h = s.getOwner(), h == null)
|
|
540
|
-
break;
|
|
541
|
-
} while (!0);
|
|
542
|
-
h = a.getOwner();
|
|
543
|
-
do {
|
|
544
|
-
if (s = h.getParent(), s == null)
|
|
545
|
-
break;
|
|
546
|
-
if (s == r)
|
|
547
|
-
return !0;
|
|
548
|
-
if (h = s.getOwner(), h == null)
|
|
549
|
-
break;
|
|
550
|
-
} while (!0);
|
|
551
|
-
return !1;
|
|
552
|
-
}, e.prototype.calcLowestCommonAncestors = function() {
|
|
553
|
-
for (var r, a, h, s, f, o = this.getAllEdges(), d = o.length, c = 0; c < d; c++) {
|
|
554
|
-
if (r = o[c], a = r.source, h = r.target, r.lca = null, r.sourceInLca = a, r.targetInLca = h, a == h) {
|
|
555
|
-
r.lca = a.getOwner();
|
|
556
|
-
continue;
|
|
557
|
-
}
|
|
558
|
-
for (s = a.getOwner(); r.lca == null; ) {
|
|
559
|
-
for (r.targetInLca = h, f = h.getOwner(); r.lca == null; ) {
|
|
560
|
-
if (f == s) {
|
|
561
|
-
r.lca = f;
|
|
562
|
-
break;
|
|
563
|
-
}
|
|
564
|
-
if (f == this.rootGraph)
|
|
565
|
-
break;
|
|
566
|
-
if (r.lca != null)
|
|
567
|
-
throw "assert failed";
|
|
568
|
-
r.targetInLca = f.getParent(), f = r.targetInLca.getOwner();
|
|
569
|
-
}
|
|
570
|
-
if (s == this.rootGraph)
|
|
571
|
-
break;
|
|
572
|
-
r.lca == null && (r.sourceInLca = s.getParent(), s = r.sourceInLca.getOwner());
|
|
573
|
-
}
|
|
574
|
-
if (r.lca == null)
|
|
575
|
-
throw "assert failed";
|
|
576
|
-
}
|
|
577
|
-
}, e.prototype.calcLowestCommonAncestor = function(r, a) {
|
|
578
|
-
if (r == a)
|
|
579
|
-
return r.getOwner();
|
|
580
|
-
var h = r.getOwner();
|
|
581
|
-
do {
|
|
582
|
-
if (h == null)
|
|
583
|
-
break;
|
|
584
|
-
var s = a.getOwner();
|
|
585
|
-
do {
|
|
586
|
-
if (s == null)
|
|
587
|
-
break;
|
|
588
|
-
if (s == h)
|
|
589
|
-
return s;
|
|
590
|
-
s = s.getParent().getOwner();
|
|
591
|
-
} while (!0);
|
|
592
|
-
h = h.getParent().getOwner();
|
|
593
|
-
} while (!0);
|
|
594
|
-
return h;
|
|
595
|
-
}, e.prototype.calcInclusionTreeDepths = function(r, a) {
|
|
596
|
-
r == null && a == null && (r = this.rootGraph, a = 1);
|
|
597
|
-
for (var h, s = r.getNodes(), f = s.length, o = 0; o < f; o++)
|
|
598
|
-
h = s[o], h.inclusionTreeDepth = a, h.child != null && this.calcInclusionTreeDepths(h.child, a + 1);
|
|
599
|
-
}, e.prototype.includesInvalidEdge = function() {
|
|
600
|
-
for (var r, a = this.edges.length, h = 0; h < a; h++)
|
|
601
|
-
if (r = this.edges[h], this.isOneAncestorOfOther(r.source, r.target))
|
|
602
|
-
return !0;
|
|
603
|
-
return !1;
|
|
604
|
-
}, p.exports = e;
|
|
605
|
-
},
|
|
606
|
-
/* 7 */
|
|
607
|
-
/***/
|
|
608
|
-
function(p, T, y) {
|
|
609
|
-
var i = y(0);
|
|
610
|
-
function t() {
|
|
611
|
-
}
|
|
612
|
-
for (var e in i)
|
|
613
|
-
t[e] = i[e];
|
|
614
|
-
t.MAX_ITERATIONS = 2500, t.DEFAULT_EDGE_LENGTH = 50, t.DEFAULT_SPRING_STRENGTH = 0.45, t.DEFAULT_REPULSION_STRENGTH = 4500, t.DEFAULT_GRAVITY_STRENGTH = 0.4, t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, t.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, t.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, t.COOLING_ADAPTATION_FACTOR = 0.33, t.ADAPTATION_LOWER_NODE_LIMIT = 1e3, t.ADAPTATION_UPPER_NODE_LIMIT = 5e3, t.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, t.MAX_NODE_DISPLACEMENT = t.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, t.MIN_REPULSION_DIST = t.DEFAULT_EDGE_LENGTH / 10, t.CONVERGENCE_CHECK_PERIOD = 100, t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, t.MIN_EDGE_LENGTH = 1, t.GRID_CALCULATION_CHECK_PERIOD = 10, p.exports = t;
|
|
615
|
-
},
|
|
616
|
-
/* 8 */
|
|
617
|
-
/***/
|
|
618
|
-
function(p, T, y) {
|
|
619
|
-
var i = y(12);
|
|
620
|
-
function t() {
|
|
621
|
-
}
|
|
622
|
-
t.calcSeparationAmount = function(e, r, a, h) {
|
|
623
|
-
if (!e.intersects(r))
|
|
624
|
-
throw "assert failed";
|
|
625
|
-
var s = new Array(2);
|
|
626
|
-
this.decideDirectionsForOverlappingNodes(e, r, s), a[0] = Math.min(e.getRight(), r.getRight()) - Math.max(e.x, r.x), a[1] = Math.min(e.getBottom(), r.getBottom()) - Math.max(e.y, r.y), e.getX() <= r.getX() && e.getRight() >= r.getRight() ? a[0] += Math.min(r.getX() - e.getX(), e.getRight() - r.getRight()) : r.getX() <= e.getX() && r.getRight() >= e.getRight() && (a[0] += Math.min(e.getX() - r.getX(), r.getRight() - e.getRight())), e.getY() <= r.getY() && e.getBottom() >= r.getBottom() ? a[1] += Math.min(r.getY() - e.getY(), e.getBottom() - r.getBottom()) : r.getY() <= e.getY() && r.getBottom() >= e.getBottom() && (a[1] += Math.min(e.getY() - r.getY(), r.getBottom() - e.getBottom()));
|
|
627
|
-
var f = Math.abs((r.getCenterY() - e.getCenterY()) / (r.getCenterX() - e.getCenterX()));
|
|
628
|
-
r.getCenterY() === e.getCenterY() && r.getCenterX() === e.getCenterX() && (f = 1);
|
|
629
|
-
var o = f * a[0], d = a[1] / f;
|
|
630
|
-
a[0] < d ? d = a[0] : o = a[1], a[0] = -1 * s[0] * (d / 2 + h), a[1] = -1 * s[1] * (o / 2 + h);
|
|
631
|
-
}, t.decideDirectionsForOverlappingNodes = function(e, r, a) {
|
|
632
|
-
e.getCenterX() < r.getCenterX() ? a[0] = -1 : a[0] = 1, e.getCenterY() < r.getCenterY() ? a[1] = -1 : a[1] = 1;
|
|
633
|
-
}, t.getIntersection2 = function(e, r, a) {
|
|
634
|
-
var h = e.getCenterX(), s = e.getCenterY(), f = r.getCenterX(), o = r.getCenterY();
|
|
635
|
-
if (e.intersects(r))
|
|
636
|
-
return a[0] = h, a[1] = s, a[2] = f, a[3] = o, !0;
|
|
637
|
-
var d = e.getX(), c = e.getY(), E = e.getRight(), m = e.getX(), v = e.getBottom(), N = e.getRight(), D = e.getWidthHalf(), g = e.getHeightHalf(), L = r.getX(), n = r.getY(), u = r.getRight(), l = r.getX(), _ = r.getBottom(), A = r.getRight(), I = r.getWidthHalf(), w = r.getHeightHalf(), R = !1, S = !1;
|
|
638
|
-
if (h === f) {
|
|
639
|
-
if (s > o)
|
|
640
|
-
return a[0] = h, a[1] = c, a[2] = f, a[3] = _, !1;
|
|
641
|
-
if (s < o)
|
|
642
|
-
return a[0] = h, a[1] = v, a[2] = f, a[3] = n, !1;
|
|
643
|
-
} else if (s === o) {
|
|
644
|
-
if (h > f)
|
|
645
|
-
return a[0] = d, a[1] = s, a[2] = u, a[3] = o, !1;
|
|
646
|
-
if (h < f)
|
|
647
|
-
return a[0] = E, a[1] = s, a[2] = L, a[3] = o, !1;
|
|
648
|
-
} else {
|
|
649
|
-
var U = e.height / e.width, b = r.height / r.width, C = (o - s) / (f - h), x = void 0, F = void 0, k = void 0, Y = void 0, X = void 0, P = void 0;
|
|
650
|
-
if (-U === C ? h > f ? (a[0] = m, a[1] = v, R = !0) : (a[0] = E, a[1] = c, R = !0) : U === C && (h > f ? (a[0] = d, a[1] = c, R = !0) : (a[0] = N, a[1] = v, R = !0)), -b === C ? f > h ? (a[2] = l, a[3] = _, S = !0) : (a[2] = u, a[3] = n, S = !0) : b === C && (f > h ? (a[2] = L, a[3] = n, S = !0) : (a[2] = A, a[3] = _, S = !0)), R && S)
|
|
651
|
-
return !1;
|
|
652
|
-
if (h > f ? s > o ? (x = this.getCardinalDirection(U, C, 4), F = this.getCardinalDirection(b, C, 2)) : (x = this.getCardinalDirection(-U, C, 3), F = this.getCardinalDirection(-b, C, 1)) : s > o ? (x = this.getCardinalDirection(-U, C, 1), F = this.getCardinalDirection(-b, C, 3)) : (x = this.getCardinalDirection(U, C, 2), F = this.getCardinalDirection(b, C, 4)), !R)
|
|
653
|
-
switch (x) {
|
|
654
|
-
case 1:
|
|
655
|
-
Y = c, k = h + -g / C, a[0] = k, a[1] = Y;
|
|
656
|
-
break;
|
|
657
|
-
case 2:
|
|
658
|
-
k = N, Y = s + D * C, a[0] = k, a[1] = Y;
|
|
659
|
-
break;
|
|
660
|
-
case 3:
|
|
661
|
-
Y = v, k = h + g / C, a[0] = k, a[1] = Y;
|
|
662
|
-
break;
|
|
663
|
-
case 4:
|
|
664
|
-
k = m, Y = s + -D * C, a[0] = k, a[1] = Y;
|
|
665
|
-
break;
|
|
666
|
-
}
|
|
667
|
-
if (!S)
|
|
668
|
-
switch (F) {
|
|
669
|
-
case 1:
|
|
670
|
-
P = n, X = f + -w / C, a[2] = X, a[3] = P;
|
|
671
|
-
break;
|
|
672
|
-
case 2:
|
|
673
|
-
X = A, P = o + I * C, a[2] = X, a[3] = P;
|
|
674
|
-
break;
|
|
675
|
-
case 3:
|
|
676
|
-
P = _, X = f + w / C, a[2] = X, a[3] = P;
|
|
677
|
-
break;
|
|
678
|
-
case 4:
|
|
679
|
-
X = l, P = o + -I * C, a[2] = X, a[3] = P;
|
|
680
|
-
break;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
return !1;
|
|
684
|
-
}, t.getCardinalDirection = function(e, r, a) {
|
|
685
|
-
return e > r ? a : 1 + a % 4;
|
|
686
|
-
}, t.getIntersection = function(e, r, a, h) {
|
|
687
|
-
if (h == null)
|
|
688
|
-
return this.getIntersection2(e, r, a);
|
|
689
|
-
var s = e.x, f = e.y, o = r.x, d = r.y, c = a.x, E = a.y, m = h.x, v = h.y, N = void 0, D = void 0, g = void 0, L = void 0, n = void 0, u = void 0, l = void 0, _ = void 0, A = void 0;
|
|
690
|
-
return g = d - f, n = s - o, l = o * f - s * d, L = v - E, u = c - m, _ = m * E - c * v, A = g * u - L * n, A === 0 ? null : (N = (n * _ - u * l) / A, D = (L * l - g * _) / A, new i(N, D));
|
|
691
|
-
}, t.angleOfVector = function(e, r, a, h) {
|
|
692
|
-
var s = void 0;
|
|
693
|
-
return e !== a ? (s = Math.atan((h - r) / (a - e)), a < e ? s += Math.PI : h < r && (s += this.TWO_PI)) : h < r ? s = this.ONE_AND_HALF_PI : s = this.HALF_PI, s;
|
|
694
|
-
}, t.doIntersect = function(e, r, a, h) {
|
|
695
|
-
var s = e.x, f = e.y, o = r.x, d = r.y, c = a.x, E = a.y, m = h.x, v = h.y, N = (o - s) * (v - E) - (m - c) * (d - f);
|
|
696
|
-
if (N === 0)
|
|
697
|
-
return !1;
|
|
698
|
-
var D = ((v - E) * (m - s) + (c - m) * (v - f)) / N, g = ((f - d) * (m - s) + (o - s) * (v - f)) / N;
|
|
699
|
-
return 0 < D && D < 1 && 0 < g && g < 1;
|
|
700
|
-
}, t.HALF_PI = 0.5 * Math.PI, t.ONE_AND_HALF_PI = 1.5 * Math.PI, t.TWO_PI = 2 * Math.PI, t.THREE_PI = 3 * Math.PI, p.exports = t;
|
|
701
|
-
},
|
|
702
|
-
/* 9 */
|
|
703
|
-
/***/
|
|
704
|
-
function(p, T, y) {
|
|
705
|
-
function i() {
|
|
706
|
-
}
|
|
707
|
-
i.sign = function(t) {
|
|
708
|
-
return t > 0 ? 1 : t < 0 ? -1 : 0;
|
|
709
|
-
}, i.floor = function(t) {
|
|
710
|
-
return t < 0 ? Math.ceil(t) : Math.floor(t);
|
|
711
|
-
}, i.ceil = function(t) {
|
|
712
|
-
return t < 0 ? Math.floor(t) : Math.ceil(t);
|
|
713
|
-
}, p.exports = i;
|
|
714
|
-
},
|
|
715
|
-
/* 10 */
|
|
716
|
-
/***/
|
|
717
|
-
function(p, T, y) {
|
|
718
|
-
function i() {
|
|
719
|
-
}
|
|
720
|
-
i.MAX_VALUE = 2147483647, i.MIN_VALUE = -2147483648, p.exports = i;
|
|
721
|
-
},
|
|
722
|
-
/* 11 */
|
|
723
|
-
/***/
|
|
724
|
-
function(p, T, y) {
|
|
725
|
-
var i = /* @__PURE__ */ function() {
|
|
726
|
-
function s(f, o) {
|
|
727
|
-
for (var d = 0; d < o.length; d++) {
|
|
728
|
-
var c = o[d];
|
|
729
|
-
c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(f, c.key, c);
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
return function(f, o, d) {
|
|
733
|
-
return o && s(f.prototype, o), d && s(f, d), f;
|
|
734
|
-
};
|
|
735
|
-
}();
|
|
736
|
-
function t(s, f) {
|
|
737
|
-
if (!(s instanceof f))
|
|
738
|
-
throw new TypeError("Cannot call a class as a function");
|
|
739
|
-
}
|
|
740
|
-
var e = function(s) {
|
|
741
|
-
return { value: s, next: null, prev: null };
|
|
742
|
-
}, r = function(s, f, o, d) {
|
|
743
|
-
return s !== null ? s.next = f : d.head = f, o !== null ? o.prev = f : d.tail = f, f.prev = s, f.next = o, d.length++, f;
|
|
744
|
-
}, a = function(s, f) {
|
|
745
|
-
var o = s.prev, d = s.next;
|
|
746
|
-
return o !== null ? o.next = d : f.head = d, d !== null ? d.prev = o : f.tail = o, s.prev = s.next = null, f.length--, s;
|
|
747
|
-
}, h = function() {
|
|
748
|
-
function s(f) {
|
|
749
|
-
var o = this;
|
|
750
|
-
t(this, s), this.length = 0, this.head = null, this.tail = null, f != null && f.forEach(function(d) {
|
|
751
|
-
return o.push(d);
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
return i(s, [{
|
|
755
|
-
key: "size",
|
|
756
|
-
value: function() {
|
|
757
|
-
return this.length;
|
|
758
|
-
}
|
|
759
|
-
}, {
|
|
760
|
-
key: "insertBefore",
|
|
761
|
-
value: function(f, o) {
|
|
762
|
-
return r(o.prev, e(f), o, this);
|
|
763
|
-
}
|
|
764
|
-
}, {
|
|
765
|
-
key: "insertAfter",
|
|
766
|
-
value: function(f, o) {
|
|
767
|
-
return r(o, e(f), o.next, this);
|
|
768
|
-
}
|
|
769
|
-
}, {
|
|
770
|
-
key: "insertNodeBefore",
|
|
771
|
-
value: function(f, o) {
|
|
772
|
-
return r(o.prev, f, o, this);
|
|
773
|
-
}
|
|
774
|
-
}, {
|
|
775
|
-
key: "insertNodeAfter",
|
|
776
|
-
value: function(f, o) {
|
|
777
|
-
return r(o, f, o.next, this);
|
|
778
|
-
}
|
|
779
|
-
}, {
|
|
780
|
-
key: "push",
|
|
781
|
-
value: function(f) {
|
|
782
|
-
return r(this.tail, e(f), null, this);
|
|
783
|
-
}
|
|
784
|
-
}, {
|
|
785
|
-
key: "unshift",
|
|
786
|
-
value: function(f) {
|
|
787
|
-
return r(null, e(f), this.head, this);
|
|
788
|
-
}
|
|
789
|
-
}, {
|
|
790
|
-
key: "remove",
|
|
791
|
-
value: function(f) {
|
|
792
|
-
return a(f, this);
|
|
793
|
-
}
|
|
794
|
-
}, {
|
|
795
|
-
key: "pop",
|
|
796
|
-
value: function() {
|
|
797
|
-
return a(this.tail, this).value;
|
|
798
|
-
}
|
|
799
|
-
}, {
|
|
800
|
-
key: "popNode",
|
|
801
|
-
value: function() {
|
|
802
|
-
return a(this.tail, this);
|
|
803
|
-
}
|
|
804
|
-
}, {
|
|
805
|
-
key: "shift",
|
|
806
|
-
value: function() {
|
|
807
|
-
return a(this.head, this).value;
|
|
808
|
-
}
|
|
809
|
-
}, {
|
|
810
|
-
key: "shiftNode",
|
|
811
|
-
value: function() {
|
|
812
|
-
return a(this.head, this);
|
|
813
|
-
}
|
|
814
|
-
}, {
|
|
815
|
-
key: "get_object_at",
|
|
816
|
-
value: function(f) {
|
|
817
|
-
if (f <= this.length()) {
|
|
818
|
-
for (var o = 1, d = this.head; o < f; )
|
|
819
|
-
d = d.next, o++;
|
|
820
|
-
return d.value;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
}, {
|
|
824
|
-
key: "set_object_at",
|
|
825
|
-
value: function(f, o) {
|
|
826
|
-
if (f <= this.length()) {
|
|
827
|
-
for (var d = 1, c = this.head; d < f; )
|
|
828
|
-
c = c.next, d++;
|
|
829
|
-
c.value = o;
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
}]), s;
|
|
833
|
-
}();
|
|
834
|
-
p.exports = h;
|
|
835
|
-
},
|
|
836
|
-
/* 12 */
|
|
837
|
-
/***/
|
|
838
|
-
function(p, T, y) {
|
|
839
|
-
function i(t, e, r) {
|
|
840
|
-
this.x = null, this.y = null, t == null && e == null && r == null ? (this.x = 0, this.y = 0) : typeof t == "number" && typeof e == "number" && r == null ? (this.x = t, this.y = e) : t.constructor.name == "Point" && e == null && r == null && (r = t, this.x = r.x, this.y = r.y);
|
|
841
|
-
}
|
|
842
|
-
i.prototype.getX = function() {
|
|
843
|
-
return this.x;
|
|
844
|
-
}, i.prototype.getY = function() {
|
|
845
|
-
return this.y;
|
|
846
|
-
}, i.prototype.getLocation = function() {
|
|
847
|
-
return new i(this.x, this.y);
|
|
848
|
-
}, i.prototype.setLocation = function(t, e, r) {
|
|
849
|
-
t.constructor.name == "Point" && e == null && r == null ? (r = t, this.setLocation(r.x, r.y)) : typeof t == "number" && typeof e == "number" && r == null && (parseInt(t) == t && parseInt(e) == e ? this.move(t, e) : (this.x = Math.floor(t + 0.5), this.y = Math.floor(e + 0.5)));
|
|
850
|
-
}, i.prototype.move = function(t, e) {
|
|
851
|
-
this.x = t, this.y = e;
|
|
852
|
-
}, i.prototype.translate = function(t, e) {
|
|
853
|
-
this.x += t, this.y += e;
|
|
854
|
-
}, i.prototype.equals = function(t) {
|
|
855
|
-
if (t.constructor.name == "Point") {
|
|
856
|
-
var e = t;
|
|
857
|
-
return this.x == e.x && this.y == e.y;
|
|
858
|
-
}
|
|
859
|
-
return this == t;
|
|
860
|
-
}, i.prototype.toString = function() {
|
|
861
|
-
return new i().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
|
|
862
|
-
}, p.exports = i;
|
|
863
|
-
},
|
|
864
|
-
/* 13 */
|
|
865
|
-
/***/
|
|
866
|
-
function(p, T, y) {
|
|
867
|
-
function i(t, e, r, a) {
|
|
868
|
-
this.x = 0, this.y = 0, this.width = 0, this.height = 0, t != null && e != null && r != null && a != null && (this.x = t, this.y = e, this.width = r, this.height = a);
|
|
869
|
-
}
|
|
870
|
-
i.prototype.getX = function() {
|
|
871
|
-
return this.x;
|
|
872
|
-
}, i.prototype.setX = function(t) {
|
|
873
|
-
this.x = t;
|
|
874
|
-
}, i.prototype.getY = function() {
|
|
875
|
-
return this.y;
|
|
876
|
-
}, i.prototype.setY = function(t) {
|
|
877
|
-
this.y = t;
|
|
878
|
-
}, i.prototype.getWidth = function() {
|
|
879
|
-
return this.width;
|
|
880
|
-
}, i.prototype.setWidth = function(t) {
|
|
881
|
-
this.width = t;
|
|
882
|
-
}, i.prototype.getHeight = function() {
|
|
883
|
-
return this.height;
|
|
884
|
-
}, i.prototype.setHeight = function(t) {
|
|
885
|
-
this.height = t;
|
|
886
|
-
}, i.prototype.getRight = function() {
|
|
887
|
-
return this.x + this.width;
|
|
888
|
-
}, i.prototype.getBottom = function() {
|
|
889
|
-
return this.y + this.height;
|
|
890
|
-
}, i.prototype.intersects = function(t) {
|
|
891
|
-
return !(this.getRight() < t.x || this.getBottom() < t.y || t.getRight() < this.x || t.getBottom() < this.y);
|
|
892
|
-
}, i.prototype.getCenterX = function() {
|
|
893
|
-
return this.x + this.width / 2;
|
|
894
|
-
}, i.prototype.getMinX = function() {
|
|
895
|
-
return this.getX();
|
|
896
|
-
}, i.prototype.getMaxX = function() {
|
|
897
|
-
return this.getX() + this.width;
|
|
898
|
-
}, i.prototype.getCenterY = function() {
|
|
899
|
-
return this.y + this.height / 2;
|
|
900
|
-
}, i.prototype.getMinY = function() {
|
|
901
|
-
return this.getY();
|
|
902
|
-
}, i.prototype.getMaxY = function() {
|
|
903
|
-
return this.getY() + this.height;
|
|
904
|
-
}, i.prototype.getWidthHalf = function() {
|
|
905
|
-
return this.width / 2;
|
|
906
|
-
}, i.prototype.getHeightHalf = function() {
|
|
907
|
-
return this.height / 2;
|
|
908
|
-
}, p.exports = i;
|
|
909
|
-
},
|
|
910
|
-
/* 14 */
|
|
911
|
-
/***/
|
|
912
|
-
function(p, T, y) {
|
|
913
|
-
var i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
914
|
-
return typeof e;
|
|
915
|
-
} : function(e) {
|
|
916
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
917
|
-
};
|
|
918
|
-
function t() {
|
|
919
|
-
}
|
|
920
|
-
t.lastID = 0, t.createID = function(e) {
|
|
921
|
-
return t.isPrimitive(e) ? e : (e.uniqueID != null || (e.uniqueID = t.getString(), t.lastID++), e.uniqueID);
|
|
922
|
-
}, t.getString = function(e) {
|
|
923
|
-
return e == null && (e = t.lastID), "Object#" + e;
|
|
924
|
-
}, t.isPrimitive = function(e) {
|
|
925
|
-
var r = typeof e > "u" ? "undefined" : i(e);
|
|
926
|
-
return e == null || r != "object" && r != "function";
|
|
927
|
-
}, p.exports = t;
|
|
928
|
-
},
|
|
929
|
-
/* 15 */
|
|
930
|
-
/***/
|
|
931
|
-
function(p, T, y) {
|
|
932
|
-
function i(c) {
|
|
933
|
-
if (Array.isArray(c)) {
|
|
934
|
-
for (var E = 0, m = Array(c.length); E < c.length; E++)
|
|
935
|
-
m[E] = c[E];
|
|
936
|
-
return m;
|
|
937
|
-
} else
|
|
938
|
-
return Array.from(c);
|
|
939
|
-
}
|
|
940
|
-
var t = y(0), e = y(6), r = y(3), a = y(1), h = y(5), s = y(4), f = y(17), o = y(27);
|
|
941
|
-
function d(c) {
|
|
942
|
-
o.call(this), this.layoutQuality = t.QUALITY, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = t.DEFAULT_INCREMENTAL, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new e(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, c != null && (this.isRemoteUse = c);
|
|
943
|
-
}
|
|
944
|
-
d.RANDOM_SEED = 1, d.prototype = Object.create(o.prototype), d.prototype.getGraphManager = function() {
|
|
945
|
-
return this.graphManager;
|
|
946
|
-
}, d.prototype.getAllNodes = function() {
|
|
947
|
-
return this.graphManager.getAllNodes();
|
|
948
|
-
}, d.prototype.getAllEdges = function() {
|
|
949
|
-
return this.graphManager.getAllEdges();
|
|
950
|
-
}, d.prototype.getAllNodesToApplyGravitation = function() {
|
|
951
|
-
return this.graphManager.getAllNodesToApplyGravitation();
|
|
952
|
-
}, d.prototype.newGraphManager = function() {
|
|
953
|
-
var c = new e(this);
|
|
954
|
-
return this.graphManager = c, c;
|
|
955
|
-
}, d.prototype.newGraph = function(c) {
|
|
956
|
-
return new h(null, this.graphManager, c);
|
|
957
|
-
}, d.prototype.newNode = function(c) {
|
|
958
|
-
return new r(this.graphManager, c);
|
|
959
|
-
}, d.prototype.newEdge = function(c) {
|
|
960
|
-
return new a(null, null, c);
|
|
961
|
-
}, d.prototype.checkLayoutSuccess = function() {
|
|
962
|
-
return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
|
|
963
|
-
}, d.prototype.runLayout = function() {
|
|
964
|
-
this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
|
|
965
|
-
var c;
|
|
966
|
-
return this.checkLayoutSuccess() ? c = !1 : c = this.layout(), t.ANIMATE === "during" ? !1 : (c && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, c);
|
|
967
|
-
}, d.prototype.doPostLayout = function() {
|
|
968
|
-
this.incremental || this.transform(), this.update();
|
|
969
|
-
}, d.prototype.update2 = function() {
|
|
970
|
-
if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
|
|
971
|
-
for (var c = this.graphManager.getAllEdges(), E = 0; E < c.length; E++)
|
|
972
|
-
c[E];
|
|
973
|
-
for (var m = this.graphManager.getRoot().getNodes(), E = 0; E < m.length; E++)
|
|
974
|
-
m[E];
|
|
975
|
-
this.update(this.graphManager.getRoot());
|
|
976
|
-
}
|
|
977
|
-
}, d.prototype.update = function(c) {
|
|
978
|
-
if (c == null)
|
|
979
|
-
this.update2();
|
|
980
|
-
else if (c instanceof r) {
|
|
981
|
-
var E = c;
|
|
982
|
-
if (E.getChild() != null)
|
|
983
|
-
for (var m = E.getChild().getNodes(), v = 0; v < m.length; v++)
|
|
984
|
-
update(m[v]);
|
|
985
|
-
if (E.vGraphObject != null) {
|
|
986
|
-
var N = E.vGraphObject;
|
|
987
|
-
N.update(E);
|
|
988
|
-
}
|
|
989
|
-
} else if (c instanceof a) {
|
|
990
|
-
var D = c;
|
|
991
|
-
if (D.vGraphObject != null) {
|
|
992
|
-
var g = D.vGraphObject;
|
|
993
|
-
g.update(D);
|
|
994
|
-
}
|
|
995
|
-
} else if (c instanceof h) {
|
|
996
|
-
var L = c;
|
|
997
|
-
if (L.vGraphObject != null) {
|
|
998
|
-
var n = L.vGraphObject;
|
|
999
|
-
n.update(L);
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
}, d.prototype.initParameters = function() {
|
|
1003
|
-
this.isSubLayout || (this.layoutQuality = t.QUALITY, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = t.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
|
|
1004
|
-
}, d.prototype.transform = function(c) {
|
|
1005
|
-
if (c == null)
|
|
1006
|
-
this.transform(new s(0, 0));
|
|
1007
|
-
else {
|
|
1008
|
-
var E = new f(), m = this.graphManager.getRoot().updateLeftTop();
|
|
1009
|
-
if (m != null) {
|
|
1010
|
-
E.setWorldOrgX(c.x), E.setWorldOrgY(c.y), E.setDeviceOrgX(m.x), E.setDeviceOrgY(m.y);
|
|
1011
|
-
for (var v = this.getAllNodes(), N, D = 0; D < v.length; D++)
|
|
1012
|
-
N = v[D], N.transform(E);
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
}, d.prototype.positionNodesRandomly = function(c) {
|
|
1016
|
-
if (c == null)
|
|
1017
|
-
this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
|
|
1018
|
-
else
|
|
1019
|
-
for (var E, m, v = c.getNodes(), N = 0; N < v.length; N++)
|
|
1020
|
-
E = v[N], m = E.getChild(), m == null || m.getNodes().length == 0 ? E.scatter() : (this.positionNodesRandomly(m), E.updateBounds());
|
|
1021
|
-
}, d.prototype.getFlatForest = function() {
|
|
1022
|
-
for (var c = [], E = !0, m = this.graphManager.getRoot().getNodes(), v = !0, N = 0; N < m.length; N++)
|
|
1023
|
-
m[N].getChild() != null && (v = !1);
|
|
1024
|
-
if (!v)
|
|
1025
|
-
return c;
|
|
1026
|
-
var D = /* @__PURE__ */ new Set(), g = [], L = /* @__PURE__ */ new Map(), n = [];
|
|
1027
|
-
for (n = n.concat(m); n.length > 0 && E; ) {
|
|
1028
|
-
for (g.push(n[0]); g.length > 0 && E; ) {
|
|
1029
|
-
var u = g[0];
|
|
1030
|
-
g.splice(0, 1), D.add(u);
|
|
1031
|
-
for (var l = u.getEdges(), N = 0; N < l.length; N++) {
|
|
1032
|
-
var _ = l[N].getOtherEnd(u);
|
|
1033
|
-
if (L.get(u) != _)
|
|
1034
|
-
if (!D.has(_))
|
|
1035
|
-
g.push(_), L.set(_, u);
|
|
1036
|
-
else {
|
|
1037
|
-
E = !1;
|
|
1038
|
-
break;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
}
|
|
1042
|
-
if (!E)
|
|
1043
|
-
c = [];
|
|
1044
|
-
else {
|
|
1045
|
-
var A = [].concat(i(D));
|
|
1046
|
-
c.push(A);
|
|
1047
|
-
for (var N = 0; N < A.length; N++) {
|
|
1048
|
-
var I = A[N], w = n.indexOf(I);
|
|
1049
|
-
w > -1 && n.splice(w, 1);
|
|
1050
|
-
}
|
|
1051
|
-
D = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Map();
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
return c;
|
|
1055
|
-
}, d.prototype.createDummyNodesForBendpoints = function(c) {
|
|
1056
|
-
for (var E = [], m = c.source, v = this.graphManager.calcLowestCommonAncestor(c.source, c.target), N = 0; N < c.bendpoints.length; N++) {
|
|
1057
|
-
var D = this.newNode(null);
|
|
1058
|
-
D.setRect(new Point(0, 0), new Dimension(1, 1)), v.add(D);
|
|
1059
|
-
var g = this.newEdge(null);
|
|
1060
|
-
this.graphManager.add(g, m, D), E.add(D), m = D;
|
|
1061
|
-
}
|
|
1062
|
-
var g = this.newEdge(null);
|
|
1063
|
-
return this.graphManager.add(g, m, c.target), this.edgeToDummyNodes.set(c, E), c.isInterGraph() ? this.graphManager.remove(c) : v.remove(c), E;
|
|
1064
|
-
}, d.prototype.createBendpointsFromDummyNodes = function() {
|
|
1065
|
-
var c = [];
|
|
1066
|
-
c = c.concat(this.graphManager.getAllEdges()), c = [].concat(i(this.edgeToDummyNodes.keys())).concat(c);
|
|
1067
|
-
for (var E = 0; E < c.length; E++) {
|
|
1068
|
-
var m = c[E];
|
|
1069
|
-
if (m.bendpoints.length > 0) {
|
|
1070
|
-
for (var v = this.edgeToDummyNodes.get(m), N = 0; N < v.length; N++) {
|
|
1071
|
-
var D = v[N], g = new s(D.getCenterX(), D.getCenterY()), L = m.bendpoints.get(N);
|
|
1072
|
-
L.x = g.x, L.y = g.y, D.getOwner().remove(D);
|
|
1073
|
-
}
|
|
1074
|
-
this.graphManager.add(m, m.source, m.target);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
}, d.transform = function(c, E, m, v) {
|
|
1078
|
-
if (m != null && v != null) {
|
|
1079
|
-
var N = E;
|
|
1080
|
-
if (c <= 50) {
|
|
1081
|
-
var D = E / m;
|
|
1082
|
-
N -= (E - D) / 50 * (50 - c);
|
|
1083
|
-
} else {
|
|
1084
|
-
var g = E * v;
|
|
1085
|
-
N += (g - E) / 50 * (c - 50);
|
|
1086
|
-
}
|
|
1087
|
-
return N;
|
|
1088
|
-
} else {
|
|
1089
|
-
var L, n;
|
|
1090
|
-
return c <= 50 ? (L = 9 * E / 500, n = E / 10) : (L = 9 * E / 50, n = -8 * E), L * c + n;
|
|
1091
|
-
}
|
|
1092
|
-
}, d.findCenterOfTree = function(c) {
|
|
1093
|
-
var E = [];
|
|
1094
|
-
E = E.concat(c);
|
|
1095
|
-
var m = [], v = /* @__PURE__ */ new Map(), N = !1, D = null;
|
|
1096
|
-
(E.length == 1 || E.length == 2) && (N = !0, D = E[0]);
|
|
1097
|
-
for (var g = 0; g < E.length; g++) {
|
|
1098
|
-
var L = E[g], n = L.getNeighborsList().size;
|
|
1099
|
-
v.set(L, L.getNeighborsList().size), n == 1 && m.push(L);
|
|
1100
|
-
}
|
|
1101
|
-
var u = [];
|
|
1102
|
-
for (u = u.concat(m); !N; ) {
|
|
1103
|
-
var l = [];
|
|
1104
|
-
l = l.concat(u), u = [];
|
|
1105
|
-
for (var g = 0; g < E.length; g++) {
|
|
1106
|
-
var L = E[g], _ = E.indexOf(L);
|
|
1107
|
-
_ >= 0 && E.splice(_, 1);
|
|
1108
|
-
var A = L.getNeighborsList();
|
|
1109
|
-
A.forEach(function(R) {
|
|
1110
|
-
if (m.indexOf(R) < 0) {
|
|
1111
|
-
var S = v.get(R), U = S - 1;
|
|
1112
|
-
U == 1 && u.push(R), v.set(R, U);
|
|
1113
|
-
}
|
|
1114
|
-
});
|
|
1115
|
-
}
|
|
1116
|
-
m = m.concat(u), (E.length == 1 || E.length == 2) && (N = !0, D = E[0]);
|
|
1117
|
-
}
|
|
1118
|
-
return D;
|
|
1119
|
-
}, d.prototype.setGraphManager = function(c) {
|
|
1120
|
-
this.graphManager = c;
|
|
1121
|
-
}, p.exports = d;
|
|
1122
|
-
},
|
|
1123
|
-
/* 16 */
|
|
1124
|
-
/***/
|
|
1125
|
-
function(p, T, y) {
|
|
1126
|
-
function i() {
|
|
1127
|
-
}
|
|
1128
|
-
i.seed = 1, i.x = 0, i.nextDouble = function() {
|
|
1129
|
-
return i.x = Math.sin(i.seed++) * 1e4, i.x - Math.floor(i.x);
|
|
1130
|
-
}, p.exports = i;
|
|
1131
|
-
},
|
|
1132
|
-
/* 17 */
|
|
1133
|
-
/***/
|
|
1134
|
-
function(p, T, y) {
|
|
1135
|
-
var i = y(4);
|
|
1136
|
-
function t(e, r) {
|
|
1137
|
-
this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
|
|
1138
|
-
}
|
|
1139
|
-
t.prototype.getWorldOrgX = function() {
|
|
1140
|
-
return this.lworldOrgX;
|
|
1141
|
-
}, t.prototype.setWorldOrgX = function(e) {
|
|
1142
|
-
this.lworldOrgX = e;
|
|
1143
|
-
}, t.prototype.getWorldOrgY = function() {
|
|
1144
|
-
return this.lworldOrgY;
|
|
1145
|
-
}, t.prototype.setWorldOrgY = function(e) {
|
|
1146
|
-
this.lworldOrgY = e;
|
|
1147
|
-
}, t.prototype.getWorldExtX = function() {
|
|
1148
|
-
return this.lworldExtX;
|
|
1149
|
-
}, t.prototype.setWorldExtX = function(e) {
|
|
1150
|
-
this.lworldExtX = e;
|
|
1151
|
-
}, t.prototype.getWorldExtY = function() {
|
|
1152
|
-
return this.lworldExtY;
|
|
1153
|
-
}, t.prototype.setWorldExtY = function(e) {
|
|
1154
|
-
this.lworldExtY = e;
|
|
1155
|
-
}, t.prototype.getDeviceOrgX = function() {
|
|
1156
|
-
return this.ldeviceOrgX;
|
|
1157
|
-
}, t.prototype.setDeviceOrgX = function(e) {
|
|
1158
|
-
this.ldeviceOrgX = e;
|
|
1159
|
-
}, t.prototype.getDeviceOrgY = function() {
|
|
1160
|
-
return this.ldeviceOrgY;
|
|
1161
|
-
}, t.prototype.setDeviceOrgY = function(e) {
|
|
1162
|
-
this.ldeviceOrgY = e;
|
|
1163
|
-
}, t.prototype.getDeviceExtX = function() {
|
|
1164
|
-
return this.ldeviceExtX;
|
|
1165
|
-
}, t.prototype.setDeviceExtX = function(e) {
|
|
1166
|
-
this.ldeviceExtX = e;
|
|
1167
|
-
}, t.prototype.getDeviceExtY = function() {
|
|
1168
|
-
return this.ldeviceExtY;
|
|
1169
|
-
}, t.prototype.setDeviceExtY = function(e) {
|
|
1170
|
-
this.ldeviceExtY = e;
|
|
1171
|
-
}, t.prototype.transformX = function(e) {
|
|
1172
|
-
var r = 0, a = this.lworldExtX;
|
|
1173
|
-
return a != 0 && (r = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / a), r;
|
|
1174
|
-
}, t.prototype.transformY = function(e) {
|
|
1175
|
-
var r = 0, a = this.lworldExtY;
|
|
1176
|
-
return a != 0 && (r = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / a), r;
|
|
1177
|
-
}, t.prototype.inverseTransformX = function(e) {
|
|
1178
|
-
var r = 0, a = this.ldeviceExtX;
|
|
1179
|
-
return a != 0 && (r = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / a), r;
|
|
1180
|
-
}, t.prototype.inverseTransformY = function(e) {
|
|
1181
|
-
var r = 0, a = this.ldeviceExtY;
|
|
1182
|
-
return a != 0 && (r = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / a), r;
|
|
1183
|
-
}, t.prototype.inverseTransformPoint = function(e) {
|
|
1184
|
-
var r = new i(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
|
|
1185
|
-
return r;
|
|
1186
|
-
}, p.exports = t;
|
|
1187
|
-
},
|
|
1188
|
-
/* 18 */
|
|
1189
|
-
/***/
|
|
1190
|
-
function(p, T, y) {
|
|
1191
|
-
function i(o) {
|
|
1192
|
-
if (Array.isArray(o)) {
|
|
1193
|
-
for (var d = 0, c = Array(o.length); d < o.length; d++)
|
|
1194
|
-
c[d] = o[d];
|
|
1195
|
-
return c;
|
|
1196
|
-
} else
|
|
1197
|
-
return Array.from(o);
|
|
1198
|
-
}
|
|
1199
|
-
var t = y(15), e = y(7), r = y(0), a = y(8), h = y(9);
|
|
1200
|
-
function s() {
|
|
1201
|
-
t.call(this), this.useSmartIdealEdgeLengthCalculation = e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = e.DEFAULT_EDGE_LENGTH, this.springConstant = e.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = e.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = e.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = e.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * e.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = e.MAX_ITERATIONS;
|
|
1202
|
-
}
|
|
1203
|
-
s.prototype = Object.create(t.prototype);
|
|
1204
|
-
for (var f in t)
|
|
1205
|
-
s[f] = t[f];
|
|
1206
|
-
s.prototype.initParameters = function() {
|
|
1207
|
-
t.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
|
|
1208
|
-
}, s.prototype.calcIdealEdgeLengths = function() {
|
|
1209
|
-
for (var o, d, c, E, m, v, N = this.getGraphManager().getAllEdges(), D = 0; D < N.length; D++)
|
|
1210
|
-
o = N[D], o.idealLength = this.idealEdgeLength, o.isInterGraph && (c = o.getSource(), E = o.getTarget(), m = o.getSourceInLca().getEstimatedSize(), v = o.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (o.idealLength += m + v - 2 * r.SIMPLE_NODE_SIZE), d = o.getLca().getInclusionTreeDepth(), o.idealLength += e.DEFAULT_EDGE_LENGTH * e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (c.getInclusionTreeDepth() + E.getInclusionTreeDepth() - 2 * d));
|
|
1211
|
-
}, s.prototype.initSpringEmbedder = function() {
|
|
1212
|
-
var o = this.getAllNodes().length;
|
|
1213
|
-
this.incremental ? (o > e.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * e.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (o - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - e.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (o > e.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(e.COOLING_ADAPTATION_FACTOR, 1 - (o - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * (1 - e.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
|
|
1214
|
-
}, s.prototype.calcSpringForces = function() {
|
|
1215
|
-
for (var o = this.getAllEdges(), d, c = 0; c < o.length; c++)
|
|
1216
|
-
d = o[c], this.calcSpringForce(d, d.idealLength);
|
|
1217
|
-
}, s.prototype.calcRepulsionForces = function() {
|
|
1218
|
-
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c, E, m, v, N = this.getAllNodes(), D;
|
|
1219
|
-
if (this.useFRGridVariant)
|
|
1220
|
-
for (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && o && this.updateGrid(), D = /* @__PURE__ */ new Set(), c = 0; c < N.length; c++)
|
|
1221
|
-
m = N[c], this.calculateRepulsionForceOfANode(m, D, o, d), D.add(m);
|
|
1222
|
-
else
|
|
1223
|
-
for (c = 0; c < N.length; c++)
|
|
1224
|
-
for (m = N[c], E = c + 1; E < N.length; E++)
|
|
1225
|
-
v = N[E], m.getOwner() == v.getOwner() && this.calcRepulsionForce(m, v);
|
|
1226
|
-
}, s.prototype.calcGravitationalForces = function() {
|
|
1227
|
-
for (var o, d = this.getAllNodesToApplyGravitation(), c = 0; c < d.length; c++)
|
|
1228
|
-
o = d[c], this.calcGravitationalForce(o);
|
|
1229
|
-
}, s.prototype.moveNodes = function() {
|
|
1230
|
-
for (var o = this.getAllNodes(), d, c = 0; c < o.length; c++)
|
|
1231
|
-
d = o[c], d.move();
|
|
1232
|
-
}, s.prototype.calcSpringForce = function(o, d) {
|
|
1233
|
-
var c = o.getSource(), E = o.getTarget(), m, v, N, D;
|
|
1234
|
-
if (this.uniformLeafNodeSizes && c.getChild() == null && E.getChild() == null)
|
|
1235
|
-
o.updateLengthSimple();
|
|
1236
|
-
else if (o.updateLength(), o.isOverlapingSourceAndTarget)
|
|
1237
|
-
return;
|
|
1238
|
-
m = o.getLength(), m != 0 && (v = this.springConstant * (m - d), N = v * (o.lengthX / m), D = v * (o.lengthY / m), c.springForceX += N, c.springForceY += D, E.springForceX -= N, E.springForceY -= D);
|
|
1239
|
-
}, s.prototype.calcRepulsionForce = function(o, d) {
|
|
1240
|
-
var c = o.getRect(), E = d.getRect(), m = new Array(2), v = new Array(4), N, D, g, L, n, u, l;
|
|
1241
|
-
if (c.intersects(E)) {
|
|
1242
|
-
a.calcSeparationAmount(c, E, m, e.DEFAULT_EDGE_LENGTH / 2), u = 2 * m[0], l = 2 * m[1];
|
|
1243
|
-
var _ = o.noOfChildren * d.noOfChildren / (o.noOfChildren + d.noOfChildren);
|
|
1244
|
-
o.repulsionForceX -= _ * u, o.repulsionForceY -= _ * l, d.repulsionForceX += _ * u, d.repulsionForceY += _ * l;
|
|
1245
|
-
} else
|
|
1246
|
-
this.uniformLeafNodeSizes && o.getChild() == null && d.getChild() == null ? (N = E.getCenterX() - c.getCenterX(), D = E.getCenterY() - c.getCenterY()) : (a.getIntersection(c, E, v), N = v[2] - v[0], D = v[3] - v[1]), Math.abs(N) < e.MIN_REPULSION_DIST && (N = h.sign(N) * e.MIN_REPULSION_DIST), Math.abs(D) < e.MIN_REPULSION_DIST && (D = h.sign(D) * e.MIN_REPULSION_DIST), g = N * N + D * D, L = Math.sqrt(g), n = this.repulsionConstant * o.noOfChildren * d.noOfChildren / g, u = n * N / L, l = n * D / L, o.repulsionForceX -= u, o.repulsionForceY -= l, d.repulsionForceX += u, d.repulsionForceY += l;
|
|
1247
|
-
}, s.prototype.calcGravitationalForce = function(o) {
|
|
1248
|
-
var d, c, E, m, v, N, D, g;
|
|
1249
|
-
d = o.getOwner(), c = (d.getRight() + d.getLeft()) / 2, E = (d.getTop() + d.getBottom()) / 2, m = o.getCenterX() - c, v = o.getCenterY() - E, N = Math.abs(m) + o.getWidth() / 2, D = Math.abs(v) + o.getHeight() / 2, o.getOwner() == this.graphManager.getRoot() ? (g = d.getEstimatedSize() * this.gravityRangeFactor, (N > g || D > g) && (o.gravitationForceX = -this.gravityConstant * m, o.gravitationForceY = -this.gravityConstant * v)) : (g = d.getEstimatedSize() * this.compoundGravityRangeFactor, (N > g || D > g) && (o.gravitationForceX = -this.gravityConstant * m * this.compoundGravityConstant, o.gravitationForceY = -this.gravityConstant * v * this.compoundGravityConstant));
|
|
1250
|
-
}, s.prototype.isConverged = function() {
|
|
1251
|
-
var o, d = !1;
|
|
1252
|
-
return this.totalIterations > this.maxIterations / 3 && (d = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), o = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, o || d;
|
|
1253
|
-
}, s.prototype.animate = function() {
|
|
1254
|
-
this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
|
|
1255
|
-
}, s.prototype.calcNoOfChildrenForAllNodes = function() {
|
|
1256
|
-
for (var o, d = this.graphManager.getAllNodes(), c = 0; c < d.length; c++)
|
|
1257
|
-
o = d[c], o.noOfChildren = o.getNoOfChildren();
|
|
1258
|
-
}, s.prototype.calcGrid = function(o) {
|
|
1259
|
-
var d = 0, c = 0;
|
|
1260
|
-
d = parseInt(Math.ceil((o.getRight() - o.getLeft()) / this.repulsionRange)), c = parseInt(Math.ceil((o.getBottom() - o.getTop()) / this.repulsionRange));
|
|
1261
|
-
for (var E = new Array(d), m = 0; m < d; m++)
|
|
1262
|
-
E[m] = new Array(c);
|
|
1263
|
-
for (var m = 0; m < d; m++)
|
|
1264
|
-
for (var v = 0; v < c; v++)
|
|
1265
|
-
E[m][v] = new Array();
|
|
1266
|
-
return E;
|
|
1267
|
-
}, s.prototype.addNodeToGrid = function(o, d, c) {
|
|
1268
|
-
var E = 0, m = 0, v = 0, N = 0;
|
|
1269
|
-
E = parseInt(Math.floor((o.getRect().x - d) / this.repulsionRange)), m = parseInt(Math.floor((o.getRect().width + o.getRect().x - d) / this.repulsionRange)), v = parseInt(Math.floor((o.getRect().y - c) / this.repulsionRange)), N = parseInt(Math.floor((o.getRect().height + o.getRect().y - c) / this.repulsionRange));
|
|
1270
|
-
for (var D = E; D <= m; D++)
|
|
1271
|
-
for (var g = v; g <= N; g++)
|
|
1272
|
-
this.grid[D][g].push(o), o.setGridCoordinates(E, m, v, N);
|
|
1273
|
-
}, s.prototype.updateGrid = function() {
|
|
1274
|
-
var o, d, c = this.getAllNodes();
|
|
1275
|
-
for (this.grid = this.calcGrid(this.graphManager.getRoot()), o = 0; o < c.length; o++)
|
|
1276
|
-
d = c[o], this.addNodeToGrid(d, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
|
|
1277
|
-
}, s.prototype.calculateRepulsionForceOfANode = function(o, d, c, E) {
|
|
1278
|
-
if (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && c || E) {
|
|
1279
|
-
var m = /* @__PURE__ */ new Set();
|
|
1280
|
-
o.surrounding = new Array();
|
|
1281
|
-
for (var v, N = this.grid, D = o.startX - 1; D < o.finishX + 2; D++)
|
|
1282
|
-
for (var g = o.startY - 1; g < o.finishY + 2; g++)
|
|
1283
|
-
if (!(D < 0 || g < 0 || D >= N.length || g >= N[0].length)) {
|
|
1284
|
-
for (var L = 0; L < N[D][g].length; L++)
|
|
1285
|
-
if (v = N[D][g][L], !(o.getOwner() != v.getOwner() || o == v) && !d.has(v) && !m.has(v)) {
|
|
1286
|
-
var n = Math.abs(o.getCenterX() - v.getCenterX()) - (o.getWidth() / 2 + v.getWidth() / 2), u = Math.abs(o.getCenterY() - v.getCenterY()) - (o.getHeight() / 2 + v.getHeight() / 2);
|
|
1287
|
-
n <= this.repulsionRange && u <= this.repulsionRange && m.add(v);
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
o.surrounding = [].concat(i(m));
|
|
1291
|
-
}
|
|
1292
|
-
for (D = 0; D < o.surrounding.length; D++)
|
|
1293
|
-
this.calcRepulsionForce(o, o.surrounding[D]);
|
|
1294
|
-
}, s.prototype.calcRepulsionRange = function() {
|
|
1295
|
-
return 0;
|
|
1296
|
-
}, p.exports = s;
|
|
1297
|
-
},
|
|
1298
|
-
/* 19 */
|
|
1299
|
-
/***/
|
|
1300
|
-
function(p, T, y) {
|
|
1301
|
-
var i = y(1), t = y(7);
|
|
1302
|
-
function e(a, h, s) {
|
|
1303
|
-
i.call(this, a, h, s), this.idealLength = t.DEFAULT_EDGE_LENGTH;
|
|
1304
|
-
}
|
|
1305
|
-
e.prototype = Object.create(i.prototype);
|
|
1306
|
-
for (var r in i)
|
|
1307
|
-
e[r] = i[r];
|
|
1308
|
-
p.exports = e;
|
|
1309
|
-
},
|
|
1310
|
-
/* 20 */
|
|
1311
|
-
/***/
|
|
1312
|
-
function(p, T, y) {
|
|
1313
|
-
var i = y(3);
|
|
1314
|
-
function t(r, a, h, s) {
|
|
1315
|
-
i.call(this, r, a, h, s), 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 = [];
|
|
1316
|
-
}
|
|
1317
|
-
t.prototype = Object.create(i.prototype);
|
|
1318
|
-
for (var e in i)
|
|
1319
|
-
t[e] = i[e];
|
|
1320
|
-
t.prototype.setGridCoordinates = function(r, a, h, s) {
|
|
1321
|
-
this.startX = r, this.finishX = a, this.startY = h, this.finishY = s;
|
|
1322
|
-
}, p.exports = t;
|
|
1323
|
-
},
|
|
1324
|
-
/* 21 */
|
|
1325
|
-
/***/
|
|
1326
|
-
function(p, T, y) {
|
|
1327
|
-
function i(t, e) {
|
|
1328
|
-
this.width = 0, this.height = 0, t !== null && e !== null && (this.height = e, this.width = t);
|
|
1329
|
-
}
|
|
1330
|
-
i.prototype.getWidth = function() {
|
|
1331
|
-
return this.width;
|
|
1332
|
-
}, i.prototype.setWidth = function(t) {
|
|
1333
|
-
this.width = t;
|
|
1334
|
-
}, i.prototype.getHeight = function() {
|
|
1335
|
-
return this.height;
|
|
1336
|
-
}, i.prototype.setHeight = function(t) {
|
|
1337
|
-
this.height = t;
|
|
1338
|
-
}, p.exports = i;
|
|
1339
|
-
},
|
|
1340
|
-
/* 22 */
|
|
1341
|
-
/***/
|
|
1342
|
-
function(p, T, y) {
|
|
1343
|
-
var i = y(14);
|
|
1344
|
-
function t() {
|
|
1345
|
-
this.map = {}, this.keys = [];
|
|
1346
|
-
}
|
|
1347
|
-
t.prototype.put = function(e, r) {
|
|
1348
|
-
var a = i.createID(e);
|
|
1349
|
-
this.contains(a) || (this.map[a] = r, this.keys.push(e));
|
|
1350
|
-
}, t.prototype.contains = function(e) {
|
|
1351
|
-
return i.createID(e), this.map[e] != null;
|
|
1352
|
-
}, t.prototype.get = function(e) {
|
|
1353
|
-
var r = i.createID(e);
|
|
1354
|
-
return this.map[r];
|
|
1355
|
-
}, t.prototype.keySet = function() {
|
|
1356
|
-
return this.keys;
|
|
1357
|
-
}, p.exports = t;
|
|
1358
|
-
},
|
|
1359
|
-
/* 23 */
|
|
1360
|
-
/***/
|
|
1361
|
-
function(p, T, y) {
|
|
1362
|
-
var i = y(14);
|
|
1363
|
-
function t() {
|
|
1364
|
-
this.set = {};
|
|
1365
|
-
}
|
|
1366
|
-
t.prototype.add = function(e) {
|
|
1367
|
-
var r = i.createID(e);
|
|
1368
|
-
this.contains(r) || (this.set[r] = e);
|
|
1369
|
-
}, t.prototype.remove = function(e) {
|
|
1370
|
-
delete this.set[i.createID(e)];
|
|
1371
|
-
}, t.prototype.clear = function() {
|
|
1372
|
-
this.set = {};
|
|
1373
|
-
}, t.prototype.contains = function(e) {
|
|
1374
|
-
return this.set[i.createID(e)] == e;
|
|
1375
|
-
}, t.prototype.isEmpty = function() {
|
|
1376
|
-
return this.size() === 0;
|
|
1377
|
-
}, t.prototype.size = function() {
|
|
1378
|
-
return Object.keys(this.set).length;
|
|
1379
|
-
}, t.prototype.addAllTo = function(e) {
|
|
1380
|
-
for (var r = Object.keys(this.set), a = r.length, h = 0; h < a; h++)
|
|
1381
|
-
e.push(this.set[r[h]]);
|
|
1382
|
-
}, t.prototype.size = function() {
|
|
1383
|
-
return Object.keys(this.set).length;
|
|
1384
|
-
}, t.prototype.addAll = function(e) {
|
|
1385
|
-
for (var r = e.length, a = 0; a < r; a++) {
|
|
1386
|
-
var h = e[a];
|
|
1387
|
-
this.add(h);
|
|
1388
|
-
}
|
|
1389
|
-
}, p.exports = t;
|
|
1390
|
-
},
|
|
1391
|
-
/* 24 */
|
|
1392
|
-
/***/
|
|
1393
|
-
function(p, T, y) {
|
|
1394
|
-
var i = /* @__PURE__ */ function() {
|
|
1395
|
-
function a(h, s) {
|
|
1396
|
-
for (var f = 0; f < s.length; f++) {
|
|
1397
|
-
var o = s[f];
|
|
1398
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(h, o.key, o);
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
return function(h, s, f) {
|
|
1402
|
-
return s && a(h.prototype, s), f && a(h, f), h;
|
|
1403
|
-
};
|
|
1404
|
-
}();
|
|
1405
|
-
function t(a, h) {
|
|
1406
|
-
if (!(a instanceof h))
|
|
1407
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1408
|
-
}
|
|
1409
|
-
var e = y(11), r = function() {
|
|
1410
|
-
function a(h, s) {
|
|
1411
|
-
t(this, a), (s !== null || s !== void 0) && (this.compareFunction = this._defaultCompareFunction);
|
|
1412
|
-
var f = void 0;
|
|
1413
|
-
h instanceof e ? f = h.size() : f = h.length, this._quicksort(h, 0, f - 1);
|
|
1414
|
-
}
|
|
1415
|
-
return i(a, [{
|
|
1416
|
-
key: "_quicksort",
|
|
1417
|
-
value: function(h, s, f) {
|
|
1418
|
-
if (s < f) {
|
|
1419
|
-
var o = this._partition(h, s, f);
|
|
1420
|
-
this._quicksort(h, s, o), this._quicksort(h, o + 1, f);
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
}, {
|
|
1424
|
-
key: "_partition",
|
|
1425
|
-
value: function(h, s, f) {
|
|
1426
|
-
for (var o = this._get(h, s), d = s, c = f; ; ) {
|
|
1427
|
-
for (; this.compareFunction(o, this._get(h, c)); )
|
|
1428
|
-
c--;
|
|
1429
|
-
for (; this.compareFunction(this._get(h, d), o); )
|
|
1430
|
-
d++;
|
|
1431
|
-
if (d < c)
|
|
1432
|
-
this._swap(h, d, c), d++, c--;
|
|
1433
|
-
else return c;
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
}, {
|
|
1437
|
-
key: "_get",
|
|
1438
|
-
value: function(h, s) {
|
|
1439
|
-
return h instanceof e ? h.get_object_at(s) : h[s];
|
|
1440
|
-
}
|
|
1441
|
-
}, {
|
|
1442
|
-
key: "_set",
|
|
1443
|
-
value: function(h, s, f) {
|
|
1444
|
-
h instanceof e ? h.set_object_at(s, f) : h[s] = f;
|
|
1445
|
-
}
|
|
1446
|
-
}, {
|
|
1447
|
-
key: "_swap",
|
|
1448
|
-
value: function(h, s, f) {
|
|
1449
|
-
var o = this._get(h, s);
|
|
1450
|
-
this._set(h, s, this._get(h, f)), this._set(h, f, o);
|
|
1451
|
-
}
|
|
1452
|
-
}, {
|
|
1453
|
-
key: "_defaultCompareFunction",
|
|
1454
|
-
value: function(h, s) {
|
|
1455
|
-
return s > h;
|
|
1456
|
-
}
|
|
1457
|
-
}]), a;
|
|
1458
|
-
}();
|
|
1459
|
-
p.exports = r;
|
|
1460
|
-
},
|
|
1461
|
-
/* 25 */
|
|
1462
|
-
/***/
|
|
1463
|
-
function(p, T, y) {
|
|
1464
|
-
var i = /* @__PURE__ */ function() {
|
|
1465
|
-
function r(a, h) {
|
|
1466
|
-
for (var s = 0; s < h.length; s++) {
|
|
1467
|
-
var f = h[s];
|
|
1468
|
-
f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(a, f.key, f);
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
return function(a, h, s) {
|
|
1472
|
-
return h && r(a.prototype, h), s && r(a, s), a;
|
|
1473
|
-
};
|
|
1474
|
-
}();
|
|
1475
|
-
function t(r, a) {
|
|
1476
|
-
if (!(r instanceof a))
|
|
1477
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1478
|
-
}
|
|
1479
|
-
var e = function() {
|
|
1480
|
-
function r(a, h) {
|
|
1481
|
-
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
|
|
1482
|
-
t(this, r), this.sequence1 = a, this.sequence2 = h, this.match_score = s, this.mismatch_penalty = f, this.gap_penalty = o, this.iMax = a.length + 1, this.jMax = h.length + 1, this.grid = new Array(this.iMax);
|
|
1483
|
-
for (var d = 0; d < this.iMax; d++) {
|
|
1484
|
-
this.grid[d] = new Array(this.jMax);
|
|
1485
|
-
for (var c = 0; c < this.jMax; c++)
|
|
1486
|
-
this.grid[d][c] = 0;
|
|
1487
|
-
}
|
|
1488
|
-
this.tracebackGrid = new Array(this.iMax);
|
|
1489
|
-
for (var E = 0; E < this.iMax; E++) {
|
|
1490
|
-
this.tracebackGrid[E] = new Array(this.jMax);
|
|
1491
|
-
for (var m = 0; m < this.jMax; m++)
|
|
1492
|
-
this.tracebackGrid[E][m] = [null, null, null];
|
|
1493
|
-
}
|
|
1494
|
-
this.alignments = [], this.score = -1, this.computeGrids();
|
|
1495
|
-
}
|
|
1496
|
-
return i(r, [{
|
|
1497
|
-
key: "getScore",
|
|
1498
|
-
value: function() {
|
|
1499
|
-
return this.score;
|
|
1500
|
-
}
|
|
1501
|
-
}, {
|
|
1502
|
-
key: "getAlignments",
|
|
1503
|
-
value: function() {
|
|
1504
|
-
return this.alignments;
|
|
1505
|
-
}
|
|
1506
|
-
// Main dynamic programming procedure
|
|
1507
|
-
}, {
|
|
1508
|
-
key: "computeGrids",
|
|
1509
|
-
value: function() {
|
|
1510
|
-
for (var a = 1; a < this.jMax; a++)
|
|
1511
|
-
this.grid[0][a] = this.grid[0][a - 1] + this.gap_penalty, this.tracebackGrid[0][a] = [!1, !1, !0];
|
|
1512
|
-
for (var h = 1; h < this.iMax; h++)
|
|
1513
|
-
this.grid[h][0] = this.grid[h - 1][0] + this.gap_penalty, this.tracebackGrid[h][0] = [!1, !0, !1];
|
|
1514
|
-
for (var s = 1; s < this.iMax; s++)
|
|
1515
|
-
for (var f = 1; f < this.jMax; f++) {
|
|
1516
|
-
var o = void 0;
|
|
1517
|
-
this.sequence1[s - 1] === this.sequence2[f - 1] ? o = this.grid[s - 1][f - 1] + this.match_score : o = this.grid[s - 1][f - 1] + this.mismatch_penalty;
|
|
1518
|
-
var d = this.grid[s - 1][f] + this.gap_penalty, c = this.grid[s][f - 1] + this.gap_penalty, E = [o, d, c], m = this.arrayAllMaxIndexes(E);
|
|
1519
|
-
this.grid[s][f] = E[m[0]], this.tracebackGrid[s][f] = [m.includes(0), m.includes(1), m.includes(2)];
|
|
1520
|
-
}
|
|
1521
|
-
this.score = this.grid[this.iMax - 1][this.jMax - 1];
|
|
1522
|
-
}
|
|
1523
|
-
// Gets all possible valid sequence combinations
|
|
1524
|
-
}, {
|
|
1525
|
-
key: "alignmentTraceback",
|
|
1526
|
-
value: function() {
|
|
1527
|
-
var a = [];
|
|
1528
|
-
for (a.push({
|
|
1529
|
-
pos: [this.sequence1.length, this.sequence2.length],
|
|
1530
|
-
seq1: "",
|
|
1531
|
-
seq2: ""
|
|
1532
|
-
}); a[0]; ) {
|
|
1533
|
-
var h = a[0], s = this.tracebackGrid[h.pos[0]][h.pos[1]];
|
|
1534
|
-
s[0] && a.push({
|
|
1535
|
-
pos: [h.pos[0] - 1, h.pos[1] - 1],
|
|
1536
|
-
seq1: this.sequence1[h.pos[0] - 1] + h.seq1,
|
|
1537
|
-
seq2: this.sequence2[h.pos[1] - 1] + h.seq2
|
|
1538
|
-
}), s[1] && a.push({
|
|
1539
|
-
pos: [h.pos[0] - 1, h.pos[1]],
|
|
1540
|
-
seq1: this.sequence1[h.pos[0] - 1] + h.seq1,
|
|
1541
|
-
seq2: "-" + h.seq2
|
|
1542
|
-
}), s[2] && a.push({
|
|
1543
|
-
pos: [h.pos[0], h.pos[1] - 1],
|
|
1544
|
-
seq1: "-" + h.seq1,
|
|
1545
|
-
seq2: this.sequence2[h.pos[1] - 1] + h.seq2
|
|
1546
|
-
}), h.pos[0] === 0 && h.pos[1] === 0 && this.alignments.push({
|
|
1547
|
-
sequence1: h.seq1,
|
|
1548
|
-
sequence2: h.seq2
|
|
1549
|
-
}), a.shift();
|
|
1550
|
-
}
|
|
1551
|
-
return this.alignments;
|
|
1552
|
-
}
|
|
1553
|
-
// Helper Functions
|
|
1554
|
-
}, {
|
|
1555
|
-
key: "getAllIndexes",
|
|
1556
|
-
value: function(a, h) {
|
|
1557
|
-
for (var s = [], f = -1; (f = a.indexOf(h, f + 1)) !== -1; )
|
|
1558
|
-
s.push(f);
|
|
1559
|
-
return s;
|
|
1560
|
-
}
|
|
1561
|
-
}, {
|
|
1562
|
-
key: "arrayAllMaxIndexes",
|
|
1563
|
-
value: function(a) {
|
|
1564
|
-
return this.getAllIndexes(a, Math.max.apply(null, a));
|
|
1565
|
-
}
|
|
1566
|
-
}]), r;
|
|
1567
|
-
}();
|
|
1568
|
-
p.exports = e;
|
|
1569
|
-
},
|
|
1570
|
-
/* 26 */
|
|
1571
|
-
/***/
|
|
1572
|
-
function(p, T, y) {
|
|
1573
|
-
var i = function() {
|
|
1574
|
-
};
|
|
1575
|
-
i.FDLayout = y(18), i.FDLayoutConstants = y(7), i.FDLayoutEdge = y(19), i.FDLayoutNode = y(20), i.DimensionD = y(21), i.HashMap = y(22), i.HashSet = y(23), i.IGeometry = y(8), i.IMath = y(9), i.Integer = y(10), i.Point = y(12), i.PointD = y(4), i.RandomSeed = y(16), i.RectangleD = y(13), i.Transform = y(17), i.UniqueIDGeneretor = y(14), i.Quicksort = y(24), i.LinkedList = y(11), i.LGraphObject = y(2), i.LGraph = y(5), i.LEdge = y(1), i.LGraphManager = y(6), i.LNode = y(3), i.Layout = y(15), i.LayoutConstants = y(0), i.NeedlemanWunsch = y(25), p.exports = i;
|
|
1576
|
-
},
|
|
1577
|
-
/* 27 */
|
|
1578
|
-
/***/
|
|
1579
|
-
function(p, T, y) {
|
|
1580
|
-
function i() {
|
|
1581
|
-
this.listeners = [];
|
|
1582
|
-
}
|
|
1583
|
-
var t = i.prototype;
|
|
1584
|
-
t.addListener = function(e, r) {
|
|
1585
|
-
this.listeners.push({
|
|
1586
|
-
event: e,
|
|
1587
|
-
callback: r
|
|
1588
|
-
});
|
|
1589
|
-
}, t.removeListener = function(e, r) {
|
|
1590
|
-
for (var a = this.listeners.length; a >= 0; a--) {
|
|
1591
|
-
var h = this.listeners[a];
|
|
1592
|
-
h.event === e && h.callback === r && this.listeners.splice(a, 1);
|
|
1593
|
-
}
|
|
1594
|
-
}, t.emit = function(e, r) {
|
|
1595
|
-
for (var a = 0; a < this.listeners.length; a++) {
|
|
1596
|
-
var h = this.listeners[a];
|
|
1597
|
-
e === h.event && h.callback(r);
|
|
1598
|
-
}
|
|
1599
|
-
}, p.exports = i;
|
|
1600
|
-
}
|
|
1601
|
-
/******/
|
|
1602
|
-
])
|
|
1603
|
-
);
|
|
1604
|
-
});
|
|
1605
|
-
}(nt)), nt.exports;
|
|
1606
|
-
}
|
|
1607
|
-
var wt = rt.exports, ct;
|
|
1608
|
-
function Rt() {
|
|
1609
|
-
return ct || (ct = 1, function(O, M) {
|
|
1610
|
-
(function(p, T) {
|
|
1611
|
-
O.exports = T(It());
|
|
1612
|
-
})(wt, function(p) {
|
|
1613
|
-
return (
|
|
1614
|
-
/******/
|
|
1615
|
-
function(T) {
|
|
1616
|
-
var y = {};
|
|
1617
|
-
function i(t) {
|
|
1618
|
-
if (y[t])
|
|
1619
|
-
return y[t].exports;
|
|
1620
|
-
var e = y[t] = {
|
|
1621
|
-
/******/
|
|
1622
|
-
i: t,
|
|
1623
|
-
/******/
|
|
1624
|
-
l: !1,
|
|
1625
|
-
/******/
|
|
1626
|
-
exports: {}
|
|
1627
|
-
/******/
|
|
1628
|
-
};
|
|
1629
|
-
return T[t].call(e.exports, e, e.exports, i), e.l = !0, e.exports;
|
|
1630
|
-
}
|
|
1631
|
-
return i.m = T, i.c = y, i.i = function(t) {
|
|
1632
|
-
return t;
|
|
1633
|
-
}, i.d = function(t, e, r) {
|
|
1634
|
-
i.o(t, e) || Object.defineProperty(t, e, {
|
|
1635
|
-
/******/
|
|
1636
|
-
configurable: !1,
|
|
1637
|
-
/******/
|
|
1638
|
-
enumerable: !0,
|
|
1639
|
-
/******/
|
|
1640
|
-
get: r
|
|
1641
|
-
/******/
|
|
1642
|
-
});
|
|
1643
|
-
}, i.n = function(t) {
|
|
1644
|
-
var e = t && t.__esModule ? (
|
|
1645
|
-
/******/
|
|
1646
|
-
function() {
|
|
1647
|
-
return t.default;
|
|
1648
|
-
}
|
|
1649
|
-
) : (
|
|
1650
|
-
/******/
|
|
1651
|
-
function() {
|
|
1652
|
-
return t;
|
|
1653
|
-
}
|
|
1654
|
-
);
|
|
1655
|
-
return i.d(e, "a", e), e;
|
|
1656
|
-
}, i.o = function(t, e) {
|
|
1657
|
-
return Object.prototype.hasOwnProperty.call(t, e);
|
|
1658
|
-
}, i.p = "", i(i.s = 7);
|
|
1659
|
-
}([
|
|
1660
|
-
/* 0 */
|
|
1661
|
-
/***/
|
|
1662
|
-
function(T, y) {
|
|
1663
|
-
T.exports = p;
|
|
1664
|
-
},
|
|
1665
|
-
/* 1 */
|
|
1666
|
-
/***/
|
|
1667
|
-
function(T, y, i) {
|
|
1668
|
-
var t = i(0).FDLayoutConstants;
|
|
1669
|
-
function e() {
|
|
1670
|
-
}
|
|
1671
|
-
for (var r in t)
|
|
1672
|
-
e[r] = t[r];
|
|
1673
|
-
e.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, e.DEFAULT_RADIAL_SEPARATION = t.DEFAULT_EDGE_LENGTH, e.DEFAULT_COMPONENT_SEPERATION = 60, e.TILE = !0, e.TILING_PADDING_VERTICAL = 10, e.TILING_PADDING_HORIZONTAL = 10, e.TREE_REDUCTION_ON_INCREMENTAL = !1, T.exports = e;
|
|
1674
|
-
},
|
|
1675
|
-
/* 2 */
|
|
1676
|
-
/***/
|
|
1677
|
-
function(T, y, i) {
|
|
1678
|
-
var t = i(0).FDLayoutEdge;
|
|
1679
|
-
function e(a, h, s) {
|
|
1680
|
-
t.call(this, a, h, s);
|
|
1681
|
-
}
|
|
1682
|
-
e.prototype = Object.create(t.prototype);
|
|
1683
|
-
for (var r in t)
|
|
1684
|
-
e[r] = t[r];
|
|
1685
|
-
T.exports = e;
|
|
1686
|
-
},
|
|
1687
|
-
/* 3 */
|
|
1688
|
-
/***/
|
|
1689
|
-
function(T, y, i) {
|
|
1690
|
-
var t = i(0).LGraph;
|
|
1691
|
-
function e(a, h, s) {
|
|
1692
|
-
t.call(this, a, h, s);
|
|
1693
|
-
}
|
|
1694
|
-
e.prototype = Object.create(t.prototype);
|
|
1695
|
-
for (var r in t)
|
|
1696
|
-
e[r] = t[r];
|
|
1697
|
-
T.exports = e;
|
|
1698
|
-
},
|
|
1699
|
-
/* 4 */
|
|
1700
|
-
/***/
|
|
1701
|
-
function(T, y, i) {
|
|
1702
|
-
var t = i(0).LGraphManager;
|
|
1703
|
-
function e(a) {
|
|
1704
|
-
t.call(this, a);
|
|
1705
|
-
}
|
|
1706
|
-
e.prototype = Object.create(t.prototype);
|
|
1707
|
-
for (var r in t)
|
|
1708
|
-
e[r] = t[r];
|
|
1709
|
-
T.exports = e;
|
|
1710
|
-
},
|
|
1711
|
-
/* 5 */
|
|
1712
|
-
/***/
|
|
1713
|
-
function(T, y, i) {
|
|
1714
|
-
var t = i(0).FDLayoutNode, e = i(0).IMath;
|
|
1715
|
-
function r(h, s, f, o) {
|
|
1716
|
-
t.call(this, h, s, f, o);
|
|
1717
|
-
}
|
|
1718
|
-
r.prototype = Object.create(t.prototype);
|
|
1719
|
-
for (var a in t)
|
|
1720
|
-
r[a] = t[a];
|
|
1721
|
-
r.prototype.move = function() {
|
|
1722
|
-
var h = this.graphManager.getLayout();
|
|
1723
|
-
this.displacementX = h.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = h.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementX = h.coolingFactor * h.maxNodeDisplacement * e.sign(this.displacementX)), Math.abs(this.displacementY) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementY = h.coolingFactor * h.maxNodeDisplacement * e.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), h.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;
|
|
1724
|
-
}, r.prototype.propogateDisplacementToChildren = function(h, s) {
|
|
1725
|
-
for (var f = this.getChild().getNodes(), o, d = 0; d < f.length; d++)
|
|
1726
|
-
o = f[d], o.getChild() == null ? (o.moveBy(h, s), o.displacementX += h, o.displacementY += s) : o.propogateDisplacementToChildren(h, s);
|
|
1727
|
-
}, r.prototype.setPred1 = function(h) {
|
|
1728
|
-
this.pred1 = h;
|
|
1729
|
-
}, r.prototype.getPred1 = function() {
|
|
1730
|
-
return pred1;
|
|
1731
|
-
}, r.prototype.getPred2 = function() {
|
|
1732
|
-
return pred2;
|
|
1733
|
-
}, r.prototype.setNext = function(h) {
|
|
1734
|
-
this.next = h;
|
|
1735
|
-
}, r.prototype.getNext = function() {
|
|
1736
|
-
return next;
|
|
1737
|
-
}, r.prototype.setProcessed = function(h) {
|
|
1738
|
-
this.processed = h;
|
|
1739
|
-
}, r.prototype.isProcessed = function() {
|
|
1740
|
-
return processed;
|
|
1741
|
-
}, T.exports = r;
|
|
1742
|
-
},
|
|
1743
|
-
/* 6 */
|
|
1744
|
-
/***/
|
|
1745
|
-
function(T, y, i) {
|
|
1746
|
-
var t = i(0).FDLayout, e = i(4), r = i(3), a = i(5), h = i(2), s = i(1), f = i(0).FDLayoutConstants, o = i(0).LayoutConstants, d = i(0).Point, c = i(0).PointD, E = i(0).Layout, m = i(0).Integer, v = i(0).IGeometry, N = i(0).LGraph, D = i(0).Transform;
|
|
1747
|
-
function g() {
|
|
1748
|
-
t.call(this), this.toBeTiled = {};
|
|
1749
|
-
}
|
|
1750
|
-
g.prototype = Object.create(t.prototype);
|
|
1751
|
-
for (var L in t)
|
|
1752
|
-
g[L] = t[L];
|
|
1753
|
-
g.prototype.newGraphManager = function() {
|
|
1754
|
-
var n = new e(this);
|
|
1755
|
-
return this.graphManager = n, n;
|
|
1756
|
-
}, g.prototype.newGraph = function(n) {
|
|
1757
|
-
return new r(null, this.graphManager, n);
|
|
1758
|
-
}, g.prototype.newNode = function(n) {
|
|
1759
|
-
return new a(this.graphManager, n);
|
|
1760
|
-
}, g.prototype.newEdge = function(n) {
|
|
1761
|
-
return new h(null, null, n);
|
|
1762
|
-
}, g.prototype.initParameters = function() {
|
|
1763
|
-
t.prototype.initParameters.call(this, arguments), this.isSubLayout || (s.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = s.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = f.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = f.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = f.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = f.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = f.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / f.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = f.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
|
|
1764
|
-
}, g.prototype.layout = function() {
|
|
1765
|
-
var n = o.DEFAULT_CREATE_BENDS_AS_NEEDED;
|
|
1766
|
-
return n && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
|
|
1767
|
-
}, g.prototype.classicLayout = function() {
|
|
1768
|
-
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) {
|
|
1769
|
-
if (s.TREE_REDUCTION_ON_INCREMENTAL) {
|
|
1770
|
-
this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1771
|
-
var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(_) {
|
|
1772
|
-
return n.has(_);
|
|
1773
|
-
});
|
|
1774
|
-
this.graphManager.setAllNodesToApplyGravitation(u);
|
|
1775
|
-
}
|
|
1776
|
-
} else {
|
|
1777
|
-
var l = this.getFlatForest();
|
|
1778
|
-
if (l.length > 0)
|
|
1779
|
-
this.positionNodesRadially(l);
|
|
1780
|
-
else {
|
|
1781
|
-
this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1782
|
-
var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(I) {
|
|
1783
|
-
return n.has(I);
|
|
1784
|
-
});
|
|
1785
|
-
this.graphManager.setAllNodesToApplyGravitation(u), this.positionNodesRandomly();
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
|
|
1789
|
-
}, g.prototype.tick = function() {
|
|
1790
|
-
if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
|
|
1791
|
-
if (this.prunedNodesAll.length > 0)
|
|
1792
|
-
this.isTreeGrowing = !0;
|
|
1793
|
-
else
|
|
1794
|
-
return !0;
|
|
1795
|
-
if (this.totalIterations % f.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
|
|
1796
|
-
if (this.isConverged())
|
|
1797
|
-
if (this.prunedNodesAll.length > 0)
|
|
1798
|
-
this.isTreeGrowing = !0;
|
|
1799
|
-
else
|
|
1800
|
-
return !0;
|
|
1801
|
-
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));
|
|
1802
|
-
}
|
|
1803
|
-
if (this.isTreeGrowing) {
|
|
1804
|
-
if (this.growTreeIterations % 10 == 0)
|
|
1805
|
-
if (this.prunedNodesAll.length > 0) {
|
|
1806
|
-
this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1807
|
-
var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(A) {
|
|
1808
|
-
return n.has(A);
|
|
1809
|
-
});
|
|
1810
|
-
this.graphManager.setAllNodesToApplyGravitation(u), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL;
|
|
1811
|
-
} else
|
|
1812
|
-
this.isTreeGrowing = !1, this.isGrowthFinished = !0;
|
|
1813
|
-
this.growTreeIterations++;
|
|
1814
|
-
}
|
|
1815
|
-
if (this.isGrowthFinished) {
|
|
1816
|
-
if (this.isConverged())
|
|
1817
|
-
return !0;
|
|
1818
|
-
this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
|
|
1819
|
-
}
|
|
1820
|
-
var l = !this.isTreeGrowing && !this.isGrowthFinished, _ = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
|
|
1821
|
-
return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(l, _), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
|
|
1822
|
-
}, g.prototype.getPositionsData = function() {
|
|
1823
|
-
for (var n = this.graphManager.getAllNodes(), u = {}, l = 0; l < n.length; l++) {
|
|
1824
|
-
var _ = n[l].rect, A = n[l].id;
|
|
1825
|
-
u[A] = {
|
|
1826
|
-
id: A,
|
|
1827
|
-
x: _.getCenterX(),
|
|
1828
|
-
y: _.getCenterY(),
|
|
1829
|
-
w: _.width,
|
|
1830
|
-
h: _.height
|
|
1831
|
-
};
|
|
1832
|
-
}
|
|
1833
|
-
return u;
|
|
1834
|
-
}, g.prototype.runSpringEmbedder = function() {
|
|
1835
|
-
this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
|
|
1836
|
-
var n = !1;
|
|
1837
|
-
if (f.ANIMATE === "during")
|
|
1838
|
-
this.emit("layoutstarted");
|
|
1839
|
-
else {
|
|
1840
|
-
for (; !n; )
|
|
1841
|
-
n = this.tick();
|
|
1842
|
-
this.graphManager.updateBounds();
|
|
1843
|
-
}
|
|
1844
|
-
}, g.prototype.calculateNodesToApplyGravitationTo = function() {
|
|
1845
|
-
var n = [], u, l = this.graphManager.getGraphs(), _ = l.length, A;
|
|
1846
|
-
for (A = 0; A < _; A++)
|
|
1847
|
-
u = l[A], u.updateConnected(), u.isConnected || (n = n.concat(u.getNodes()));
|
|
1848
|
-
return n;
|
|
1849
|
-
}, g.prototype.createBendpoints = function() {
|
|
1850
|
-
var n = [];
|
|
1851
|
-
n = n.concat(this.graphManager.getAllEdges());
|
|
1852
|
-
var u = /* @__PURE__ */ new Set(), l;
|
|
1853
|
-
for (l = 0; l < n.length; l++) {
|
|
1854
|
-
var _ = n[l];
|
|
1855
|
-
if (!u.has(_)) {
|
|
1856
|
-
var A = _.getSource(), I = _.getTarget();
|
|
1857
|
-
if (A == I)
|
|
1858
|
-
_.getBendpoints().push(new c()), _.getBendpoints().push(new c()), this.createDummyNodesForBendpoints(_), u.add(_);
|
|
1859
|
-
else {
|
|
1860
|
-
var w = [];
|
|
1861
|
-
if (w = w.concat(A.getEdgeListToNode(I)), w = w.concat(I.getEdgeListToNode(A)), !u.has(w[0])) {
|
|
1862
|
-
if (w.length > 1) {
|
|
1863
|
-
var R;
|
|
1864
|
-
for (R = 0; R < w.length; R++) {
|
|
1865
|
-
var S = w[R];
|
|
1866
|
-
S.getBendpoints().push(new c()), this.createDummyNodesForBendpoints(S);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
w.forEach(function(U) {
|
|
1870
|
-
u.add(U);
|
|
1871
|
-
});
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
if (u.size == n.length)
|
|
1876
|
-
break;
|
|
1877
|
-
}
|
|
1878
|
-
}, g.prototype.positionNodesRadially = function(n) {
|
|
1879
|
-
for (var u = new d(0, 0), l = Math.ceil(Math.sqrt(n.length)), _ = 0, A = 0, I = 0, w = new c(0, 0), R = 0; R < n.length; R++) {
|
|
1880
|
-
R % l == 0 && (I = 0, A = _, R != 0 && (A += s.DEFAULT_COMPONENT_SEPERATION), _ = 0);
|
|
1881
|
-
var S = n[R], U = E.findCenterOfTree(S);
|
|
1882
|
-
u.x = I, u.y = A, w = g.radialLayout(S, U, u), w.y > _ && (_ = Math.floor(w.y)), I = Math.floor(w.x + s.DEFAULT_COMPONENT_SEPERATION);
|
|
1883
|
-
}
|
|
1884
|
-
this.transform(new c(o.WORLD_CENTER_X - w.x / 2, o.WORLD_CENTER_Y - w.y / 2));
|
|
1885
|
-
}, g.radialLayout = function(n, u, l) {
|
|
1886
|
-
var _ = Math.max(this.maxDiagonalInTree(n), s.DEFAULT_RADIAL_SEPARATION);
|
|
1887
|
-
g.branchRadialLayout(u, null, 0, 359, 0, _);
|
|
1888
|
-
var A = N.calculateBounds(n), I = new D();
|
|
1889
|
-
I.setDeviceOrgX(A.getMinX()), I.setDeviceOrgY(A.getMinY()), I.setWorldOrgX(l.x), I.setWorldOrgY(l.y);
|
|
1890
|
-
for (var w = 0; w < n.length; w++) {
|
|
1891
|
-
var R = n[w];
|
|
1892
|
-
R.transform(I);
|
|
1893
|
-
}
|
|
1894
|
-
var S = new c(A.getMaxX(), A.getMaxY());
|
|
1895
|
-
return I.inverseTransformPoint(S);
|
|
1896
|
-
}, g.branchRadialLayout = function(n, u, l, _, A, I) {
|
|
1897
|
-
var w = (_ - l + 1) / 2;
|
|
1898
|
-
w < 0 && (w += 180);
|
|
1899
|
-
var R = (w + l) % 360, S = R * v.TWO_PI / 360, U = A * Math.cos(S), b = A * Math.sin(S);
|
|
1900
|
-
n.setCenter(U, b);
|
|
1901
|
-
var C = [];
|
|
1902
|
-
C = C.concat(n.getEdges());
|
|
1903
|
-
var x = C.length;
|
|
1904
|
-
u != null && x--;
|
|
1905
|
-
for (var F = 0, k = C.length, Y, X = n.getEdgesBetween(u); X.length > 1; ) {
|
|
1906
|
-
var P = X[0];
|
|
1907
|
-
X.splice(0, 1);
|
|
1908
|
-
var B = C.indexOf(P);
|
|
1909
|
-
B >= 0 && C.splice(B, 1), k--, x--;
|
|
1910
|
-
}
|
|
1911
|
-
u != null ? Y = (C.indexOf(X[0]) + 1) % k : Y = 0;
|
|
1912
|
-
for (var $ = Math.abs(_ - l) / x, H = Y; F != x; H = ++H % k) {
|
|
1913
|
-
var V = C[H].getOtherEnd(n);
|
|
1914
|
-
if (V != u) {
|
|
1915
|
-
var z = (l + F * $) % 360, j = (z + $) % 360;
|
|
1916
|
-
g.branchRadialLayout(V, n, z, j, A + I, I), F++;
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
}, g.maxDiagonalInTree = function(n) {
|
|
1920
|
-
for (var u = m.MIN_VALUE, l = 0; l < n.length; l++) {
|
|
1921
|
-
var _ = n[l], A = _.getDiagonal();
|
|
1922
|
-
A > u && (u = A);
|
|
1923
|
-
}
|
|
1924
|
-
return u;
|
|
1925
|
-
}, g.prototype.calcRepulsionRange = function() {
|
|
1926
|
-
return 2 * (this.level + 1) * this.idealEdgeLength;
|
|
1927
|
-
}, g.prototype.groupZeroDegreeMembers = function() {
|
|
1928
|
-
var n = this, u = {};
|
|
1929
|
-
this.memberGroups = {}, this.idToDummyNode = {};
|
|
1930
|
-
for (var l = [], _ = this.graphManager.getAllNodes(), A = 0; A < _.length; A++) {
|
|
1931
|
-
var I = _[A], w = I.getParent();
|
|
1932
|
-
this.getNodeDegreeWithChildren(I) === 0 && (w.id == null || !this.getToBeTiled(w)) && l.push(I);
|
|
1933
|
-
}
|
|
1934
|
-
for (var A = 0; A < l.length; A++) {
|
|
1935
|
-
var I = l[A], R = I.getParent().id;
|
|
1936
|
-
typeof u[R] > "u" && (u[R] = []), u[R] = u[R].concat(I);
|
|
1937
|
-
}
|
|
1938
|
-
Object.keys(u).forEach(function(S) {
|
|
1939
|
-
if (u[S].length > 1) {
|
|
1940
|
-
var U = "DummyCompound_" + S;
|
|
1941
|
-
n.memberGroups[U] = u[S];
|
|
1942
|
-
var b = u[S][0].getParent(), C = new a(n.graphManager);
|
|
1943
|
-
C.id = U, C.paddingLeft = b.paddingLeft || 0, C.paddingRight = b.paddingRight || 0, C.paddingBottom = b.paddingBottom || 0, C.paddingTop = b.paddingTop || 0, n.idToDummyNode[U] = C;
|
|
1944
|
-
var x = n.getGraphManager().add(n.newGraph(), C), F = b.getChild();
|
|
1945
|
-
F.add(C);
|
|
1946
|
-
for (var k = 0; k < u[S].length; k++) {
|
|
1947
|
-
var Y = u[S][k];
|
|
1948
|
-
F.remove(Y), x.add(Y);
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
});
|
|
1952
|
-
}, g.prototype.clearCompounds = function() {
|
|
1953
|
-
var n = {}, u = {};
|
|
1954
|
-
this.performDFSOnCompounds();
|
|
1955
|
-
for (var l = 0; l < this.compoundOrder.length; l++)
|
|
1956
|
-
u[this.compoundOrder[l].id] = this.compoundOrder[l], n[this.compoundOrder[l].id] = [].concat(this.compoundOrder[l].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[l].getChild()), this.compoundOrder[l].child = null;
|
|
1957
|
-
this.graphManager.resetAllNodes(), this.tileCompoundMembers(n, u);
|
|
1958
|
-
}, g.prototype.clearZeroDegreeMembers = function() {
|
|
1959
|
-
var n = this, u = this.tiledZeroDegreePack = [];
|
|
1960
|
-
Object.keys(this.memberGroups).forEach(function(l) {
|
|
1961
|
-
var _ = n.idToDummyNode[l];
|
|
1962
|
-
u[l] = n.tileNodes(n.memberGroups[l], _.paddingLeft + _.paddingRight), _.rect.width = u[l].width, _.rect.height = u[l].height;
|
|
1963
|
-
});
|
|
1964
|
-
}, g.prototype.repopulateCompounds = function() {
|
|
1965
|
-
for (var n = this.compoundOrder.length - 1; n >= 0; n--) {
|
|
1966
|
-
var u = this.compoundOrder[n], l = u.id, _ = u.paddingLeft, A = u.paddingTop;
|
|
1967
|
-
this.adjustLocations(this.tiledMemberPack[l], u.rect.x, u.rect.y, _, A);
|
|
1968
|
-
}
|
|
1969
|
-
}, g.prototype.repopulateZeroDegreeMembers = function() {
|
|
1970
|
-
var n = this, u = this.tiledZeroDegreePack;
|
|
1971
|
-
Object.keys(u).forEach(function(l) {
|
|
1972
|
-
var _ = n.idToDummyNode[l], A = _.paddingLeft, I = _.paddingTop;
|
|
1973
|
-
n.adjustLocations(u[l], _.rect.x, _.rect.y, A, I);
|
|
1974
|
-
});
|
|
1975
|
-
}, g.prototype.getToBeTiled = function(n) {
|
|
1976
|
-
var u = n.id;
|
|
1977
|
-
if (this.toBeTiled[u] != null)
|
|
1978
|
-
return this.toBeTiled[u];
|
|
1979
|
-
var l = n.getChild();
|
|
1980
|
-
if (l == null)
|
|
1981
|
-
return this.toBeTiled[u] = !1, !1;
|
|
1982
|
-
for (var _ = l.getNodes(), A = 0; A < _.length; A++) {
|
|
1983
|
-
var I = _[A];
|
|
1984
|
-
if (this.getNodeDegree(I) > 0)
|
|
1985
|
-
return this.toBeTiled[u] = !1, !1;
|
|
1986
|
-
if (I.getChild() == null) {
|
|
1987
|
-
this.toBeTiled[I.id] = !1;
|
|
1988
|
-
continue;
|
|
1989
|
-
}
|
|
1990
|
-
if (!this.getToBeTiled(I))
|
|
1991
|
-
return this.toBeTiled[u] = !1, !1;
|
|
1992
|
-
}
|
|
1993
|
-
return this.toBeTiled[u] = !0, !0;
|
|
1994
|
-
}, g.prototype.getNodeDegree = function(n) {
|
|
1995
|
-
n.id;
|
|
1996
|
-
for (var u = n.getEdges(), l = 0, _ = 0; _ < u.length; _++) {
|
|
1997
|
-
var A = u[_];
|
|
1998
|
-
A.getSource().id !== A.getTarget().id && (l = l + 1);
|
|
1999
|
-
}
|
|
2000
|
-
return l;
|
|
2001
|
-
}, g.prototype.getNodeDegreeWithChildren = function(n) {
|
|
2002
|
-
var u = this.getNodeDegree(n);
|
|
2003
|
-
if (n.getChild() == null)
|
|
2004
|
-
return u;
|
|
2005
|
-
for (var l = n.getChild().getNodes(), _ = 0; _ < l.length; _++) {
|
|
2006
|
-
var A = l[_];
|
|
2007
|
-
u += this.getNodeDegreeWithChildren(A);
|
|
2008
|
-
}
|
|
2009
|
-
return u;
|
|
2010
|
-
}, g.prototype.performDFSOnCompounds = function() {
|
|
2011
|
-
this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
|
|
2012
|
-
}, g.prototype.fillCompexOrderByDFS = function(n) {
|
|
2013
|
-
for (var u = 0; u < n.length; u++) {
|
|
2014
|
-
var l = n[u];
|
|
2015
|
-
l.getChild() != null && this.fillCompexOrderByDFS(l.getChild().getNodes()), this.getToBeTiled(l) && this.compoundOrder.push(l);
|
|
2016
|
-
}
|
|
2017
|
-
}, g.prototype.adjustLocations = function(n, u, l, _, A) {
|
|
2018
|
-
u += _, l += A;
|
|
2019
|
-
for (var I = u, w = 0; w < n.rows.length; w++) {
|
|
2020
|
-
var R = n.rows[w];
|
|
2021
|
-
u = I;
|
|
2022
|
-
for (var S = 0, U = 0; U < R.length; U++) {
|
|
2023
|
-
var b = R[U];
|
|
2024
|
-
b.rect.x = u, b.rect.y = l, u += b.rect.width + n.horizontalPadding, b.rect.height > S && (S = b.rect.height);
|
|
2025
|
-
}
|
|
2026
|
-
l += S + n.verticalPadding;
|
|
2027
|
-
}
|
|
2028
|
-
}, g.prototype.tileCompoundMembers = function(n, u) {
|
|
2029
|
-
var l = this;
|
|
2030
|
-
this.tiledMemberPack = [], Object.keys(n).forEach(function(_) {
|
|
2031
|
-
var A = u[_];
|
|
2032
|
-
l.tiledMemberPack[_] = l.tileNodes(n[_], A.paddingLeft + A.paddingRight), A.rect.width = l.tiledMemberPack[_].width, A.rect.height = l.tiledMemberPack[_].height;
|
|
2033
|
-
});
|
|
2034
|
-
}, g.prototype.tileNodes = function(n, u) {
|
|
2035
|
-
var l = s.TILING_PADDING_VERTICAL, _ = s.TILING_PADDING_HORIZONTAL, A = {
|
|
2036
|
-
rows: [],
|
|
2037
|
-
rowWidth: [],
|
|
2038
|
-
rowHeight: [],
|
|
2039
|
-
width: 0,
|
|
2040
|
-
height: u,
|
|
2041
|
-
// assume minHeight equals to minWidth
|
|
2042
|
-
verticalPadding: l,
|
|
2043
|
-
horizontalPadding: _
|
|
2044
|
-
};
|
|
2045
|
-
n.sort(function(R, S) {
|
|
2046
|
-
return R.rect.width * R.rect.height > S.rect.width * S.rect.height ? -1 : R.rect.width * R.rect.height < S.rect.width * S.rect.height ? 1 : 0;
|
|
2047
|
-
});
|
|
2048
|
-
for (var I = 0; I < n.length; I++) {
|
|
2049
|
-
var w = n[I];
|
|
2050
|
-
A.rows.length == 0 ? this.insertNodeToRow(A, w, 0, u) : this.canAddHorizontal(A, w.rect.width, w.rect.height) ? this.insertNodeToRow(A, w, this.getShortestRowIndex(A), u) : this.insertNodeToRow(A, w, A.rows.length, u), this.shiftToLastRow(A);
|
|
2051
|
-
}
|
|
2052
|
-
return A;
|
|
2053
|
-
}, g.prototype.insertNodeToRow = function(n, u, l, _) {
|
|
2054
|
-
var A = _;
|
|
2055
|
-
if (l == n.rows.length) {
|
|
2056
|
-
var I = [];
|
|
2057
|
-
n.rows.push(I), n.rowWidth.push(A), n.rowHeight.push(0);
|
|
2058
|
-
}
|
|
2059
|
-
var w = n.rowWidth[l] + u.rect.width;
|
|
2060
|
-
n.rows[l].length > 0 && (w += n.horizontalPadding), n.rowWidth[l] = w, n.width < w && (n.width = w);
|
|
2061
|
-
var R = u.rect.height;
|
|
2062
|
-
l > 0 && (R += n.verticalPadding);
|
|
2063
|
-
var S = 0;
|
|
2064
|
-
R > n.rowHeight[l] && (S = n.rowHeight[l], n.rowHeight[l] = R, S = n.rowHeight[l] - S), n.height += S, n.rows[l].push(u);
|
|
2065
|
-
}, g.prototype.getShortestRowIndex = function(n) {
|
|
2066
|
-
for (var u = -1, l = Number.MAX_VALUE, _ = 0; _ < n.rows.length; _++)
|
|
2067
|
-
n.rowWidth[_] < l && (u = _, l = n.rowWidth[_]);
|
|
2068
|
-
return u;
|
|
2069
|
-
}, g.prototype.getLongestRowIndex = function(n) {
|
|
2070
|
-
for (var u = -1, l = Number.MIN_VALUE, _ = 0; _ < n.rows.length; _++)
|
|
2071
|
-
n.rowWidth[_] > l && (u = _, l = n.rowWidth[_]);
|
|
2072
|
-
return u;
|
|
2073
|
-
}, g.prototype.canAddHorizontal = function(n, u, l) {
|
|
2074
|
-
var _ = this.getShortestRowIndex(n);
|
|
2075
|
-
if (_ < 0)
|
|
2076
|
-
return !0;
|
|
2077
|
-
var A = n.rowWidth[_];
|
|
2078
|
-
if (A + n.horizontalPadding + u <= n.width) return !0;
|
|
2079
|
-
var I = 0;
|
|
2080
|
-
n.rowHeight[_] < l && _ > 0 && (I = l + n.verticalPadding - n.rowHeight[_]);
|
|
2081
|
-
var w;
|
|
2082
|
-
n.width - A >= u + n.horizontalPadding ? w = (n.height + I) / (A + u + n.horizontalPadding) : w = (n.height + I) / n.width, I = l + n.verticalPadding;
|
|
2083
|
-
var R;
|
|
2084
|
-
return n.width < u ? R = (n.height + I) / u : R = (n.height + I) / n.width, R < 1 && (R = 1 / R), w < 1 && (w = 1 / w), w < R;
|
|
2085
|
-
}, g.prototype.shiftToLastRow = function(n) {
|
|
2086
|
-
var u = this.getLongestRowIndex(n), l = n.rowWidth.length - 1, _ = n.rows[u], A = _[_.length - 1], I = A.width + n.horizontalPadding;
|
|
2087
|
-
if (n.width - n.rowWidth[l] > I && u != l) {
|
|
2088
|
-
_.splice(-1, 1), n.rows[l].push(A), n.rowWidth[u] = n.rowWidth[u] - I, n.rowWidth[l] = n.rowWidth[l] + I, n.width = n.rowWidth[instance.getLongestRowIndex(n)];
|
|
2089
|
-
for (var w = Number.MIN_VALUE, R = 0; R < _.length; R++)
|
|
2090
|
-
_[R].height > w && (w = _[R].height);
|
|
2091
|
-
u > 0 && (w += n.verticalPadding);
|
|
2092
|
-
var S = n.rowHeight[u] + n.rowHeight[l];
|
|
2093
|
-
n.rowHeight[u] = w, n.rowHeight[l] < A.height + n.verticalPadding && (n.rowHeight[l] = A.height + n.verticalPadding);
|
|
2094
|
-
var U = n.rowHeight[u] + n.rowHeight[l];
|
|
2095
|
-
n.height += U - S, this.shiftToLastRow(n);
|
|
2096
|
-
}
|
|
2097
|
-
}, g.prototype.tilingPreLayout = function() {
|
|
2098
|
-
s.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
|
|
2099
|
-
}, g.prototype.tilingPostLayout = function() {
|
|
2100
|
-
s.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
|
|
2101
|
-
}, g.prototype.reduceTrees = function() {
|
|
2102
|
-
for (var n = [], u = !0, l; u; ) {
|
|
2103
|
-
var _ = this.graphManager.getAllNodes(), A = [];
|
|
2104
|
-
u = !1;
|
|
2105
|
-
for (var I = 0; I < _.length; I++)
|
|
2106
|
-
l = _[I], l.getEdges().length == 1 && !l.getEdges()[0].isInterGraph && l.getChild() == null && (A.push([l, l.getEdges()[0], l.getOwner()]), u = !0);
|
|
2107
|
-
if (u == !0) {
|
|
2108
|
-
for (var w = [], R = 0; R < A.length; R++)
|
|
2109
|
-
A[R][0].getEdges().length == 1 && (w.push(A[R]), A[R][0].getOwner().remove(A[R][0]));
|
|
2110
|
-
n.push(w), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
this.prunedNodesAll = n;
|
|
2114
|
-
}, g.prototype.growTree = function(n) {
|
|
2115
|
-
for (var u = n.length, l = n[u - 1], _, A = 0; A < l.length; A++)
|
|
2116
|
-
_ = l[A], this.findPlaceforPrunedNode(_), _[2].add(_[0]), _[2].add(_[1], _[1].source, _[1].target);
|
|
2117
|
-
n.splice(n.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
|
|
2118
|
-
}, g.prototype.findPlaceforPrunedNode = function(n) {
|
|
2119
|
-
var u, l, _ = n[0];
|
|
2120
|
-
_ == n[1].source ? l = n[1].target : l = n[1].source;
|
|
2121
|
-
var A = l.startX, I = l.finishX, w = l.startY, R = l.finishY, S = 0, U = 0, b = 0, C = 0, x = [S, b, U, C];
|
|
2122
|
-
if (w > 0)
|
|
2123
|
-
for (var F = A; F <= I; F++)
|
|
2124
|
-
x[0] += this.grid[F][w - 1].length + this.grid[F][w].length - 1;
|
|
2125
|
-
if (I < this.grid.length - 1)
|
|
2126
|
-
for (var F = w; F <= R; F++)
|
|
2127
|
-
x[1] += this.grid[I + 1][F].length + this.grid[I][F].length - 1;
|
|
2128
|
-
if (R < this.grid[0].length - 1)
|
|
2129
|
-
for (var F = A; F <= I; F++)
|
|
2130
|
-
x[2] += this.grid[F][R + 1].length + this.grid[F][R].length - 1;
|
|
2131
|
-
if (A > 0)
|
|
2132
|
-
for (var F = w; F <= R; F++)
|
|
2133
|
-
x[3] += this.grid[A - 1][F].length + this.grid[A][F].length - 1;
|
|
2134
|
-
for (var k = m.MAX_VALUE, Y, X, P = 0; P < x.length; P++)
|
|
2135
|
-
x[P] < k ? (k = x[P], Y = 1, X = P) : x[P] == k && Y++;
|
|
2136
|
-
if (Y == 3 && k == 0)
|
|
2137
|
-
x[0] == 0 && x[1] == 0 && x[2] == 0 ? u = 1 : x[0] == 0 && x[1] == 0 && x[3] == 0 ? u = 0 : x[0] == 0 && x[2] == 0 && x[3] == 0 ? u = 3 : x[1] == 0 && x[2] == 0 && x[3] == 0 && (u = 2);
|
|
2138
|
-
else if (Y == 2 && k == 0) {
|
|
2139
|
-
var B = Math.floor(Math.random() * 2);
|
|
2140
|
-
x[0] == 0 && x[1] == 0 ? B == 0 ? u = 0 : u = 1 : x[0] == 0 && x[2] == 0 ? B == 0 ? u = 0 : u = 2 : x[0] == 0 && x[3] == 0 ? B == 0 ? u = 0 : u = 3 : x[1] == 0 && x[2] == 0 ? B == 0 ? u = 1 : u = 2 : x[1] == 0 && x[3] == 0 ? B == 0 ? u = 1 : u = 3 : B == 0 ? u = 2 : u = 3;
|
|
2141
|
-
} else if (Y == 4 && k == 0) {
|
|
2142
|
-
var B = Math.floor(Math.random() * 4);
|
|
2143
|
-
u = B;
|
|
2144
|
-
} else
|
|
2145
|
-
u = X;
|
|
2146
|
-
u == 0 ? _.setCenter(l.getCenterX(), l.getCenterY() - l.getHeight() / 2 - f.DEFAULT_EDGE_LENGTH - _.getHeight() / 2) : u == 1 ? _.setCenter(l.getCenterX() + l.getWidth() / 2 + f.DEFAULT_EDGE_LENGTH + _.getWidth() / 2, l.getCenterY()) : u == 2 ? _.setCenter(l.getCenterX(), l.getCenterY() + l.getHeight() / 2 + f.DEFAULT_EDGE_LENGTH + _.getHeight() / 2) : _.setCenter(l.getCenterX() - l.getWidth() / 2 - f.DEFAULT_EDGE_LENGTH - _.getWidth() / 2, l.getCenterY());
|
|
2147
|
-
}, T.exports = g;
|
|
2148
|
-
},
|
|
2149
|
-
/* 7 */
|
|
2150
|
-
/***/
|
|
2151
|
-
function(T, y, i) {
|
|
2152
|
-
var t = {};
|
|
2153
|
-
t.layoutBase = i(0), t.CoSEConstants = i(1), t.CoSEEdge = i(2), t.CoSEGraph = i(3), t.CoSEGraphManager = i(4), t.CoSELayout = i(6), t.CoSENode = i(5), T.exports = t;
|
|
2154
|
-
}
|
|
2155
|
-
/******/
|
|
2156
|
-
])
|
|
2157
|
-
);
|
|
2158
|
-
});
|
|
2159
|
-
}(rt)), rt.exports;
|
|
2160
|
-
}
|
|
2161
|
-
var Mt = it.exports, gt;
|
|
2162
|
-
function Ct() {
|
|
2163
|
-
return gt || (gt = 1, function(O, M) {
|
|
2164
|
-
(function(p, T) {
|
|
2165
|
-
O.exports = T(Rt());
|
|
2166
|
-
})(Mt, function(p) {
|
|
2167
|
-
return (
|
|
2168
|
-
/******/
|
|
2169
|
-
function(T) {
|
|
2170
|
-
var y = {};
|
|
2171
|
-
function i(t) {
|
|
2172
|
-
if (y[t])
|
|
2173
|
-
return y[t].exports;
|
|
2174
|
-
var e = y[t] = {
|
|
2175
|
-
/******/
|
|
2176
|
-
i: t,
|
|
2177
|
-
/******/
|
|
2178
|
-
l: !1,
|
|
2179
|
-
/******/
|
|
2180
|
-
exports: {}
|
|
2181
|
-
/******/
|
|
2182
|
-
};
|
|
2183
|
-
return T[t].call(e.exports, e, e.exports, i), e.l = !0, e.exports;
|
|
2184
|
-
}
|
|
2185
|
-
return i.m = T, i.c = y, i.i = function(t) {
|
|
2186
|
-
return t;
|
|
2187
|
-
}, i.d = function(t, e, r) {
|
|
2188
|
-
i.o(t, e) || Object.defineProperty(t, e, {
|
|
2189
|
-
/******/
|
|
2190
|
-
configurable: !1,
|
|
2191
|
-
/******/
|
|
2192
|
-
enumerable: !0,
|
|
2193
|
-
/******/
|
|
2194
|
-
get: r
|
|
2195
|
-
/******/
|
|
2196
|
-
});
|
|
2197
|
-
}, i.n = function(t) {
|
|
2198
|
-
var e = t && t.__esModule ? (
|
|
2199
|
-
/******/
|
|
2200
|
-
function() {
|
|
2201
|
-
return t.default;
|
|
2202
|
-
}
|
|
2203
|
-
) : (
|
|
2204
|
-
/******/
|
|
2205
|
-
function() {
|
|
2206
|
-
return t;
|
|
2207
|
-
}
|
|
2208
|
-
);
|
|
2209
|
-
return i.d(e, "a", e), e;
|
|
2210
|
-
}, i.o = function(t, e) {
|
|
2211
|
-
return Object.prototype.hasOwnProperty.call(t, e);
|
|
2212
|
-
}, i.p = "", i(i.s = 1);
|
|
2213
|
-
}([
|
|
2214
|
-
/* 0 */
|
|
2215
|
-
/***/
|
|
2216
|
-
function(T, y) {
|
|
2217
|
-
T.exports = p;
|
|
2218
|
-
},
|
|
2219
|
-
/* 1 */
|
|
2220
|
-
/***/
|
|
2221
|
-
function(T, y, i) {
|
|
2222
|
-
var t = i(0).layoutBase.LayoutConstants, e = i(0).layoutBase.FDLayoutConstants, r = i(0).CoSEConstants, a = i(0).CoSELayout, h = i(0).CoSENode, s = i(0).layoutBase.PointD, f = i(0).layoutBase.DimensionD, o = {
|
|
2223
|
-
// Called on `layoutready`
|
|
2224
|
-
ready: function() {
|
|
2225
|
-
},
|
|
2226
|
-
// Called on `layoutstop`
|
|
2227
|
-
stop: function() {
|
|
2228
|
-
},
|
|
2229
|
-
// 'draft', 'default' or 'proof"
|
|
2230
|
-
// - 'draft' fast cooling rate
|
|
2231
|
-
// - 'default' moderate cooling rate
|
|
2232
|
-
// - "proof" slow cooling rate
|
|
2233
|
-
quality: "default",
|
|
2234
|
-
// include labels in node dimensions
|
|
2235
|
-
nodeDimensionsIncludeLabels: !1,
|
|
2236
|
-
// number of ticks per frame; higher is faster but more jerky
|
|
2237
|
-
refresh: 30,
|
|
2238
|
-
// Whether to fit the network view after when done
|
|
2239
|
-
fit: !0,
|
|
2240
|
-
// Padding on fit
|
|
2241
|
-
padding: 10,
|
|
2242
|
-
// Whether to enable incremental mode
|
|
2243
|
-
randomize: !0,
|
|
2244
|
-
// Node repulsion (non overlapping) multiplier
|
|
2245
|
-
nodeRepulsion: 4500,
|
|
2246
|
-
// Ideal edge (non nested) length
|
|
2247
|
-
idealEdgeLength: 50,
|
|
2248
|
-
// Divisor to compute edge forces
|
|
2249
|
-
edgeElasticity: 0.45,
|
|
2250
|
-
// Nesting factor (multiplier) to compute ideal edge length for nested edges
|
|
2251
|
-
nestingFactor: 0.1,
|
|
2252
|
-
// Gravity force (constant)
|
|
2253
|
-
gravity: 0.25,
|
|
2254
|
-
// Maximum number of iterations to perform
|
|
2255
|
-
numIter: 2500,
|
|
2256
|
-
// For enabling tiling
|
|
2257
|
-
tile: !0,
|
|
2258
|
-
// Type of layout animation. The option set is {'during', 'end', false}
|
|
2259
|
-
animate: "end",
|
|
2260
|
-
// Duration for animate:end
|
|
2261
|
-
animationDuration: 500,
|
|
2262
|
-
// Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
|
|
2263
|
-
tilingPaddingVertical: 10,
|
|
2264
|
-
// Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
|
|
2265
|
-
tilingPaddingHorizontal: 10,
|
|
2266
|
-
// Gravity range (constant) for compounds
|
|
2267
|
-
gravityRangeCompound: 1.5,
|
|
2268
|
-
// Gravity force (constant) for compounds
|
|
2269
|
-
gravityCompound: 1,
|
|
2270
|
-
// Gravity range (constant)
|
|
2271
|
-
gravityRange: 3.8,
|
|
2272
|
-
// Initial cooling factor for incremental layout
|
|
2273
|
-
initialEnergyOnIncremental: 0.5
|
|
2274
|
-
};
|
|
2275
|
-
function d(v, N) {
|
|
2276
|
-
var D = {};
|
|
2277
|
-
for (var g in v)
|
|
2278
|
-
D[g] = v[g];
|
|
2279
|
-
for (var g in N)
|
|
2280
|
-
D[g] = N[g];
|
|
2281
|
-
return D;
|
|
2282
|
-
}
|
|
2283
|
-
function c(v) {
|
|
2284
|
-
this.options = d(o, v), E(this.options);
|
|
2285
|
-
}
|
|
2286
|
-
var E = function(v) {
|
|
2287
|
-
v.nodeRepulsion != null && (r.DEFAULT_REPULSION_STRENGTH = e.DEFAULT_REPULSION_STRENGTH = v.nodeRepulsion), v.idealEdgeLength != null && (r.DEFAULT_EDGE_LENGTH = e.DEFAULT_EDGE_LENGTH = v.idealEdgeLength), v.edgeElasticity != null && (r.DEFAULT_SPRING_STRENGTH = e.DEFAULT_SPRING_STRENGTH = v.edgeElasticity), v.nestingFactor != null && (r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = v.nestingFactor), v.gravity != null && (r.DEFAULT_GRAVITY_STRENGTH = e.DEFAULT_GRAVITY_STRENGTH = v.gravity), v.numIter != null && (r.MAX_ITERATIONS = e.MAX_ITERATIONS = v.numIter), v.gravityRange != null && (r.DEFAULT_GRAVITY_RANGE_FACTOR = e.DEFAULT_GRAVITY_RANGE_FACTOR = v.gravityRange), v.gravityCompound != null && (r.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH = v.gravityCompound), v.gravityRangeCompound != null && (r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = v.gravityRangeCompound), v.initialEnergyOnIncremental != null && (r.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.DEFAULT_COOLING_FACTOR_INCREMENTAL = v.initialEnergyOnIncremental), v.quality == "draft" ? t.QUALITY = 0 : v.quality == "proof" ? t.QUALITY = 2 : t.QUALITY = 1, r.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = v.nodeDimensionsIncludeLabels, r.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = !v.randomize, r.ANIMATE = e.ANIMATE = t.ANIMATE = v.animate, r.TILE = v.tile, r.TILING_PADDING_VERTICAL = typeof v.tilingPaddingVertical == "function" ? v.tilingPaddingVertical.call() : v.tilingPaddingVertical, r.TILING_PADDING_HORIZONTAL = typeof v.tilingPaddingHorizontal == "function" ? v.tilingPaddingHorizontal.call() : v.tilingPaddingHorizontal;
|
|
2288
|
-
};
|
|
2289
|
-
c.prototype.run = function() {
|
|
2290
|
-
var v, N, D = this.options;
|
|
2291
|
-
this.idToLNode = {};
|
|
2292
|
-
var g = this.layout = new a(), L = this;
|
|
2293
|
-
L.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
|
|
2294
|
-
var n = g.newGraphManager();
|
|
2295
|
-
this.gm = n;
|
|
2296
|
-
var u = this.options.eles.nodes(), l = this.options.eles.edges();
|
|
2297
|
-
this.root = n.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(u), g);
|
|
2298
|
-
for (var _ = 0; _ < l.length; _++) {
|
|
2299
|
-
var A = l[_], I = this.idToLNode[A.data("source")], w = this.idToLNode[A.data("target")];
|
|
2300
|
-
if (I !== w && I.getEdgesBetween(w).length == 0) {
|
|
2301
|
-
var R = n.add(g.newEdge(), I, w);
|
|
2302
|
-
R.id = A.id();
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
var S = function(b, C) {
|
|
2306
|
-
typeof b == "number" && (b = C);
|
|
2307
|
-
var x = b.data("id"), F = L.idToLNode[x];
|
|
2308
|
-
return {
|
|
2309
|
-
x: F.getRect().getCenterX(),
|
|
2310
|
-
y: F.getRect().getCenterY()
|
|
2311
|
-
};
|
|
2312
|
-
}, U = function b() {
|
|
2313
|
-
for (var C = function() {
|
|
2314
|
-
D.fit && D.cy.fit(D.eles, D.padding), v || (v = !0, L.cy.one("layoutready", D.ready), L.cy.trigger({ type: "layoutready", layout: L }));
|
|
2315
|
-
}, x = L.options.refresh, F, k = 0; k < x && !F; k++)
|
|
2316
|
-
F = L.stopped || L.layout.tick();
|
|
2317
|
-
if (F) {
|
|
2318
|
-
g.checkLayoutSuccess() && !g.isSubLayout && g.doPostLayout(), g.tilingPostLayout && g.tilingPostLayout(), g.isLayoutFinished = !0, L.options.eles.nodes().positions(S), C(), L.cy.one("layoutstop", L.options.stop), L.cy.trigger({ type: "layoutstop", layout: L }), N && cancelAnimationFrame(N), v = !1;
|
|
2319
|
-
return;
|
|
2320
|
-
}
|
|
2321
|
-
var Y = L.layout.getPositionsData();
|
|
2322
|
-
D.eles.nodes().positions(function(X, P) {
|
|
2323
|
-
if (typeof X == "number" && (X = P), !X.isParent()) {
|
|
2324
|
-
for (var B = X.id(), $ = Y[B], H = X; $ == null && ($ = Y[H.data("parent")] || Y["DummyCompound_" + H.data("parent")], Y[B] = $, H = H.parent()[0], H != null); )
|
|
2325
|
-
;
|
|
2326
|
-
return $ != null ? {
|
|
2327
|
-
x: $.x,
|
|
2328
|
-
y: $.y
|
|
2329
|
-
} : {
|
|
2330
|
-
x: X.position("x"),
|
|
2331
|
-
y: X.position("y")
|
|
2332
|
-
};
|
|
2333
|
-
}
|
|
2334
|
-
}), C(), N = requestAnimationFrame(b);
|
|
2335
|
-
};
|
|
2336
|
-
return g.addListener("layoutstarted", function() {
|
|
2337
|
-
L.options.animate === "during" && (N = requestAnimationFrame(U));
|
|
2338
|
-
}), g.runLayout(), this.options.animate !== "during" && (L.options.eles.nodes().not(":parent").layoutPositions(L, L.options, S), v = !1), this;
|
|
2339
|
-
}, c.prototype.getTopMostNodes = function(v) {
|
|
2340
|
-
for (var N = {}, D = 0; D < v.length; D++)
|
|
2341
|
-
N[v[D].id()] = !0;
|
|
2342
|
-
var g = v.filter(function(L, n) {
|
|
2343
|
-
typeof L == "number" && (L = n);
|
|
2344
|
-
for (var u = L.parent()[0]; u != null; ) {
|
|
2345
|
-
if (N[u.id()])
|
|
2346
|
-
return !1;
|
|
2347
|
-
u = u.parent()[0];
|
|
2348
|
-
}
|
|
2349
|
-
return !0;
|
|
2350
|
-
});
|
|
2351
|
-
return g;
|
|
2352
|
-
}, c.prototype.processChildrenList = function(v, N, D) {
|
|
2353
|
-
for (var g = N.length, L = 0; L < g; L++) {
|
|
2354
|
-
var n = N[L], u = n.children(), l, _ = n.layoutDimensions({
|
|
2355
|
-
nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
|
|
2356
|
-
});
|
|
2357
|
-
if (n.outerWidth() != null && n.outerHeight() != null ? l = v.add(new h(D.graphManager, new s(n.position("x") - _.w / 2, n.position("y") - _.h / 2), new f(parseFloat(_.w), parseFloat(_.h)))) : l = v.add(new h(this.graphManager)), l.id = n.data("id"), l.paddingLeft = parseInt(n.css("padding")), l.paddingTop = parseInt(n.css("padding")), l.paddingRight = parseInt(n.css("padding")), l.paddingBottom = parseInt(n.css("padding")), this.options.nodeDimensionsIncludeLabels && n.isParent()) {
|
|
2358
|
-
var A = n.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, I = n.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, w = n.css("text-halign");
|
|
2359
|
-
l.labelWidth = A, l.labelHeight = I, l.labelPos = w;
|
|
2360
|
-
}
|
|
2361
|
-
if (this.idToLNode[n.data("id")] = l, isNaN(l.rect.x) && (l.rect.x = 0), isNaN(l.rect.y) && (l.rect.y = 0), u != null && u.length > 0) {
|
|
2362
|
-
var R;
|
|
2363
|
-
R = D.getGraphManager().add(D.newGraph(), l), this.processChildrenList(R, u, D);
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
}, c.prototype.stop = function() {
|
|
2367
|
-
return this.stopped = !0, this;
|
|
2368
|
-
};
|
|
2369
|
-
var m = function(v) {
|
|
2370
|
-
v("layout", "cose-bilkent", c);
|
|
2371
|
-
};
|
|
2372
|
-
typeof cytoscape < "u" && m(cytoscape), T.exports = m;
|
|
2373
|
-
}
|
|
2374
|
-
/******/
|
|
2375
|
-
])
|
|
2376
|
-
);
|
|
2377
|
-
});
|
|
2378
|
-
}(it)), it.exports;
|
|
2379
|
-
}
|
|
2380
|
-
var xt = Ct();
|
|
2381
|
-
const St = /* @__PURE__ */ Lt(xt);
|
|
2382
|
-
var ot = function() {
|
|
2383
|
-
var O = /* @__PURE__ */ G(function(D, g, L, n) {
|
|
2384
|
-
for (L = L || {}, n = D.length; n--; L[D[n]] = g) ;
|
|
2385
|
-
return L;
|
|
2386
|
-
}, "o"), M = [1, 4], p = [1, 13], T = [1, 12], y = [1, 15], i = [1, 16], t = [1, 20], e = [1, 19], r = [6, 7, 8], a = [1, 26], h = [1, 24], s = [1, 25], f = [6, 7, 11], o = [1, 6, 13, 15, 16, 19, 22], d = [1, 33], c = [1, 34], E = [1, 6, 7, 11, 13, 15, 16, 19, 22], m = {
|
|
2387
|
-
trace: /* @__PURE__ */ G(function() {
|
|
2388
|
-
}, "trace"),
|
|
2389
|
-
yy: {},
|
|
2390
|
-
symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
|
|
2391
|
-
terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
|
|
2392
|
-
productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
|
|
2393
|
-
performAction: /* @__PURE__ */ G(function(D, g, L, n, u, l, _) {
|
|
2394
|
-
var A = l.length - 1;
|
|
2395
|
-
switch (u) {
|
|
2396
|
-
case 6:
|
|
2397
|
-
case 7:
|
|
2398
|
-
return n;
|
|
2399
|
-
case 8:
|
|
2400
|
-
n.getLogger().trace("Stop NL ");
|
|
2401
|
-
break;
|
|
2402
|
-
case 9:
|
|
2403
|
-
n.getLogger().trace("Stop EOF ");
|
|
2404
|
-
break;
|
|
2405
|
-
case 11:
|
|
2406
|
-
n.getLogger().trace("Stop NL2 ");
|
|
2407
|
-
break;
|
|
2408
|
-
case 12:
|
|
2409
|
-
n.getLogger().trace("Stop EOF2 ");
|
|
2410
|
-
break;
|
|
2411
|
-
case 15:
|
|
2412
|
-
n.getLogger().info("Node: ", l[A].id), n.addNode(l[A - 1].length, l[A].id, l[A].descr, l[A].type);
|
|
2413
|
-
break;
|
|
2414
|
-
case 16:
|
|
2415
|
-
n.getLogger().trace("Icon: ", l[A]), n.decorateNode({ icon: l[A] });
|
|
2416
|
-
break;
|
|
2417
|
-
case 17:
|
|
2418
|
-
case 21:
|
|
2419
|
-
n.decorateNode({ class: l[A] });
|
|
2420
|
-
break;
|
|
2421
|
-
case 18:
|
|
2422
|
-
n.getLogger().trace("SPACELIST");
|
|
2423
|
-
break;
|
|
2424
|
-
case 19:
|
|
2425
|
-
n.getLogger().trace("Node: ", l[A].id), n.addNode(0, l[A].id, l[A].descr, l[A].type);
|
|
2426
|
-
break;
|
|
2427
|
-
case 20:
|
|
2428
|
-
n.decorateNode({ icon: l[A] });
|
|
2429
|
-
break;
|
|
2430
|
-
case 25:
|
|
2431
|
-
n.getLogger().trace("node found ..", l[A - 2]), this.$ = { id: l[A - 1], descr: l[A - 1], type: n.getType(l[A - 2], l[A]) };
|
|
2432
|
-
break;
|
|
2433
|
-
case 26:
|
|
2434
|
-
this.$ = { id: l[A], descr: l[A], type: n.nodeType.DEFAULT };
|
|
2435
|
-
break;
|
|
2436
|
-
case 27:
|
|
2437
|
-
n.getLogger().trace("node found ..", l[A - 3]), this.$ = { id: l[A - 3], descr: l[A - 1], type: n.getType(l[A - 2], l[A]) };
|
|
2438
|
-
break;
|
|
2439
|
-
}
|
|
2440
|
-
}, "anonymous"),
|
|
2441
|
-
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: M }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: M }, { 6: p, 7: [1, 10], 9: 9, 12: 11, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, O(r, [2, 3]), { 1: [2, 2] }, O(r, [2, 4]), O(r, [2, 5]), { 1: [2, 6], 6: p, 12: 21, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, { 6: p, 9: 22, 12: 11, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, { 6: a, 7: h, 10: 23, 11: s }, O(f, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: t, 22: e }), O(f, [2, 18]), O(f, [2, 19]), O(f, [2, 20]), O(f, [2, 21]), O(f, [2, 23]), O(f, [2, 24]), O(f, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: a, 7: h, 10: 32, 11: s }, { 1: [2, 7], 6: p, 12: 21, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, O(o, [2, 14], { 7: d, 11: c }), O(E, [2, 8]), O(E, [2, 9]), O(E, [2, 10]), O(f, [2, 15]), O(f, [2, 16]), O(f, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, O(o, [2, 13], { 7: d, 11: c }), O(E, [2, 11]), O(E, [2, 12]), { 21: [1, 37] }, O(f, [2, 25]), O(f, [2, 27])],
|
|
2442
|
-
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
|
2443
|
-
parseError: /* @__PURE__ */ G(function(D, g) {
|
|
2444
|
-
if (g.recoverable)
|
|
2445
|
-
this.trace(D);
|
|
2446
|
-
else {
|
|
2447
|
-
var L = new Error(D);
|
|
2448
|
-
throw L.hash = g, L;
|
|
2449
|
-
}
|
|
2450
|
-
}, "parseError"),
|
|
2451
|
-
parse: /* @__PURE__ */ G(function(D) {
|
|
2452
|
-
var g = this, L = [0], n = [], u = [null], l = [], _ = this.table, A = "", I = 0, w = 0, R = 2, S = 1, U = l.slice.call(arguments, 1), b = Object.create(this.lexer), C = { yy: {} };
|
|
2453
|
-
for (var x in this.yy)
|
|
2454
|
-
Object.prototype.hasOwnProperty.call(this.yy, x) && (C.yy[x] = this.yy[x]);
|
|
2455
|
-
b.setInput(D, C.yy), C.yy.lexer = b, C.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
|
2456
|
-
var F = b.yylloc;
|
|
2457
|
-
l.push(F);
|
|
2458
|
-
var k = b.options && b.options.ranges;
|
|
2459
|
-
typeof C.yy.parseError == "function" ? this.parseError = C.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
2460
|
-
function Y(W) {
|
|
2461
|
-
L.length = L.length - 2 * W, u.length = u.length - W, l.length = l.length - W;
|
|
2462
|
-
}
|
|
2463
|
-
G(Y, "popStack");
|
|
2464
|
-
function X() {
|
|
2465
|
-
var W;
|
|
2466
|
-
return W = n.pop() || b.lex() || S, typeof W != "number" && (W instanceof Array && (n = W, W = n.pop()), W = g.symbols_[W] || W), W;
|
|
2467
|
-
}
|
|
2468
|
-
G(X, "lex");
|
|
2469
|
-
for (var P, B, $, H, V = {}, z, j, ht, Z; ; ) {
|
|
2470
|
-
if (B = L[L.length - 1], this.defaultActions[B] ? $ = this.defaultActions[B] : ((P === null || typeof P > "u") && (P = X()), $ = _[B] && _[B][P]), typeof $ > "u" || !$.length || !$[0]) {
|
|
2471
|
-
var J = "";
|
|
2472
|
-
Z = [];
|
|
2473
|
-
for (z in _[B])
|
|
2474
|
-
this.terminals_[z] && z > R && Z.push("'" + this.terminals_[z] + "'");
|
|
2475
|
-
b.showPosition ? J = "Parse error on line " + (I + 1) + `:
|
|
2476
|
-
` + b.showPosition() + `
|
|
2477
|
-
Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : J = "Parse error on line " + (I + 1) + ": Unexpected " + (P == S ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(J, {
|
|
2478
|
-
text: b.match,
|
|
2479
|
-
token: this.terminals_[P] || P,
|
|
2480
|
-
line: b.yylineno,
|
|
2481
|
-
loc: F,
|
|
2482
|
-
expected: Z
|
|
2483
|
-
});
|
|
2484
|
-
}
|
|
2485
|
-
if ($[0] instanceof Array && $.length > 1)
|
|
2486
|
-
throw new Error("Parse Error: multiple actions possible at state: " + B + ", token: " + P);
|
|
2487
|
-
switch ($[0]) {
|
|
2488
|
-
case 1:
|
|
2489
|
-
L.push(P), u.push(b.yytext), l.push(b.yylloc), L.push($[1]), P = null, w = b.yyleng, A = b.yytext, I = b.yylineno, F = b.yylloc;
|
|
2490
|
-
break;
|
|
2491
|
-
case 2:
|
|
2492
|
-
if (j = this.productions_[$[1]][1], V.$ = u[u.length - j], V._$ = {
|
|
2493
|
-
first_line: l[l.length - (j || 1)].first_line,
|
|
2494
|
-
last_line: l[l.length - 1].last_line,
|
|
2495
|
-
first_column: l[l.length - (j || 1)].first_column,
|
|
2496
|
-
last_column: l[l.length - 1].last_column
|
|
2497
|
-
}, k && (V._$.range = [
|
|
2498
|
-
l[l.length - (j || 1)].range[0],
|
|
2499
|
-
l[l.length - 1].range[1]
|
|
2500
|
-
]), H = this.performAction.apply(V, [
|
|
2501
|
-
A,
|
|
2502
|
-
w,
|
|
2503
|
-
I,
|
|
2504
|
-
C.yy,
|
|
2505
|
-
$[1],
|
|
2506
|
-
u,
|
|
2507
|
-
l
|
|
2508
|
-
].concat(U)), typeof H < "u")
|
|
2509
|
-
return H;
|
|
2510
|
-
j && (L = L.slice(0, -1 * j * 2), u = u.slice(0, -1 * j), l = l.slice(0, -1 * j)), L.push(this.productions_[$[1]][0]), u.push(V.$), l.push(V._$), ht = _[L[L.length - 2]][L[L.length - 1]], L.push(ht);
|
|
2511
|
-
break;
|
|
2512
|
-
case 3:
|
|
2513
|
-
return !0;
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
return !0;
|
|
2517
|
-
}, "parse")
|
|
2518
|
-
}, v = /* @__PURE__ */ function() {
|
|
2519
|
-
var D = {
|
|
2520
|
-
EOF: 1,
|
|
2521
|
-
parseError: /* @__PURE__ */ G(function(g, L) {
|
|
2522
|
-
if (this.yy.parser)
|
|
2523
|
-
this.yy.parser.parseError(g, L);
|
|
2524
|
-
else
|
|
2525
|
-
throw new Error(g);
|
|
2526
|
-
}, "parseError"),
|
|
2527
|
-
// resets the lexer, sets new input
|
|
2528
|
-
setInput: /* @__PURE__ */ G(function(g, L) {
|
|
2529
|
-
return this.yy = L || this.yy || {}, this._input = g, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
2530
|
-
first_line: 1,
|
|
2531
|
-
first_column: 0,
|
|
2532
|
-
last_line: 1,
|
|
2533
|
-
last_column: 0
|
|
2534
|
-
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
2535
|
-
}, "setInput"),
|
|
2536
|
-
// consumes and returns one char from the input
|
|
2537
|
-
input: /* @__PURE__ */ G(function() {
|
|
2538
|
-
var g = this._input[0];
|
|
2539
|
-
this.yytext += g, this.yyleng++, this.offset++, this.match += g, this.matched += g;
|
|
2540
|
-
var L = g.match(/(?:\r\n?|\n).*/g);
|
|
2541
|
-
return L ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), g;
|
|
2542
|
-
}, "input"),
|
|
2543
|
-
// unshifts one char (or a string) into the input
|
|
2544
|
-
unput: /* @__PURE__ */ G(function(g) {
|
|
2545
|
-
var L = g.length, n = g.split(/(?:\r\n?|\n)/g);
|
|
2546
|
-
this._input = g + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - L), this.offset -= L;
|
|
2547
|
-
var u = this.match.split(/(?:\r\n?|\n)/g);
|
|
2548
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
|
2549
|
-
var l = this.yylloc.range;
|
|
2550
|
-
return this.yylloc = {
|
|
2551
|
-
first_line: this.yylloc.first_line,
|
|
2552
|
-
last_line: this.yylineno + 1,
|
|
2553
|
-
first_column: this.yylloc.first_column,
|
|
2554
|
-
last_column: n ? (n.length === u.length ? this.yylloc.first_column : 0) + u[u.length - n.length].length - n[0].length : this.yylloc.first_column - L
|
|
2555
|
-
}, this.options.ranges && (this.yylloc.range = [l[0], l[0] + this.yyleng - L]), this.yyleng = this.yytext.length, this;
|
|
2556
|
-
}, "unput"),
|
|
2557
|
-
// When called from action, caches matched text and appends it on next action
|
|
2558
|
-
more: /* @__PURE__ */ G(function() {
|
|
2559
|
-
return this._more = !0, this;
|
|
2560
|
-
}, "more"),
|
|
2561
|
-
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
2562
|
-
reject: /* @__PURE__ */ G(function() {
|
|
2563
|
-
if (this.options.backtrack_lexer)
|
|
2564
|
-
this._backtrack = !0;
|
|
2565
|
-
else
|
|
2566
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
2567
|
-
` + this.showPosition(), {
|
|
2568
|
-
text: "",
|
|
2569
|
-
token: null,
|
|
2570
|
-
line: this.yylineno
|
|
2571
|
-
});
|
|
2572
|
-
return this;
|
|
2573
|
-
}, "reject"),
|
|
2574
|
-
// retain first n characters of the match
|
|
2575
|
-
less: /* @__PURE__ */ G(function(g) {
|
|
2576
|
-
this.unput(this.match.slice(g));
|
|
2577
|
-
}, "less"),
|
|
2578
|
-
// displays already matched input, i.e. for error messages
|
|
2579
|
-
pastInput: /* @__PURE__ */ G(function() {
|
|
2580
|
-
var g = this.matched.substr(0, this.matched.length - this.match.length);
|
|
2581
|
-
return (g.length > 20 ? "..." : "") + g.substr(-20).replace(/\n/g, "");
|
|
2582
|
-
}, "pastInput"),
|
|
2583
|
-
// displays upcoming input, i.e. for error messages
|
|
2584
|
-
upcomingInput: /* @__PURE__ */ G(function() {
|
|
2585
|
-
var g = this.match;
|
|
2586
|
-
return g.length < 20 && (g += this._input.substr(0, 20 - g.length)), (g.substr(0, 20) + (g.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
2587
|
-
}, "upcomingInput"),
|
|
2588
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
2589
|
-
showPosition: /* @__PURE__ */ G(function() {
|
|
2590
|
-
var g = this.pastInput(), L = new Array(g.length + 1).join("-");
|
|
2591
|
-
return g + this.upcomingInput() + `
|
|
2592
|
-
` + L + "^";
|
|
2593
|
-
}, "showPosition"),
|
|
2594
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
2595
|
-
test_match: /* @__PURE__ */ G(function(g, L) {
|
|
2596
|
-
var n, u, l;
|
|
2597
|
-
if (this.options.backtrack_lexer && (l = {
|
|
2598
|
-
yylineno: this.yylineno,
|
|
2599
|
-
yylloc: {
|
|
2600
|
-
first_line: this.yylloc.first_line,
|
|
2601
|
-
last_line: this.last_line,
|
|
2602
|
-
first_column: this.yylloc.first_column,
|
|
2603
|
-
last_column: this.yylloc.last_column
|
|
2604
|
-
},
|
|
2605
|
-
yytext: this.yytext,
|
|
2606
|
-
match: this.match,
|
|
2607
|
-
matches: this.matches,
|
|
2608
|
-
matched: this.matched,
|
|
2609
|
-
yyleng: this.yyleng,
|
|
2610
|
-
offset: this.offset,
|
|
2611
|
-
_more: this._more,
|
|
2612
|
-
_input: this._input,
|
|
2613
|
-
yy: this.yy,
|
|
2614
|
-
conditionStack: this.conditionStack.slice(0),
|
|
2615
|
-
done: this.done
|
|
2616
|
-
}, this.options.ranges && (l.yylloc.range = this.yylloc.range.slice(0))), u = g[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
|
|
2617
|
-
first_line: this.yylloc.last_line,
|
|
2618
|
-
last_line: this.yylineno + 1,
|
|
2619
|
-
first_column: this.yylloc.last_column,
|
|
2620
|
-
last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + g[0].length
|
|
2621
|
-
}, this.yytext += g[0], this.match += g[0], this.matches = g, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(g[0].length), this.matched += g[0], n = this.performAction.call(this, this.yy, this, L, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
|
|
2622
|
-
return n;
|
|
2623
|
-
if (this._backtrack) {
|
|
2624
|
-
for (var _ in l)
|
|
2625
|
-
this[_] = l[_];
|
|
2626
|
-
return !1;
|
|
2627
|
-
}
|
|
2628
|
-
return !1;
|
|
2629
|
-
}, "test_match"),
|
|
2630
|
-
// return next match in input
|
|
2631
|
-
next: /* @__PURE__ */ G(function() {
|
|
2632
|
-
if (this.done)
|
|
2633
|
-
return this.EOF;
|
|
2634
|
-
this._input || (this.done = !0);
|
|
2635
|
-
var g, L, n, u;
|
|
2636
|
-
this._more || (this.yytext = "", this.match = "");
|
|
2637
|
-
for (var l = this._currentRules(), _ = 0; _ < l.length; _++)
|
|
2638
|
-
if (n = this._input.match(this.rules[l[_]]), n && (!L || n[0].length > L[0].length)) {
|
|
2639
|
-
if (L = n, u = _, this.options.backtrack_lexer) {
|
|
2640
|
-
if (g = this.test_match(n, l[_]), g !== !1)
|
|
2641
|
-
return g;
|
|
2642
|
-
if (this._backtrack) {
|
|
2643
|
-
L = !1;
|
|
2644
|
-
continue;
|
|
2645
|
-
} else
|
|
2646
|
-
return !1;
|
|
2647
|
-
} else if (!this.options.flex)
|
|
2648
|
-
break;
|
|
2649
|
-
}
|
|
2650
|
-
return L ? (g = this.test_match(L, l[u]), g !== !1 ? g : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
2651
|
-
` + this.showPosition(), {
|
|
2652
|
-
text: "",
|
|
2653
|
-
token: null,
|
|
2654
|
-
line: this.yylineno
|
|
2655
|
-
});
|
|
2656
|
-
}, "next"),
|
|
2657
|
-
// return next match that has a token
|
|
2658
|
-
lex: /* @__PURE__ */ G(function() {
|
|
2659
|
-
var g = this.next();
|
|
2660
|
-
return g || this.lex();
|
|
2661
|
-
}, "lex"),
|
|
2662
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
2663
|
-
begin: /* @__PURE__ */ G(function(g) {
|
|
2664
|
-
this.conditionStack.push(g);
|
|
2665
|
-
}, "begin"),
|
|
2666
|
-
// pop the previously active lexer condition state off the condition stack
|
|
2667
|
-
popState: /* @__PURE__ */ G(function() {
|
|
2668
|
-
var g = this.conditionStack.length - 1;
|
|
2669
|
-
return g > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
2670
|
-
}, "popState"),
|
|
2671
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
2672
|
-
_currentRules: /* @__PURE__ */ G(function() {
|
|
2673
|
-
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
2674
|
-
}, "_currentRules"),
|
|
2675
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
2676
|
-
topState: /* @__PURE__ */ G(function(g) {
|
|
2677
|
-
return g = this.conditionStack.length - 1 - Math.abs(g || 0), g >= 0 ? this.conditionStack[g] : "INITIAL";
|
|
2678
|
-
}, "topState"),
|
|
2679
|
-
// alias for begin(condition)
|
|
2680
|
-
pushState: /* @__PURE__ */ G(function(g) {
|
|
2681
|
-
this.begin(g);
|
|
2682
|
-
}, "pushState"),
|
|
2683
|
-
// return the number of states currently on the stack
|
|
2684
|
-
stateStackSize: /* @__PURE__ */ G(function() {
|
|
2685
|
-
return this.conditionStack.length;
|
|
2686
|
-
}, "stateStackSize"),
|
|
2687
|
-
options: { "case-insensitive": !0 },
|
|
2688
|
-
performAction: /* @__PURE__ */ G(function(g, L, n, u) {
|
|
2689
|
-
switch (n) {
|
|
2690
|
-
case 0:
|
|
2691
|
-
return g.getLogger().trace("Found comment", L.yytext), 6;
|
|
2692
|
-
case 1:
|
|
2693
|
-
return 8;
|
|
2694
|
-
case 2:
|
|
2695
|
-
this.begin("CLASS");
|
|
2696
|
-
break;
|
|
2697
|
-
case 3:
|
|
2698
|
-
return this.popState(), 16;
|
|
2699
|
-
case 4:
|
|
2700
|
-
this.popState();
|
|
2701
|
-
break;
|
|
2702
|
-
case 5:
|
|
2703
|
-
g.getLogger().trace("Begin icon"), this.begin("ICON");
|
|
2704
|
-
break;
|
|
2705
|
-
case 6:
|
|
2706
|
-
return g.getLogger().trace("SPACELINE"), 6;
|
|
2707
|
-
case 7:
|
|
2708
|
-
return 7;
|
|
2709
|
-
case 8:
|
|
2710
|
-
return 15;
|
|
2711
|
-
case 9:
|
|
2712
|
-
g.getLogger().trace("end icon"), this.popState();
|
|
2713
|
-
break;
|
|
2714
|
-
case 10:
|
|
2715
|
-
return g.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
|
|
2716
|
-
case 11:
|
|
2717
|
-
return g.getLogger().trace("Cloud"), this.begin("NODE"), 19;
|
|
2718
|
-
case 12:
|
|
2719
|
-
return g.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
|
|
2720
|
-
case 13:
|
|
2721
|
-
return g.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
|
|
2722
|
-
case 14:
|
|
2723
|
-
return this.begin("NODE"), 19;
|
|
2724
|
-
case 15:
|
|
2725
|
-
return this.begin("NODE"), 19;
|
|
2726
|
-
case 16:
|
|
2727
|
-
return this.begin("NODE"), 19;
|
|
2728
|
-
case 17:
|
|
2729
|
-
return this.begin("NODE"), 19;
|
|
2730
|
-
case 18:
|
|
2731
|
-
return 13;
|
|
2732
|
-
case 19:
|
|
2733
|
-
return 22;
|
|
2734
|
-
case 20:
|
|
2735
|
-
return 11;
|
|
2736
|
-
case 21:
|
|
2737
|
-
this.begin("NSTR2");
|
|
2738
|
-
break;
|
|
2739
|
-
case 22:
|
|
2740
|
-
return "NODE_DESCR";
|
|
2741
|
-
case 23:
|
|
2742
|
-
this.popState();
|
|
2743
|
-
break;
|
|
2744
|
-
case 24:
|
|
2745
|
-
g.getLogger().trace("Starting NSTR"), this.begin("NSTR");
|
|
2746
|
-
break;
|
|
2747
|
-
case 25:
|
|
2748
|
-
return g.getLogger().trace("description:", L.yytext), "NODE_DESCR";
|
|
2749
|
-
case 26:
|
|
2750
|
-
this.popState();
|
|
2751
|
-
break;
|
|
2752
|
-
case 27:
|
|
2753
|
-
return this.popState(), g.getLogger().trace("node end ))"), "NODE_DEND";
|
|
2754
|
-
case 28:
|
|
2755
|
-
return this.popState(), g.getLogger().trace("node end )"), "NODE_DEND";
|
|
2756
|
-
case 29:
|
|
2757
|
-
return this.popState(), g.getLogger().trace("node end ...", L.yytext), "NODE_DEND";
|
|
2758
|
-
case 30:
|
|
2759
|
-
return this.popState(), g.getLogger().trace("node end (("), "NODE_DEND";
|
|
2760
|
-
case 31:
|
|
2761
|
-
return this.popState(), g.getLogger().trace("node end (-"), "NODE_DEND";
|
|
2762
|
-
case 32:
|
|
2763
|
-
return this.popState(), g.getLogger().trace("node end (-"), "NODE_DEND";
|
|
2764
|
-
case 33:
|
|
2765
|
-
return this.popState(), g.getLogger().trace("node end (("), "NODE_DEND";
|
|
2766
|
-
case 34:
|
|
2767
|
-
return this.popState(), g.getLogger().trace("node end (("), "NODE_DEND";
|
|
2768
|
-
case 35:
|
|
2769
|
-
return g.getLogger().trace("Long description:", L.yytext), 20;
|
|
2770
|
-
case 36:
|
|
2771
|
-
return g.getLogger().trace("Long description:", L.yytext), 20;
|
|
2772
|
-
}
|
|
2773
|
-
}, "anonymous"),
|
|
2774
|
-
rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
|
|
2775
|
-
conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
|
|
2776
|
-
};
|
|
2777
|
-
return D;
|
|
2778
|
-
}();
|
|
2779
|
-
m.lexer = v;
|
|
2780
|
-
function N() {
|
|
2781
|
-
this.yy = {};
|
|
2782
|
-
}
|
|
2783
|
-
return G(N, "Parser"), N.prototype = m, m.Parser = N, new N();
|
|
2784
|
-
}();
|
|
2785
|
-
ot.parser = ot;
|
|
2786
|
-
var bt = ot, Gt = {
|
|
2787
|
-
DEFAULT: 0,
|
|
2788
|
-
NO_BORDER: 0,
|
|
2789
|
-
ROUNDED_RECT: 1,
|
|
2790
|
-
RECT: 2,
|
|
2791
|
-
CIRCLE: 3,
|
|
2792
|
-
CLOUD: 4,
|
|
2793
|
-
BANG: 5,
|
|
2794
|
-
HEXAGON: 6
|
|
2795
|
-
}, tt, Ft = (tt = class {
|
|
2796
|
-
constructor() {
|
|
2797
|
-
this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = Gt, this.clear(), this.getType = this.getType.bind(this), this.getMindmap = this.getMindmap.bind(this), this.getElementById = this.getElementById.bind(this), this.getParent = this.getParent.bind(this), this.getMindmap = this.getMindmap.bind(this), this.addNode = this.addNode.bind(this), this.decorateNode = this.decorateNode.bind(this);
|
|
2798
|
-
}
|
|
2799
|
-
clear() {
|
|
2800
|
-
this.nodes = [], this.count = 0, this.elements = {};
|
|
2801
|
-
}
|
|
2802
|
-
getParent(O) {
|
|
2803
|
-
for (let M = this.nodes.length - 1; M >= 0; M--)
|
|
2804
|
-
if (this.nodes[M].level < O)
|
|
2805
|
-
return this.nodes[M];
|
|
2806
|
-
return null;
|
|
2807
|
-
}
|
|
2808
|
-
getMindmap() {
|
|
2809
|
-
return this.nodes.length > 0 ? this.nodes[0] : null;
|
|
2810
|
-
}
|
|
2811
|
-
addNode(O, M, p, T) {
|
|
2812
|
-
var y, i;
|
|
2813
|
-
q.info("addNode", O, M, p, T);
|
|
2814
|
-
const t = et();
|
|
2815
|
-
let e = ((y = t.mindmap) == null ? void 0 : y.padding) ?? K.mindmap.padding;
|
|
2816
|
-
switch (T) {
|
|
2817
|
-
case this.nodeType.ROUNDED_RECT:
|
|
2818
|
-
case this.nodeType.RECT:
|
|
2819
|
-
case this.nodeType.HEXAGON:
|
|
2820
|
-
e *= 2;
|
|
2821
|
-
break;
|
|
2822
|
-
}
|
|
2823
|
-
const r = {
|
|
2824
|
-
id: this.count++,
|
|
2825
|
-
nodeId: Q(M, t),
|
|
2826
|
-
level: O,
|
|
2827
|
-
descr: Q(p, t),
|
|
2828
|
-
type: T,
|
|
2829
|
-
children: [],
|
|
2830
|
-
width: ((i = t.mindmap) == null ? void 0 : i.maxNodeWidth) ?? K.mindmap.maxNodeWidth,
|
|
2831
|
-
padding: e
|
|
2832
|
-
}, a = this.getParent(O);
|
|
2833
|
-
if (a)
|
|
2834
|
-
a.children.push(r), this.nodes.push(r);
|
|
2835
|
-
else if (this.nodes.length === 0)
|
|
2836
|
-
this.nodes.push(r);
|
|
2837
|
-
else
|
|
2838
|
-
throw new Error(
|
|
2839
|
-
`There can be only one root. No parent could be found for ("${r.descr}")`
|
|
2840
|
-
);
|
|
2841
|
-
}
|
|
2842
|
-
getType(O, M) {
|
|
2843
|
-
switch (q.debug("In get type", O, M), O) {
|
|
2844
|
-
case "[":
|
|
2845
|
-
return this.nodeType.RECT;
|
|
2846
|
-
case "(":
|
|
2847
|
-
return M === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
|
|
2848
|
-
case "((":
|
|
2849
|
-
return this.nodeType.CIRCLE;
|
|
2850
|
-
case ")":
|
|
2851
|
-
return this.nodeType.CLOUD;
|
|
2852
|
-
case "))":
|
|
2853
|
-
return this.nodeType.BANG;
|
|
2854
|
-
case "{{":
|
|
2855
|
-
return this.nodeType.HEXAGON;
|
|
2856
|
-
default:
|
|
2857
|
-
return this.nodeType.DEFAULT;
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
setElementForId(O, M) {
|
|
2861
|
-
this.elements[O] = M;
|
|
2862
|
-
}
|
|
2863
|
-
getElementById(O) {
|
|
2864
|
-
return this.elements[O];
|
|
2865
|
-
}
|
|
2866
|
-
decorateNode(O) {
|
|
2867
|
-
if (!O)
|
|
2868
|
-
return;
|
|
2869
|
-
const M = et(), p = this.nodes[this.nodes.length - 1];
|
|
2870
|
-
O.icon && (p.icon = Q(O.icon, M)), O.class && (p.class = Q(O.class, M));
|
|
2871
|
-
}
|
|
2872
|
-
type2Str(O) {
|
|
2873
|
-
switch (O) {
|
|
2874
|
-
case this.nodeType.DEFAULT:
|
|
2875
|
-
return "no-border";
|
|
2876
|
-
case this.nodeType.RECT:
|
|
2877
|
-
return "rect";
|
|
2878
|
-
case this.nodeType.ROUNDED_RECT:
|
|
2879
|
-
return "rounded-rect";
|
|
2880
|
-
case this.nodeType.CIRCLE:
|
|
2881
|
-
return "circle";
|
|
2882
|
-
case this.nodeType.CLOUD:
|
|
2883
|
-
return "cloud";
|
|
2884
|
-
case this.nodeType.BANG:
|
|
2885
|
-
return "bang";
|
|
2886
|
-
case this.nodeType.HEXAGON:
|
|
2887
|
-
return "hexgon";
|
|
2888
|
-
default:
|
|
2889
|
-
return "no-border";
|
|
2890
|
-
}
|
|
2891
|
-
}
|
|
2892
|
-
getLogger() {
|
|
2893
|
-
return q;
|
|
2894
|
-
}
|
|
2895
|
-
}, G(tt, "MindmapDB"), tt), Pt = 12, Ut = /* @__PURE__ */ G(function(O, M, p, T) {
|
|
2896
|
-
M.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
|
|
2897
|
-
"d",
|
|
2898
|
-
`M0 ${p.height - 5} v${-p.height + 10} q0,-5 5,-5 h${p.width - 10} q5,0 5,5 v${p.height - 5} H0 Z`
|
|
2899
|
-
), M.append("line").attr("class", "node-line-" + T).attr("x1", 0).attr("y1", p.height).attr("x2", p.width).attr("y2", p.height);
|
|
2900
|
-
}, "defaultBkg"), kt = /* @__PURE__ */ G(function(O, M, p) {
|
|
2901
|
-
M.append("rect").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("height", p.height).attr("width", p.width);
|
|
2902
|
-
}, "rectBkg"), Yt = /* @__PURE__ */ G(function(O, M, p) {
|
|
2903
|
-
const T = p.width, y = p.height, i = 0.15 * T, t = 0.25 * T, e = 0.35 * T, r = 0.2 * T;
|
|
2904
|
-
M.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
|
|
2905
|
-
"d",
|
|
2906
|
-
`M0 0 a${i},${i} 0 0,1 ${T * 0.25},${-1 * T * 0.1}
|
|
2907
|
-
a${e},${e} 1 0,1 ${T * 0.4},${-1 * T * 0.1}
|
|
2908
|
-
a${t},${t} 1 0,1 ${T * 0.35},${1 * T * 0.2}
|
|
2909
|
-
|
|
2910
|
-
a${i},${i} 1 0,1 ${T * 0.15},${1 * y * 0.35}
|
|
2911
|
-
a${r},${r} 1 0,1 ${-1 * T * 0.15},${1 * y * 0.65}
|
|
2912
|
-
|
|
2913
|
-
a${t},${i} 1 0,1 ${-1 * T * 0.25},${T * 0.15}
|
|
2914
|
-
a${e},${e} 1 0,1 ${-1 * T * 0.5},0
|
|
2915
|
-
a${i},${i} 1 0,1 ${-1 * T * 0.25},${-1 * T * 0.15}
|
|
2916
|
-
|
|
2917
|
-
a${i},${i} 1 0,1 ${-1 * T * 0.1},${-1 * y * 0.35}
|
|
2918
|
-
a${r},${r} 1 0,1 ${T * 0.1},${-1 * y * 0.65}
|
|
2919
|
-
|
|
2920
|
-
H0 V0 Z`
|
|
2921
|
-
);
|
|
2922
|
-
}, "cloudBkg"), Xt = /* @__PURE__ */ G(function(O, M, p) {
|
|
2923
|
-
const T = p.width, y = p.height, i = 0.15 * T;
|
|
2924
|
-
M.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
|
|
2925
|
-
"d",
|
|
2926
|
-
`M0 0 a${i},${i} 1 0,0 ${T * 0.25},${-1 * y * 0.1}
|
|
2927
|
-
a${i},${i} 1 0,0 ${T * 0.25},0
|
|
2928
|
-
a${i},${i} 1 0,0 ${T * 0.25},0
|
|
2929
|
-
a${i},${i} 1 0,0 ${T * 0.25},${1 * y * 0.1}
|
|
2930
|
-
|
|
2931
|
-
a${i},${i} 1 0,0 ${T * 0.15},${1 * y * 0.33}
|
|
2932
|
-
a${i * 0.8},${i * 0.8} 1 0,0 0,${1 * y * 0.34}
|
|
2933
|
-
a${i},${i} 1 0,0 ${-1 * T * 0.15},${1 * y * 0.33}
|
|
2934
|
-
|
|
2935
|
-
a${i},${i} 1 0,0 ${-1 * T * 0.25},${y * 0.15}
|
|
2936
|
-
a${i},${i} 1 0,0 ${-1 * T * 0.25},0
|
|
2937
|
-
a${i},${i} 1 0,0 ${-1 * T * 0.25},0
|
|
2938
|
-
a${i},${i} 1 0,0 ${-1 * T * 0.25},${-1 * y * 0.15}
|
|
2939
|
-
|
|
2940
|
-
a${i},${i} 1 0,0 ${-1 * T * 0.1},${-1 * y * 0.33}
|
|
2941
|
-
a${i * 0.8},${i * 0.8} 1 0,0 0,${-1 * y * 0.34}
|
|
2942
|
-
a${i},${i} 1 0,0 ${T * 0.1},${-1 * y * 0.33}
|
|
2943
|
-
|
|
2944
|
-
H0 V0 Z`
|
|
2945
|
-
);
|
|
2946
|
-
}, "bangBkg"), Bt = /* @__PURE__ */ G(function(O, M, p) {
|
|
2947
|
-
M.append("circle").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("r", p.width / 2);
|
|
2948
|
-
}, "circleBkg");
|
|
2949
|
-
function dt(O, M, p, T, y) {
|
|
2950
|
-
return O.insert("polygon", ":first-child").attr(
|
|
2951
|
-
"points",
|
|
2952
|
-
T.map(function(i) {
|
|
2953
|
-
return i.x + "," + i.y;
|
|
2954
|
-
}).join(" ")
|
|
2955
|
-
).attr("transform", "translate(" + (y.width - M) / 2 + ", " + p + ")");
|
|
2956
|
-
}
|
|
2957
|
-
G(dt, "insertPolygonShape");
|
|
2958
|
-
var $t = /* @__PURE__ */ G(function(O, M, p) {
|
|
2959
|
-
const T = p.height, y = T / 4, i = p.width - p.padding + 2 * y, t = [
|
|
2960
|
-
{ x: y, y: 0 },
|
|
2961
|
-
{ x: i - y, y: 0 },
|
|
2962
|
-
{ x: i, y: -T / 2 },
|
|
2963
|
-
{ x: i - y, y: -T },
|
|
2964
|
-
{ x: y, y: -T },
|
|
2965
|
-
{ x: 0, y: -T / 2 }
|
|
2966
|
-
];
|
|
2967
|
-
dt(M, i, T, t, p);
|
|
2968
|
-
}, "hexagonBkg"), Ht = /* @__PURE__ */ G(function(O, M, p) {
|
|
2969
|
-
M.append("rect").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("height", p.height).attr("rx", p.padding).attr("ry", p.padding).attr("width", p.width);
|
|
2970
|
-
}, "roundedRectBkg"), Wt = /* @__PURE__ */ G(async function(O, M, p, T, y) {
|
|
2971
|
-
const i = y.htmlLabels, t = T % (Pt - 1), e = M.append("g");
|
|
2972
|
-
p.section = t;
|
|
2973
|
-
let r = "section-" + t;
|
|
2974
|
-
t < 0 && (r += " section-root"), e.attr("class", (p.class ? p.class + " " : "") + "mindmap-node " + r);
|
|
2975
|
-
const a = e.append("g"), h = e.append("g"), s = p.descr.replace(/(<br\/*>)/g, `
|
|
2976
|
-
`);
|
|
2977
|
-
await Tt(
|
|
2978
|
-
h,
|
|
2979
|
-
s,
|
|
2980
|
-
{
|
|
2981
|
-
useHtmlLabels: i,
|
|
2982
|
-
width: p.width,
|
|
2983
|
-
classes: "mindmap-node-label"
|
|
2984
|
-
},
|
|
2985
|
-
y
|
|
2986
|
-
), i || h.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle");
|
|
2987
|
-
const f = h.node().getBBox(), [o] = Dt(y.fontSize);
|
|
2988
|
-
if (p.height = f.height + o * 1.1 * 0.5 + p.padding, p.width = f.width + 2 * p.padding, p.icon)
|
|
2989
|
-
if (p.type === O.nodeType.CIRCLE)
|
|
2990
|
-
p.height += 50, p.width += 50, e.append("foreignObject").attr("height", "50px").attr("width", p.width).attr("style", "text-align: center;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + p.icon), h.attr(
|
|
2991
|
-
"transform",
|
|
2992
|
-
"translate(" + p.width / 2 + ", " + (p.height / 2 - 1.5 * p.padding) + ")"
|
|
2993
|
-
);
|
|
2994
|
-
else {
|
|
2995
|
-
p.width += 50;
|
|
2996
|
-
const d = p.height;
|
|
2997
|
-
p.height = Math.max(d, 60);
|
|
2998
|
-
const c = Math.abs(p.height - d);
|
|
2999
|
-
e.append("foreignObject").attr("width", "60px").attr("height", p.height).attr("style", "text-align: center;margin-top:" + c / 2 + "px;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + p.icon), h.attr(
|
|
3000
|
-
"transform",
|
|
3001
|
-
"translate(" + (25 + p.width / 2) + ", " + (c / 2 + p.padding / 2) + ")"
|
|
3002
|
-
);
|
|
3003
|
-
}
|
|
3004
|
-
else if (i) {
|
|
3005
|
-
const d = (p.width - f.width) / 2, c = (p.height - f.height) / 2;
|
|
3006
|
-
h.attr("transform", "translate(" + d + ", " + c + ")");
|
|
3007
|
-
} else {
|
|
3008
|
-
const d = p.width / 2, c = p.padding / 2;
|
|
3009
|
-
h.attr("transform", "translate(" + d + ", " + c + ")");
|
|
3010
|
-
}
|
|
3011
|
-
switch (p.type) {
|
|
3012
|
-
case O.nodeType.DEFAULT:
|
|
3013
|
-
Ut(O, a, p, t);
|
|
3014
|
-
break;
|
|
3015
|
-
case O.nodeType.ROUNDED_RECT:
|
|
3016
|
-
Ht(O, a, p, t);
|
|
3017
|
-
break;
|
|
3018
|
-
case O.nodeType.RECT:
|
|
3019
|
-
kt(O, a, p, t);
|
|
3020
|
-
break;
|
|
3021
|
-
case O.nodeType.CIRCLE:
|
|
3022
|
-
a.attr("transform", "translate(" + p.width / 2 + ", " + +p.height / 2 + ")"), Bt(O, a, p, t);
|
|
3023
|
-
break;
|
|
3024
|
-
case O.nodeType.CLOUD:
|
|
3025
|
-
Yt(O, a, p, t);
|
|
3026
|
-
break;
|
|
3027
|
-
case O.nodeType.BANG:
|
|
3028
|
-
Xt(O, a, p, t);
|
|
3029
|
-
break;
|
|
3030
|
-
case O.nodeType.HEXAGON:
|
|
3031
|
-
$t(O, a, p, t);
|
|
3032
|
-
break;
|
|
3033
|
-
}
|
|
3034
|
-
return O.setElementForId(p.id, e), p.height;
|
|
3035
|
-
}, "drawNode"), jt = /* @__PURE__ */ G(function(O, M) {
|
|
3036
|
-
const p = O.getElementById(M.id), T = M.x || 0, y = M.y || 0;
|
|
3037
|
-
p.attr("transform", "translate(" + T + "," + y + ")");
|
|
3038
|
-
}, "positionNode");
|
|
3039
|
-
ut.use(St);
|
|
3040
|
-
async function st(O, M, p, T, y) {
|
|
3041
|
-
await Wt(O, M, p, T, y), p.children && await Promise.all(
|
|
3042
|
-
p.children.map(
|
|
3043
|
-
(i, t) => st(O, M, i, T < 0 ? t : T, y)
|
|
3044
|
-
)
|
|
3045
|
-
);
|
|
3046
|
-
}
|
|
3047
|
-
G(st, "drawNodes");
|
|
3048
|
-
function pt(O, M) {
|
|
3049
|
-
M.edges().map((p, T) => {
|
|
3050
|
-
const y = p.data();
|
|
3051
|
-
if (p[0]._private.bodyBounds) {
|
|
3052
|
-
const i = p[0]._private.rscratch;
|
|
3053
|
-
q.trace("Edge: ", T, y), O.insert("path").attr(
|
|
3054
|
-
"d",
|
|
3055
|
-
`M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `
|
|
3056
|
-
).attr("class", "edge section-edge-" + y.section + " edge-depth-" + y.depth);
|
|
3057
|
-
}
|
|
3058
|
-
});
|
|
3059
|
-
}
|
|
3060
|
-
G(pt, "drawEdges");
|
|
3061
|
-
function at(O, M, p, T) {
|
|
3062
|
-
M.add({
|
|
3063
|
-
group: "nodes",
|
|
3064
|
-
data: {
|
|
3065
|
-
id: O.id.toString(),
|
|
3066
|
-
labelText: O.descr,
|
|
3067
|
-
height: O.height,
|
|
3068
|
-
width: O.width,
|
|
3069
|
-
level: T,
|
|
3070
|
-
nodeId: O.id,
|
|
3071
|
-
padding: O.padding,
|
|
3072
|
-
type: O.type
|
|
3073
|
-
},
|
|
3074
|
-
position: {
|
|
3075
|
-
x: O.x,
|
|
3076
|
-
y: O.y
|
|
3077
|
-
}
|
|
3078
|
-
}), O.children && O.children.forEach((y) => {
|
|
3079
|
-
at(y, M, p, T + 1), M.add({
|
|
3080
|
-
group: "edges",
|
|
3081
|
-
data: {
|
|
3082
|
-
id: `${O.id}_${y.id}`,
|
|
3083
|
-
source: O.id,
|
|
3084
|
-
target: y.id,
|
|
3085
|
-
depth: T,
|
|
3086
|
-
section: y.section
|
|
3087
|
-
}
|
|
3088
|
-
});
|
|
3089
|
-
});
|
|
3090
|
-
}
|
|
3091
|
-
G(at, "addNodes");
|
|
3092
|
-
function ft(O, M) {
|
|
3093
|
-
return new Promise((p) => {
|
|
3094
|
-
const T = At("body").append("div").attr("id", "cy").attr("style", "display:none"), y = ut({
|
|
3095
|
-
container: document.getElementById("cy"),
|
|
3096
|
-
// container to render in
|
|
3097
|
-
style: [
|
|
3098
|
-
{
|
|
3099
|
-
selector: "edge",
|
|
3100
|
-
style: {
|
|
3101
|
-
"curve-style": "bezier"
|
|
3102
|
-
}
|
|
3103
|
-
}
|
|
3104
|
-
]
|
|
3105
|
-
});
|
|
3106
|
-
T.remove(), at(O, y, M, 0), y.nodes().forEach(function(i) {
|
|
3107
|
-
i.layoutDimensions = () => {
|
|
3108
|
-
const t = i.data();
|
|
3109
|
-
return { w: t.width, h: t.height };
|
|
3110
|
-
};
|
|
3111
|
-
}), y.layout({
|
|
3112
|
-
name: "cose-bilkent",
|
|
3113
|
-
// @ts-ignore Types for cose-bilkent are not correct?
|
|
3114
|
-
quality: "proof",
|
|
3115
|
-
styleEnabled: !1,
|
|
3116
|
-
animate: !1
|
|
3117
|
-
}).run(), y.ready((i) => {
|
|
3118
|
-
q.info("Ready", i), p(y);
|
|
3119
|
-
});
|
|
3120
|
-
});
|
|
3121
|
-
}
|
|
3122
|
-
G(ft, "layoutMindmap");
|
|
3123
|
-
function yt(O, M) {
|
|
3124
|
-
M.nodes().map((p, T) => {
|
|
3125
|
-
const y = p.data();
|
|
3126
|
-
y.x = p.position().x, y.y = p.position().y, jt(O, y);
|
|
3127
|
-
const i = O.getElementById(y.nodeId);
|
|
3128
|
-
q.info("id:", T, "Position: (", p.position().x, ", ", p.position().y, ")", y), i.attr(
|
|
3129
|
-
"transform",
|
|
3130
|
-
`translate(${p.position().x - y.width / 2}, ${p.position().y - y.height / 2})`
|
|
3131
|
-
), i.attr("attr", `apa-${T})`);
|
|
3132
|
-
});
|
|
3133
|
-
}
|
|
3134
|
-
G(yt, "positionNodes");
|
|
3135
|
-
var Vt = /* @__PURE__ */ G(async (O, M, p, T) => {
|
|
3136
|
-
var y, i;
|
|
3137
|
-
q.debug(`Rendering mindmap diagram
|
|
3138
|
-
` + O);
|
|
3139
|
-
const t = T.db, e = t.getMindmap();
|
|
3140
|
-
if (!e)
|
|
3141
|
-
return;
|
|
3142
|
-
const r = et();
|
|
3143
|
-
r.htmlLabels = !1;
|
|
3144
|
-
const a = Et(M), h = a.append("g");
|
|
3145
|
-
h.attr("class", "mindmap-edges");
|
|
3146
|
-
const s = a.append("g");
|
|
3147
|
-
s.attr("class", "mindmap-nodes"), await st(t, s, e, -1, r);
|
|
3148
|
-
const f = await ft(e, r);
|
|
3149
|
-
pt(h, f), yt(t, f), vt(
|
|
3150
|
-
void 0,
|
|
3151
|
-
a,
|
|
3152
|
-
((y = r.mindmap) == null ? void 0 : y.padding) ?? K.mindmap.padding,
|
|
3153
|
-
((i = r.mindmap) == null ? void 0 : i.useMaxWidth) ?? K.mindmap.useMaxWidth
|
|
3154
|
-
);
|
|
3155
|
-
}, "draw"), zt = {
|
|
3156
|
-
draw: Vt
|
|
3157
|
-
}, qt = /* @__PURE__ */ G((O) => {
|
|
3158
|
-
let M = "";
|
|
3159
|
-
for (let p = 0; p < O.THEME_COLOR_LIMIT; p++)
|
|
3160
|
-
O["lineColor" + p] = O["lineColor" + p] || O["cScaleInv" + p], _t(O["lineColor" + p]) ? O["lineColor" + p] = mt(O["lineColor" + p], 20) : O["lineColor" + p] = Nt(O["lineColor" + p], 20);
|
|
3161
|
-
for (let p = 0; p < O.THEME_COLOR_LIMIT; p++) {
|
|
3162
|
-
const T = "" + (17 - 3 * p);
|
|
3163
|
-
M += `
|
|
3164
|
-
.section-${p - 1} rect, .section-${p - 1} path, .section-${p - 1} circle, .section-${p - 1} polygon, .section-${p - 1} path {
|
|
3165
|
-
fill: ${O["cScale" + p]};
|
|
3166
|
-
}
|
|
3167
|
-
.section-${p - 1} text {
|
|
3168
|
-
fill: ${O["cScaleLabel" + p]};
|
|
3169
|
-
}
|
|
3170
|
-
.node-icon-${p - 1} {
|
|
3171
|
-
font-size: 40px;
|
|
3172
|
-
color: ${O["cScaleLabel" + p]};
|
|
3173
|
-
}
|
|
3174
|
-
.section-edge-${p - 1}{
|
|
3175
|
-
stroke: ${O["cScale" + p]};
|
|
3176
|
-
}
|
|
3177
|
-
.edge-depth-${p - 1}{
|
|
3178
|
-
stroke-width: ${T};
|
|
3179
|
-
}
|
|
3180
|
-
.section-${p - 1} line {
|
|
3181
|
-
stroke: ${O["cScaleInv" + p]} ;
|
|
3182
|
-
stroke-width: 3;
|
|
3183
|
-
}
|
|
3184
|
-
|
|
3185
|
-
.disabled, .disabled circle, .disabled text {
|
|
3186
|
-
fill: lightgray;
|
|
3187
|
-
}
|
|
3188
|
-
.disabled text {
|
|
3189
|
-
fill: #efefef;
|
|
3190
|
-
}
|
|
3191
|
-
`;
|
|
3192
|
-
}
|
|
3193
|
-
return M;
|
|
3194
|
-
}, "genSections"), Zt = /* @__PURE__ */ G((O) => `
|
|
3195
|
-
.edge {
|
|
3196
|
-
stroke-width: 3;
|
|
3197
|
-
}
|
|
3198
|
-
${qt(O)}
|
|
3199
|
-
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
3200
|
-
fill: ${O.git0};
|
|
3201
|
-
}
|
|
3202
|
-
.section-root text {
|
|
3203
|
-
fill: ${O.gitBranchLabel0};
|
|
3204
|
-
}
|
|
3205
|
-
.icon-container {
|
|
3206
|
-
height:100%;
|
|
3207
|
-
display: flex;
|
|
3208
|
-
justify-content: center;
|
|
3209
|
-
align-items: center;
|
|
3210
|
-
}
|
|
3211
|
-
.edge {
|
|
3212
|
-
fill: none;
|
|
3213
|
-
}
|
|
3214
|
-
.mindmap-node-label {
|
|
3215
|
-
dy: 1em;
|
|
3216
|
-
alignment-baseline: middle;
|
|
3217
|
-
text-anchor: middle;
|
|
3218
|
-
dominant-baseline: middle;
|
|
3219
|
-
text-align: center;
|
|
3220
|
-
}
|
|
3221
|
-
`, "getStyles"), Qt = Zt, te = {
|
|
3222
|
-
get db() {
|
|
3223
|
-
return new Ft();
|
|
3224
|
-
},
|
|
3225
|
-
renderer: zt,
|
|
3226
|
-
parser: bt,
|
|
3227
|
-
styles: Qt
|
|
3228
|
-
};
|
|
3229
|
-
export {
|
|
3230
|
-
te as diagram
|
|
3231
|
-
};
|