novelaid-markdown 0.2.0 → 0.4.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/README.md +32 -0
- package/dist/_baseFor-Btt7qhvA.js +394 -0
- package/dist/arc-B1ElyJRe.js +80 -0
- package/dist/architecture-YZFGNWBL-DbwpLiaF.js +3 -0
- package/dist/architectureDiagram-Q4EWVU46-DPdA1a51.js +4057 -0
- package/dist/array-D9V22jUe.js +6 -0
- package/dist/blockDiagram-DXYQGD6D-Bf0IzYoN.js +3035 -0
- package/dist/c4Diagram-AHTNJAMY-BlTBDzAq.js +2961 -0
- package/dist/channel-CoqXOEHz.js +5 -0
- package/dist/chunk-2KRD3SAO-r21hNzXt.js +23 -0
- package/dist/chunk-336JU56O-DcVNMTsS.js +49 -0
- package/dist/chunk-426QAEUC-B4JQ_vPF.js +9 -0
- package/dist/chunk-4BX2VUAB-JBqrV_IE.js +8 -0
- package/dist/chunk-4TB4RGXK-DHS8LN6H.js +3255 -0
- package/dist/chunk-55IACEB6-C9COrGK_.js +8 -0
- package/dist/chunk-5FUZZQ4R-CdCLluck.js +3638 -0
- package/dist/chunk-5PVQY5BW-Dgwc0dUk.js +1299 -0
- package/dist/chunk-67CJDMHE-UQ-a7p3g.js +23 -0
- package/dist/chunk-7N4EOEYR-CPiwpV-A.js +35 -0
- package/dist/chunk-AA7GKIK3-DR_Iqho4.js +30 -0
- package/dist/chunk-BSJP7CBP-BrxQKL1l.js +82 -0
- package/dist/chunk-CIAEETIT-tbco3aB3.js +23 -0
- package/dist/chunk-EDXVE4YY-BHsZxHlc.js +25 -0
- package/dist/chunk-ENJZ2VHE-Dm2kuGCh.js +560 -0
- package/dist/chunk-FMBD7UC4-DwV8Wmed.js +5 -0
- package/dist/chunk-FOC6F5B3-CQtHQje_.js +23 -0
- package/dist/chunk-ICPOFSXX-B9lsZaK9.js +3363 -0
- package/dist/chunk-K5T4RW27-DI9nuGzI.js +16082 -0
- package/dist/chunk-KGLVRYIC-BMNH9LI-.js +23 -0
- package/dist/chunk-LIHQZDEY-Dc-yVZ_W.js +64 -0
- package/dist/chunk-ORNJ4GCN-DqZLt4_8.js +31 -0
- package/dist/chunk-OYMX7WX6-B8KpS9qK.js +2014 -0
- package/dist/chunk-QZHKN3VN-C4dmvHME.js +15 -0
- package/dist/chunk-U2HBQHQK-BME65g2a.js +1896 -0
- package/dist/chunk-X2U36JSP-CesuQ-Sm.js +67 -0
- package/dist/chunk-XPW4576I-Wv7jaLUC.js +1146 -0
- package/dist/chunk-YZCP3GAM-CJIt1xzm.js +60 -0
- package/dist/chunk-ZZ45TVLE-CMBGSmdv.js +32 -0
- package/dist/chunk-ha4E1CQs.js +20 -0
- package/dist/classDiagram-6PBFFD2Q-kvmQgIxu.js +29 -0
- package/dist/classDiagram-v2-HSJHXN6E-DLlYyLVf.js +29 -0
- package/dist/clone-B5XHQkPs.js +8 -0
- package/dist/cose-bilkent-S5V4N54A-xGhciOop.js +2250 -0
- package/dist/cytoscape.esm-BgCYa94Q.js +18103 -0
- package/dist/dagre-KV5264BT-DNe8h1eH.js +293 -0
- package/dist/dagre-SfibWTbo.js +1606 -0
- package/dist/defaultLocale-9iKoEQQi.js +201 -0
- package/dist/diagram-5BDNPKRD-D_R6IIhE.js +101 -0
- package/dist/diagram-G4DWMVQ6-CGlOggN-.js +524 -0
- package/dist/diagram-MMDJMWI5-GlxWkSbK.js +213 -0
- package/dist/diagram-TYMM5635-Empbfz-2.js +133 -0
- package/dist/dist-Dz2K8jVv.js +59 -0
- package/dist/erDiagram-SMLLAGMA-DSnlNLPr.js +1700 -0
- package/dist/{esm-Psdhd_27.js → esm-Binvve4F.js} +285 -303
- package/dist/flatten-BeeUCBYF.js +40 -0
- package/dist/flowDiagram-DWJPFMVM-YAh0NsG9.js +4145 -0
- package/dist/ganttDiagram-T4ZO3ILL-DkmkZTO5.js +3077 -0
- package/dist/gitGraph-7Q5UKJZL-DamMrPFa.js +3 -0
- package/dist/gitGraphDiagram-UUTBAWPF-IjLQtHgn.js +728 -0
- package/dist/graphlib-DSQqP-5Y.js +373 -0
- package/dist/index.css +2 -0
- package/dist/index.js +4086 -38
- package/dist/index.umd.cjs +3325 -23
- package/dist/info-OMHHGYJF-BovemagY.js +3 -0
- package/dist/infoDiagram-42DDH7IO-izJQDQJs.js +19 -0
- package/dist/init-DkX7cl9c.js +15 -0
- package/dist/isEmpty-kLGD071T.js +35 -0
- package/dist/ishikawaDiagram-UXIWVN3A-SJb5qsLR.js +718 -0
- package/dist/journeyDiagram-VCZTEJTY-BDa8bFXG.js +883 -0
- package/dist/kanban-definition-6JOO6SKY-i73I3KFw.js +973 -0
- package/dist/katex-DI2iMRYj.js +22000 -0
- package/dist/line-BD0OIRsH.js +34 -0
- package/dist/linear-DV1pG6aV.js +289 -0
- package/dist/mermaid-parser.core-CZznKIov.js +69 -0
- package/dist/mermaid.core-a1TLqUAY.js +951 -0
- package/dist/mindmap-definition-QFDTVHPH-DPG-HkqU.js +1009 -0
- package/dist/ordinal-Zd5qpGcV.js +65 -0
- package/dist/packet-4T2RLAQJ-BEP9UcAl.js +3 -0
- package/dist/path-BSwIfggT.js +85 -0
- package/dist/pie-ZZUOXDRM-AZqQmg1p.js +3 -0
- package/dist/pieDiagram-DEJITSTG-Cj1YBlb1.js +165 -0
- package/dist/quadrantDiagram-34T5L4WZ-ypBI9wre.js +1974 -0
- package/dist/radar-PYXPWWZC-BpKM_Ghb.js +3 -0
- package/dist/{react-markdown-BXmDW998.js → react-markdown-CwHVAeQi.js} +82 -81
- package/dist/reduce-DQgHi9nw.js +532 -0
- package/dist/{rehype-raw-_yRr8ewB.js → rehype-raw-CbJS4QeP.js} +346 -346
- package/dist/{remark-gfm-Cfc5YeEq.js → remark-gfm-D_QtAzOA.js} +2 -2
- package/dist/requirementDiagram-MS252O5E-CkuWjAxJ.js +2221 -0
- package/dist/rough.esm-Dun2l6dn.js +1352 -0
- package/dist/sankeyDiagram-XADWPNL6-BzIHfJyL.js +920 -0
- package/dist/sequenceDiagram-FGHM5R23-NC0cKvy5.js +4157 -0
- package/dist/src-D7IEzgYM.js +2149 -0
- package/dist/stateDiagram-FHFEXIEX-vd0cNpSx.js +217 -0
- package/dist/stateDiagram-v2-QKLJ7IA2-BXsBMk9U.js +27 -0
- package/dist/timeline-definition-GMOUNBTQ-DeOvCyAs.js +1068 -0
- package/dist/treeView-SZITEDCU-D-ftaYOL.js +3 -0
- package/dist/treemap-W4RFUUIX-B2bp9KIg.js +3 -0
- package/dist/vennDiagram-DHZGUBPP-Hraq3pvR.js +1858 -0
- package/dist/wardley-RL74JXVD-BdjKuxh8.js +3 -0
- package/dist/wardleyDiagram-NUSXRM2D-C06eRanG.js +578 -0
- package/dist/xychartDiagram-5P7HB3ND-BiD79JlS.js +2044 -0
- package/package.json +4 -2
- /package/dist/{blank-line-ClJSvRAu.js → blank-line-DxLGQ569.js} +0 -0
- /package/dist/{lib-DWIu06lZ.js → lib-z8X9LcoZ.js} +0 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { C as e, E as t, S as n, T as r, a as i, b as a, c as o, i as s, n as c, s as l, t as u, w as d, x as f } from "./reduce-DQgHi9nw.js";
|
|
2
|
+
import { C as p, E as m, g as ee, h, l as g, p as te, u as _, v, w as ne } from "./_baseFor-Btt7qhvA.js";
|
|
3
|
+
import { n as y, t as b } from "./isEmpty-kLGD071T.js";
|
|
4
|
+
import { A as re, C as x, D as S, E as ie, M as ae, O as oe, T as se, j as C, k as ce, w, x as T, y as le } from "./chunk-5PVQY5BW-Dgwc0dUk.js";
|
|
5
|
+
//#region node_modules/lodash-es/_baseAssign.js
|
|
6
|
+
function ue(e, t) {
|
|
7
|
+
return e && w(t, f(t), e);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region node_modules/lodash-es/_baseAssignIn.js
|
|
11
|
+
function de(e, t) {
|
|
12
|
+
return e && w(t, x(t), e);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region node_modules/lodash-es/_copySymbols.js
|
|
16
|
+
function fe(e, t) {
|
|
17
|
+
return w(e, n(e), t);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region node_modules/lodash-es/_getSymbolsIn.js
|
|
21
|
+
var E = Object.getOwnPropertySymbols ? function(e) {
|
|
22
|
+
for (var t = []; e;) r(t, n(e)), e = oe(e);
|
|
23
|
+
return t;
|
|
24
|
+
} : e;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region node_modules/lodash-es/_copySymbolsIn.js
|
|
27
|
+
function pe(e, t) {
|
|
28
|
+
return w(e, E(e), t);
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region node_modules/lodash-es/_getAllKeysIn.js
|
|
32
|
+
function me(e) {
|
|
33
|
+
return d(e, x, E);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region node_modules/lodash-es/_initCloneArray.js
|
|
37
|
+
var he = Object.prototype.hasOwnProperty;
|
|
38
|
+
function ge(e) {
|
|
39
|
+
var t = e.length, n = new e.constructor(t);
|
|
40
|
+
return t && typeof e[0] == "string" && he.call(e, "index") && (n.index = e.index, n.input = e.input), n;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region node_modules/lodash-es/_cloneDataView.js
|
|
44
|
+
function _e(e, t) {
|
|
45
|
+
var n = t ? C(e.buffer) : e.buffer;
|
|
46
|
+
return new e.constructor(n, e.byteOffset, e.byteLength);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region node_modules/lodash-es/_cloneRegExp.js
|
|
50
|
+
var D = /\w*$/;
|
|
51
|
+
function O(e) {
|
|
52
|
+
var t = new e.constructor(e.source, D.exec(e));
|
|
53
|
+
return t.lastIndex = e.lastIndex, t;
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region node_modules/lodash-es/_cloneSymbol.js
|
|
57
|
+
var k = m ? m.prototype : void 0, A = k ? k.valueOf : void 0;
|
|
58
|
+
function j(e) {
|
|
59
|
+
return A ? Object(A.call(e)) : {};
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region node_modules/lodash-es/_initCloneByTag.js
|
|
63
|
+
var M = "[object Boolean]", N = "[object Date]", P = "[object Map]", F = "[object Number]", I = "[object RegExp]", ve = "[object Set]", ye = "[object String]", be = "[object Symbol]", xe = "[object ArrayBuffer]", Se = "[object DataView]", Ce = "[object Float32Array]", we = "[object Float64Array]", Te = "[object Int8Array]", Ee = "[object Int16Array]", De = "[object Int32Array]", Oe = "[object Uint8Array]", ke = "[object Uint8ClampedArray]", Ae = "[object Uint16Array]", je = "[object Uint32Array]";
|
|
64
|
+
function Me(e, t, n) {
|
|
65
|
+
var r = e.constructor;
|
|
66
|
+
switch (t) {
|
|
67
|
+
case xe: return C(e);
|
|
68
|
+
case M:
|
|
69
|
+
case N: return new r(+e);
|
|
70
|
+
case Se: return _e(e, n);
|
|
71
|
+
case Ce:
|
|
72
|
+
case we:
|
|
73
|
+
case Te:
|
|
74
|
+
case Ee:
|
|
75
|
+
case De:
|
|
76
|
+
case Oe:
|
|
77
|
+
case ke:
|
|
78
|
+
case Ae:
|
|
79
|
+
case je: return re(e, n);
|
|
80
|
+
case P: return new r();
|
|
81
|
+
case F:
|
|
82
|
+
case ye: return new r(e);
|
|
83
|
+
case I: return O(e);
|
|
84
|
+
case ve: return new r();
|
|
85
|
+
case be: return j(e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region node_modules/lodash-es/_baseIsMap.js
|
|
90
|
+
var Ne = "[object Map]";
|
|
91
|
+
function Pe(e) {
|
|
92
|
+
return h(e) && y(e) == Ne;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region node_modules/lodash-es/isMap.js
|
|
96
|
+
var L = g && g.isMap, Fe = L ? _(L) : Pe, Ie = "[object Set]";
|
|
97
|
+
function Le(e) {
|
|
98
|
+
return h(e) && y(e) == Ie;
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region node_modules/lodash-es/isSet.js
|
|
102
|
+
var R = g && g.isSet, Re = R ? _(R) : Le, ze = 1, Be = 2, Ve = 4, z = "[object Arguments]", He = "[object Array]", Ue = "[object Boolean]", We = "[object Date]", Ge = "[object Error]", B = "[object Function]", Ke = "[object GeneratorFunction]", qe = "[object Map]", Je = "[object Number]", V = "[object Object]", Ye = "[object RegExp]", Xe = "[object Set]", Ze = "[object String]", Qe = "[object Symbol]", $e = "[object WeakMap]", et = "[object ArrayBuffer]", tt = "[object DataView]", nt = "[object Float32Array]", rt = "[object Float64Array]", it = "[object Int8Array]", at = "[object Int16Array]", ot = "[object Int32Array]", st = "[object Uint8Array]", ct = "[object Uint8ClampedArray]", lt = "[object Uint16Array]", ut = "[object Uint32Array]", H = {};
|
|
103
|
+
H[z] = H[He] = H[et] = H[tt] = H[Ue] = H[We] = H[nt] = H[rt] = H[it] = H[at] = H[ot] = H[qe] = H[Je] = H[V] = H[Ye] = H[Xe] = H[Ze] = H[Qe] = H[st] = H[ct] = H[lt] = H[ut] = !0, H[Ge] = H[B] = H[$e] = !1;
|
|
104
|
+
function U(e, t, n, r, i, o) {
|
|
105
|
+
var c, l = t & ze, u = t & Be, d = t & Ve;
|
|
106
|
+
if (n && (c = i ? n(e, r, i, o) : n(e)), c !== void 0) return c;
|
|
107
|
+
if (!ne(e)) return e;
|
|
108
|
+
var p = ee(e);
|
|
109
|
+
if (p) {
|
|
110
|
+
if (c = ge(e), !l) return ce(e, c);
|
|
111
|
+
} else {
|
|
112
|
+
var m = y(e), h = m == B || m == Ke;
|
|
113
|
+
if (te(e)) return ae(e, l);
|
|
114
|
+
if (m == V || m == z || h && !i) {
|
|
115
|
+
if (c = u || h ? {} : S(e), !l) return u ? pe(e, de(c, e)) : fe(e, ue(c, e));
|
|
116
|
+
} else {
|
|
117
|
+
if (!H[m]) return i ? e : {};
|
|
118
|
+
c = Me(e, m, l);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
o ||= new v();
|
|
122
|
+
var g = o.get(e);
|
|
123
|
+
if (g) return g;
|
|
124
|
+
o.set(e, c), Re(e) ? e.forEach(function(r) {
|
|
125
|
+
c.add(U(r, t, n, r, e, o));
|
|
126
|
+
}) : Fe(e) && e.forEach(function(r, i) {
|
|
127
|
+
c.set(i, U(r, t, n, i, e, o));
|
|
128
|
+
});
|
|
129
|
+
var _ = p ? void 0 : (d ? u ? me : a : u ? x : f)(e);
|
|
130
|
+
return s(_ || e, function(r, i) {
|
|
131
|
+
_ && (i = r, r = e[i]), se(c, i, U(r, t, n, i, e, o));
|
|
132
|
+
}), c;
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region node_modules/lodash-es/_baseValues.js
|
|
136
|
+
function W(e, n) {
|
|
137
|
+
return t(n, function(t) {
|
|
138
|
+
return e[t];
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region node_modules/lodash-es/values.js
|
|
143
|
+
function G(e) {
|
|
144
|
+
return e == null ? [] : W(e, f(e));
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region node_modules/lodash-es/isUndefined.js
|
|
148
|
+
function K(e) {
|
|
149
|
+
return e === void 0;
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region node_modules/lodash-es/union.js
|
|
153
|
+
var dt = le(function(e) {
|
|
154
|
+
return i(l(e, 1, ie, !0));
|
|
155
|
+
}), ft = "\0", q = "\0", J = "", Y = class {
|
|
156
|
+
constructor(e = {}) {
|
|
157
|
+
this._isDirected = Object.prototype.hasOwnProperty.call(e, "directed") ? e.directed : !0, this._isMultigraph = Object.prototype.hasOwnProperty.call(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = T(void 0), this._defaultEdgeLabelFn = T(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[q] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
|
|
158
|
+
}
|
|
159
|
+
isDirected() {
|
|
160
|
+
return this._isDirected;
|
|
161
|
+
}
|
|
162
|
+
isMultigraph() {
|
|
163
|
+
return this._isMultigraph;
|
|
164
|
+
}
|
|
165
|
+
isCompound() {
|
|
166
|
+
return this._isCompound;
|
|
167
|
+
}
|
|
168
|
+
setGraph(e) {
|
|
169
|
+
return this._label = e, this;
|
|
170
|
+
}
|
|
171
|
+
graph() {
|
|
172
|
+
return this._label;
|
|
173
|
+
}
|
|
174
|
+
setDefaultNodeLabel(e) {
|
|
175
|
+
return p(e) || (e = T(e)), this._defaultNodeLabelFn = e, this;
|
|
176
|
+
}
|
|
177
|
+
nodeCount() {
|
|
178
|
+
return this._nodeCount;
|
|
179
|
+
}
|
|
180
|
+
nodes() {
|
|
181
|
+
return f(this._nodes);
|
|
182
|
+
}
|
|
183
|
+
sources() {
|
|
184
|
+
var e = this;
|
|
185
|
+
return o(this.nodes(), function(t) {
|
|
186
|
+
return b(e._in[t]);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
sinks() {
|
|
190
|
+
var e = this;
|
|
191
|
+
return o(this.nodes(), function(t) {
|
|
192
|
+
return b(e._out[t]);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
setNodes(e, t) {
|
|
196
|
+
var n = arguments, r = this;
|
|
197
|
+
return c(e, function(e) {
|
|
198
|
+
n.length > 1 ? r.setNode(e, t) : r.setNode(e);
|
|
199
|
+
}), this;
|
|
200
|
+
}
|
|
201
|
+
setNode(e, t) {
|
|
202
|
+
return Object.prototype.hasOwnProperty.call(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = q, this._children[e] = {}, this._children[q][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
|
203
|
+
}
|
|
204
|
+
node(e) {
|
|
205
|
+
return this._nodes[e];
|
|
206
|
+
}
|
|
207
|
+
hasNode(e) {
|
|
208
|
+
return Object.prototype.hasOwnProperty.call(this._nodes, e);
|
|
209
|
+
}
|
|
210
|
+
removeNode(e) {
|
|
211
|
+
if (Object.prototype.hasOwnProperty.call(this._nodes, e)) {
|
|
212
|
+
var t = (e) => this.removeEdge(this._edgeObjs[e]);
|
|
213
|
+
delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], c(this.children(e), (e) => {
|
|
214
|
+
this.setParent(e);
|
|
215
|
+
}), delete this._children[e]), c(f(this._in[e]), t), delete this._in[e], delete this._preds[e], c(f(this._out[e]), t), delete this._out[e], delete this._sucs[e], --this._nodeCount;
|
|
216
|
+
}
|
|
217
|
+
return this;
|
|
218
|
+
}
|
|
219
|
+
setParent(e, t) {
|
|
220
|
+
if (!this._isCompound) throw Error("Cannot set parent in a non-compound graph");
|
|
221
|
+
if (K(t)) t = q;
|
|
222
|
+
else {
|
|
223
|
+
t += "";
|
|
224
|
+
for (var n = t; !K(n); n = this.parent(n)) if (n === e) throw Error("Setting " + t + " as parent of " + e + " would create a cycle");
|
|
225
|
+
this.setNode(t);
|
|
226
|
+
}
|
|
227
|
+
return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = t, this._children[t][e] = !0, this;
|
|
228
|
+
}
|
|
229
|
+
_removeFromParentsChildList(e) {
|
|
230
|
+
delete this._children[this._parent[e]][e];
|
|
231
|
+
}
|
|
232
|
+
parent(e) {
|
|
233
|
+
if (this._isCompound) {
|
|
234
|
+
var t = this._parent[e];
|
|
235
|
+
if (t !== q) return t;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
children(e) {
|
|
239
|
+
if (K(e) && (e = q), this._isCompound) {
|
|
240
|
+
var t = this._children[e];
|
|
241
|
+
if (t) return f(t);
|
|
242
|
+
} else if (e === q) return this.nodes();
|
|
243
|
+
else if (this.hasNode(e)) return [];
|
|
244
|
+
}
|
|
245
|
+
predecessors(e) {
|
|
246
|
+
var t = this._preds[e];
|
|
247
|
+
if (t) return f(t);
|
|
248
|
+
}
|
|
249
|
+
successors(e) {
|
|
250
|
+
var t = this._sucs[e];
|
|
251
|
+
if (t) return f(t);
|
|
252
|
+
}
|
|
253
|
+
neighbors(e) {
|
|
254
|
+
var t = this.predecessors(e);
|
|
255
|
+
if (t) return dt(t, this.successors(e));
|
|
256
|
+
}
|
|
257
|
+
isLeaf(e) {
|
|
258
|
+
return (this.isDirected() ? this.successors(e) : this.neighbors(e)).length === 0;
|
|
259
|
+
}
|
|
260
|
+
filterNodes(e) {
|
|
261
|
+
var t = new this.constructor({
|
|
262
|
+
directed: this._isDirected,
|
|
263
|
+
multigraph: this._isMultigraph,
|
|
264
|
+
compound: this._isCompound
|
|
265
|
+
});
|
|
266
|
+
t.setGraph(this.graph());
|
|
267
|
+
var n = this;
|
|
268
|
+
c(this._nodes, function(n, r) {
|
|
269
|
+
e(r) && t.setNode(r, n);
|
|
270
|
+
}), c(this._edgeObjs, function(e) {
|
|
271
|
+
t.hasNode(e.v) && t.hasNode(e.w) && t.setEdge(e, n.edge(e));
|
|
272
|
+
});
|
|
273
|
+
var r = {};
|
|
274
|
+
function i(e) {
|
|
275
|
+
var a = n.parent(e);
|
|
276
|
+
return a === void 0 || t.hasNode(a) ? (r[e] = a, a) : a in r ? r[a] : i(a);
|
|
277
|
+
}
|
|
278
|
+
return this._isCompound && c(t.nodes(), function(e) {
|
|
279
|
+
t.setParent(e, i(e));
|
|
280
|
+
}), t;
|
|
281
|
+
}
|
|
282
|
+
setDefaultEdgeLabel(e) {
|
|
283
|
+
return p(e) || (e = T(e)), this._defaultEdgeLabelFn = e, this;
|
|
284
|
+
}
|
|
285
|
+
edgeCount() {
|
|
286
|
+
return this._edgeCount;
|
|
287
|
+
}
|
|
288
|
+
edges() {
|
|
289
|
+
return G(this._edgeObjs);
|
|
290
|
+
}
|
|
291
|
+
setPath(e, t) {
|
|
292
|
+
var n = this, r = arguments;
|
|
293
|
+
return u(e, function(e, i) {
|
|
294
|
+
return r.length > 1 ? n.setEdge(e, i, t) : n.setEdge(e, i), i;
|
|
295
|
+
}), this;
|
|
296
|
+
}
|
|
297
|
+
setEdge() {
|
|
298
|
+
var e, t, n, r, i = !1, a = arguments[0];
|
|
299
|
+
typeof a == "object" && a && "v" in a ? (e = a.v, t = a.w, n = a.name, arguments.length === 2 && (r = arguments[1], i = !0)) : (e = a, t = arguments[1], n = arguments[3], arguments.length > 2 && (r = arguments[2], i = !0)), e = "" + e, t = "" + t, K(n) || (n = "" + n);
|
|
300
|
+
var o = Q(this._isDirected, e, t, n);
|
|
301
|
+
if (Object.prototype.hasOwnProperty.call(this._edgeLabels, o)) return i && (this._edgeLabels[o] = r), this;
|
|
302
|
+
if (!K(n) && !this._isMultigraph) throw Error("Cannot set a named edge when isMultigraph = false");
|
|
303
|
+
this.setNode(e), this.setNode(t), this._edgeLabels[o] = i ? r : this._defaultEdgeLabelFn(e, t, n);
|
|
304
|
+
var s = pt(this._isDirected, e, t, n);
|
|
305
|
+
return e = s.v, t = s.w, Object.freeze(s), this._edgeObjs[o] = s, X(this._preds[t], e), X(this._sucs[e], t), this._in[t][o] = s, this._out[e][o] = s, this._edgeCount++, this;
|
|
306
|
+
}
|
|
307
|
+
edge(e, t, n) {
|
|
308
|
+
var r = arguments.length === 1 ? $(this._isDirected, arguments[0]) : Q(this._isDirected, e, t, n);
|
|
309
|
+
return this._edgeLabels[r];
|
|
310
|
+
}
|
|
311
|
+
hasEdge(e, t, n) {
|
|
312
|
+
var r = arguments.length === 1 ? $(this._isDirected, arguments[0]) : Q(this._isDirected, e, t, n);
|
|
313
|
+
return Object.prototype.hasOwnProperty.call(this._edgeLabels, r);
|
|
314
|
+
}
|
|
315
|
+
removeEdge(e, t, n) {
|
|
316
|
+
var r = arguments.length === 1 ? $(this._isDirected, arguments[0]) : Q(this._isDirected, e, t, n), i = this._edgeObjs[r];
|
|
317
|
+
return i && (e = i.v, t = i.w, delete this._edgeLabels[r], delete this._edgeObjs[r], Z(this._preds[t], e), Z(this._sucs[e], t), delete this._in[t][r], delete this._out[e][r], this._edgeCount--), this;
|
|
318
|
+
}
|
|
319
|
+
inEdges(e, t) {
|
|
320
|
+
var n = this._in[e];
|
|
321
|
+
if (n) {
|
|
322
|
+
var r = G(n);
|
|
323
|
+
return t ? o(r, function(e) {
|
|
324
|
+
return e.v === t;
|
|
325
|
+
}) : r;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
outEdges(e, t) {
|
|
329
|
+
var n = this._out[e];
|
|
330
|
+
if (n) {
|
|
331
|
+
var r = G(n);
|
|
332
|
+
return t ? o(r, function(e) {
|
|
333
|
+
return e.w === t;
|
|
334
|
+
}) : r;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
nodeEdges(e, t) {
|
|
338
|
+
var n = this.inEdges(e, t);
|
|
339
|
+
if (n) return n.concat(this.outEdges(e, t));
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
Y.prototype._nodeCount = 0, Y.prototype._edgeCount = 0;
|
|
343
|
+
function X(e, t) {
|
|
344
|
+
e[t] ? e[t]++ : e[t] = 1;
|
|
345
|
+
}
|
|
346
|
+
function Z(e, t) {
|
|
347
|
+
--e[t] || delete e[t];
|
|
348
|
+
}
|
|
349
|
+
function Q(e, t, n, r) {
|
|
350
|
+
var i = "" + t, a = "" + n;
|
|
351
|
+
if (!e && i > a) {
|
|
352
|
+
var o = i;
|
|
353
|
+
i = a, a = o;
|
|
354
|
+
}
|
|
355
|
+
return i + J + a + J + (K(r) ? ft : r);
|
|
356
|
+
}
|
|
357
|
+
function pt(e, t, n, r) {
|
|
358
|
+
var i = "" + t, a = "" + n;
|
|
359
|
+
if (!e && i > a) {
|
|
360
|
+
var o = i;
|
|
361
|
+
i = a, a = o;
|
|
362
|
+
}
|
|
363
|
+
var s = {
|
|
364
|
+
v: i,
|
|
365
|
+
w: a
|
|
366
|
+
};
|
|
367
|
+
return r && (s.name = r), s;
|
|
368
|
+
}
|
|
369
|
+
function $(e, t) {
|
|
370
|
+
return Q(e, t.v, t.w, t.name);
|
|
371
|
+
}
|
|
372
|
+
//#endregion
|
|
373
|
+
export { U as i, K as n, G as r, Y as t };
|
package/dist/index.css
ADDED