UNPKG

modify-ui

Version:

MY UI

161 lines (123 loc) 12.4 MB
/* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["mui"] = factory(); else root["mui"] = factory(); })(self, function() { return /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./node_modules/@ant-design/colors/dist/index.esm.js": /*!***********************************************************!*\ !*** ./node_modules/@ant-design/colors/dist/index.esm.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"blue\": function() { return /* binding */ blue; },\n/* harmony export */ \"cyan\": function() { return /* binding */ cyan; },\n/* harmony export */ \"geekblue\": function() { return /* binding */ geekblue; },\n/* harmony export */ \"generate\": function() { return /* binding */ generate; },\n/* harmony export */ \"gold\": function() { return /* binding */ gold; },\n/* harmony export */ \"green\": function() { return /* binding */ green; },\n/* harmony export */ \"grey\": function() { return /* binding */ grey; },\n/* harmony export */ \"lime\": function() { return /* binding */ lime; },\n/* harmony export */ \"magenta\": function() { return /* binding */ magenta; },\n/* harmony export */ \"orange\": function() { return /* binding */ orange; },\n/* harmony export */ \"presetDarkPalettes\": function() { return /* binding */ presetDarkPalettes; },\n/* harmony export */ \"presetPalettes\": function() { return /* binding */ presetPalettes; },\n/* harmony export */ \"presetPrimaryColors\": function() { return /* binding */ presetPrimaryColors; },\n/* harmony export */ \"purple\": function() { return /* binding */ purple; },\n/* harmony export */ \"red\": function() { return /* binding */ red; },\n/* harmony export */ \"volcano\": function() { return /* binding */ volcano; },\n/* harmony export */ \"yellow\": function() { return /* binding */ yellow; }\n/* harmony export */ });\n/* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tinycolor2 */ \"./node_modules/tinycolor2/esm/tinycolor.js\");\n\n\nvar hueStep = 2; // 色相阶梯\n\nvar saturationStep = 0.16; // 饱和度阶梯,浅色部分\n\nvar saturationStep2 = 0.05; // 饱和度阶梯,深色部分\n\nvar brightnessStep1 = 0.05; // 亮度阶梯,浅色部分\n\nvar brightnessStep2 = 0.15; // 亮度阶梯,深色部分\n\nvar lightColorCount = 5; // 浅色数量,主色上\n\nvar darkColorCount = 4; // 深色数量,主色下\n// 暗色主题颜色映射关系表\n\nvar darkColorMap = [{\n index: 7,\n opacity: 0.15\n}, {\n index: 6,\n opacity: 0.25\n}, {\n index: 5,\n opacity: 0.3\n}, {\n index: 5,\n opacity: 0.45\n}, {\n index: 5,\n opacity: 0.65\n}, {\n index: 5,\n opacity: 0.85\n}, {\n index: 4,\n opacity: 0.9\n}, {\n index: 3,\n opacity: 0.95\n}, {\n index: 2,\n opacity: 0.97\n}, {\n index: 1,\n opacity: 0.98\n}];\n\nfunction getHue(hsv, i, light) {\n var hue; // 根据色相不同,色相转向不同\n\n if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {\n hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;\n } else {\n hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;\n }\n\n if (hue < 0) {\n hue += 360;\n } else if (hue >= 360) {\n hue -= 360;\n }\n\n return hue;\n}\n\nfunction getSaturation(hsv, i, light) {\n // grey color don't change saturation\n if (hsv.h === 0 && hsv.s === 0) {\n return hsv.s;\n }\n\n var saturation;\n\n if (light) {\n saturation = hsv.s - saturationStep * i;\n } else if (i === darkColorCount) {\n saturation = hsv.s + saturationStep;\n } else {\n saturation = hsv.s + saturationStep2 * i;\n } // 边界值修正\n\n\n if (saturation > 1) {\n saturation = 1;\n } // 第一格的 s 限制在 0.06-0.1 之间\n\n\n if (light && i === lightColorCount && saturation > 0.1) {\n saturation = 0.1;\n }\n\n if (saturation < 0.06) {\n saturation = 0.06;\n }\n\n return Number(saturation.toFixed(2));\n}\n\nfunction getValue(hsv, i, light) {\n var value;\n\n if (light) {\n value = hsv.v + brightnessStep1 * i;\n } else {\n value = hsv.v - brightnessStep2 * i;\n }\n\n if (value > 1) {\n value = 1;\n }\n\n return Number(value.toFixed(2));\n}\n\nfunction generate(color) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var patterns = [];\n var pColor = (0,tinycolor2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(color);\n\n for (var i = lightColorCount; i > 0; i -= 1) {\n var hsv = pColor.toHsv();\n var colorString = (0,tinycolor2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n h: getHue(hsv, i, true),\n s: getSaturation(hsv, i, true),\n v: getValue(hsv, i, true)\n }).toHexString();\n patterns.push(colorString);\n }\n\n patterns.push(pColor.toHexString());\n\n for (var _i = 1; _i <= darkColorCount; _i += 1) {\n var _hsv = pColor.toHsv();\n\n var _colorString = (0,tinycolor2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n h: getHue(_hsv, _i),\n s: getSaturation(_hsv, _i),\n v: getValue(_hsv, _i)\n }).toHexString();\n\n patterns.push(_colorString);\n } // dark theme patterns\n\n\n if (opts.theme === 'dark') {\n return darkColorMap.map(function (_ref) {\n var index = _ref.index,\n opacity = _ref.opacity;\n var darkColorString = tinycolor2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].mix(opts.backgroundColor || '#141414', patterns[index], opacity * 100).toHexString();\n return darkColorString;\n });\n }\n\n return patterns;\n}\n\nvar presetPrimaryColors = {\n red: '#F5222D',\n volcano: '#FA541C',\n orange: '#FA8C16',\n gold: '#FAAD14',\n yellow: '#FADB14',\n lime: '#A0D911',\n green: '#52C41A',\n cyan: '#13C2C2',\n blue: '#1890FF',\n geekblue: '#2F54EB',\n purple: '#722ED1',\n magenta: '#EB2F96',\n grey: '#666666'\n};\nvar presetPalettes = {};\nvar presetDarkPalettes = {};\nObject.keys(presetPrimaryColors).forEach(function (key) {\n presetPalettes[key] = generate(presetPrimaryColors[key]);\n presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes\n\n presetDarkPalettes[key] = generate(presetPrimaryColors[key], {\n theme: 'dark',\n backgroundColor: '#141414'\n });\n presetDarkPalettes[key].primary = presetDarkPalettes[key][5];\n});\nvar red = presetPalettes.red;\nvar volcano = presetPalettes.volcano;\nvar gold = presetPalettes.gold;\nvar orange = presetPalettes.orange;\nvar yellow = presetPalettes.yellow;\nvar lime = presetPalettes.lime;\nvar green = presetPalettes.green;\nvar cyan = presetPalettes.cyan;\nvar blue = presetPalettes.blue;\nvar geekblue = presetPalettes.geekblue;\nvar purple = presetPalettes.purple;\nvar magenta = presetPalettes.magenta;\nvar grey = presetPalettes.grey;\n\n\n\n\n//# sourceURL=webpack://mui/./node_modules/@ant-design/colors/dist/index.esm.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/adjacent-matrix.js": /*!************************************************************!*\ !*** ./node_modules/@antv/algorithm/es/adjacent-matrix.js ***! \************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar adjMatrix = function adjMatrix(graphData, directed) {\n var nodes = graphData.nodes,\n edges = graphData.edges;\n var matrix = []; // map node with index in data.nodes\n\n var nodeMap = {};\n\n if (!nodes) {\n throw new Error(\"invalid nodes data!\");\n }\n\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n\n if (edges) {\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n if (!sIndex && sIndex !== 0 || !tIndex && tIndex !== 0) return;\n matrix[sIndex][tIndex] = 1;\n\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n }\n\n return matrix;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (adjMatrix);\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/adjacent-matrix.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/bfs.js": /*!************************************************!*\ !*** ./node_modules/@antv/algorithm/es/bfs.js ***! \************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _structs_queue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./structs/queue */ \"./node_modules/@antv/algorithm/es/structs/queue.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ \"./node_modules/@antv/algorithm/es/util.js\");\n\n\n/**\n *\n * @param callbacks\n * allowTraversal: 确定 BFS 是否从顶点沿着边遍历到其邻居,默认情况下,同一个节点只能遍历一次\n * enterNode: 当 BFS 访问某个节点时调用\n * leaveNode: 当 BFS 访问访问结束某个节点时调用\n */\n\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n\n var initiatedCallback = callbacks;\n\n var stubCallback = function stubCallback() {};\n\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n var id = next;\n\n if (!seen[id]) {\n seen[id] = true;\n return true;\n }\n\n return false;\n };\n }();\n\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * 广度优先遍历图\n * @param graph Graph 图实例\n * @param startNode 开始遍历的节点\n * @param originalCallbacks 回调\n */\n\n\nvar breadthFirstSearch = function breadthFirstSearch(graphData, startNodeId, originalCallbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n\n var callbacks = initCallbacks(originalCallbacks);\n var nodeQueue = new _structs_queue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a; // 初始化队列元素\n\n nodeQueue.enqueue(startNodeId);\n var previousNode = '';\n\n var _loop_1 = function _loop_1() {\n var currentNode = nodeQueue.dequeue();\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n }); // 将所有邻居添加到队列中以便遍历\n\n (0,_util__WEBPACK_IMPORTED_MODULE_1__.getNeighbors)(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n nodeQueue.enqueue(nextNode);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n }); // 下一次循环之前存储当前顶点\n\n previousNode = currentNode;\n }; // 遍历队列中的所有顶点\n\n\n while (!nodeQueue.isEmpty()) {\n _loop_1();\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (breadthFirstSearch);\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/bfs.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/connected-component.js": /*!****************************************************************!*\ !*** ./node_modules/@antv/algorithm/es/connected-component.js ***! \****************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getConnectedComponents; },\n/* harmony export */ \"detectConnectedComponents\": function() { return /* binding */ detectConnectedComponents; },\n/* harmony export */ \"detectStrongConnectComponents\": function() { return /* binding */ detectStrongConnectComponents; }\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ \"./node_modules/@antv/algorithm/es/util.js\");\n\n/**\n * Generate all connected components for an undirected graph\n * @param graph\n */\n\nvar detectConnectedComponents = function detectConnectedComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allComponents = [];\n var visited = {};\n var nodeStack = [];\n\n var getComponent = function getComponent(node) {\n nodeStack.push(node);\n visited[node.id] = true;\n var neighbors = (0,_util__WEBPACK_IMPORTED_MODULE_0__.getNeighbors)(node.id, edges);\n\n var _loop_1 = function _loop_1(i) {\n var neighbor = neighbors[i];\n\n if (!visited[neighbor]) {\n var targetNode = nodes.filter(function (node) {\n return node.id === neighbor;\n });\n\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n }\n };\n\n for (var i = 0; i < neighbors.length; ++i) {\n _loop_1(i);\n }\n };\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (!visited[node.id]) {\n // 对于无向图进行dfs遍历,每一次调用后都得到一个连通分量\n getComponent(node);\n var component = [];\n\n while (nodeStack.length > 0) {\n component.push(nodeStack.pop());\n }\n\n allComponents.push(component);\n }\n }\n\n return allComponents;\n};\n/**\n * Tarjan's Algorithm 复杂度 O(|V|+|E|)\n * For directed graph only\n * a directed graph is said to be strongly connected if \"every vertex is reachable from every other vertex\".\n * refer: http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm\n * @param graph\n * @return a list of strongly connected components\n */\n\nvar detectStrongConnectComponents = function detectStrongConnectComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeStack = [];\n var inStack = {}; // 辅助判断是否已经在stack中,减少查找开销\n\n var indices = {};\n var lowLink = {};\n var allComponents = [];\n var index = 0;\n\n var getComponent = function getComponent(node) {\n // Set the depth index for v to the smallest unused index\n indices[node.id] = index;\n lowLink[node.id] = index;\n index += 1;\n nodeStack.push(node);\n inStack[node.id] = true; // 考虑每个邻接点\n\n var neighbors = (0,_util__WEBPACK_IMPORTED_MODULE_0__.getNeighbors)(node.id, edges, 'target').filter(function (n) {\n return nodes.map(function (node) {\n return node.id;\n }).indexOf(n) > -1;\n });\n\n var _loop_2 = function _loop_2(i) {\n var targetNodeID = neighbors[i];\n\n if (!indices[targetNodeID] && indices[targetNodeID] !== 0) {\n var targetNode = nodes.filter(function (node) {\n return node.id === targetNodeID;\n });\n\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n } // tree edge\n\n\n lowLink[node.id] = Math.min(lowLink[node.id], lowLink[targetNodeID]);\n } else if (inStack[targetNodeID]) {\n // back edge, target node is in the current SCC\n lowLink[node.id] = Math.min(lowLink[node.id], indices[targetNodeID]);\n }\n };\n\n for (var i = 0; i < neighbors.length; i++) {\n _loop_2(i);\n } // If node is a root node, generate an SCC\n\n\n if (lowLink[node.id] === indices[node.id]) {\n var component = [];\n\n while (nodeStack.length > 0) {\n var tmpNode = nodeStack.pop();\n inStack[tmpNode.id] = false;\n component.push(tmpNode);\n if (tmpNode === node) break;\n }\n\n if (component.length > 0) {\n allComponents.push(component);\n }\n }\n };\n\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var node = nodes_1[_i];\n\n if (!indices[node.id] && indices[node.id] !== 0) {\n getComponent(node);\n }\n }\n\n return allComponents;\n};\nfunction getConnectedComponents(graphData, directed) {\n if (directed) return detectStrongConnectComponents(graphData);\n return detectConnectedComponents(graphData);\n}\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/connected-component.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/constants/time.js": /*!***********************************************************!*\ !*** ./node_modules/@antv/algorithm/es/constants/time.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"dateReg\": function() { return /* binding */ dateReg; },\n/* harmony export */ \"secondReg\": function() { return /* binding */ secondReg; }\n/* harmony export */ });\nvar secondReg = /^(\\d{1,4})(-|\\/)(\\d{1,2})\\2(\\d{1,2})$/;\nvar dateReg = /^(\\d{1,4})(-|\\/)(\\d{1,2})\\2(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$/;\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/constants/time.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/cosine-similarity.js": /*!**************************************************************!*\ !*** ./node_modules/@antv/algorithm/es/cosine-similarity.js ***! \**************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_vector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/vector */ \"./node_modules/@antv/algorithm/es/utils/vector.js\");\n\n/**\n * cosine-similarity算法 计算余弦相似度\n * @param item 元素\n * @param targetItem 目标元素\n */\n\nvar cosineSimilarity = function cosineSimilarity(item, targetItem) {\n // 目标元素向量\n var targetItemVector = new _utils_vector__WEBPACK_IMPORTED_MODULE_0__[\"default\"](targetItem); // 目标元素向量的模长\n\n var targetNodeNorm2 = targetItemVector.norm2(); // 元素向量\n\n var itemVector = new _utils_vector__WEBPACK_IMPORTED_MODULE_0__[\"default\"](item); // 元素向量的模长\n\n var itemNorm2 = itemVector.norm2(); // 计算元素向量和目标元素向量的点积\n\n var dot = targetItemVector.dot(itemVector);\n var norm2Product = targetNodeNorm2 * itemNorm2; // 计算元素向量和目标元素向量的余弦相似度\n\n var cosineSimilarity = norm2Product ? dot / norm2Product : 0;\n return cosineSimilarity;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cosineSimilarity);\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/cosine-similarity.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/degree.js": /*!***************************************************!*\ !*** ./node_modules/@antv/algorithm/es/degree.js ***! \***************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getInDegree\": function() { return /* binding */ getInDegree; },\n/* harmony export */ \"getOutDegree\": function() { return /* binding */ getOutDegree; }\n/* harmony export */ });\nvar degree = function degree(graphData) {\n var degrees = {};\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n nodes.forEach(function (node) {\n degrees[node.id] = {\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n });\n edges.forEach(function (edge) {\n degrees[edge.source].degree++;\n degrees[edge.source].outDegree++;\n degrees[edge.target].degree++;\n degrees[edge.target].inDegree++;\n });\n return degrees;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (degree);\n/**\n * 获取指定节点的入度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\n\nvar getInDegree = function getInDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].inDegree;\n }\n\n return 0;\n};\n/**\n * 获取指定节点的出度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\n\nvar getOutDegree = function getOutDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].outDegree;\n }\n\n return 0;\n};\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/degree.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/detect-cycle.js": /*!*********************************************************!*\ !*** ./node_modules/@antv/algorithm/es/detect-cycle.js ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"detectAllCycles\": function() { return /* binding */ detectAllCycles; },\n/* harmony export */ \"detectAllDirectedCycle\": function() { return /* binding */ detectAllDirectedCycle; },\n/* harmony export */ \"detectAllUndirectedCycle\": function() { return /* binding */ detectAllUndirectedCycle; }\n/* harmony export */ });\n/* harmony import */ var _dfs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dfs */ \"./node_modules/@antv/algorithm/es/dfs.js\");\n/* harmony import */ var _connected_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./connected-component */ \"./node_modules/@antv/algorithm/es/connected-component.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ \"./node_modules/@antv/algorithm/es/util.js\");\n\n\n\n\nvar detectDirectedCycle = function detectDirectedCycle(graphData) {\n var cycle = null;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n var dfsParentMap = {}; // 所有没有被访问的节点集合\n\n var unvisitedSet = {}; // 正在被访问的节点集合\n\n var visitingSet = {}; // 所有已经被访问过的节点集合\n\n var visitedSet = {}; // 初始化 unvisitedSet\n\n nodes.forEach(function (node) {\n unvisitedSet[node.id] = node;\n });\n var callbacks = {\n enter: function enter(_a) {\n var currentNode = _a.current,\n previousNode = _a.previous;\n\n if (visitingSet[currentNode]) {\n // 如果当前节点正在访问中,则说明检测到环路了\n cycle = {};\n var currentCycleNode = currentNode;\n var previousCycleNode = previousNode;\n\n while (previousCycleNode !== currentNode) {\n cycle[currentCycleNode] = previousCycleNode;\n currentCycleNode = previousCycleNode;\n previousCycleNode = dfsParentMap[previousCycleNode];\n }\n\n cycle[currentCycleNode] = previousCycleNode;\n } else {\n // 如果不存在正在访问集合中,则将其放入正在访问集合,并从未访问集合中删除\n visitingSet[currentNode] = currentNode;\n delete unvisitedSet[currentNode]; // 更新 DSF parents 列表\n\n dfsParentMap[currentNode] = previousNode;\n }\n },\n leave: function leave(_a) {\n var currentNode = _a.current; // 如果所有的节点的子节点都已经访问过了,则从正在访问集合中删除掉,并将其移入到已访问集合中,\n // 同时也意味着当前节点的所有邻居节点都被访问过了\n\n visitedSet[currentNode] = currentNode;\n delete visitingSet[currentNode];\n },\n allowTraversal: function allowTraversal(_a) {\n var nextNode = _a.next; // 如果检测到环路则需要终止所有进一步的遍历,否则会导致无限循环遍历\n\n if (cycle) {\n return false;\n } // 仅允许遍历没有访问的节点,visitedSet 中的都已经访问过了\n\n\n return !visitedSet[nextNode];\n }\n }; // 开始遍历节点\n\n while (Object.keys(unvisitedSet).length) {\n // 从第一个节点开始进行 DFS 遍历\n var firsetUnVisitedKey = Object.keys(unvisitedSet)[0];\n (0,_dfs__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(graphData, firsetUnVisitedKey, callbacks);\n }\n\n return cycle;\n};\n/**\n * 检测无向图中的所有Base cycles\n * refer: https://www.codeproject.com/Articles/1158232/Enumerating-All-Cycles-in-an-Undirected-Graph\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回一组base cycles\n */\n\n\nvar detectAllUndirectedCycle = function detectAllUndirectedCycle(graphData, nodeIds, include) {\n var _a, _b;\n\n if (include === void 0) {\n include = true;\n }\n\n var allCycles = [];\n var components = (0,_connected_component__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(graphData, false); // loop through all connected components\n\n for (var _i = 0, components_1 = components; _i < components_1.length; _i++) {\n var component = components_1[_i];\n if (!component.length) continue;\n var root = component[0];\n var rootId = root.id;\n var stack = [root];\n var parent_1 = (_a = {}, _a[rootId] = root, _a);\n var used = (_b = {}, _b[rootId] = new Set(), _b); // walk a spanning tree to find cycles\n\n while (stack.length > 0) {\n var curNode = stack.pop();\n var curNodeId = curNode.id;\n var neighbors = (0,_util__WEBPACK_IMPORTED_MODULE_2__.getNeighbors)(curNodeId, graphData.edges);\n\n var _loop_1 = function _loop_1(i) {\n var _c;\n\n var neighborId = neighbors[i];\n var neighbor = graphData.nodes.find(function (node) {\n return node.id === neighborId;\n }); // const neighborId = neighbor.get('id');\n\n if (neighborId === curNodeId) {\n // 自环\n allCycles.push((_c = {}, _c[neighborId] = curNode, _c));\n } else if (!(neighborId in used)) {\n // visit a new node\n parent_1[neighborId] = curNode;\n stack.push(neighbor);\n used[neighborId] = new Set([curNode]);\n } else if (!used[curNodeId].has(neighbor)) {\n // a cycle found\n var cycleValid = true;\n var cyclePath = [neighbor, curNode];\n var p = parent_1[curNodeId];\n\n while (used[neighborId].size && !used[neighborId].has(p)) {\n cyclePath.push(p);\n if (p === parent_1[p.id]) break;else p = parent_1[p.id];\n }\n\n cyclePath.push(p);\n\n if (nodeIds && include) {\n // 如果有指定包含的节点\n cycleValid = false;\n\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = true;\n }\n } else if (nodeIds && !include) {\n // 如果有指定不包含的节点\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = false;\n }\n } // 把 node list 形式转换为 cycle 的格式\n\n\n if (cycleValid) {\n var cycle = {};\n\n for (var index = 1; index < cyclePath.length; index += 1) {\n cycle[cyclePath[index - 1].id] = cyclePath[index];\n }\n\n if (cyclePath.length) {\n cycle[cyclePath[cyclePath.length - 1].id] = cyclePath[0];\n }\n\n allCycles.push(cycle);\n }\n\n used[neighborId].add(curNode);\n }\n };\n\n for (var i = 0; i < neighbors.length; i += 1) {\n _loop_1(i);\n }\n }\n }\n\n return allCycles;\n};\n/**\n * Johnson's algorithm, 时间复杂度 O((V + E)(C + 1))$ and space bounded by O(V + E)\n * refer: https://www.cs.tufts.edu/comp/150GA/homeworks/hw1/Johnson%2075.PDF\n * refer: https://networkx.github.io/documentation/stable/_modules/networkx/algorithms/cycles.html#simple_cycles\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回所有的 simple cycles\n */\n\nvar detectAllDirectedCycle = function detectAllDirectedCycle(graphData, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n\n var path = []; // stack of nodes in current path\n\n var blocked = new Set();\n var B = []; // remember portions of the graph that yield no elementary circuit\n\n var allCycles = [];\n var idx2Node = {};\n var node2Idx = {}; // 辅助函数: unblock all blocked nodes\n\n var unblock = function unblock(thisNode) {\n var stack = [thisNode];\n\n while (stack.length > 0) {\n var node = stack.pop();\n\n if (blocked.has(node)) {\n blocked.delete(node);\n B[node.id].forEach(function (n) {\n stack.push(n);\n });\n B[node.id].clear();\n }\n }\n };\n\n var circuit = function circuit(node, start, adjList) {\n var closed = false; // whether a path is closed\n\n if (nodeIds && include === false && nodeIds.indexOf(node.id) > -1) return closed;\n path.push(node);\n blocked.add(node);\n var neighbors = adjList[node.id];\n\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n\n if (neighbor === start) {\n var cycle = {};\n\n for (var index = 1; index < path.length; index += 1) {\n cycle[path[index - 1].id] = path[index];\n }\n\n if (path.length) {\n cycle[path[path.length - 1].id] = path[0];\n }\n\n allCycles.push(cycle);\n closed = true;\n } else if (!blocked.has(neighbor)) {\n if (circuit(neighbor, start, adjList)) {\n closed = true;\n }\n }\n }\n\n if (closed) {\n unblock(node);\n } else {\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n\n if (!B[neighbor.id].has(node)) {\n B[neighbor.id].add(node);\n }\n }\n }\n\n path.pop();\n return closed;\n };\n\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a; // Johnson's algorithm 要求给节点赋顺序,先按节点在数组中的顺序\n\n for (var i = 0; i < nodes.length; i += 1) {\n var node = nodes[i];\n var nodeId = node.id;\n node2Idx[nodeId] = i;\n idx2Node[i] = node;\n } // 如果有指定包含的节点,则把指定节点排序在前,以便提早结束搜索\n\n\n if (nodeIds && include) {\n var _loop_2 = function _loop_2(i) {\n var nodeId = nodeIds[i];\n node2Idx[nodes[i].id] = node2Idx[nodeId];\n node2Idx[nodeId] = 0;\n idx2Node[0] = nodes.find(function (node) {\n return node.id === nodeId;\n });\n idx2Node[node2Idx[nodes[i].id]] = nodes[i];\n };\n\n for (var i = 0; i < nodeIds.length; i++) {\n _loop_2(i);\n }\n } // 返回 节点顺序 >= nodeOrder 的强连通分量的adjList\n\n\n var getMinComponentAdj = function getMinComponentAdj(components) {\n var _a;\n\n var minCompIdx;\n var minIdx = Infinity; // Find least component and the lowest node\n\n for (var i = 0; i < components.length; i += 1) {\n var comp = components[i];\n\n for (var j = 0; j < comp.length; j++) {\n var nodeIdx_1 = node2Idx[comp[j].id];\n\n if (nodeIdx_1 < minIdx) {\n minIdx = nodeIdx_1;\n minCompIdx = i;\n }\n }\n }\n\n var component = components[minCompIdx];\n var adjList = [];\n\n for (var i = 0; i < component.length; i += 1) {\n var node = component[i];\n adjList[node.id] = [];\n\n for (var _i = 0, _b = (0,_util__WEBPACK_IMPORTED_MODULE_2__.getNeighbors)(node.id, graphData.edges, 'target').filter(function (n) {\n return component.map(function (c) {\n return c.id;\n }).indexOf(n) > -1;\n }); _i < _b.length; _i++) {\n var neighbor = _b[_i]; // 对自环情况 (点连向自身) 特殊处理:记录自环,但不加入adjList\n\n if (neighbor === node.id && !(include === false && nodeIds.indexOf(node.id) > -1)) {\n allCycles.push((_a = {}, _a[node.id] = node, _a));\n } else {\n adjList[node.id].push(node2Idx[neighbor]);\n }\n }\n }\n\n return {\n component: component,\n adjList: adjList,\n minIdx: minIdx\n };\n };\n\n var nodeIdx = 0;\n\n while (nodeIdx < nodes.length) {\n var subgraphNodes = nodes.filter(function (n) {\n return node2Idx[n.id] >= nodeIdx;\n });\n var sccs = (0,_connected_component__WEBPACK_IMPORTED_MODULE_1__.detectStrongConnectComponents)({\n nodes: subgraphNodes,\n edges: graphData.edges\n }).filter(function (component) {\n return component.length > 1;\n });\n if (sccs.length === 0) break;\n var scc = getMinComponentAdj(sccs);\n var minIdx = scc.minIdx,\n adjList = scc.adjList,\n component = scc.component;\n\n if (component.length > 1) {\n component.forEach(function (node) {\n B[node.id] = new Set();\n });\n var startNode = idx2Node[minIdx]; // startNode 不在指定要包含的节点中,提前结束搜索\n\n if (nodeIds && include && nodeIds.indexOf(startNode.id) === -1) return allCycles;\n circuit(startNode, startNode, adjList);\n nodeIdx = minIdx + 1;\n } else {\n break;\n }\n }\n\n return allCycles;\n};\n/**\n * 查找图中所有满足要求的圈\n * @param graph\n * @param directed 是否为有向图\n * @param nodeIds 节点 ID 的数组,若不指定,则返回图中所有的圈\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: Node}] 包含所有环的数组,每个环用一个Object表示,其中key为节点id,value为该节点在环中指向的下一个节点\n */\n\nvar detectAllCycles = function detectAllCycles(graphData, directed, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n\n if (directed) return detectAllDirectedCycle(graphData, nodeIds, include);\n return detectAllUndirectedCycle(graphData, nodeIds, include);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (detectDirectedCycle);\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/detect-cycle.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/dfs.js": /*!************************************************!*\ !*** ./node_modules/@antv/algorithm/es/dfs.js ***! \************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ depthFirstSearch; }\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ \"./node_modules/@antv/algorithm/es/util.js\");\n\n\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n\n var initiatedCallback = callbacks;\n\n var stubCallback = function stubCallback() {};\n\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n\n if (!seen[next]) {\n seen[next] = true;\n return true;\n }\n\n return false;\n };\n }();\n\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * @param {Graph} graph\n * @param {GraphNode} currentNode\n * @param {GraphNode} previousNode\n * @param {Callbacks} callbacks\n */\n\n\nfunction depthFirstSearchRecursive(graphData, currentNode, previousNode, callbacks) {\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.getNeighbors)(currentNode, edges, 'target').forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n depthFirstSearchRecursive(graphData, nextNode, currentNode, callbacks);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n}\n/**\n * 深度优先遍历图\n * @param data GraphData 图数据\n * @param startNodeId 开始遍历的节点的 ID\n * @param originalCallbacks 回调\n */\n\n\nfunction depthFirstSearch(graphData, startNodeId, callbacks) {\n depthFirstSearchRecursive(graphData, startNodeId, '', initCallbacks(callbacks));\n}\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/dfs.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/dijkstra.js": /*!*****************************************************!*\ !*** ./node_modules/@antv/algorithm/es/dijkstra.js ***! \*****************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.js\");\n/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ \"./node_modules/@antv/util/esm/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ \"./node_modules/@antv/algorithm/es/util.js\");\n\n\n\n\nvar minVertex = function minVertex(D, nodes, marks) {\n // 找出最小的点\n var minDis = Infinity;\n var minNode;\n\n for (var i = 0; i < nodes.length; i++) {\n var nodeId = nodes[i].id;\n\n if (!marks[nodeId] && D[nodeId] <= minDis) {\n minDis = D[nodeId];\n minNode = nodes[i];\n }\n }\n\n return minNode;\n};\n\nvar dijkstra = function dijkstra(graphData, source, directed, weightPropertyName) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeIds = [];\n var marks = {};\n var D = {};\n var prevs = {}; // key: 顶点, value: 顶点的前驱点数组(可能有多条等长的最短路径)\n\n nodes.forEach(function (node, i) {\n var id = node.id;\n nodeIds.push(id);\n D[id] = Infinity;\n if (id === source) D[id] = 0;\n });\n var nodeNum = nodes.length;\n\n var _loop_1 = function _loop_1(i) {\n // Process the vertices\n var minNode = minVertex(D, nodes, marks);\n var minNodeId = minNode.id;\n marks[minNodeId] = true;\n if (D[minNodeId] === Infinity) return \"continue\"; // Unreachable vertices cannot be the intermediate point\n\n var relatedEdges = [];\n if (directed) relatedEdges = (0,_util__WEBPACK_IMPORTED_MODULE_1__.getOutEdgesNodeId)(minNodeId, edges);else relatedEdges = (0,_util__WEBPACK_IMPORTED_MODULE_1__.getEdgesByNodeId)(minNodeId, edges);\n relatedEdges.forEach(function (edge) {\n var edgeTarget = edge.target;\n var edgeSource = edge.source;\n var w = edgeTarget === minNodeId ? edgeSource : edgeTarget;\n var weight = weightPropertyName && edge[weightPropertyName] ? edge[weightPropertyName] : 1;\n\n if (D[w] > D[minNode.id] + weight) {\n D[w] = D[minNode.id] + weight;\n prevs[w] = [minNode.id];\n } else if (D[w] === D[minNode.id] + weight) {\n prevs[w].push(minNode.id);\n }\n });\n };\n\n for (var i = 0; i < nodeNum; i++) {\n _loop_1(i);\n }\n\n prevs[source] = [source]; // 每个节点存可能存在多条最短路径\n\n var paths = {};\n\n for (var target in D) {\n if (D[target] !== Infinity) {\n findAllPaths(source, target, prevs, paths);\n }\n } // 兼容之前单路径\n\n\n var path = {};\n\n for (var target in paths) {\n path[target] = paths[target][0];\n }\n\n return {\n length: D,\n path: path,\n allPath: paths\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (dijkstra);\n\nfunction findAllPaths(source, target, prevs, foundPaths) {\n if (source === target) {\n return [source];\n }\n\n if (foundPaths[target]) {\n return foundPaths[target];\n }\n\n var paths = [];\n\n for (var _i = 0, _a = prevs[target]; _i < _a.length; _i++) {\n var prev = _a[_i];\n var prevPaths = findAllPaths(source, prev, prevs, foundPaths);\n if (!prevPaths) return;\n\n for (var _b = 0, prevPaths_1 = prevPaths; _b < prevPaths_1.length; _b++) {\n var prePath = prevPaths_1[_b];\n if ((0,_antv_util__WEBPACK_IMPORTED_MODULE_0__.isArray)(prePath)) paths.push((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([], prePath, true), [target], false));else paths.push([prePath, target]);\n }\n }\n\n foundPaths[target] = paths;\n return foundPaths[target];\n}\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/dijkstra.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/find-path.js": /*!******************************************************!*\ !*** ./node_modules/@antv/algorithm/es/find-path.js ***! \******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"findAllPath\": function() { return /* binding */ findAllPath; },\n/* harmony export */ \"findShortestPath\": function() { return /* binding */ findShortestPath; }\n/* harmony export */ });\n/* harmony import */ var _dijkstra__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dijkstra */ \"./node_modules/@antv/algorithm/es/dijkstra.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ \"./node_modules/@antv/algorithm/es/util.js\");\n\n\nvar findShortestPath = function findShortestPath(graphData, start, end, directed, weightPropertyName) {\n var _a = (0,_dijkstra__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(graphData, start, directed, weightPropertyName),\n length = _a.length,\n path = _a.path,\n allPath = _a.allPath;\n\n return {\n length: length[end],\n path: path[end],\n allPath: allPath[end]\n };\n};\nvar findAllPath = function findAllPath(graphData, start, end, directed) {\n var _a;\n\n if (start === end) return [[start]];\n var _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var visited = [start];\n var isVisited = (_a = {}, _a[start] = true, _a);\n var stack = []; // 辅助栈,用于存储访问过的节点的邻居节点\n\n var allPath = [];\n var neighbors = directed ? (0,_util__WEBPACK_IMPORTED_MODULE_1__.getNeighbors)(start, edges, 'target') : (0,_util__WEBPACK_IMPORTED_MODULE_1__.getNeighbors)(start, edges);\n stack.push(neighbors);\n\n while (visited.length > 0 && stack.length > 0) {\n var children = stack[stack.length - 1];\n\n if (children.length) {\n var child = children.shift();\n\n if (child) {\n visited.push(child);\n isVisited[child] = true;\n neighbors = directed ? (0,_util__WEBPACK_IMPORTED_MODULE_1__.getNeighbors)(child, edges, 'target') : (0,_util__WEBPACK_IMPORTED_MODULE_1__.getNeighbors)(child, edges);\n stack.push(neighbors.filter(function (neighbor) {\n return !isVisited[neighbor];\n }));\n }\n } else {\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n continue;\n }\n\n if (visited[visited.length - 1] === end) {\n var path = visited.map(function (node) {\n return node;\n });\n allPath.push(path);\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n }\n }\n\n return allPath;\n};\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/find-path.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/floydWarshall.js": /*!**********************************************************!*\ !*** ./node_modules/@antv/algorithm/es/floydWarshall.js ***! \**********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adjacent_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adjacent-matrix */ \"./node_modules/@antv/algorithm/es/adjacent-matrix.js\");\n\n\nvar floydWarshall = function floydWarshall(graphData, directed) {\n var adjacentMatrix = (0,_adjacent_matrix__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(graphData, directed);\n var dist = [];\n var size = adjacentMatrix.length;\n\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n } else if (adjacentMatrix[i][j] === 0 || !adjacentMatrix[i][j]) {\n dist[i][j] = Infinity;\n } else {\n dist[i][j] = adjacentMatrix[i][j];\n }\n }\n } // floyd\n\n\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n\n return dist;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (floydWarshall);\n\n//# sourceURL=webpack://mui/./node_modules/@antv/algorithm/es/floydWarshall.js?"); /***/ }), /***/ "./node_modules/@antv/algorithm/es/gSpan/gSpan.js": /*!********************************************************!*\ !*** ./node_modules/@antv/algorithm/es/gSpan/gSpan.js ***! \********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ \"./node_modules/@antv/util/esm/index.js\");\n/* harmony import */ var _struct__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./struct */ \"./node_modules/@antv/algorithm/es/gSpan/struct.js\");\n\n\n\nvar DFSedge =\n/** @class */\nfunction () {\n function DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.fromNode = fromNode;\n this.toNode = toNode;\n this.nodeEdgeNodeLabel = {\n nodeLabel1: fromNodeLabel || _struct__WEBPACK_IMPORTED_MODULE_1__.VACANT_NODE_LABEL,\n edgeLabel: edgeLabel || _struct__WEBPACK_IMPORTED_MODULE_1__.VACANT_EDGE_LABEL,\n nodeLabel2: toNodeLabel || _struct__WEBPACK_IMPORTED_MODULE_1__.VACANT_NODE_LABEL\n };\n }\n\n DFSedge.prototype.equalTo = function (other) {\n return this.fromNode === other.formNode && this.toNode === other.toNode && this.nodeEdgeNodeLabel === other.nodeEdgeNodeLabel;\n };\n\n DFSedge.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n\n return DFSedge;\n}(); // DFScode 是 DESedge 的数组\n\n\nvar DFScode =\n/** @class */\nfunction () {\n function DFScode() {\n this.rmpath = [];\n this.dfsEdgeList = [];\n }\n\n DFScode.prototype.equalTo = function (other) {\n var aLength = this.dfsEdgeList.length;\n var bLength = other.length;\n if (aLength !== bLength) return false;\n\n for (var i = 0; i < aLength; i++) {\n if (this.dfsEdgeList[i] !== other[i]) return false;\n }\n\n return true;\n };\n\n DFScode.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n /** 增加一条 edge 到 DFScode */\n\n\n DFScode.prototype.pushBack = function (fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.dfsEdgeList.push(new DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel));\n return this.dfsEdgeList;\n };\n /** 根据 dfs 构建图 */\n\n\n DFScode.prototype.toGraph = function (graphId, directed) {\n if (graphId === void 0) {\n graphId = _struct__WEBPACK_IMPORTED_MODULE_1__.VACANT_GRAPH_ID;\n }\n\n if (directed === void 0) {\n directed = false;\n }\n\n var graph = new _struct__WEBPACK_IMPORTED_MODULE_1__.Graph(graphId, true, directed);\n this.dfsEdgeList.forEach(function (dfsEdge) {\n var fromNodeId = dfsEdge.fromNode;\n var toNodeId = dfsEdge.toNode;\n var _a = dfsEdge.nodeEdgeNodeLabel,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (nodeLabel1 !== _struct__WEBPACK_IMPORTED_MODULE_1__.VACANT_NODE_LABEL) graph.addNode(fromNodeId, nodeLabel1);\n if (nodeLabel2 !== _struct__WEBPACK_IMPORTED_MODULE_1__.VACANT_NODE_LABEL) graph.addNode(toNodeId, nodeLabel2);\n if (nodeLabel1 !== _struct__WEBPACK_IMPORTED_MODULE_1__.VACANT_NODE_LABEL && nodeLabel2 !== nodeLabel1) graph.addEdge(undefined, fromNodeId, toNodeId, edgeLabel);\n });\n return graph;\n }; // 建立 rightmost path\n\n\n DFScode.prototype.buildRmpath = function () {\n this.rmpath = [];\n var oldFrom = undefined;\n var selfLength = this.dfsEdgeList.length;\n\n for (var i = selfLength - 1; i >= 0; i--) {\n var dfsEdge = this.dfsEdgeList[i];\n var fromNodeIdx = dfsEdge.fromNode;\n var toNodeIdx = dfsEdge.toNode;\n\n if (fromNodeIdx < toNodeIdx && (oldFrom === undefined || toN