dagreLayout.js 91 KB

12
  1. !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.f6=n():t.f6=n()}(this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=218)}([,,,,,,,function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Base=void 0;var r=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t}();n.Base=r},,function(t,n,e){var r;try{r={cloneDeep:e(335),constant:e(95),defaults:e(336),each:e(131),filter:e(134),find:e(337),flatten:e(161),forEach:e(132),forIn:e(344),has:e(145),isUndefined:e(146),last:e(345),map:e(147),mapValues:e(346),max:e(347),merge:e(349),min:e(355),minBy:e(356),now:e(357),pick:e(358),range:e(363),reduce:e(149),sortBy:e(366),uniqueId:e(371),values:e(154),zipObject:e(372)}}catch(t){}r||(r=window._),t.exports=r},function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),o=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),o(e(11),n),o(e(12),n),o(e(13),n),o(e(14),n),o(e(15),n),o(e(16),n)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelize=n.isString=void 0;n.isString=function(t){return"string"==typeof t};var r,o,i=/-(\w)/g;n.camelize=(r=function(t){return t.replace(i,(function(t,n){return n?n.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=r(t))})},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isArray=void 0,n.isArray=Array.isArray},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toNumber=n.isNaN=n.isNumber=void 0;n.isNumber=function(t){return"number"==typeof t};n.isNaN=function(t){return Number.isNaN(Number(t))};n.toNumber=function(t){var e=parseFloat(t);return n.isNaN(e)?t:e}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.traverseTreeUp=n.scaleMatrix=n.getAdjMatrix=n.floydWarshall=n.getDegree=void 0;n.getDegree=function(t,n,e){for(var r=[],o=0;o<t;o++)r[o]=0;return e?(e.forEach((function(t){t.source&&(r[n[t.source]]+=1),t.target&&(r[n[t.target]]+=1)})),r):r};n.floydWarshall=function(t){for(var n=[],e=t.length,r=0;r<e;r+=1){n[r]=[];for(var o=0;o<e;o+=1)r===o?n[r][o]=0:0!==t[r][o]&&t[r][o]?n[r][o]=t[r][o]:n[r][o]=1/0}for(var i=0;i<e;i+=1)for(r=0;r<e;r+=1)for(o=0;o<e;o+=1)n[r][o]>n[r][i]+n[i][o]&&(n[r][o]=n[r][i]+n[i][o]);return n};n.getAdjMatrix=function(t,n){var e=t.nodes,r=t.edges,o=[],i={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((function(t,n){i[t.id]=n;o.push([])})),r&&r.forEach((function(t){var e=t.source,r=t.target,u=i[e],c=i[r];o[u][c]=1,n||(o[c][u]=1)})),o};n.scaleMatrix=function(t,n){var e=[];return t.forEach((function(t){var r=[];t.forEach((function(t){r.push(t*n)})),e.push(r)})),e};n.traverseTreeUp=function(t,n){"function"==typeof n&&function t(n,e){if(n&&n.children)for(var r=n.children.length-1;r>=0;r--)if(!t(n.children[r],e))return;return!!e(n)}(t,n)}},function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.clone=n.isObject=void 0;n.isObject=function(t){return null!==t&&"object"===r(t)};n.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var e=[];return t.forEach((function(t){e.push(t)})),e.map((function(t){return n.clone(t)}))}if("object"===r(t)&&t!=={}){var i=o({},t);return Object.keys(i).forEach((function(t){i[t]=n.clone(i[t])})),i}return t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isFunction=void 0;n.isFunction=function(t){return"function"==typeof t}},function(t,n){var e=Array.isArray;t.exports=e},,function(t,n,e){"use strict";var r=e(9),o=e(23).Graph;function i(t,n,e,o){var i;do{i=r.uniqueId(o)}while(t.hasNode(i));return e.dummy=n,t.setNode(i,e),i}function u(t){return r.max(r.map(t.nodes(),(function(n){var e=t.node(n).rank;if(!r.isUndefined(e))return e})))}t.exports={addDummyNode:i,simplify:function(t){var n=(new o).setGraph(t.graph());return r.forEach(t.nodes(),(function(e){n.setNode(e,t.node(e))})),r.forEach(t.edges(),(function(e){var r=n.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),n},asNonCompoundGraph:function(t){var n=new o({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(e){t.children(e).length||n.setNode(e,t.node(e))})),r.forEach(t.edges(),(function(e){n.setEdge(e,t.edge(e))})),n},successorWeights:function(t){var n=r.map(t.nodes(),(function(n){var e={};return r.forEach(t.outEdges(n),(function(n){e[n.w]=(e[n.w]||0)+t.edge(n).weight})),e}));return r.zipObject(t.nodes(),n)},predecessorWeights:function(t){var n=r.map(t.nodes(),(function(n){var e={};return r.forEach(t.inEdges(n),(function(n){e[n.v]=(e[n.v]||0)+t.edge(n).weight})),e}));return r.zipObject(t.nodes(),n)},intersectRect:function(t,n){var e,r,o=t.x,i=t.y,u=n.x-o,c=n.y-i,a=t.width/2,f=t.height/2;if(!u&&!c)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(c)*a>Math.abs(u)*f?(c<0&&(f=-f),e=f*u/c,r=f):(u<0&&(a=-a),e=a,r=a*c/u);return{x:o+e,y:i+r}},buildLayerMatrix:function(t){var n=r.map(r.range(u(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(e){var o=t.node(e),i=o.rank;r.isUndefined(i)||(n[i][o.order]=e)})),n},normalizeRanks:function(t){var n=r.min(r.map(t.nodes(),(function(n){return t.node(n).rank})));r.forEach(t.nodes(),(function(e){var o=t.node(e);r.has(o,"rank")&&(o.rank-=n)}))},removeEmptyRanks:function(t){var n=r.min(r.map(t.nodes(),(function(n){return t.node(n).rank}))),e=[];r.forEach(t.nodes(),(function(r){var o=t.node(r).rank-n;e[o]||(e[o]=[]),e[o].push(r)}));var o=0,i=t.graph().nodeRankFactor;r.forEach(e,(function(n,e){r.isUndefined(n)&&e%i!=0?--o:o&&r.forEach(n,(function(n){t.node(n).rank+=o}))}))},addBorderNode:function(t,n,e,r){var o={width:0,height:0};arguments.length>=4&&(o.rank=e,o.order=r);return i(t,"border",o,n)},maxRank:u,partition:function(t,n){var e={lhs:[],rhs:[]};return r.forEach(t,(function(t){n(t)?e.lhs.push(t):e.rhs.push(t)})),e},time:function(t,n){var e=r.now();try{return n()}finally{console.log(t+" time: "+(r.now()-e)+"ms")}},notime:function(t,n){return n()}}},,function(t,n,e){var r;try{r={clone:e(222),constant:e(95),each:e(131),filter:e(134),has:e(145),isArray:e(17),isEmpty:e(299),isFunction:e(51),isUndefined:e(146),keys:e(33),map:e(147),reduce:e(149),size:e(302),transform:e(308),union:e(309),values:e(154)}}catch(t){}r||(r=window._),t.exports=r},function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var n=e(t);return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r;try{r=e(220)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,n,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(114),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,u=o||i||Function("return this")();t.exports=u},,function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!=t&&"object"==e(t)}},,,,function(t,n,e){var r=e(51),o=e(89);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,n,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(279),i=e(289),u=e(38),c=e(17),a=e(296);t.exports=function(t){return"function"==typeof t?t:null==t?u:"object"==r(t)?c(t)?i(t[0],t[1]):o(t):a(t)}},,function(t,n,e){var r=e(117),o=e(91),i=e(30);t.exports=function(t){return i(t)?r(t):o(t)}},,function(t,n,e){var r=e(233),o=e(239);t.exports=function(t,n){var e=o(t,n);return r(e)?e:void 0}},function(t,n,e){var r=e(42),o=e(235),i=e(236),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},function(t,n,e){var r=e(117),o=e(259),i=e(30);t.exports=function(t){return i(t)?r(t,!0):o(t)}},function(t,n){t.exports=function(t){return t}},,,function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,e){var r=e(24).Symbol;t.exports=r},function(t,n,e){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(24),i=e(255),u="object"==r(n)&&n&&!n.nodeType&&n,c=u&&"object"==r(t)&&t&&!t.nodeType&&t,a=c&&c.exports===u?o.Buffer:void 0,f=(a?a.isBuffer:void 0)||i;t.exports=f}).call(this,e(50)(t))},function(t,n,e){var r=e(264),o=e(86),i=e(265),u=e(126),c=e(266),a=e(36),f=e(115),s=f(r),p=f(o),d=f(i),h=f(u),l=f(c),v=a;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||u&&"[object Set]"!=v(new u)||c&&"[object WeakMap]"!=v(new c))&&(v=function(t){var n=a(t),e="[object Object]"==n?t.constructor:void 0,r=e?f(e):"";if(r)switch(r){case s:return"[object DataView]";case p:return"[object Map]";case d:return"[object Promise]";case h:return"[object Set]";case l:return"[object WeakMap]"}return n}),t.exports=v},function(t,n,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(36),i=e(26);t.exports=function(t){return"symbol"==r(t)||i(t)&&"[object Symbol]"==o(t)}},,,,,function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){var r=e(36),o=e(22);t.exports=function(t){if(!o(t))return!1;var n=r(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}},function(t,n,e){var r=e(63),o=e(64);t.exports=function(t,n,e,i){var u=!e;e||(e={});for(var c=-1,a=n.length;++c<a;){var f=n[c],s=i?i(e[f],t[f],f,e,t):void 0;void 0===s&&(s=t[f]),u?o(e,f,s):r(e,f,s)}return e}},function(t,n,e){var r=e(254),o=e(26),i=Object.prototype,u=i.hasOwnProperty,c=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(t){return o(t)&&u.call(t,"callee")&&!c.call(t,"callee")};t.exports=a},function(t,n,e){var r=e(256),o=e(66),i=e(90),u=i&&i.isTypedArray,c=u?o(u):r;t.exports=c},function(t,n,e){var r=e(45);t.exports=function(t){if("string"==typeof t||r(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},,,function(t,n,e){var r=e(59),o=e(228),i=e(229),u=e(230),c=e(231),a=e(232);function f(t){var n=this.__data__=new r(t);this.size=n.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=u,f.prototype.has=c,f.prototype.set=a,t.exports=f},function(t,n,e){var r=e(223),o=e(224),i=e(225),u=e(226),c=e(227);function a(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=u,a.prototype.set=c,t.exports=a},function(t,n,e){var r=e(41);t.exports=function(t,n){for(var e=t.length;e--;)if(r(t[e][0],n))return e;return-1}},function(t,n,e){var r=e(35)(Object,"create");t.exports=r},function(t,n,e){var r=e(248);t.exports=function(t,n){var e=t.__data__;return r(n)?e["string"==typeof n?"string":"hash"]:e.map}},function(t,n,e){var r=e(64),o=e(41),i=Object.prototype.hasOwnProperty;t.exports=function(t,n,e){var u=t[n];i.call(t,n)&&o(u,e)&&(void 0!==e||n in t)||r(t,n,e)}},function(t,n,e){var r=e(116);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var o=e(t);return!!(n=null==n?9007199254740991:n)&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t<n}},function(t,n){t.exports=function(t){return function(n){return t(n)}}},function(t,n){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},function(t,n,e){var r=e(118)(Object.getPrototypeOf,Object);t.exports=r},function(t,n,e){var r=e(96),o=e(277)(r);t.exports=o},function(t,n,e){var r=e(71),o=e(55);t.exports=function(t,n){for(var e=0,i=(n=r(n,t)).length;null!=t&&e<i;)t=t[o(n[e++])];return e&&e==i?t:void 0}},function(t,n,e){var r=e(17),o=e(99),i=e(291),u=e(141);t.exports=function(t,n){return r(t)?t:o(t,n)?[t]:i(u(t))}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o}},function(t,n,e){var r=e(38),o=e(150),i=e(151);t.exports=function(t,n){return i(o(t,n,r),t+"")}},function(t,n,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(41),i=e(30),u=e(65),c=e(22);t.exports=function(t,n,e){if(!c(e))return!1;var a=r(n);return!!("number"==a?i(e)&&u(n,e.length):"string"==a&&n in e)&&o(e[n],t)}},function(t,n,e){"use strict";var r=e(9);t.exports={longestPath:function(t){var n={};r.forEach(t.sources(),(function e(o){var i=t.node(o);if(r.has(n,o))return i.rank;n[o]=!0;var u=r.min(r.map(t.outEdges(o),(function(n){return e(n.w)-t.edge(n).minlen})));return u!==Number.POSITIVE_INFINITY&&null!=u||(u=0),i.rank=u}))},slack:function(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}}},,,,,,,,,,function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(21);t.exports=i;function i(t){this._isDirected=!o.has(t,"directed")||t.directed,this._isMultigraph=!!o.has(t,"multigraph")&&t.multigraph,this._isCompound=!!o.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=o.constant(void 0),this._defaultEdgeLabelFn=o.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function u(t,n){t[n]?t[n]++:t[n]=1}function c(t,n){--t[n]||delete t[n]}function a(t,n,e,r){var i=""+n,u=""+e;if(!t&&i>u){var c=i;i=u,u=c}return i+""+u+""+(o.isUndefined(r)?"\0":r)}function f(t,n,e,r){var o=""+n,i=""+e;if(!t&&o>i){var u=o;o=i,i=u}var c={v:o,w:i};return r&&(c.name=r),c}function s(t,n){return a(t,n.v,n.w,n.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return o.isFunction(t)||(t=o.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var t=this;return o.filter(this.nodes(),(function(n){return o.isEmpty(t._in[n])}))},i.prototype.sinks=function(){var t=this;return o.filter(this.nodes(),(function(n){return o.isEmpty(t._out[n])}))},i.prototype.setNodes=function(t,n){var e=arguments,r=this;return o.each(t,(function(t){e.length>1?r.setNode(t,n):r.setNode(t)})),this},i.prototype.setNode=function(t,n){return o.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return o.has(this._nodes,t)},i.prototype.removeNode=function(t){var n=this;if(o.has(this._nodes,t)){var e=function(t){n.removeEdge(n._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],o.each(this.children(t),(function(t){n.setParent(t)})),delete this._children[t]),o.each(o.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],o.each(o.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(n))n="\0";else{for(var e=n+="";!o.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var n=this._parent[t];if("\0"!==n)return n}},i.prototype.children=function(t){if(o.isUndefined(t)&&(t="\0"),this._isCompound){var n=this._children[t];if(n)return o.keys(n)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var n=this._preds[t];if(n)return o.keys(n)},i.prototype.successors=function(t){var n=this._sucs[t];if(n)return o.keys(n)},i.prototype.neighbors=function(t){var n=this.predecessors(t);if(n)return o.union(n,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var e=this;o.each(this._nodes,(function(e,r){t(r)&&n.setNode(r,e)})),o.each(this._edgeObjs,(function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,e.edge(t))}));var r={};return this._isCompound&&o.each(n.nodes(),(function(t){n.setParent(t,function t(o){var i=e.parent(o);return void 0===i||n.hasNode(i)?(r[o]=i,i):i in r?r[i]:t(i)}(t))})),n},i.prototype.setDefaultEdgeLabel=function(t){return o.isFunction(t)||(t=o.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(t,n){var e=this,r=arguments;return o.reduce(t,(function(t,o){return r.length>1?e.setEdge(t,o,n):e.setEdge(t,o),o})),this},i.prototype.setEdge=function(){var t,n,e,i,c=!1,s=arguments[0];"object"===r(s)&&null!==s&&"v"in s?(t=s.v,n=s.w,e=s.name,2===arguments.length&&(i=arguments[1],c=!0)):(t=s,n=arguments[1],e=arguments[3],arguments.length>2&&(i=arguments[2],c=!0)),t=""+t,n=""+n,o.isUndefined(e)||(e=""+e);var p=a(this._isDirected,t,n,e);if(o.has(this._edgeLabels,p))return c&&(this._edgeLabels[p]=i),this;if(!o.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[p]=c?i:this._defaultEdgeLabelFn(t,n,e);var d=f(this._isDirected,t,n,e);return t=d.v,n=d.w,Object.freeze(d),this._edgeObjs[p]=d,u(this._preds[n],t),u(this._sucs[t],n),this._in[n][p]=d,this._out[t][p]=d,this._edgeCount++,this},i.prototype.edge=function(t,n,e){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,n,e);return this._edgeLabels[r]},i.prototype.hasEdge=function(t,n,e){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,n,e);return o.has(this._edgeLabels,r)},i.prototype.removeEdge=function(t,n,e){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,n,e),o=this._edgeObjs[r];return o&&(t=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[n],t),c(this._sucs[t],n),delete this._in[n][r],delete this._out[t][r],this._edgeCount--),this},i.prototype.inEdges=function(t,n){var e=this._in[t];if(e){var r=o.values(e);return n?o.filter(r,(function(t){return t.v===n})):r}},i.prototype.outEdges=function(t,n){var e=this._out[t];if(e){var r=o.values(e);return n?o.filter(r,(function(t){return t.w===n})):r}},i.prototype.nodeEdges=function(t,n){var e=this.inEdges(t,n);if(e)return e.concat(this.outEdges(t,n))}},function(t,n,e){var r=e(35)(e(24),"Map");t.exports=r},function(t,n,e){var r=e(240),o=e(247),i=e(249),u=e(250),c=e(251);function a(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=u,a.prototype.set=c,t.exports=a},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}},function(t,n){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,n,e){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(114),i="object"==r(n)&&n&&!n.nodeType&&n,u=i&&"object"==r(t)&&t&&!t.nodeType&&t,c=u&&u.exports===i&&o.process,a=function(){try{var t=u&&u.require&&u.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(t){}}();t.exports=a}).call(this,e(50)(t))},function(t,n,e){var r=e(67),o=e(257),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var n=[];for(var e in Object(t))i.call(t,e)&&"constructor"!=e&&n.push(e);return n}},function(t,n,e){var r=e(121),o=e(122),i=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,c=u?function(t){return null==t?[]:(t=Object(t),r(u(t),(function(n){return i.call(t,n)})))}:o;t.exports=c},function(t,n){t.exports=function(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}},function(t,n,e){var r=e(127);t.exports=function(t){var n=new t.constructor(t.byteLength);return new r(n).set(new r(t)),n}},function(t,n){t.exports=function(t){return function(){return t}}},function(t,n,e){var r=e(97),o=e(33);t.exports=function(t,n){return t&&r(t,n,o)}},function(t,n,e){var r=e(276)();t.exports=r},function(t,n){t.exports=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}},function(t,n,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(17),i=e(45),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;t.exports=function(t,n){if(o(t))return!1;var e=r(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!i(t))||(c.test(t)||!u.test(t)||null!=n&&t in Object(n))}},function(t,n,e){var r=e(93),o=e(310);t.exports=function t(n,e,i,u,c){var a=-1,f=n.length;for(i||(i=o),c||(c=[]);++a<f;){var s=n[a];e>0&&i(s)?e>1?t(s,e-1,i,u,c):r(c,s):u||(c[c.length]=s)}return c}},function(t,n,e){var r=e(45);t.exports=function(t,n,e){for(var o=-1,i=t.length;++o<i;){var u=t[o],c=n(u);if(null!=c&&(void 0===a?c==c&&!r(c):e(c,a)))var a=c,f=u}return f}},,,,,,,,,,,,function(t,n,e){var r=e(58),o=e(88),i=e(63),u=e(252),c=e(258),a=e(119),f=e(120),s=e(261),p=e(262),d=e(124),h=e(263),l=e(44),v=e(267),y=e(268),g=e(129),b=e(17),m=e(43),x=e(272),_=e(22),w=e(274),E=e(33),j=e(37),k={};k["[object Arguments]"]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k["[object Object]"]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k["[object Function]"]=k["[object WeakMap]"]=!1,t.exports=function t(n,e,S,O,N,I){var P,M=1&e,C=2&e,A=4&e;if(S&&(P=N?S(n,O,N,I):S(n)),void 0!==P)return P;if(!_(n))return n;var L=b(n);if(L){if(P=v(n),!M)return f(n,P)}else{var T=l(n),z="[object Function]"==T||"[object GeneratorFunction]"==T;if(m(n))return a(n,M);if("[object Object]"==T||"[object Arguments]"==T||z&&!N){if(P=C||z?{}:g(n),!M)return C?p(n,c(P,n)):s(n,u(P,n))}else{if(!k[T])return N?n:{};P=y(n,T,M)}}I||(I=new r);var F=I.get(n);if(F)return F;I.set(n,P),w(n)?n.forEach((function(r){P.add(t(r,e,S,r,n,I))})):x(n)&&n.forEach((function(r,o){P.set(o,t(r,e,S,o,n,I))}));var D=L?void 0:(A?C?h:d:C?j:E)(n);return o(D||n,(function(r,o){D&&(r=n[o=r]),i(P,o,t(r,e,S,o,n,I))})),P}},function(t,n,e){(function(n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r="object"==(void 0===n?"undefined":e(n))&&n&&n.Object===Object&&n;t.exports=r}).call(this,e(234))},function(t,n){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,n,e){var r=e(35),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,n,e){var r=e(253),o=e(53),i=e(17),u=e(43),c=e(65),a=e(54),f=Object.prototype.hasOwnProperty;t.exports=function(t,n){var e=i(t),s=!e&&o(t),p=!e&&!s&&u(t),d=!e&&!s&&!p&&a(t),h=e||s||p||d,l=h?r(t.length,String):[],v=l.length;for(var y in t)!n&&!f.call(t,y)||h&&("length"==y||p&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||c(y,v))||l.push(y);return l}},function(t,n){t.exports=function(t,n){return function(e){return t(n(e))}}},function(t,n,e){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=e(24),i="object"==r(n)&&n&&!n.nodeType&&n,u=i&&"object"==r(t)&&t&&!t.nodeType&&t,c=u&&u.exports===i?o.Buffer:void 0,a=c?c.allocUnsafe:void 0;t.exports=function(t,n){if(n)return t.slice();var e=t.length,r=a?a(e):new t.constructor(e);return t.copy(r),r}}).call(this,e(50)(t))},function(t,n){t.exports=function(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length,o=0,i=[];++e<r;){var u=t[e];n(u,e,t)&&(i[o++]=u)}return i}},function(t,n){t.exports=function(){return[]}},function(t,n,e){var r=e(93),o=e(68),i=e(92),u=e(122),c=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)r(n,i(t)),t=o(t);return n}:u;t.exports=c},function(t,n,e){var r=e(125),o=e(92),i=e(33);t.exports=function(t){return r(t,i,o)}},function(t,n,e){var r=e(93),o=e(17);t.exports=function(t,n,e){var i=n(t);return o(t)?i:r(i,e(t))}},function(t,n,e){var r=e(35)(e(24),"Set");t.exports=r},function(t,n,e){var r=e(24).Uint8Array;t.exports=r},function(t,n,e){var r=e(94);t.exports=function(t,n){var e=n?r(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}},function(t,n,e){var r=e(130),o=e(68),i=e(67);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},function(t,n,e){var r=e(22),o=Object.create,i=function(){function t(){}return function(n){if(!r(n))return{};if(o)return o(n);t.prototype=n;var e=new t;return t.prototype=void 0,e}}();t.exports=i},function(t,n,e){t.exports=e(132)},function(t,n,e){var r=e(88),o=e(69),i=e(133),u=e(17);t.exports=function(t,n){return(u(t)?r:o)(t,i(n))}},function(t,n,e){var r=e(38);t.exports=function(t){return"function"==typeof t?t:r}},function(t,n,e){var r=e(121),o=e(278),i=e(31),u=e(17);t.exports=function(t,n){return(u(t)?r:o)(t,i(n,3))}},function(t,n,e){var r=e(281),o=e(26);t.exports=function t(n,e,i,u,c){return n===e||(null==n||null==e||!o(n)&&!o(e)?n!=n&&e!=e:r(n,e,i,u,t,c))}},function(t,n,e){var r=e(137),o=e(284),i=e(138);t.exports=function(t,n,e,u,c,a){var f=1&e,s=t.length,p=n.length;if(s!=p&&!(f&&p>s))return!1;var d=a.get(t),h=a.get(n);if(d&&h)return d==n&&h==t;var l=-1,v=!0,y=2&e?new r:void 0;for(a.set(t,n),a.set(n,t);++l<s;){var g=t[l],b=n[l];if(u)var m=f?u(b,g,l,n,t,a):u(g,b,l,t,n,a);if(void 0!==m){if(m)continue;v=!1;break}if(y){if(!o(n,(function(t,n){if(!i(y,n)&&(g===t||c(g,t,e,u,a)))return y.push(n)}))){v=!1;break}}else if(g!==b&&!c(g,b,e,u,a)){v=!1;break}}return a.delete(t),a.delete(n),v}},function(t,n,e){var r=e(87),o=e(282),i=e(283);function u(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new r;++n<e;)this.add(t[n])}u.prototype.add=u.prototype.push=o,u.prototype.has=i,t.exports=u},function(t,n){t.exports=function(t,n){return t.has(n)}},function(t,n,e){var r=e(22);t.exports=function(t){return t==t&&!r(t)}},function(t,n){t.exports=function(t,n){return function(e){return null!=e&&(e[t]===n&&(void 0!==n||t in Object(e)))}}},function(t,n,e){var r=e(294);t.exports=function(t){return null==t?"":r(t)}},function(t,n,e){var r=e(295),o=e(143);t.exports=function(t,n){return null!=t&&o(t,n,r)}},function(t,n,e){var r=e(71),o=e(53),i=e(17),u=e(65),c=e(89),a=e(55);t.exports=function(t,n,e){for(var f=-1,s=(n=r(n,t)).length,p=!1;++f<s;){var d=a(n[f]);if(!(p=null!=t&&e(t,d)))break;t=t[d]}return p||++f!=s?p:!!(s=null==t?0:t.length)&&c(s)&&u(d,s)&&(i(t)||o(t))}},function(t,n){t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},function(t,n,e){var r=e(298),o=e(143);t.exports=function(t,n){return null!=t&&o(t,n,r)}},function(t,n){t.exports=function(t){return void 0===t}},function(t,n,e){var r=e(72),o=e(31),i=e(148),u=e(17);t.exports=function(t,n){return(u(t)?r:i)(t,o(n,3))}},function(t,n,e){var r=e(69),o=e(30);t.exports=function(t,n){var e=-1,i=o(t)?Array(t.length):[];return r(t,(function(t,r,o){i[++e]=n(t,r,o)})),i}},function(t,n,e){var r=e(300),o=e(69),i=e(31),u=e(301),c=e(17);t.exports=function(t,n,e){var a=c(t)?r:u,f=arguments.length<3;return a(t,i(n,4),e,f,o)}},function(t,n,e){var r=e(311),o=Math.max;t.exports=function(t,n,e){return n=o(void 0===n?t.length-1:n,0),function(){for(var i=arguments,u=-1,c=o(i.length-n,0),a=Array(c);++u<c;)a[u]=i[n+u];u=-1;for(var f=Array(n+1);++u<n;)f[u]=i[u];return f[n]=e(a),r(t,this,f)}}},function(t,n,e){var r=e(312),o=e(313)(r);t.exports=o},function(t,n){t.exports=function(t,n,e,r){for(var o=t.length,i=e+(r?1:-1);r?i--:++i<o;)if(n(t[i],i,t))return i;return-1}},function(t,n,e){var r=e(30),o=e(26);t.exports=function(t){return o(t)&&r(t)}},function(t,n,e){var r=e(322),o=e(33);t.exports=function(t){return null==t?[]:r(t,o(t))}},function(t,n,e){var r=e(21),o=e(156);t.exports=function(t,n,e,r){return function(t,n,e,r){var i,u,c={},a=new o,f=function(t){var n=t.v!==i?t.v:t.w,r=c[n],o=e(t),f=u.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+o);f<r.distance&&(r.distance=f,r.predecessor=i,a.decrease(n,f))};t.nodes().forEach((function(t){var e=t===n?0:Number.POSITIVE_INFINITY;c[t]={distance:e},a.add(t,e)}));for(;a.size()>0&&(i=a.removeMin(),(u=c[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(f);return c}(t,String(n),e||i,r||function(n){return t.outEdges(n)})};var i=r.constant(1)},function(t,n,e){var r=e(21);function o(){this._arr=[],this._keyIndices={}}t.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},o.prototype.has=function(t){return r.has(this._keyIndices,t)},o.prototype.priority=function(t){var n=this._keyIndices[t];if(void 0!==n)return this._arr[n].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(t,n){var e=this._keyIndices;if(t=String(t),!r.has(e,t)){var o=this._arr,i=o.length;return e[t]=i,o.push({key:t,priority:n}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},o.prototype.decrease=function(t,n){var e=this._keyIndices[t];if(n>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+n);this._arr[e].priority=n,this._decrease(e)},o.prototype._heapify=function(t){var n=this._arr,e=2*t,r=e+1,o=t;e<n.length&&(o=n[e].priority<n[o].priority?e:o,r<n.length&&(o=n[r].priority<n[o].priority?r:o),o!==t&&(this._swap(t,o),this._heapify(o)))},o.prototype._decrease=function(t){for(var n,e=this._arr,r=e[t].priority;0!==t&&!(e[n=t>>1].priority<r);)this._swap(t,n),t=n},o.prototype._swap=function(t,n){var e=this._arr,r=this._keyIndices,o=e[t],i=e[n];e[t]=i,e[n]=o,r[i.key]=t,r[o.key]=n}},function(t,n,e){var r=e(21);t.exports=function(t){var n=0,e=[],o={},i=[];return t.nodes().forEach((function(u){r.has(o,u)||function u(c){var a=o[c]={onStack:!0,lowlink:n,index:n++};if(e.push(c),t.successors(c).forEach((function(t){r.has(o,t)?o[t].onStack&&(a.lowlink=Math.min(a.lowlink,o[t].index)):(u(t),a.lowlink=Math.min(a.lowlink,o[t].lowlink))})),a.lowlink===a.index){var f,s=[];do{f=e.pop(),o[f].onStack=!1,s.push(f)}while(c!==f);i.push(s)}}(u)})),i}},function(t,n,e){var r=e(21);function o(t){var n={},e={},o=[];if(r.each(t.sinks(),(function u(c){if(r.has(e,c))throw new i;r.has(n,c)||(e[c]=!0,n[c]=!0,r.each(t.predecessors(c),u),delete e[c],o.push(c))})),r.size(n)!==t.nodeCount())throw new i;return o}function i(){}t.exports=o,o.CycleException=i,i.prototype=new Error},function(t,n,e){var r=e(21);t.exports=function(t,n,e){r.isArray(n)||(n=[n]);var o=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],u={};return r.each(n,(function(n){if(!t.hasNode(n))throw new Error("Graph does not have node: "+n);!function t(n,e,o,i,u,c){r.has(i,e)||(i[e]=!0,o||c.push(e),r.each(u(e),(function(e){t(n,e,o,i,u,c)})),o&&c.push(e))}(t,n,"post"===e,u,o,i)})),i}},function(t,n,e){var r=e(341);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,n,e){var r=e(100);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,n,e){var r=e(64),o=e(41);t.exports=function(t,n,e){(void 0!==e&&!o(t[n],e)||void 0===e&&!(n in t))&&r(t,n,e)}},function(t,n){t.exports=function(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}},function(t,n){t.exports=function(t,n){return t<n}},function(t,n,e){"use strict";var r=e(9),o=e(23).Graph,i=e(75).slack;function u(t,n){return r.forEach(t.nodes(),(function e(o){r.forEach(n.nodeEdges(o),(function(r){var u=r.v,c=o===u?r.w:u;t.hasNode(c)||i(n,r)||(t.setNode(c,{}),t.setEdge(o,c,{}),e(c))}))})),t.nodeCount()}function c(t,n){return r.minBy(n.edges(),(function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return i(n,e)}))}function a(t,n,e){r.forEach(t.nodes(),(function(t){n.node(t).rank+=e}))}t.exports=function(t){var n,e,r=new o({directed:!1}),f=t.nodes()[0],s=t.nodeCount();r.setNode(f,{});for(;u(r,t)<s;)n=c(r,t),e=r.hasNode(n.v)?i(t,n):-i(t,n),a(r,t,e);return r}},,,,,,,,,function(t,n,e){"use strict";var r,o=this&&this.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.DagreLayout=void 0;var u=i(e(219)),c=e(10),a=function(t){function n(n){var e=t.call(this)||this;return e.rankdir="TB",e.nodesep=50,e.ranksep=50,e.controlPoints=!1,e.sortByCombo=!1,e.nodes=[],e.edges=[],e.onLayoutEnd=function(){},e.updateCfg(n),e}return o(n,t),n.prototype.getDefaultCfg=function(){return{rankdir:"TB",align:void 0,nodeSize:void 0,nodesepFunc:void 0,ranksepFunc:void 0,nodesep:50,ranksep:50,controlPoints:!1}},n.prototype.execute=function(){var t=this,n=this,e=n.nodes,r=n.nodeSize,o=n.rankdir,i=n.combos;if(e){var a,s=n.edges||[],p=new u.default.graphlib.Graph({multigraph:!0,compound:!0});a=r?c.isArray(r)?function(){return r}:function(){return[r,r]}:function(t){return t.size?c.isArray(t.size)?t.size:[t.size,t.size]:[40,40]};var d=f(n.nodesepFunc,n.nodesep,50),h=f(n.ranksepFunc,n.ranksep,50);"LR"!==o&&"RL"!==o||(d=f(n.ranksepFunc,n.ranksep,50),h=f(n.nodesepFunc,n.nodesep,50)),p.setDefaultEdgeLabel((function(){return{}})),p.setGraph(n);var l,v={};return e.forEach((function(n){var e=a(n),r=h(n),o=d(n),i=e[0]+2*o,u=e[1]+2*r;p.setNode(n.id,{width:i,height:u}),t.sortByCombo&&n.comboId&&(v[n.comboId]||(v[n.comboId]=!0,p.setNode(n.comboId,{})),p.setParent(n.id,n.comboId))})),this.sortByCombo&&i&&i.forEach((function(t){t.parentId&&(v[t.parentId]||(v[t.parentId]=!0,p.setNode(t.parentId,{})),p.setParent(t.id,t.parentId))})),s.forEach((function(t){p.setEdge(t.source,t.target,{weight:t.weight||1})})),u.default.layout(p),p.nodes().forEach((function(t){l=p.node(t);var n=e.findIndex((function(n){return n.id===t}));e[n]&&(e[n].x=l.x,e[n].y=l.y)})),p.edges().forEach((function(t){l=p.edge(t);var e=s.findIndex((function(n){return n.source===t.v&&n.target===t.w}));n.controlPoints&&"loop"!==s[e].type&&(s[e].controlPoints=l.points.slice(1,l.points.length-1))})),n.onLayoutEnd&&n.onLayoutEnd(),{nodes:e,edges:s}}},n.prototype.getType=function(){return"dagre"},n}(e(7).Base);function f(t,n,e){return t||(c.isNumber(n)?function(){return n}:function(){return e})}n.DagreLayout=a},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n,e){"use strict";e.r(n);var r=e(174);n.default=r.DagreLayout},function(t,n,e){t.exports={graphlib:e(23),layout:e(334),debug:e(395),util:{time:e(19).time,notime:e(19).notime},version:e(396)}},function(t,n,e){var r=e(221);t.exports={Graph:r.Graph,json:e(324),alg:e(325),version:r.version}},function(t,n,e){t.exports={Graph:e(85),version:e(323)}},function(t,n,e){var r=e(113);t.exports=function(t){return r(t,4)}},function(t,n){t.exports=function(){this.__data__=[],this.size=0}},function(t,n,e){var r=e(60),o=Array.prototype.splice;t.exports=function(t){var n=this.__data__,e=r(n,t);return!(e<0)&&(e==n.length-1?n.pop():o.call(n,e,1),--this.size,!0)}},function(t,n,e){var r=e(60);t.exports=function(t){var n=this.__data__,e=r(n,t);return e<0?void 0:n[e][1]}},function(t,n,e){var r=e(60);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,n,e){var r=e(60);t.exports=function(t,n){var e=this.__data__,o=r(e,t);return o<0?(++this.size,e.push([t,n])):e[o][1]=n,this}},function(t,n,e){var r=e(59);t.exports=function(){this.__data__=new r,this.size=0}},function(t,n){t.exports=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}},function(t,n){t.exports=function(t){return this.__data__.get(t)}},function(t,n){t.exports=function(t){return this.__data__.has(t)}},function(t,n,e){var r=e(59),o=e(86),i=e(87);t.exports=function(t,n){var e=this.__data__;if(e instanceof r){var u=e.__data__;if(!o||u.length<199)return u.push([t,n]),this.size=++e.size,this;e=this.__data__=new i(u)}return e.set(t,n),this.size=e.size,this}},function(t,n,e){var r=e(51),o=e(237),i=e(22),u=e(115),c=/^\[object .+?Constructor\]$/,a=Function.prototype,f=Object.prototype,s=a.toString,p=f.hasOwnProperty,d=RegExp("^"+s.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?d:c).test(u(t))}},function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":e(window))&&(r=window)}t.exports=r},function(t,n,e){var r=e(42),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var n=i.call(t,c),e=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(n?t[c]=e:delete t[c]),o}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n,e){var r,o=e(238),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,n,e){var r=e(24)["__core-js_shared__"];t.exports=r},function(t,n){t.exports=function(t,n){return null==t?void 0:t[n]}},function(t,n,e){var r=e(241),o=e(59),i=e(86);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,n,e){var r=e(242),o=e(243),i=e(244),u=e(245),c=e(246);function a(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=u,a.prototype.set=c,t.exports=a},function(t,n,e){var r=e(61);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,n){t.exports=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}},function(t,n,e){var r=e(61),o=Object.prototype.hasOwnProperty;t.exports=function(t){var n=this.__data__;if(r){var e=n[t];return"__lodash_hash_undefined__"===e?void 0:e}return o.call(n,t)?n[t]:void 0}},function(t,n,e){var r=e(61),o=Object.prototype.hasOwnProperty;t.exports=function(t){var n=this.__data__;return r?void 0!==n[t]:o.call(n,t)}},function(t,n,e){var r=e(61);t.exports=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=r&&void 0===n?"__lodash_hash_undefined__":n,this}},function(t,n,e){var r=e(62);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}},function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var n=e(t);return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},function(t,n,e){var r=e(62);t.exports=function(t){return r(this,t).get(t)}},function(t,n,e){var r=e(62);t.exports=function(t){return r(this,t).has(t)}},function(t,n,e){var r=e(62);t.exports=function(t,n){var e=r(this,t),o=e.size;return e.set(t,n),this.size+=e.size==o?0:1,this}},function(t,n,e){var r=e(52),o=e(33);t.exports=function(t,n){return t&&r(n,o(n),t)}},function(t,n){t.exports=function(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}},function(t,n,e){var r=e(36),o=e(26);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,n){t.exports=function(){return!1}},function(t,n,e){var r=e(36),o=e(89),i=e(26),u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u["[object Arguments]"]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u["[object Map]"]=u["[object Number]"]=u["[object Object]"]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!u[r(t)]}},function(t,n,e){var r=e(118)(Object.keys,Object);t.exports=r},function(t,n,e){var r=e(52),o=e(37);t.exports=function(t,n){return t&&r(n,o(n),t)}},function(t,n,e){var r=e(22),o=e(67),i=e(260),u=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var n=o(t),e=[];for(var c in t)("constructor"!=c||!n&&u.call(t,c))&&e.push(c);return e}},function(t,n){t.exports=function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}},function(t,n,e){var r=e(52),o=e(92);t.exports=function(t,n){return r(t,o(t),n)}},function(t,n,e){var r=e(52),o=e(123);t.exports=function(t,n){return r(t,o(t),n)}},function(t,n,e){var r=e(125),o=e(123),i=e(37);t.exports=function(t){return r(t,i,o)}},function(t,n,e){var r=e(35)(e(24),"DataView");t.exports=r},function(t,n,e){var r=e(35)(e(24),"Promise");t.exports=r},function(t,n,e){var r=e(35)(e(24),"WeakMap");t.exports=r},function(t,n){var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,n,e){var r=e(94),o=e(269),i=e(270),u=e(271),c=e(128);t.exports=function(t,n,e){var a=t.constructor;switch(n){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return o(t,e);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return c(t,e);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return i(t);case"[object Set]":return new a;case"[object Symbol]":return u(t)}}},function(t,n,e){var r=e(94);t.exports=function(t,n){var e=n?r(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}},function(t,n){var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},function(t,n,e){var r=e(42),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;t.exports=function(t){return i?Object(i.call(t)):{}}},function(t,n,e){var r=e(273),o=e(66),i=e(90),u=i&&i.isMap,c=u?o(u):r;t.exports=c},function(t,n,e){var r=e(44),o=e(26);t.exports=function(t){return o(t)&&"[object Map]"==r(t)}},function(t,n,e){var r=e(275),o=e(66),i=e(90),u=i&&i.isSet,c=u?o(u):r;t.exports=c},function(t,n,e){var r=e(44),o=e(26);t.exports=function(t){return o(t)&&"[object Set]"==r(t)}},function(t,n){t.exports=function(t){return function(n,e,r){for(var o=-1,i=Object(n),u=r(n),c=u.length;c--;){var a=u[t?c:++o];if(!1===e(i[a],a,i))break}return n}}},function(t,n,e){var r=e(30);t.exports=function(t,n){return function(e,o){if(null==e)return e;if(!r(e))return t(e,o);for(var i=e.length,u=n?i:-1,c=Object(e);(n?u--:++u<i)&&!1!==o(c[u],u,c););return e}}},function(t,n,e){var r=e(69);t.exports=function(t,n){var e=[];return r(t,(function(t,r,o){n(t,r,o)&&e.push(t)})),e}},function(t,n,e){var r=e(280),o=e(288),i=e(140);t.exports=function(t){var n=o(t);return 1==n.length&&n[0][2]?i(n[0][0],n[0][1]):function(e){return e===t||r(e,t,n)}}},function(t,n,e){var r=e(58),o=e(135);t.exports=function(t,n,e,i){var u=e.length,c=u,a=!i;if(null==t)return!c;for(t=Object(t);u--;){var f=e[u];if(a&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return!1}for(;++u<c;){var s=(f=e[u])[0],p=t[s],d=f[1];if(a&&f[2]){if(void 0===p&&!(s in t))return!1}else{var h=new r;if(i)var l=i(p,d,s,t,n,h);if(!(void 0===l?o(d,p,3,i,h):l))return!1}}return!0}},function(t,n,e){var r=e(58),o=e(136),i=e(285),u=e(287),c=e(44),a=e(17),f=e(43),s=e(54),p="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,n,e,h,l,v){var y=a(t),g=a(n),b=y?"[object Array]":c(t),m=g?"[object Array]":c(n),x=(b="[object Arguments]"==b?p:b)==p,_=(m="[object Arguments]"==m?p:m)==p,w=b==m;if(w&&f(t)){if(!f(n))return!1;y=!0,x=!1}if(w&&!x)return v||(v=new r),y||s(t)?o(t,n,e,h,l,v):i(t,n,b,e,h,l,v);if(!(1&e)){var E=x&&d.call(t,"__wrapped__"),j=_&&d.call(n,"__wrapped__");if(E||j){var k=E?t.value():t,S=j?n.value():n;return v||(v=new r),l(k,S,e,h,v)}}return!!w&&(v||(v=new r),u(t,n,e,h,l,v))}},function(t,n){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,n){t.exports=function(t){return this.__data__.has(t)}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}},function(t,n,e){var r=e(42),o=e(127),i=e(41),u=e(136),c=e(286),a=e(98),f=r?r.prototype:void 0,s=f?f.valueOf:void 0;t.exports=function(t,n,e,r,f,p,d){switch(e){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!p(new o(t),new o(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var h=c;case"[object Set]":var l=1&r;if(h||(h=a),t.size!=n.size&&!l)return!1;var v=d.get(t);if(v)return v==n;r|=2,d.set(t,n);var y=u(h(t),h(n),r,f,p,d);return d.delete(t),y;case"[object Symbol]":if(s)return s.call(t)==s.call(n)}return!1}},function(t,n){t.exports=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}},function(t,n,e){var r=e(124),o=Object.prototype.hasOwnProperty;t.exports=function(t,n,e,i,u,c){var a=1&e,f=r(t),s=f.length;if(s!=r(n).length&&!a)return!1;for(var p=s;p--;){var d=f[p];if(!(a?d in n:o.call(n,d)))return!1}var h=c.get(t),l=c.get(n);if(h&&l)return h==n&&l==t;var v=!0;c.set(t,n),c.set(n,t);for(var y=a;++p<s;){var g=t[d=f[p]],b=n[d];if(i)var m=a?i(b,g,d,n,t,c):i(g,b,d,t,n,c);if(!(void 0===m?g===b||u(g,b,e,i,c):m)){v=!1;break}y||(y="constructor"==d)}if(v&&!y){var x=t.constructor,_=n.constructor;x==_||!("constructor"in t)||!("constructor"in n)||"function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _||(v=!1)}return c.delete(t),c.delete(n),v}},function(t,n,e){var r=e(139),o=e(33);t.exports=function(t){for(var n=o(t),e=n.length;e--;){var i=n[e],u=t[i];n[e]=[i,u,r(u)]}return n}},function(t,n,e){var r=e(135),o=e(290),i=e(142),u=e(99),c=e(139),a=e(140),f=e(55);t.exports=function(t,n){return u(t)&&c(n)?a(f(t),n):function(e){var u=o(e,t);return void 0===u&&u===n?i(e,t):r(n,u,3)}}},function(t,n,e){var r=e(70);t.exports=function(t,n,e){var o=null==t?void 0:r(t,n);return void 0===o?e:o}},function(t,n,e){var r=e(292),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,u=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,e,r,o){n.push(r?o.replace(i,"$1"):e||t)})),n}));t.exports=u},function(t,n,e){var r=e(293);t.exports=function(t){var n=r(t,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}},function(t,n,e){var r=e(87);function o(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function e(){var r=arguments,o=n?n.apply(this,r):r[0],i=e.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return e.cache=i.set(o,u)||i,u};return e.cache=new(o.Cache||r),e}o.Cache=r,t.exports=o},function(t,n,e){var r=e(42),o=e(72),i=e(17),u=e(45),c=r?r.prototype:void 0,a=c?c.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(i(n))return o(n,t)+"";if(u(n))return a?a.call(n):"";var e=n+"";return"0"==e&&1/n==-1/0?"-0":e}},function(t,n){t.exports=function(t,n){return null!=t&&n in Object(t)}},function(t,n,e){var r=e(144),o=e(297),i=e(99),u=e(55);t.exports=function(t){return i(t)?r(u(t)):o(t)}},function(t,n,e){var r=e(70);t.exports=function(t){return function(n){return r(n,t)}}},function(t,n){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},function(t,n,e){var r=e(91),o=e(44),i=e(53),u=e(17),c=e(30),a=e(43),f=e(67),s=e(54),p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(c(t)&&(u(t)||"string"==typeof t||"function"==typeof t.splice||a(t)||s(t)||i(t)))return!t.length;var n=o(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;if(f(t))return!r(t).length;for(var e in t)if(p.call(t,e))return!1;return!0}},function(t,n){t.exports=function(t,n,e,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(e=t[++o]);++o<i;)e=n(e,t[o],o,t);return e}},function(t,n){t.exports=function(t,n,e,r,o){return o(t,(function(t,o,i){e=r?(r=!1,t):n(e,t,o,i)})),e}},function(t,n,e){var r=e(91),o=e(44),i=e(30),u=e(303),c=e(304);t.exports=function(t){if(null==t)return 0;if(i(t))return u(t)?c(t):t.length;var n=o(t);return"[object Map]"==n||"[object Set]"==n?t.size:r(t).length}},function(t,n,e){var r=e(36),o=e(17),i=e(26);t.exports=function(t){return"string"==typeof t||!o(t)&&i(t)&&"[object String]"==r(t)}},function(t,n,e){var r=e(305),o=e(306),i=e(307);t.exports=function(t){return o(t)?i(t):r(t)}},function(t,n,e){var r=e(144)("length");t.exports=r},function(t,n){var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},function(t,n){var e="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+r+"|"+o+")"+"?",f="[\\ufe0e\\ufe0f]?"+a+("(?:\\u200d(?:"+[i,u,c].join("|")+")[\\ufe0e\\ufe0f]?"+a+")*"),s="(?:"+[i+r+"?",r,u,c,e].join("|")+")",p=RegExp(o+"(?="+o+")|"+s+f,"g");t.exports=function(t){for(var n=p.lastIndex=0;p.test(t);)++n;return n}},function(t,n,e){var r=e(88),o=e(130),i=e(96),u=e(31),c=e(68),a=e(17),f=e(43),s=e(51),p=e(22),d=e(54);t.exports=function(t,n,e){var h=a(t),l=h||f(t)||d(t);if(n=u(n,4),null==e){var v=t&&t.constructor;e=l?h?new v:[]:p(t)&&s(v)?o(c(t)):{}}return(l?r:i)(t,(function(t,r,o){return n(e,t,r,o)})),e}},function(t,n,e){var r=e(100),o=e(73),i=e(314),u=e(153),c=o((function(t){return i(r(t,1,u,!0))}));t.exports=c},function(t,n,e){var r=e(42),o=e(53),i=e(17),u=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(u&&t&&t[u])}},function(t,n){t.exports=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}},function(t,n,e){var r=e(95),o=e(116),i=e(38),u=o?function(t,n){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(n),writable:!0})}:i;t.exports=u},function(t,n){var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},function(t,n,e){var r=e(137),o=e(315),i=e(319),u=e(138),c=e(320),a=e(98);t.exports=function(t,n,e){var f=-1,s=o,p=t.length,d=!0,h=[],l=h;if(e)d=!1,s=i;else if(p>=200){var v=n?null:c(t);if(v)return a(v);d=!1,s=u,l=new r}else l=n?[]:h;t:for(;++f<p;){var y=t[f],g=n?n(y):y;if(y=e||0!==y?y:0,d&&g==g){for(var b=l.length;b--;)if(l[b]===g)continue t;n&&l.push(g),h.push(y)}else s(l,g,e)||(l!==h&&l.push(g),h.push(y))}return h}},function(t,n,e){var r=e(316);t.exports=function(t,n){return!!(null==t?0:t.length)&&r(t,n,0)>-1}},function(t,n,e){var r=e(152),o=e(317),i=e(318);t.exports=function(t,n,e){return n==n?i(t,n,e):r(t,o,e)}},function(t,n){t.exports=function(t){return t!=t}},function(t,n){t.exports=function(t,n,e){for(var r=e-1,o=t.length;++r<o;)if(t[r]===n)return r;return-1}},function(t,n){t.exports=function(t,n,e){for(var r=-1,o=null==t?0:t.length;++r<o;)if(e(n,t[r]))return!0;return!1}},function(t,n,e){var r=e(126),o=e(321),i=e(98),u=r&&1/i(new r([,-0]))[1]==1/0?function(t){return new r(t)}:o;t.exports=u},function(t,n){t.exports=function(){}},function(t,n,e){var r=e(72);t.exports=function(t,n){return r(n,(function(n){return t[n]}))}},function(t,n){t.exports="2.1.8"},function(t,n,e){var r=e(21),o=e(85);function i(t){return r.map(t.nodes(),(function(n){var e=t.node(n),o=t.parent(n),i={v:n};return r.isUndefined(e)||(i.value=e),r.isUndefined(o)||(i.parent=o),i}))}function u(t){return r.map(t.edges(),(function(n){var e=t.edge(n),o={v:n.v,w:n.w};return r.isUndefined(n.name)||(o.name=n.name),r.isUndefined(e)||(o.value=e),o}))}t.exports={write:function(t){var n={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:i(t),edges:u(t)};r.isUndefined(t.graph())||(n.value=r.clone(t.graph()));return n},read:function(t){var n=new o(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){n.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),n}}},function(t,n,e){t.exports={components:e(326),dijkstra:e(155),dijkstraAll:e(327),findCycles:e(328),floydWarshall:e(329),isAcyclic:e(330),postorder:e(331),preorder:e(332),prim:e(333),tarjan:e(157),topsort:e(158)}},function(t,n,e){var r=e(21);t.exports=function(t){var n,e={},o=[];function i(o){r.has(e,o)||(e[o]=!0,n.push(o),r.each(t.successors(o),i),r.each(t.predecessors(o),i))}return r.each(t.nodes(),(function(t){n=[],i(t),n.length&&o.push(n)})),o}},function(t,n,e){var r=e(155),o=e(21);t.exports=function(t,n,e){return o.transform(t.nodes(),(function(o,i){o[i]=r(t,i,n,e)}),{})}},function(t,n,e){var r=e(21),o=e(157);t.exports=function(t){return r.filter(o(t),(function(n){return n.length>1||1===n.length&&t.hasEdge(n[0],n[0])}))}},function(t,n,e){var r=e(21);t.exports=function(t,n,e){return function(t,n,e){var r={},o=t.nodes();return o.forEach((function(t){r[t]={},r[t][t]={distance:0},o.forEach((function(n){t!==n&&(r[t][n]={distance:Number.POSITIVE_INFINITY})})),e(t).forEach((function(e){var o=e.v===t?e.w:e.v,i=n(e);r[t][o]={distance:i,predecessor:t}}))})),o.forEach((function(t){var n=r[t];o.forEach((function(e){var i=r[e];o.forEach((function(e){var r=i[t],o=n[e],u=i[e],c=r.distance+o.distance;c<u.distance&&(u.distance=c,u.predecessor=o.predecessor)}))}))})),r}(t,n||o,e||function(n){return t.outEdges(n)})};var o=r.constant(1)},function(t,n,e){var r=e(158);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,n,e){var r=e(159);t.exports=function(t,n){return r(t,n,"post")}},function(t,n,e){var r=e(159);t.exports=function(t,n){return r(t,n,"pre")}},function(t,n,e){var r=e(21),o=e(85),i=e(156);t.exports=function(t,n){var e,u=new o,c={},a=new i;function f(t){var r=t.v===e?t.w:t.v,o=a.priority(r);if(void 0!==o){var i=n(t);i<o&&(c[r]=e,a.decrease(r,i))}}if(0===t.nodeCount())return u;r.each(t.nodes(),(function(t){a.add(t,Number.POSITIVE_INFINITY),u.setNode(t)})),a.decrease(t.nodes()[0],0);var s=!1;for(;a.size()>0;){if(e=a.removeMin(),r.has(c,e))u.setEdge(e,c[e]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(e).forEach(f)}return u}},function(t,n,e){"use strict";var r=e(9),o=e(374),i=e(377),u=e(378),c=e(19).normalizeRanks,a=e(380),f=e(19).removeEmptyRanks,s=e(381),p=e(382),d=e(383),h=e(384),l=e(393),v=e(19),y=e(23).Graph;t.exports=function(t,n){var e=n&&n.debugTiming?v.time:v.notime;e("layout",(function(){var n=e(" buildLayoutGraph",(function(){return function(t){var n=new y({multigraph:!0,compound:!0}),e=S(t.graph());return n.setGraph(r.merge({},b,k(e,g),r.pick(e,m))),r.forEach(t.nodes(),(function(e){var o=S(t.node(e));n.setNode(e,r.defaults(k(o,x),_)),n.setParent(e,t.parent(e))})),r.forEach(t.edges(),(function(e){var o=S(t.edge(e));n.setEdge(e,r.merge({},E,k(o,w),r.pick(o,j)))})),n}(t)}));e(" runLayout",(function(){!function(t,n){n(" makeSpaceForEdgeLabels",(function(){!function(t){var n=t.graph();n.ranksep/=2,r.forEach(t.edges(),(function(e){var r=t.edge(e);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),n(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(n){if(n.v===n.w){var e=t.node(n.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:n,label:t.edge(n)}),t.removeEdge(n)}}))}(t)})),n(" acyclic",(function(){o.run(t)})),n(" nestingGraph.run",(function(){s.run(t)})),n(" rank",(function(){u(v.asNonCompoundGraph(t))})),n(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(n){var e=t.edge(n);if(e.width&&e.height){var r=t.node(n.v),o={rank:(t.node(n.w).rank-r.rank)/2+r.rank,e:n};v.addDummyNode(t,"edge-proxy",o,"_ep")}}))}(t)})),n(" removeEmptyRanks",(function(){f(t)})),n(" nestingGraph.cleanup",(function(){s.cleanup(t)})),n(" normalizeRanks",(function(){c(t)})),n(" assignRankMinMax",(function(){!function(t){var n=0;r.forEach(t.nodes(),(function(e){var o=t.node(e);o.borderTop&&(o.minRank=t.node(o.borderTop).rank,o.maxRank=t.node(o.borderBottom).rank,n=r.max(n,o.maxRank))})),t.graph().maxRank=n}(t)})),n(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(n){var e=t.node(n);"edge-proxy"===e.dummy&&(t.edge(e.e).labelRank=e.rank,t.removeNode(n))}))}(t)})),n(" normalize.run",(function(){i.run(t)})),n(" parentDummyChains",(function(){a(t)})),n(" addBorderSegments",(function(){p(t)})),n(" order",(function(){h(t)})),n(" insertSelfEdges",(function(){!function(t){var n=v.buildLayerMatrix(t);r.forEach(n,(function(n){var e=0;r.forEach(n,(function(n,o){var i=t.node(n);i.order=o+e,r.forEach(i.selfEdges,(function(n){v.addDummyNode(t,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++e,e:n.e,label:n.label},"_se")})),delete i.selfEdges}))}))}(t)})),n(" adjustCoordinateSystem",(function(){d.adjust(t)})),n(" position",(function(){l(t)})),n(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(n){var e=t.node(n);if("selfedge"===e.dummy){var r=t.node(e.e.v),o=r.x+r.width/2,i=r.y,u=e.x-o,c=r.height/2;t.setEdge(e.e,e.label),t.removeNode(n),e.label.points=[{x:o+2*u/3,y:i-c},{x:o+5*u/6,y:i-c},{x:o+u,y:i},{x:o+5*u/6,y:i+c},{x:o+2*u/3,y:i+c}],e.label.x=e.x,e.label.y=e.y}}))}(t)})),n(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(n){if(t.children(n).length){var e=t.node(n),o=t.node(e.borderTop),i=t.node(e.borderBottom),u=t.node(r.last(e.borderLeft)),c=t.node(r.last(e.borderRight));e.width=Math.abs(c.x-u.x),e.height=Math.abs(i.y-o.y),e.x=u.x+e.width/2,e.y=o.y+e.height/2}})),r.forEach(t.nodes(),(function(n){"border"===t.node(n).dummy&&t.removeNode(n)}))}(t)})),n(" normalize.undo",(function(){i.undo(t)})),n(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(n){var e=t.edge(n);if(r.has(e,"x"))switch("l"!==e.labelpos&&"r"!==e.labelpos||(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}}))}(t)})),n(" undoCoordinateSystem",(function(){d.undo(t)})),n(" translateGraph",(function(){!function(t){var n=Number.POSITIVE_INFINITY,e=0,o=Number.POSITIVE_INFINITY,i=0,u=t.graph(),c=u.marginx||0,a=u.marginy||0;function f(t){var r=t.x,u=t.y,c=t.width,a=t.height;n=Math.min(n,r-c/2),e=Math.max(e,r+c/2),o=Math.min(o,u-a/2),i=Math.max(i,u+a/2)}r.forEach(t.nodes(),(function(n){f(t.node(n))})),r.forEach(t.edges(),(function(n){var e=t.edge(n);r.has(e,"x")&&f(e)})),n-=c,o-=a,r.forEach(t.nodes(),(function(e){var r=t.node(e);r.x-=n,r.y-=o})),r.forEach(t.edges(),(function(e){var i=t.edge(e);r.forEach(i.points,(function(t){t.x-=n,t.y-=o})),r.has(i,"x")&&(i.x-=n),r.has(i,"y")&&(i.y-=o)})),u.width=e-n+c,u.height=i-o+a}(t)})),n(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(n){var e,r,o=t.edge(n),i=t.node(n.v),u=t.node(n.w);o.points?(e=o.points[0],r=o.points[o.points.length-1]):(o.points=[],e=u,r=i),o.points.unshift(v.intersectRect(i,e)),o.points.push(v.intersectRect(u,r))}))}(t)})),n(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(n){var e=t.edge(n);e.reversed&&e.points.reverse()}))}(t)})),n(" acyclic.undo",(function(){o.undo(t)}))}(n,e)})),e(" updateInputGraph",(function(){!function(t,n){r.forEach(t.nodes(),(function(e){var r=t.node(e),o=n.node(e);r&&(r.x=o.x,r.y=o.y,n.children(e).length&&(r.width=o.width,r.height=o.height))})),r.forEach(t.edges(),(function(e){var o=t.edge(e),i=n.edge(e);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)})),t.graph().width=n.graph().width,t.graph().height=n.graph().height}(t,n)}))}))};var g=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],x=["width","height"],_={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},j=["labelpos"];function k(t,n){return r.mapValues(r.pick(t,n),Number)}function S(t){var n={};return r.forEach(t,(function(t,e){n[e.toLowerCase()]=t})),n}},function(t,n,e){var r=e(113);t.exports=function(t){return r(t,5)}},function(t,n,e){var r=e(73),o=e(41),i=e(74),u=e(37),c=Object.prototype,a=c.hasOwnProperty,f=r((function(t,n){t=Object(t);var e=-1,r=n.length,f=r>2?n[2]:void 0;for(f&&i(n[0],n[1],f)&&(r=1);++e<r;)for(var s=n[e],p=u(s),d=-1,h=p.length;++d<h;){var l=p[d],v=t[l];(void 0===v||o(v,c[l])&&!a.call(t,l))&&(t[l]=s[l])}return t}));t.exports=f},function(t,n,e){var r=e(338)(e(339));t.exports=r},function(t,n,e){var r=e(31),o=e(30),i=e(33);t.exports=function(t){return function(n,e,u){var c=Object(n);if(!o(n)){var a=r(e,3);n=i(n),e=function(t){return a(c[t],t,c)}}var f=t(n,e,u);return f>-1?c[a?n[f]:f]:void 0}}},function(t,n,e){var r=e(152),o=e(31),i=e(340),u=Math.max;t.exports=function(t,n,e){var c=null==t?0:t.length;if(!c)return-1;var a=null==e?0:i(e);return a<0&&(a=u(c+a,0)),r(t,o(n,3),a)}},function(t,n,e){var r=e(160);t.exports=function(t){var n=r(t),e=n%1;return n==n?e?n-e:n:0}},function(t,n,e){var r=e(342),o=e(22),i=e(45),u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=o(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var e=c.test(t);return e||a.test(t)?f(t.slice(2),e?2:8):u.test(t)?NaN:+t}},function(t,n,e){var r=e(343),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},function(t,n){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},function(t,n,e){var r=e(97),o=e(133),i=e(37);t.exports=function(t,n){return null==t?t:r(t,o(n),i)}},function(t,n){t.exports=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}},function(t,n,e){var r=e(64),o=e(96),i=e(31);t.exports=function(t,n){var e={};return n=i(n,3),o(t,(function(t,o,i){r(e,o,n(t,o,i))})),e}},function(t,n,e){var r=e(101),o=e(348),i=e(38);t.exports=function(t){return t&&t.length?r(t,i,o):void 0}},function(t,n){t.exports=function(t,n){return t>n}},function(t,n,e){var r=e(350),o=e(354)((function(t,n,e){r(t,n,e)}));t.exports=o},function(t,n,e){var r=e(58),o=e(162),i=e(97),u=e(351),c=e(22),a=e(37),f=e(163);t.exports=function t(n,e,s,p,d){n!==e&&i(e,(function(i,a){if(d||(d=new r),c(i))u(n,e,a,s,t,p,d);else{var h=p?p(f(n,a),i,a+"",n,e,d):void 0;void 0===h&&(h=i),o(n,a,h)}}),a)}},function(t,n,e){var r=e(162),o=e(119),i=e(128),u=e(120),c=e(129),a=e(53),f=e(17),s=e(153),p=e(43),d=e(51),h=e(22),l=e(352),v=e(54),y=e(163),g=e(353);t.exports=function(t,n,e,b,m,x,_){var w=y(t,e),E=y(n,e),j=_.get(E);if(j)r(t,e,j);else{var k=x?x(w,E,e+"",t,n,_):void 0,S=void 0===k;if(S){var O=f(E),N=!O&&p(E),I=!O&&!N&&v(E);k=E,O||N||I?f(w)?k=w:s(w)?k=u(w):N?(S=!1,k=o(E,!0)):I?(S=!1,k=i(E,!0)):k=[]:l(E)||a(E)?(k=w,a(w)?k=g(w):h(w)&&!d(w)||(k=c(E))):S=!1}S&&(_.set(E,k),m(k,E,b,x,_),_.delete(E)),r(t,e,k)}}},function(t,n,e){var r=e(36),o=e(68),i=e(26),u=Function.prototype,c=Object.prototype,a=u.toString,f=c.hasOwnProperty,s=a.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var n=o(t);if(null===n)return!0;var e=f.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&a.call(e)==s}},function(t,n,e){var r=e(52),o=e(37);t.exports=function(t){return r(t,o(t))}},function(t,n,e){var r=e(73),o=e(74);t.exports=function(t){return r((function(n,e){var r=-1,i=e.length,u=i>1?e[i-1]:void 0,c=i>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(i--,u):void 0,c&&o(e[0],e[1],c)&&(u=i<3?void 0:u,i=1),n=Object(n);++r<i;){var a=e[r];a&&t(n,a,r,u)}return n}))}},function(t,n,e){var r=e(101),o=e(164),i=e(38);t.exports=function(t){return t&&t.length?r(t,i,o):void 0}},function(t,n,e){var r=e(101),o=e(31),i=e(164);t.exports=function(t,n){return t&&t.length?r(t,o(n,2),i):void 0}},function(t,n,e){var r=e(24);t.exports=function(){return r.Date.now()}},function(t,n,e){var r=e(359),o=e(362)((function(t,n){return null==t?{}:r(t,n)}));t.exports=o},function(t,n,e){var r=e(360),o=e(142);t.exports=function(t,n){return r(t,n,(function(n,e){return o(t,e)}))}},function(t,n,e){var r=e(70),o=e(361),i=e(71);t.exports=function(t,n,e){for(var u=-1,c=n.length,a={};++u<c;){var f=n[u],s=r(t,f);e(s,f)&&o(a,i(f,t),s)}return a}},function(t,n,e){var r=e(63),o=e(71),i=e(65),u=e(22),c=e(55);t.exports=function(t,n,e,a){if(!u(t))return t;for(var f=-1,s=(n=o(n,t)).length,p=s-1,d=t;null!=d&&++f<s;){var h=c(n[f]),l=e;if("__proto__"===h||"constructor"===h||"prototype"===h)return t;if(f!=p){var v=d[h];void 0===(l=a?a(v,h,d):void 0)&&(l=u(v)?v:i(n[f+1])?[]:{})}r(d,h,l),d=d[h]}return t}},function(t,n,e){var r=e(161),o=e(150),i=e(151);t.exports=function(t){return i(o(t,void 0,r),t+"")}},function(t,n,e){var r=e(364)();t.exports=r},function(t,n,e){var r=e(365),o=e(74),i=e(160);t.exports=function(t){return function(n,e,u){return u&&"number"!=typeof u&&o(n,e,u)&&(e=u=void 0),n=i(n),void 0===e?(e=n,n=0):e=i(e),u=void 0===u?n<e?1:-1:i(u),r(n,e,u,t)}}},function(t,n){var e=Math.ceil,r=Math.max;t.exports=function(t,n,o,i){for(var u=-1,c=r(e((n-t)/(o||1)),0),a=Array(c);c--;)a[i?c:++u]=t,t+=o;return a}},function(t,n,e){var r=e(100),o=e(367),i=e(73),u=e(74),c=i((function(t,n){if(null==t)return[];var e=n.length;return e>1&&u(t,n[0],n[1])?n=[]:e>2&&u(n[0],n[1],n[2])&&(n=[n[0]]),o(t,r(n,1),[])}));t.exports=c},function(t,n,e){var r=e(72),o=e(70),i=e(31),u=e(148),c=e(368),a=e(66),f=e(369),s=e(38),p=e(17);t.exports=function(t,n,e){n=n.length?r(n,(function(t){return p(t)?function(n){return o(n,1===t.length?t[0]:t)}:t})):[s];var d=-1;n=r(n,a(i));var h=u(t,(function(t,e,o){return{criteria:r(n,(function(n){return n(t)})),index:++d,value:t}}));return c(h,(function(t,n){return f(t,n,e)}))}},function(t,n){t.exports=function(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}},function(t,n,e){var r=e(370);t.exports=function(t,n,e){for(var o=-1,i=t.criteria,u=n.criteria,c=i.length,a=e.length;++o<c;){var f=r(i[o],u[o]);if(f)return o>=a?f:f*("desc"==e[o]?-1:1)}return t.index-n.index}},function(t,n,e){var r=e(45);t.exports=function(t,n){if(t!==n){var e=void 0!==t,o=null===t,i=t==t,u=r(t),c=void 0!==n,a=null===n,f=n==n,s=r(n);if(!a&&!s&&!u&&t>n||u&&c&&f&&!a&&!s||o&&c&&f||!e&&f||!i)return 1;if(!o&&!u&&!s&&t<n||s&&e&&i&&!o&&!u||a&&e&&i||!c&&i||!f)return-1}return 0}},function(t,n,e){var r=e(141),o=0;t.exports=function(t){var n=++o;return r(t)+n}},function(t,n,e){var r=e(63),o=e(373);t.exports=function(t,n){return o(t||[],n||[],r)}},function(t,n){t.exports=function(t,n,e){for(var r=-1,o=t.length,i=n.length,u={};++r<o;){var c=r<i?n[r]:void 0;e(u,t[r],c)}return u}},function(t,n,e){"use strict";var r=e(9),o=e(375);t.exports={run:function(t){var n="greedy"===t.graph().acyclicer?o(t,function(t){return function(n){return t.edge(n).weight}}(t)):function(t){var n=[],e={},o={};function i(u){r.has(o,u)||(o[u]=!0,e[u]=!0,r.forEach(t.outEdges(u),(function(t){r.has(e,t.w)?n.push(t):i(t.w)})),delete e[u])}return r.forEach(t.nodes(),i),n}(t);r.forEach(n,(function(n){var e=t.edge(n);t.removeEdge(n),e.forwardName=n.name,e.reversed=!0,t.setEdge(n.w,n.v,e,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(n){var e=t.edge(n);if(e.reversed){t.removeEdge(n);var r=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(n.w,n.v,e,r)}}))}}},function(t,n,e){var r=e(9),o=e(23).Graph,i=e(376);t.exports=function(t,n){if(t.nodeCount()<=1)return[];var e=function(t,n){var e=new o,u=0,c=0;r.forEach(t.nodes(),(function(t){e.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=e.edge(t.v,t.w)||0,o=n(t),i=r+o;e.setEdge(t.v,t.w,i),c=Math.max(c,e.node(t.v).out+=o),u=Math.max(u,e.node(t.w).in+=o)}));var f=r.range(c+u+3).map((function(){return new i})),s=u+1;return r.forEach(e.nodes(),(function(t){a(f,s,e.node(t))})),{graph:e,buckets:f,zeroIdx:s}}(t,n||u),f=function(t,n,e){var r,o=[],i=n[n.length-1],u=n[0];for(;t.nodeCount();){for(;r=u.dequeue();)c(t,n,e,r);for(;r=i.dequeue();)c(t,n,e,r);if(t.nodeCount())for(var a=n.length-2;a>0;--a)if(r=n[a].dequeue()){o=o.concat(c(t,n,e,r,!0));break}}return o}(e.graph,e.buckets,e.zeroIdx);return r.flatten(r.map(f,(function(n){return t.outEdges(n.v,n.w)})),!0)};var u=r.constant(1);function c(t,n,e,o,i){var u=i?[]:void 0;return r.forEach(t.inEdges(o.v),(function(r){var o=t.edge(r),c=t.node(r.v);i&&u.push({v:r.v,w:r.w}),c.out-=o,a(n,e,c)})),r.forEach(t.outEdges(o.v),(function(r){var o=t.edge(r),i=r.w,u=t.node(i);u.in-=o,a(n,e,u)})),t.removeNode(o.v),u}function a(t,n,e){e.out?e.in?t[e.out-e.in+n].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}},function(t,n){function e(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function o(t,n){if("_next"!==t&&"_prev"!==t)return n}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,n=t._prev;if(n!==t)return r(n),n},e.prototype.enqueue=function(t){var n=this._sentinel;t._prev&&t._next&&r(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n},e.prototype.toString=function(){for(var t=[],n=this._sentinel,e=n._prev;e!==n;)t.push(JSON.stringify(e,o)),e=e._prev;return"["+t.join(", ")+"]"}},function(t,n,e){"use strict";var r=e(9),o=e(19);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(n){!function(t,n){var e,r,i,u=n.v,c=t.node(u).rank,a=n.w,f=t.node(a).rank,s=n.name,p=t.edge(n),d=p.labelRank;if(f===c+1)return;for(t.removeEdge(n),i=0,++c;c<f;++i,++c)p.points=[],r={width:0,height:0,edgeLabel:p,edgeObj:n,rank:c},e=o.addDummyNode(t,"edge",r,"_d"),c===d&&(r.width=p.width,r.height=p.height,r.dummy="edge-label",r.labelpos=p.labelpos),t.setEdge(u,e,{weight:p.weight},s),0===i&&t.graph().dummyChains.push(e),u=e;t.setEdge(u,a,{weight:p.weight},s)}(t,n)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(n){var e,r=t.node(n),o=r.edgeLabel;for(t.setEdge(r.edgeObj,o);r.dummy;)e=t.successors(n)[0],t.removeNode(n),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),n=e,r=t.node(n)}))}}},function(t,n,e){"use strict";var r=e(75).longestPath,o=e(165),i=e(379);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":c(t);break;case"tight-tree":!function(t){r(t),o(t)}(t);break;case"longest-path":u(t);break;default:c(t)}};var u=r;function c(t){i(t)}},function(t,n,e){"use strict";var r=e(9),o=e(165),i=e(75).slack,u=e(75).longestPath,c=e(23).alg.preorder,a=e(23).alg.postorder,f=e(19).simplify;function s(t){t=f(t),u(t);var n,e=o(t);for(h(e),p(e,t);n=v(e);)g(e,t,n,y(e,t,n))}function p(t,n){var e=a(t,t.nodes());e=e.slice(0,e.length-1),r.forEach(e,(function(e){!function(t,n,e){var r=t.node(e).parent;t.edge(e,r).cutvalue=d(t,n,e)}(t,n,e)}))}function d(t,n,e){var o=t.node(e).parent,i=!0,u=n.edge(e,o),c=0;return u||(i=!1,u=n.edge(o,e)),c=u.weight,r.forEach(n.nodeEdges(e),(function(r){var u,a,f=r.v===e,s=f?r.w:r.v;if(s!==o){var p=f===i,d=n.edge(r).weight;if(c+=p?d:-d,u=e,a=s,t.hasEdge(u,a)){var h=t.edge(e,s).cutvalue;c+=p?-h:h}}})),c}function h(t,n){arguments.length<2&&(n=t.nodes()[0]),l(t,{},1,n)}function l(t,n,e,o,i){var u=e,c=t.node(o);return n[o]=!0,r.forEach(t.neighbors(o),(function(i){r.has(n,i)||(e=l(t,n,e,i,o))})),c.low=u,c.lim=e++,i?c.parent=i:delete c.parent,e}function v(t){return r.find(t.edges(),(function(n){return t.edge(n).cutvalue<0}))}function y(t,n,e){var o=e.v,u=e.w;n.hasEdge(o,u)||(o=e.w,u=e.v);var c=t.node(o),a=t.node(u),f=c,s=!1;c.lim>a.lim&&(f=a,s=!0);var p=r.filter(n.edges(),(function(n){return s===b(t,t.node(n.v),f)&&s!==b(t,t.node(n.w),f)}));return r.minBy(p,(function(t){return i(n,t)}))}function g(t,n,e,o){var i=e.v,u=e.w;t.removeEdge(i,u),t.setEdge(o.v,o.w,{}),h(t),p(t,n),function(t,n){var e=r.find(t.nodes(),(function(t){return!n.node(t).parent})),o=c(t,e);o=o.slice(1),r.forEach(o,(function(e){var r=t.node(e).parent,o=n.edge(e,r),i=!1;o||(o=n.edge(r,e),i=!0),n.node(e).rank=n.node(r).rank+(i?o.minlen:-o.minlen)}))}(t,n)}function b(t,n,e){return e.low<=n.lim&&n.lim<=e.lim}t.exports=s,s.initLowLimValues=h,s.initCutValues=p,s.calcCutValue=d,s.leaveEdge=v,s.enterEdge=y,s.exchangeEdges=g},function(t,n,e){var r=e(9);t.exports=function(t){var n=function(t){var n={},e=0;function o(i){var u=e;r.forEach(t.children(i),o),n[i]={low:u,lim:e++}}return r.forEach(t.children(),o),n}(t);r.forEach(t.graph().dummyChains,(function(e){for(var r=t.node(e),o=r.edgeObj,i=function(t,n,e,r){var o,i,u=[],c=[],a=Math.min(n[e].low,n[r].low),f=Math.max(n[e].lim,n[r].lim);o=e;do{o=t.parent(o),u.push(o)}while(o&&(n[o].low>a||f>n[o].lim));i=o,o=r;for(;(o=t.parent(o))!==i;)c.push(o);return{path:u.concat(c.reverse()),lca:i}}(t,n,o.v,o.w),u=i.path,c=i.lca,a=0,f=u[a],s=!0;e!==o.w;){if(r=t.node(e),s){for(;(f=u[a])!==c&&t.node(f).maxRank<r.rank;)a++;f===c&&(s=!1)}if(!s){for(;a<u.length-1&&t.node(f=u[a+1]).minRank<=r.rank;)a++;f=u[a]}t.setParent(e,f),e=t.successors(e)[0]}}))}},function(t,n,e){var r=e(9),o=e(19);t.exports={run:function(t){var n=o.addDummyNode(t,"root",{},"_root"),e=function(t){var n={};return r.forEach(t.children(),(function(e){!function e(o,i){var u=t.children(o);u&&u.length&&r.forEach(u,(function(t){e(t,i+1)}));n[o]=i}(e,1)})),n}(t),i=r.max(r.values(e))-1,u=2*i+1;t.graph().nestingRoot=n,r.forEach(t.edges(),(function(n){t.edge(n).minlen*=u}));var c=function(t){return r.reduce(t.edges(),(function(n,e){return n+t.edge(e).weight}),0)}(t)+1;r.forEach(t.children(),(function(a){!function t(n,e,i,u,c,a,f){var s=n.children(f);if(!s.length)return void(f!==e&&n.setEdge(e,f,{weight:0,minlen:i}));var p=o.addBorderNode(n,"_bt"),d=o.addBorderNode(n,"_bb"),h=n.node(f);n.setParent(p,f),h.borderTop=p,n.setParent(d,f),h.borderBottom=d,r.forEach(s,(function(r){t(n,e,i,u,c,a,r);var o=n.node(r),s=o.borderTop?o.borderTop:r,h=o.borderBottom?o.borderBottom:r,l=o.borderTop?u:2*u,v=s!==h?1:c-a[f]+1;n.setEdge(p,s,{weight:l,minlen:v,nestingEdge:!0}),n.setEdge(h,d,{weight:l,minlen:v,nestingEdge:!0})})),n.parent(f)||n.setEdge(e,p,{weight:0,minlen:c+a[f]})}(t,n,u,c,i,e,a)})),t.graph().nodeRankFactor=u},cleanup:function(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,r.forEach(t.edges(),(function(n){t.edge(n).nestingEdge&&t.removeEdge(n)}))}}},function(t,n,e){var r=e(9),o=e(19);function i(t,n,e,r,i,u){var c={width:0,height:0,rank:u,borderType:n},a=i[n][u-1],f=o.addDummyNode(t,"border",c,e);i[n][u]=f,t.setParent(f,r),a&&t.setEdge(a,f,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function n(e){var o=t.children(e),u=t.node(e);if(o.length&&r.forEach(o,n),r.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var c=u.minRank,a=u.maxRank+1;c<a;++c)i(t,"borderLeft","_bl",e,u,c),i(t,"borderRight","_br",e,u,c)}}))}},function(t,n,e){"use strict";var r=e(9);function o(t){r.forEach(t.nodes(),(function(n){i(t.node(n))})),r.forEach(t.edges(),(function(n){i(t.edge(n))}))}function i(t){var n=t.width;t.width=t.height,t.height=n}function u(t){t.y=-t.y}function c(t){var n=t.x;t.x=t.y,t.y=n}t.exports={adjust:function(t){var n=t.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||o(t)},undo:function(t){var n=t.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(t){r.forEach(t.nodes(),(function(n){u(t.node(n))})),r.forEach(t.edges(),(function(n){var e=t.edge(n);r.forEach(e.points,u),r.has(e,"y")&&u(e)}))}(t);"lr"!==n&&"rl"!==n||(!function(t){r.forEach(t.nodes(),(function(n){c(t.node(n))})),r.forEach(t.edges(),(function(n){var e=t.edge(n);r.forEach(e.points,c),r.has(e,"x")&&c(e)}))}(t),o(t))}}},function(t,n,e){"use strict";var r=e(9),o=e(385),i=e(386),u=e(387),c=e(391),a=e(392),f=e(23).Graph,s=e(19);function p(t,n,e){return r.map(n,(function(n){return c(t,n,e)}))}function d(t,n){var e=new f;r.forEach(t,(function(t){var o=t.graph().root,i=u(t,o,e,n);r.forEach(i.vs,(function(n,e){t.node(n).order=e})),a(t,e,i.vs)}))}function h(t,n){r.forEach(n,(function(n){r.forEach(n,(function(n,e){t.node(n).order=e}))}))}t.exports=function(t){var n=s.maxRank(t),e=p(t,r.range(1,n+1),"inEdges"),u=p(t,r.range(n-1,-1,-1),"outEdges"),c=o(t);h(t,c);for(var a,f=Number.POSITIVE_INFINITY,l=0,v=0;v<4;++l,++v){d(l%2?e:u,l%4>=2),c=s.buildLayerMatrix(t);var y=i(t,c);y<f&&(v=0,a=r.cloneDeep(c),f=y)}h(t,a)}},function(t,n,e){"use strict";var r=e(9);t.exports=function(t){var n={},e=r.filter(t.nodes(),(function(n){return!t.children(n).length})),o=r.max(r.map(e,(function(n){return t.node(n).rank}))),i=r.map(r.range(o+1),(function(){return[]}));var u=r.sortBy(e,(function(n){return t.node(n).rank}));return r.forEach(u,(function e(o){if(r.has(n,o))return;n[o]=!0;var u=t.node(o);i[u.rank].push(o),r.forEach(t.successors(o),e)})),i}},function(t,n,e){"use strict";var r=e(9);function o(t,n,e){for(var o=r.zipObject(e,r.map(e,(function(t,n){return n}))),i=r.flatten(r.map(n,(function(n){return r.sortBy(r.map(t.outEdges(n),(function(n){return{pos:o[n.w],weight:t.edge(n).weight}})),"pos")})),!0),u=1;u<e.length;)u<<=1;var c=2*u-1;u-=1;var a=r.map(new Array(c),(function(){return 0})),f=0;return r.forEach(i.forEach((function(t){var n=t.pos+u;a[n]+=t.weight;for(var e=0;n>0;)n%2&&(e+=a[n+1]),a[n=n-1>>1]+=t.weight;f+=t.weight*e}))),f}t.exports=function(t,n){for(var e=0,r=1;r<n.length;++r)e+=o(t,n[r-1],n[r]);return e}},function(t,n,e){var r=e(9),o=e(388),i=e(389),u=e(390);t.exports=function t(n,e,c,a){var f=n.children(e),s=n.node(e),p=s?s.borderLeft:void 0,d=s?s.borderRight:void 0,h={};p&&(f=r.filter(f,(function(t){return t!==p&&t!==d})));var l=o(n,f);r.forEach(l,(function(e){if(n.children(e.v).length){var o=t(n,e.v,c,a);h[e.v]=o,r.has(o,"barycenter")&&(i=e,u=o,r.isUndefined(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u}));var v=i(l,c);!function(t,n){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return n[t]?n[t].vs:t})),!0)}))}(v,h);var y=u(v,a);if(p&&(y.vs=r.flatten([p,y.vs,d],!0),n.predecessors(p).length)){var g=n.node(n.predecessors(p)[0]),b=n.node(n.predecessors(d)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+g.order+b.order)/(y.weight+2),y.weight+=2}return y}},function(t,n,e){var r=e(9);t.exports=function(t,n){return r.map(n,(function(n){var e=t.inEdges(n);if(e.length){var o=r.reduce(e,(function(n,e){var r=t.edge(e),o=t.node(e.v);return{sum:n.sum+r.weight*o.order,weight:n.weight+r.weight}}),{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}return{v:n}}))}},function(t,n,e){"use strict";var r=e(9);t.exports=function(t,n){var e={};return r.forEach(t,(function(t,n){var o=e[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:n};r.isUndefined(t.barycenter)||(o.barycenter=t.barycenter,o.weight=t.weight)})),r.forEach(n.edges(),(function(t){var n=e[t.v],o=e[t.w];r.isUndefined(n)||r.isUndefined(o)||(o.indegree++,n.out.push(e[t.w]))})),function(t){var n=[];function e(t){return function(n){n.merged||(r.isUndefined(n.barycenter)||r.isUndefined(t.barycenter)||n.barycenter>=t.barycenter)&&function(t,n){var e=0,r=0;t.weight&&(e+=t.barycenter*t.weight,r+=t.weight);n.weight&&(e+=n.barycenter*n.weight,r+=n.weight);t.vs=n.vs.concat(t.vs),t.barycenter=e/r,t.weight=r,t.i=Math.min(n.i,t.i),n.merged=!0}(t,n)}}function o(n){return function(e){e.in.push(n),0==--e.indegree&&t.push(e)}}for(;t.length;){var i=t.pop();n.push(i),r.forEach(i.in.reverse(),e(i)),r.forEach(i.out,o(i))}return r.map(r.filter(n,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(e,(function(t){return!t.indegree})))}},function(t,n,e){var r=e(9),o=e(19);function i(t,n,e){for(var o;n.length&&(o=r.last(n)).i<=e;)n.pop(),t.push(o.vs),e++;return e}t.exports=function(t,n){var e=o.partition(t,(function(t){return r.has(t,"barycenter")})),u=e.lhs,c=r.sortBy(e.rhs,(function(t){return-t.i})),a=[],f=0,s=0,p=0;u.sort((d=!!n,function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:d?n.i-t.i:t.i-n.i})),p=i(a,c,p),r.forEach(u,(function(t){p+=t.vs.length,a.push(t.vs),f+=t.barycenter*t.weight,s+=t.weight,p=i(a,c,p)}));var d;var h={vs:r.flatten(a,!0)};s&&(h.barycenter=f/s,h.weight=s);return h}},function(t,n,e){var r=e(9),o=e(23).Graph;t.exports=function(t,n,e){var i=function(t){var n;for(;t.hasNode(n=r.uniqueId("_root")););return n}(t),u=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(n){return t.node(n)}));return r.forEach(t.nodes(),(function(o){var c=t.node(o),a=t.parent(o);(c.rank===n||c.minRank<=n&&n<=c.maxRank)&&(u.setNode(o),u.setParent(o,a||i),r.forEach(t[e](o),(function(n){var e=n.v===o?n.w:n.v,i=u.edge(e,o),c=r.isUndefined(i)?0:i.weight;u.setEdge(e,o,{weight:t.edge(n).weight+c})})),r.has(c,"minRank")&&u.setNode(o,{borderLeft:c.borderLeft[n],borderRight:c.borderRight[n]}))})),u}},function(t,n,e){var r=e(9);t.exports=function(t,n,e){var o,i={};r.forEach(e,(function(e){for(var r,u,c=t.parent(e);c;){if((r=t.parent(c))?(u=i[r],i[r]=c):(u=o,o=c),u&&u!==c)return void n.setEdge(u,c);c=r}}))}},function(t,n,e){"use strict";var r=e(9),o=e(19),i=e(394).positionX;t.exports=function(t){(function(t){var n=o.buildLayerMatrix(t),e=t.graph().ranksep,i=0;r.forEach(n,(function(n){var o=r.max(r.map(n,(function(n){return t.node(n).height})));r.forEach(n,(function(n){t.node(n).y=i+o/2})),i+=o+e}))})(t=o.asNonCompoundGraph(t)),r.forEach(i(t),(function(n,e){t.node(e).x=n}))}},function(t,n,e){"use strict";var r=e(9),o=e(23).Graph,i=e(19);function u(t,n){var e={};return r.reduce(n,(function(n,o){var i=0,u=0,c=n.length,f=r.last(o);return r.forEach(o,(function(n,s){var p=function(t,n){if(t.node(n).dummy)return r.find(t.predecessors(n),(function(n){return t.node(n).dummy}))}(t,n),d=p?t.node(p).order:c;(p||n===f)&&(r.forEach(o.slice(u,s+1),(function(n){r.forEach(t.predecessors(n),(function(r){var o=t.node(r),u=o.order;!(u<i||d<u)||o.dummy&&t.node(n).dummy||a(e,r,n)}))})),u=s+1,i=d)})),o})),e}function c(t,n){var e={};function o(n,o,i,u,c){var f;r.forEach(r.range(o,i),(function(o){f=n[o],t.node(f).dummy&&r.forEach(t.predecessors(f),(function(n){var r=t.node(n);r.dummy&&(r.order<u||r.order>c)&&a(e,n,f)}))}))}return r.reduce(n,(function(n,e){var i,u=-1,c=0;return r.forEach(e,(function(r,a){if("border"===t.node(r).dummy){var f=t.predecessors(r);f.length&&(i=t.node(f[0]).order,o(e,c,a,u,i),c=a,u=i)}o(e,c,e.length,i,n.length)})),e})),e}function a(t,n,e){if(n>e){var r=n;n=e,e=r}var o=t[n];o||(t[n]=o={}),o[e]=!0}function f(t,n,e){if(n>e){var o=n;n=e,e=o}return r.has(t[n],e)}function s(t,n,e,o){var i={},u={},c={};return r.forEach(n,(function(t){r.forEach(t,(function(t,n){i[t]=t,u[t]=t,c[t]=n}))})),r.forEach(n,(function(t){var n=-1;r.forEach(t,(function(t){var a=o(t);if(a.length)for(var s=((a=r.sortBy(a,(function(t){return c[t]}))).length-1)/2,p=Math.floor(s),d=Math.ceil(s);p<=d;++p){var h=a[p];u[t]===t&&n<c[h]&&!f(e,t,h)&&(u[h]=t,u[t]=i[t]=i[h],n=c[h])}}))})),{root:i,align:u}}function p(t,n,e,i,u){var c={},a=function(t,n,e,i){var u=new o,c=t.graph(),a=function(t,n,e){return function(o,i,u){var c,a=o.node(i),f=o.node(u),s=0;if(s+=a.width/2,r.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=-a.width/2;break;case"r":c=a.width/2}if(c&&(s+=e?c:-c),c=0,s+=(a.dummy?n:t)/2,s+=(f.dummy?n:t)/2,s+=f.width/2,r.has(f,"labelpos"))switch(f.labelpos.toLowerCase()){case"l":c=f.width/2;break;case"r":c=-f.width/2}return c&&(s+=e?c:-c),c=0,s}}(c.nodesep,c.edgesep,i);return r.forEach(n,(function(n){var o;r.forEach(n,(function(n){var r=e[n];if(u.setNode(r),o){var i=e[o],c=u.edge(i,r);u.setEdge(i,r,Math.max(a(t,n,o),c||0))}o=n}))})),u}(t,n,e,u),f=u?"borderLeft":"borderRight";function s(t,n){for(var e=a.nodes(),r=e.pop(),o={};r;)o[r]?t(r):(o[r]=!0,e.push(r),e=e.concat(n(r))),r=e.pop()}return s((function(t){c[t]=a.inEdges(t).reduce((function(t,n){return Math.max(t,c[n.v]+a.edge(n))}),0)}),a.predecessors.bind(a)),s((function(n){var e=a.outEdges(n).reduce((function(t,n){return Math.min(t,c[n.w]-a.edge(n))}),Number.POSITIVE_INFINITY),r=t.node(n);e!==Number.POSITIVE_INFINITY&&r.borderType!==f&&(c[n]=Math.max(c[n],e))}),a.successors.bind(a)),r.forEach(i,(function(t){c[t]=c[e[t]]})),c}function d(t,n){return r.minBy(r.values(n),(function(n){var e=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return r.forIn(n,(function(n,r){var i=function(t,n){return t.node(n).width}(t,r)/2;e=Math.max(n+i,e),o=Math.min(n-i,o)})),e-o}))}function h(t,n){var e=r.values(n),o=r.min(e),i=r.max(e);r.forEach(["u","d"],(function(e){r.forEach(["l","r"],(function(u){var c,a=e+u,f=t[a];if(f!==n){var s=r.values(f);(c="l"===u?o-r.min(s):i-r.max(s))&&(t[a]=r.mapValues(f,(function(t){return t+c})))}}))}))}function l(t,n){return r.mapValues(t.ul,(function(e,o){if(n)return t[n.toLowerCase()][o];var i=r.sortBy(r.map(t,o));return(i[1]+i[2])/2}))}t.exports={positionX:function(t){var n,e=i.buildLayerMatrix(t),o=r.merge(u(t,e),c(t,e)),a={};r.forEach(["u","d"],(function(i){n="u"===i?e:r.values(e).reverse(),r.forEach(["l","r"],(function(e){"r"===e&&(n=r.map(n,(function(t){return r.values(t).reverse()})));var u=("u"===i?t.predecessors:t.successors).bind(t),c=s(t,n,o,u),f=p(t,n,c.root,c.align,"r"===e);"r"===e&&(f=r.mapValues(f,(function(t){return-t}))),a[i+e]=f}))}));var f=d(t,a);return h(a,f),l(a,t.graph().align)},findType1Conflicts:u,findType2Conflicts:c,addConflict:a,hasConflict:f,verticalAlignment:s,horizontalCompaction:p,alignCoordinates:h,findSmallestWidthAlignment:d,balance:l}},function(t,n,e){var r=e(9),o=e(19),i=e(23).Graph;t.exports={debugOrdering:function(t){var n=o.buildLayerMatrix(t),e=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)})),r.forEach(t.edges(),(function(t){e.setEdge(t.v,t.w,{},t.name)})),r.forEach(n,(function(t,n){var o="layer"+n;e.setNode(o,{rank:"same"}),r.reduce(t,(function(t,n){return e.setEdge(t,n,{style:"invis"}),n}))})),e}}},function(t,n){t.exports="0.8.5"}]).default}));
  2. //# sourceMappingURL=dagreLayout.js.map