cullmann.io/themes/blowfish/assets/lib/mermaid/flowDiagram-d83bc35d.js.map

1 line
40 KiB
Plaintext
Raw Normal View History

{"version":3,"file":"flowDiagram-d83bc35d.js","sources":["../src/diagrams/flowchart/flowChartShapes.js","../src/diagrams/flowchart/flowRenderer.js","../src/diagrams/flowchart/flowDiagram.ts"],"sourcesContent":["import { intersectPolygon } from 'dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js';\nimport { intersectRect } from 'dagre-d3-es/src/dagre-js/intersect/intersect-rect.js';\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction question(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const s = (w + h) * 0.9;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n const shapeSvg = insertPolygonShape(parent, s, s, points);\n node.intersect = function (point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction hexagon(parent, bbox, node) {\n const f = 4;\n const h = bbox.height;\n const m = h / f;\n const w = bbox.width + 2 * m;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction rect_left_inv_arrow(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction lean_right(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction lean_left(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction trapezoid(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction inv_trapezoid(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction rect_right_inv_arrow(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: w + h /