text/js/node_modules_dagre-d3-es_sr...

1 строка
3.7 KiB
Plaintext

{"version":3,"file":"node_modules_dagre-d3-es_src_graphlib_json_js-_33010.js?v=a7fb1c95d0dc699032f7","mappings":"2RAKA,SAASA,EAAMC,GACb,IAAIC,EAAO,CACTC,QAAS,CACPC,SAAUH,EAAEI,aACZC,WAAYL,EAAEM,eACdC,SAAUP,EAAEQ,cAEdC,MAAOC,EAAWV,GAClBW,MAAOC,EAAWZ,IAKpB,OAHK,IAAcA,EAAEa,WACnBZ,EAAKa,MAAQ,IAAQd,EAAEa,UAElBZ,CACT,CAEA,SAASS,EAAWV,GAClB,OAAO,IAAMA,EAAES,SAAS,SAAUM,GAChC,IAAIC,EAAYhB,EAAEiB,KAAKF,GACnBG,EAASlB,EAAEkB,OAAOH,GAClBE,EAAO,CAAEF,EAAGA,GAOhB,OANK,IAAcC,KACjBC,EAAKH,MAAQE,GAEV,IAAcE,KACjBD,EAAKC,OAASA,GAETD,CACT,GACF,CAEA,SAASL,EAAWZ,GAClB,OAAO,IAAMA,EAAEW,SAAS,SAAUQ,GAChC,IAAIC,EAAYpB,EAAEqB,KAAKF,GACnBE,EAAO,CAAEN,EAAGI,EAAEJ,EAAGO,EAAGH,EAAEG,GAO1B,OANK,IAAcH,EAAEI,QACnBF,EAAKE,KAAOJ,EAAEI,MAEX,IAAcH,KACjBC,EAAKP,MAAQM,GAERC,CACT,GACF,C,kDCbA,QAJA,SAAeP,GACb,OAAO,OAAUA,EA7BM,EA8BzB,C","sources":["webpack:///text/node_modules/dagre-d3-es/src/graphlib/json.js","webpack:///text/node_modules/lodash-es/clone.js"],"sourcesContent":["import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\nexport { write, read };\n\nfunction write(g) {\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n"],"names":["write","g","json","options","directed","isDirected","multigraph","isMultigraph","compound","isCompound","nodes","writeNodes","edges","writeEdges","graph","value","v","nodeValue","node","parent","e","edgeValue","edge","w","name"],"sourceRoot":""}