package.dist.chunks.mermaid.esm.min.chunk-6XGRHI2A.mjs.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
{
"version": 3,
"sources": ["../../../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/graph.js"],
"sourcesContent": ["import * as _ from 'lodash-es';\n\nvar DEFAULT_EDGE_NAME = '\\x00';\nvar GRAPH_NODE = '\\x00';\nvar EDGE_KEY_DELIM = '\\x01';\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\nexport class Graph {\n constructor(opts = {}) {\n this._isDirected = _.has(opts, 'directed') ? opts.directed : true;\n this._isMultigraph = _.has(opts, 'multigraph') ? opts.multigraph : false;\n this._isCompound = _.has(opts, 'compound') ? opts.compound : false;\n\n // Label for the graph itself\n this._label = undefined;\n\n // Defaults to be set when creating a new node\n this._defaultNodeLabelFn = _.constant(undefined);\n\n // Defaults to be set when creating a new edge\n this._defaultEdgeLabelFn = _.constant(undefined);\n\n // v -> label\n this._nodes = {};\n\n if (this._isCompound) {\n // v -> parent\n this._parent = {};\n\n // v -> children\n this._children = {};\n this._children[GRAPH_NODE] = {};\n }\n\n // v -> edgeObj\n this._in = {};\n\n // u -> v -> Number\n this._preds = {};\n\n // v -> edgeObj\n this._out = {};\n\n // v -> w -> Number\n this._sucs = {};\n\n // e -> edgeObj\n this._edgeObjs = {};\n\n // e -> label\n this._edgeLabels = {};\n }\n /* === Graph functions ========= */\n isDirected() {\n return this._isDirected;\n }\n isMultigraph() {\n return this._isMultigraph;\n }\n isCompound() {\n return this._isCompound;\n }\n setGraph(label) {\n this._label = label;\n return this;\n }\n graph() {\n return this._label;\n }\n /* === Node functions ========== */\n setDefaultNodeLabel(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultNodeLabelFn = newDefault;\n return this;\n }\n nodeCount() {\n return this._nodeCount;\n }\n nodes() {\n return _.keys(this._nodes);\n }\n sources() {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._in[v]);\n });\n }\n sinks() {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._out[v]);\n });\n }\n setNodes(vs, value) {\n var args = arguments;\n var self = this;\n _.each(vs, function (v) {\n if (args.length > 1) {\n self.setNode(v, value);\n } else {\n self.setNode(v);\n }\n });\n return this;\n }\n setNode(v, value) {\n if (_.has(this._nodes, v)) {\n if (arguments.length > 1) {\n this._nodes[v] = value;\n }\n return this;\n }\n\n // @ts-expect-error\n this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);\n if (this._isCompound) {\n this._parent[v] = GRAPH_NODE;\n this._children[v] = {};\n this._children[GRAPH_NODE][v] = true;\n }\n this._in[v] = {};\n this._preds[v] = {};\n this._out[v] = {};\n this._sucs[v] = {};\n ++this._nodeCount;\n return this;\n }\n node(v) {\n return this._nodes[v];\n }\n hasNode(v) {\n return _.has(this._nodes, v);\n }\n removeNode(v) {\n var self = this;\n if (_.has(this._nodes, v)) {\n var removeEdge = function (e) {\n self.removeEdge(self._edgeObjs[e]);\n };\n delete this._nodes[v];\n if (this._isCompound) {\n this._removeFromParentsChildList(v);\n delete this._parent[v];\n _.each(this.children(v), function (child) {\n self.setParent(child);\n });\n delete this._children[v];\n }\n _.each(_.keys(this._in[v]), removeEdge);\n delete this._in[v];\n delete this._preds[v];\n _.each(_.keys(this._out[v]), removeEdge);\n delete this._out[v];\n delete this._sucs[v];\n --this._nodeCount;\n }\n return this;\n }\n setParent(v, parent) {\n if (!this._isCompound) {\n throw new Error('Cannot set parent in a non-compound graph');\n }\n\n if (_.isUndefined(parent)) {\n parent = GRAPH_NODE;\n } else {\n // Coerce parent to string\n parent += '';\n for (var ancestor = parent; !_.isUndefined(ancestor); ancestor = this.parent(ancestor)) {\n if (ancestor === v) {\n throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle');\n }\n }\n\n this.setNode(parent);\n }\n\n this.setNode(v);\n this._removeFromParentsChildList(v);\n this._parent[v] = parent;\n this._children[parent][v] = true;\n return this;\n }\n _removeFromParentsChildList(v) {\n delete this._children[this._parent[v]][v];\n }\n parent(v) {\n if (this._isCompound) {\n var parent = this._parent[v];\n if (parent !== GRAPH_NODE) {\n return parent;\n }\n }\n }\n children(v) {\n if (_.isUndefined(v)) {\n v = GRAPH_NODE;\n }\n\n if (this._isCompound) {\n var children = this._children[v];\n if (children) {\n return _.keys(children);\n }\n } else if (v === GRAPH_NODE) {\n return this.nodes();\n } else if (this.hasNode(v)) {\n return [];\n }\n }\n predecessors(v) {\n var predsV = this._preds[v];\n if (predsV) {\n return _.keys(predsV);\n }\n }\n successors(v) {\n var sucsV = this._sucs[v];\n if (sucsV) {\n return _.keys(sucsV);\n }\n }\n neighbors(v) {\n var preds = this.predecessors(v);\n if (preds) {\n return _.union(preds, this.successors(v));\n }\n }\n isLeaf(v) {\n var neighbors;\n if (this.isDirected()) {\n neighbors = this.successors(v);\n } else {\n neighbors = this.neighbors(v);\n }\n return neighbors.length === 0;\n }\n filterNodes(filter) {\n // @ts-expect-error\n var copy = new this.constructor({\n directed: this._isDirected,\n multigraph: this._isMultigraph,\n compound: this._isCompound,\n });\n\n copy.setGraph(this.graph());\n\n var self = this;\n _.each(this._nodes, function (value, v) {\n if (filter(v)) {\n copy.setNode(v, value);\n }\n });\n\n _.each(this._edgeObjs, function (e) {\n // @ts-expect-error\n if (copy.hasNode(e.v) && copy.hasNode(e.w)) {\n copy.setEdge(e, self.edge(e));\n }\n });\n\n var parents = {};\n function findParent(v) {\n var parent = self.parent(v);\n if (parent === undefined || copy.hasNode(parent)) {\n parents[v] = parent;\n return parent;\n } else if (parent in parents) {\n return parents[parent];\n } else {\n return findParent(parent);\n }\n }\n\n if (this._isCompound) {\n _.each(copy.nodes(), function (v) {\n copy.setParent(v, findParent(v));\n });\n }\n\n return copy;\n }\n /* === Edge functions ========== */\n setDefaultEdgeLabel(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultEdgeLabelFn = newDefault;\n return this;\n }\n edgeCount() {\n return this._edgeCount;\n }\n edges() {\n return _.values(this._edgeObjs);\n }\n setPath(vs, value) {\n var self = this;\n var args = arguments;\n _.reduce(vs, function (v, w) {\n if (args.length > 1) {\n self.setEdge(v, w, value);\n } else {\n self.setEdge(v, w);\n }\n return w;\n });\n return this;\n }\n /*\n * setEdge(v, w, [value, [name]])\n * setEdge({ v, w, [name] }, [value])\n */\n setEdge() {\n var v, w, name, value;\n var valueSpecified = false;\n var arg0 = arguments[0];\n\n if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) {\n v = arg0.v;\n w = arg0.w;\n name = arg0.name;\n if (arguments.length === 2) {\n value = arguments[1];\n valueSpecified = true;\n }\n } else {\n v = arg0;\n w = arguments[1];\n name = arguments[3];\n if (arguments.length > 2) {\n value = arguments[2];\n valueSpecified = true;\n }\n }\n\n v = '' + v;\n w = '' + w;\n if (!_.isUndefined(name)) {\n name = '' + name;\n }\n\n var e = edgeArgsToId(this._isDirected, v, w, name);\n if (_.has(this._edgeLabels, e)) {\n if (valueSpecified) {\n this._edgeLabels[e] = value;\n }\n return this;\n }\n\n if (!_.isUndefined(name) && !this._isMultigraph) {\n throw new Error('Cannot set a named edge when isMultigraph = false');\n }\n\n // It didn't exist, so we need to create it.\n // First ensure the nodes exist.\n this.setNode(v);\n this.setNode(w);\n\n // @ts-expect-error\n this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);\n\n var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);\n // Ensure we add undirected edges in a consistent way.\n v = edgeObj.v;\n w = edgeObj.w;\n\n Object.freeze(edgeObj);\n this._edgeObjs[e] = edgeObj;\n incrementOrInitEntry(this._preds[w], v);\n incrementOrInitEntry(this._sucs[v], w);\n this._in[w][e] = edgeObj;\n this._out[v][e] = edgeObj;\n this._edgeCount++;\n return this;\n }\n edge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n return this._edgeLabels[e];\n }\n hasEdge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n return _.has(this._edgeLabels, e);\n }\n removeEdge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n var edge = this._edgeObjs[e];\n if (edge) {\n v = edge.v;\n w = edge.w;\n delete this._edgeLabels[e];\n delete this._edgeObjs[e];\n decrementOrRemoveEntry(this._preds[w], v);\n decrementOrRemoveEntry(this._sucs[v], w);\n delete this._in[w][e];\n delete this._out[v][e];\n this._edgeCount--;\n }\n return this;\n }\n inEdges(v, u) {\n var inV = this._in[v];\n if (inV) {\n var edges = _.values(inV);\n if (!u) {\n return edges;\n }\n return _.filter(edges, function (edge) {\n return edge.v === u;\n });\n }\n }\n outEdges(v, w) {\n var outV = this._out[v];\n if (outV) {\n var edges = _.values(outV);\n if (!w) {\n return edges;\n }\n return _.filter(edges, function (edge) {\n return edge.w === w;\n });\n }\n }\n nodeEdges(v, w) {\n var inEdges = this.inEdges(v, w);\n if (inEdges) {\n return inEdges.concat(this.outEdges(v, w));\n }\n }\n}\n\n/* Number of nodes in the graph. Should only be changed by the implementation. */\nGraph.prototype._nodeCount = 0;\n\n/* Number of edges in the graph. Should only be changed by the implementation. */\nGraph.prototype._edgeCount = 0;\n\nfunction incrementOrInitEntry(map, k) {\n if (map[k]) {\n map[k]++;\n } else {\n map[k] = 1;\n }\n}\n\nfunction decrementOrRemoveEntry(map, k) {\n if (!--map[k]) {\n delete map[k];\n }\n}\n\nfunction edgeArgsToId(isDirected, v_, w_, name) {\n var v = '' + v_;\n var w = '' + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name);\n}\n\nfunction edgeArgsToObj(isDirected, v_, w_, name) {\n var v = '' + v_;\n var w = '' + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n var edgeObj = { v: v, w: w };\n if (name) {\n edgeObj.name = name;\n }\n return edgeObj;\n}\n\nfunction edgeObjToId(isDirected, edgeObj) {\n return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}\n"],
"mappings": "uNAEA,IAAIA,EAAoB,KACpBC,EAAa,KACbC,EAAiB,IAqBRC,EAAN,KAAY,CAzBnB,MAyBmB,CAAAC,EAAA,cACjB,YAAYC,EAAO,CAAC,EAAG,CACrB,KAAK,YAAgBC,EAAID,EAAM,UAAU,EAAIA,EAAK,SAAW,GAC7D,KAAK,cAAkBC,EAAID,EAAM,YAAY,EAAIA,EAAK,WAAa,GACnE,KAAK,YAAgBC,EAAID,EAAM,UAAU,EAAIA,EAAK,SAAW,GAG7D,KAAK,OAAS,OAGd,KAAK,oBAAwBE,EAAS,MAAS,EAG/C,KAAK,oBAAwBA,EAAS,MAAS,EAG/C,KAAK,OAAS,CAAC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AAI,GAAKoB,EACb,GAAI,CAACF,GAAc1C,EAAIwB,EAAG,CACxB,IAAIqB,EAAM7C,EACVA,EAAIwB,EACJA,EAAIqB,CACN,CACA,IAAIhB,EAAU,CAAE,EAAG7B,EAAG,EAAGwB,CAAE,EAC3B,OAAIC,IACFI,EAAQ,KAAOJ,GAEVI,CACT,CAbSvC,EAAAwC,EAAA,iBAeT,SAASE,EAAYU,EAAYb,EAAS,CACxC,OAAOD,EAAac,EAAYb,EAAQ,EAAGA,EAAQ,EAAGA,EAAQ,IAAI,CACpE,CAFSvC,EAAA0C,EAAA",
"names": ["DEFAULT_EDGE_NAME", "GRAPH_NODE", "EDGE_KEY_DELIM", "Graph", "__name", "opts", "has_default", "constant_default", "label", "newDefault", "isFunction_default", "keys_default", "self", "filter_default", "v", "isEmpty_default", "vs", "value", "args", "forEach_default", "removeEdge", "e", "child", "parent", "isUndefined_default", "ancestor", "children", "predsV", "sucsV", "preds", "union_default", "neighbors", "filter", "copy", "parents", "findParent", "values_default", "reduce_default", "w", "name", "valueSpecified", "arg0", "edgeArgsToId", "edgeObj", "edgeArgsToObj", "incrementOrInitEntry", "edgeObjToId", "edge", "decrementOrRemoveEntry", "u", "inV", "edges", "outV", "inEdges", "map", "k", "isDirected", "v_", "w_", "tmp"]
}