"use strict";Liferay.Loader.define("portal-workflow-kaleo-designer-web$dagre@0.8.2/lib/normalize",["module","exports","require","./lodash","./util"],(function(e,d,o){window;var i=o("./lodash"),n=o("./util");e.exports={run:function run(e){e.graph().dummyChains=[],i.forEach(e.edges(),(function(d){!function normalizeEdge(e,d){var o,i,a,t=d.v,h=e.node(t).rank,r=d.w,g=e.node(r).rank,u=d.name,s=e.edge(d),l=s.labelRank;if(g!==h+1){for(e.removeEdge(d),a=0,++h;h<g;++a,++h)s.points=[],i={width:0,height:0,edgeLabel:s,edgeObj:d,rank:h},o=n.addDummyNode(e,"edge",i,"_d"),h===l&&(i.width=s.width,i.height=s.height,i.dummy="edge-label",i.labelpos=s.labelpos),e.setEdge(t,o,{weight:s.weight},u),0===a&&e.graph().dummyChains.push(o),t=o;e.setEdge(t,r,{weight:s.weight},u)}}(e,d)}))},undo:function undo(e){i.forEach(e.graph().dummyChains,(function(d){var o,i=e.node(d),n=i.edgeLabel;for(e.setEdge(i.edgeObj,n);i.dummy;)o=e.successors(d)[0],e.removeNode(d),n.points.push({x:i.x,y:i.y}),"edge-label"===i.dummy&&(n.x=i.x,n.y=i.y,n.width=i.width,n.height=i.height),d=o,i=e.node(d)}))}}}));
//# sourceMappingURL=normalize.js.map