!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gM||(M>O&&(O=M,P=[]),P.push(a))}function e(){var a,b;if(b=f(),null!==b)for(a=[];null!==b;)a.push(b),b=f();else a=null;return a}function f(){var a,c,e,f,h,i,j,k,l,m,n,o,p,q,r,s;for(q=M,r=M,a=[],c=G();null!==c;)a.push(c),c=G();if(null!==a)if(s=M,c=C(),null!==c?(e=G(),null!==e?c=[c,e]:(c=null,M=s)):(c=null,M=s),c=null!==c?c:"",null!==c)if(e=D(),null!==e){for(f=[],h=G();null!==h;)f.push(h),h=G();if(null!==f)if(h=w(),h=null!==h?h:"",null!==h){for(i=[],j=G();null!==j;)i.push(j),j=G();if(null!==i)if(123===b.charCodeAt(M)?(j="{",M++):(j=null,0===N&&d('"{"')),null!==j){for(k=[],l=G();null!==l;)k.push(l),l=G();if(null!==k)if(l=g(),l=null!==l?l:"",null!==l){for(m=[],n=G();null!==n;)m.push(n),n=G();if(null!==m)if(125===b.charCodeAt(M)?(n="}",M++):(n=null,0===N&&d('"}"')),null!==n){for(o=[],p=G();null!==p;)o.push(p),p=G();null!==o?a=[a,c,e,f,h,i,j,k,l,m,n,o]:(a=null,M=r)}else a=null,M=r;else a=null,M=r}else a=null,M=r;else a=null,M=r}else a=null,M=r;else a=null,M=r}else a=null,M=r;else a=null,M=r}else a=null,M=r;else a=null,M=r;else a=null,M=r;return null!==a&&(a=function(a,b,c,d){return{type:b,id:c,stmts:d}}(q,a[2],a[4],a[8])),null===a&&(M=q),a}function g(){var a,c,e,f,g,i,j,k,l,m,n;if(l=M,m=M,a=h(),null!==a){for(c=[],e=G();null!==e;)c.push(e),e=G();if(null!==c)if(59===b.charCodeAt(M)?(e=";",M++):(e=null,0===N&&d('";"')),e=null!==e?e:"",null!==e){for(f=[],n=M,g=[],i=G();null!==i;)g.push(i),i=G();if(null!==g)if(i=h(),null!==i){for(j=[],k=G();null!==k;)j.push(k),k=G();null!==j?(59===b.charCodeAt(M)?(k=";",M++):(k=null,0===N&&d('";"')),k=null!==k?k:"",null!==k?g=[g,i,j,k]:(g=null,M=n)):(g=null,M=n)}else g=null,M=n;else g=null,M=n;for(;null!==g;){for(f.push(g),n=M,g=[],i=G();null!==i;)g.push(i),i=G();if(null!==g)if(i=h(),null!==i){for(j=[],k=G();null!==k;)j.push(k),k=G();null!==j?(59===b.charCodeAt(M)?(k=";",M++):(k=null,0===N&&d('";"')),k=null!==k?k:"",null!==k?g=[g,i,j,k]:(g=null,M=n)):(g=null,M=n)}else g=null,M=n;else g=null,M=n}null!==f?a=[a,c,e,f]:(a=null,M=m)}else a=null,M=m;else a=null,M=m}else a=null,M=m;return null!==a&&(a=function(a,b,c){for(var d=[b],e=0;e"===b.substr(M,2)?(a="->",M+=2):(a=null,0===N&&d('"->"')),null!==a?(c=function(){return L}(M)?"":null,null!==c?a=[a,c]:(a=null,M=j)):(a=null,M=j)),null!==a){for(c=[],e=G();null!==e;)c.push(e),e=G();if(null!==c)if(e=s(),null!==e){for(f=[],g=G();null!==g;)f.push(g),g=G();null!==f?(g=q(),g=null!==g?g:"",null!==g?a=[a,c,e,f,g]:(a=null,M=i)):(a=null,M=i)}else a=null,M=i;else a=null,M=i}else a=null,M=i;return null!==a&&(a=function(a,b,c){for(var d=[b],e=0;eM?(f=b.charAt(M),M++):(f=null,0===N&&d("any character")),null!==f?e=[e,f]:(e=null,M=h)):(e=null,M=h);null!==e;)c.push(e),h=M,i=M,N++,"*/"===b.substr(M,2)?(e="*/",M+=2):(e=null,0===N&&d('"*/"')),N--,null===e?e="":(e=null,M=i),null!==e?(b.length>M?(f=b.charAt(M),M++):(f=null,0===N&&d("any character")),null!==f?e=[e,f]:(e=null,M=h)):(e=null,M=h);null!==c?("*/"===b.substr(M,2)?(e="*/",M+=2):(e=null,0===N&&d('"*/"')),null!==e?a=[a,c,e]:(a=null,M=g)):(a=null,M=g)}else a=null,M=g;return N--,0===N&&null===a&&d("comment"),a}function G(){var a;return a=E(),null===a&&(a=F()),a}function H(a){a.sort();for(var b=null,c=[],d=0;d":"--",c=new h;c.writeLine((a.isDirected()?"digraph":"graph")+" {"),c.indent();var f=a.graph();return f&&Object.keys(f).map(function(a){c.writeLine(e(a)+"="+e(f[a])+";")}),d(a,null,c),a.edges().forEach(function(d){g(a,d,b,c)}),c.unindent(),c.writeLine("}"),c.toString()}function d(a,b,c){var g=a.children?a.children(b):null===b?a.nodes():[];g.forEach(function(b){if(a.children&&0!==a.children(b).length){c.writeLine("subgraph "+e(b)+" {"),c.indent();var g=a.node(b);Object.keys(g).map(function(a){c.writeLine(e(a)+"="+e(g[a])+";")}),d(a,b,c),c.unindent(),c.writeLine("}")}else f(a,b,c)})}function e(a){return"number"==typeof a||a.toString().match(i)?a:'"'+a.toString().replace(/"/g,'\\"')+'"'}function f(a,b,c){var d=a.node(b);if(c.write(e(b)),d){var f=Object.keys(d).map(function(a){return e(a)+"="+e(d[a])});f.length&&c.write(" ["+f.join(",")+"]")}c.writeLine()}function g(a,b,c,d){var f=a.edge(b),g=a.incidentNodes(b),h=g[0],i=g[1];if(d.write(e(h)+" "+c+" "+e(i)),f){var j=Object.keys(f).map(function(a){return e(a)+"="+e(f[a])});j.length&&d.write(" ["+j.join(",")+"]")}d.writeLine()}var h=a("./Writer");b.exports=c;var i=/^[a-zA-Z\200-\377_][a-zA-Z\200-\377_0-9]*$/},{"./Writer":5}],11:[function(a,b,c){c.Graph=a("./lib/Graph"),c.Digraph=a("./lib/Digraph"),c.CGraph=a("./lib/CGraph"),c.CDigraph=a("./lib/CDigraph"),a("./lib/graph-converters"),c.alg={isAcyclic:a("./lib/alg/isAcyclic"),components:a("./lib/alg/components"),dijkstra:a("./lib/alg/dijkstra"),dijkstraAll:a("./lib/alg/dijkstraAll"),findCycles:a("./lib/alg/findCycles"),floydWarshall:a("./lib/alg/floydWarshall"),postorder:a("./lib/alg/postorder"),preorder:a("./lib/alg/preorder"),prim:a("./lib/alg/prim"),tarjan:a("./lib/alg/tarjan"),topsort:a("./lib/alg/topsort")},c.converter={json:a("./lib/converter/json.js")};var d=a("./lib/filter");c.filter={all:d.all,nodesFromList:d.nodesFromList},c.version=a("./lib/version")},{"./lib/CDigraph":13,"./lib/CGraph":14,"./lib/Digraph":15,"./lib/Graph":16,"./lib/alg/components":17,"./lib/alg/dijkstra":18,"./lib/alg/dijkstraAll":19,"./lib/alg/findCycles":20,"./lib/alg/floydWarshall":21,"./lib/alg/isAcyclic":22,"./lib/alg/postorder":23,"./lib/alg/preorder":24,"./lib/alg/prim":25,"./lib/alg/tarjan":26,"./lib/alg/topsort":27,"./lib/converter/json.js":29,"./lib/filter":30,"./lib/graph-converters":31,"./lib/version":33}],12:[function(a,b){function c(){this._value=void 0,this._nodes={},this._edges={},this._nextId=0}function d(a,b,c){(a[b]||(a[b]=new f)).add(c)}function e(a,b,c){var d=a[b];d.remove(c),0===d.size()&&delete a[b]}var f=a("cp-data").Set;b.exports=c,c.prototype.order=function(){return Object.keys(this._nodes).length},c.prototype.size=function(){return Object.keys(this._edges).length},c.prototype.graph=function(a){return 0===arguments.length?this._value:(this._value=a,void 0)},c.prototype.hasNode=function(a){return a in this._nodes},c.prototype.node=function(a,b){var c=this._strictGetNode(a);return 1===arguments.length?c.value:(c.value=b,void 0)},c.prototype.nodes=function(){var a=[];return this.eachNode(function(b){a.push(b)}),a},c.prototype.eachNode=function(a){for(var b in this._nodes){var c=this._nodes[b];a(c.id,c.value)}},c.prototype.hasEdge=function(a){return a in this._edges},c.prototype.edge=function(a,b){var c=this._strictGetEdge(a);return 1===arguments.length?c.value:(c.value=b,void 0)},c.prototype.edges=function(){var a=[];return this.eachEdge(function(b){a.push(b)}),a},c.prototype.eachEdge=function(a){for(var b in this._edges){var c=this._edges[b];a(c.id,c.u,c.v,c.value)}},c.prototype.incidentNodes=function(a){var b=this._strictGetEdge(a);return[b.u,b.v]},c.prototype.addNode=function(a,b){if(void 0===a||null===a){do a="_"+ ++this._nextId;while(this.hasNode(a))}else if(this.hasNode(a))throw new Error("Graph already has node '"+a+"'");return this._nodes[a]={id:a,value:b},a},c.prototype.delNode=function(a){this._strictGetNode(a),this.incidentEdges(a).forEach(function(a){this.delEdge(a)},this),delete this._nodes[a]},c.prototype._addEdge=function(a,b,c,e,f,g){if(this._strictGetNode(b),this._strictGetNode(c),void 0===a||null===a){do a="_"+ ++this._nextId;while(this.hasEdge(a))}else if(this.hasEdge(a))throw new Error("Graph already has edge '"+a+"'");return this._edges[a]={id:a,u:b,v:c,value:e},d(f[c],b,a),d(g[b],c,a),a},c.prototype._delEdge=function(a,b,c){var d=this._strictGetEdge(a);e(b[d.v],d.u,a),e(c[d.u],d.v,a),delete this._edges[a]},c.prototype.copy=function(){var a=new this.constructor;return a.graph(this.graph()),this.eachNode(function(b,c){a.addNode(b,c)}),this.eachEdge(function(b,c,d,e){a.addEdge(b,c,d,e)}),a._nextId=this._nextId,a},c.prototype.filterNodes=function(a){var b=new this.constructor;return b.graph(this.graph()),this.eachNode(function(c,d){a(c)&&b.addNode(c,d)}),this.eachEdge(function(a,c,d,e){b.hasNode(c)&&b.hasNode(d)&&b.addEdge(a,c,d,e)}),b},c.prototype._strictGetNode=function(a){var b=this._nodes[a];if(void 0===b)throw new Error("Node '"+a+"' is not in graph");return b},c.prototype._strictGetEdge=function(a){var b=this._edges[a];if(void 0===b)throw new Error("Edge '"+a+"' is not in graph");return b}},{"cp-data":34}],13:[function(a,b){var c=a("./Digraph"),d=a("./compoundify"),e=d(c);b.exports=e,e.fromDigraph=function(a){var b=new e,c=a.graph();return void 0!==c&&b.graph(c),a.eachNode(function(a,c){void 0===c?b.addNode(a):b.addNode(a,c)}),a.eachEdge(function(a,c,d,e){void 0===e?b.addEdge(null,c,d):b.addEdge(null,c,d,e)}),b},e.prototype.toString=function(){return"CDigraph "+JSON.stringify(this,null,2)}},{"./Digraph":15,"./compoundify":28}],14:[function(a,b){var c=a("./Graph"),d=a("./compoundify"),e=d(c);b.exports=e,e.fromGraph=function(a){var b=new e,c=a.graph();return void 0!==c&&b.graph(c),a.eachNode(function(a,c){void 0===c?b.addNode(a):b.addNode(a,c)}),a.eachEdge(function(a,c,d,e){void 0===e?b.addEdge(null,c,d):b.addEdge(null,c,d,e)}),b},e.prototype.toString=function(){return"CGraph "+JSON.stringify(this,null,2)}},{"./Graph":16,"./compoundify":28}],15:[function(a,b){function c(){e.call(this),this._inEdges={},this._outEdges={}}var d=a("./util"),e=a("./BaseGraph"),f=a("cp-data").Set;b.exports=c,c.prototype=new e,c.prototype.constructor=c,c.prototype.isDirected=function(){return!0},c.prototype.successors=function(a){return this._strictGetNode(a),Object.keys(this._outEdges[a]).map(function(a){return this._nodes[a].id},this)},c.prototype.predecessors=function(a){return this._strictGetNode(a),Object.keys(this._inEdges[a]).map(function(a){return this._nodes[a].id},this)},c.prototype.neighbors=function(a){return f.union([this.successors(a),this.predecessors(a)]).keys()},c.prototype.sources=function(){var a=this;return this._filterNodes(function(b){return 0===a.inEdges(b).length})},c.prototype.sinks=function(){var a=this;return this._filterNodes(function(b){return 0===a.outEdges(b).length})},c.prototype.source=function(a){return this._strictGetEdge(a).u},c.prototype.target=function(a){return this._strictGetEdge(a).v},c.prototype.inEdges=function(a,b){this._strictGetNode(a);var c=f.union(d.values(this._inEdges[a])).keys();return arguments.length>1&&(this._strictGetNode(b),c=c.filter(function(a){return this.source(a)===b},this)),c},c.prototype.outEdges=function(a,b){this._strictGetNode(a);var c=f.union(d.values(this._outEdges[a])).keys();return arguments.length>1&&(this._strictGetNode(b),c=c.filter(function(a){return this.target(a)===b},this)),c},c.prototype.incidentEdges=function(a,b){return arguments.length>1?f.union([this.outEdges(a,b),this.outEdges(b,a)]).keys():f.union([this.inEdges(a),this.outEdges(a)]).keys()},c.prototype.toString=function(){return"Digraph "+JSON.stringify(this,null,2)},c.prototype.addNode=function(a,b){return a=e.prototype.addNode.call(this,a,b),this._inEdges[a]={},this._outEdges[a]={},a},c.prototype.delNode=function(a){e.prototype.delNode.call(this,a),delete this._inEdges[a],delete this._outEdges[a]},c.prototype.addEdge=function(a,b,c,d){return e.prototype._addEdge.call(this,a,b,c,d,this._inEdges,this._outEdges)},c.prototype.delEdge=function(a){e.prototype._delEdge.call(this,a,this._inEdges,this._outEdges)},c.prototype._filterNodes=function(a){var b=[];return this.eachNode(function(c){a(c)&&b.push(c)}),b}},{"./BaseGraph":12,"./util":32,"cp-data":34}],16:[function(a,b){function c(){e.call(this),this._incidentEdges={}}var d=a("./util"),e=a("./BaseGraph"),f=a("cp-data").Set;b.exports=c,c.prototype=new e,c.prototype.constructor=c,c.prototype.isDirected=function(){return!1},c.prototype.neighbors=function(a){return this._strictGetNode(a),Object.keys(this._incidentEdges[a]).map(function(a){return this._nodes[a].id},this)},c.prototype.incidentEdges=function(a,b){return this._strictGetNode(a),arguments.length>1?(this._strictGetNode(b),b in this._incidentEdges[a]?this._incidentEdges[a][b].keys():[]):f.union(d.values(this._incidentEdges[a])).keys()},c.prototype.toString=function(){return"Graph "+JSON.stringify(this,null,2)},c.prototype.addNode=function(a,b){return a=e.prototype.addNode.call(this,a,b),this._incidentEdges[a]={},a},c.prototype.delNode=function(a){e.prototype.delNode.call(this,a),delete this._incidentEdges[a]},c.prototype.addEdge=function(a,b,c,d){return e.prototype._addEdge.call(this,a,b,c,d,this._incidentEdges,this._incidentEdges)},c.prototype.delEdge=function(a){e.prototype._delEdge.call(this,a,this._incidentEdges,this._incidentEdges)}},{"./BaseGraph":12,"./util":32,"cp-data":34}],17:[function(a,b){function c(a){function b(c,d){e.has(c)||(e.add(c),d.push(c),a.neighbors(c).forEach(function(a){b(a,d)}))}var c=[],e=new d;return a.nodes().forEach(function(a){var d=[];b(a,d),d.length>0&&c.push(d)}),c}var d=a("cp-data").Set;b.exports=c},{"cp-data":34}],18:[function(a,b){function c(a,b,c,e){function f(b){var d=a.incidentNodes(b),e=d[0]!==i?d[0]:d[1],f=g[e],k=c(b),l=j.distance+k;if(0>k)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+b+" Weight: "+k); l0&&(i=h.removeMin(),j=g[i],j.distance!==Number.POSITIVE_INFINITY);)e(i).forEach(f);return g}var d=a("cp-data").PriorityQueue;b.exports=c},{"cp-data":34}],19:[function(a,b){function c(a,b,c){var e={};return a.nodes().forEach(function(f){e[f]=d(a,f,b,c)}),e}var d=a("./dijkstra");b.exports=c},{"./dijkstra":18}],20:[function(a,b){function c(a){return d(a).filter(function(a){return a.length>1})}var d=a("./tarjan");b.exports=c},{"./tarjan":26}],21:[function(a,b){function c(a,b,c){var d={},e=a.nodes();return b=b||function(){return 1},c=c||(a.isDirected()?function(b){return a.outEdges(b)}:function(b){return a.incidentEdges(b)}),e.forEach(function(f){d[f]={},d[f][f]={distance:0},e.forEach(function(a){f!==a&&(d[f][a]={distance:Number.POSITIVE_INFINITY})}),c(f).forEach(function(c){var e=a.incidentNodes(c),g=e[0]!==f?e[0]:e[1],h=b(c);hj&&(h[e]=f,i.decrease(e,j))}}var f,g=new d,h={},i=new e;if(0===a.order())return g;a.eachNode(function(a){i.add(a,Number.POSITIVE_INFINITY),g.addNode(a)}),i.decrease(a.nodes()[0],0);for(var j=!1;i.size()>0;){if(f=i.removeMin(),f in h)g.addEdge(null,f,h[f]);else{if(j)throw new Error("Input graph is not connected: "+a);j=!0}a.incidentEdges(f).forEach(c)}return g}var d=a("../Graph"),e=a("cp-data").PriorityQueue;b.exports=c},{"../Graph":16,"cp-data":34}],26:[function(a,b){function c(a){function b(g){var h=e[g]={onStack:!0,lowlink:c,index:c++};if(d.push(g),a.successors(g).forEach(function(a){a in e?e[a].onStack&&(h.lowlink=Math.min(h.lowlink,e[a].index)):(b(a),h.lowlink=Math.min(h.lowlink,e[a].lowlink))}),h.lowlink===h.index){var i,j=[];do i=d.pop(),e[i].onStack=!1,j.push(i);while(g!==i);f.push(j)}}if(!a.isDirected())throw new Error("tarjan can only be applied to a directed graph. Bad input: "+a);var c=0,d=[],e={},f=[];return a.nodes().forEach(function(a){a in e||b(a)}),f}b.exports=c},{}],27:[function(a,b){function c(a){function b(g){if(g in e)throw new d;g in c||(e[g]=!0,c[g]=!0,a.predecessors(g).forEach(function(a){b(a)}),delete e[g],f.push(g))}if(!a.isDirected())throw new Error("topsort can only be applied to a directed graph. Bad input: "+a);var c={},e={},f=[],g=a.sinks();if(0!==a.order()&&0===g.length)throw new d;return a.sinks().forEach(function(a){b(a)}),f}function d(){}b.exports=c,c.CycleException=d,d.prototype.toString=function(){return"Graph has at least one cycle"}},{}],28:[function(a,b){function c(a){function b(){a.call(this),this._parents={},this._children={"null":new d}}return b.prototype=new a,b.prototype.constructor=b,b.prototype.parent=function(a,b){if(this._strictGetNode(a),arguments.length<2)return this._parents[a];if(a===b)throw new Error("Cannot make "+a+" a parent of itself");null!==b&&this._strictGetNode(b),this._children[this._parents[a]].remove(a),this._parents[a]=b,this._children[b].add(a)},b.prototype.children=function(a){return null!==a&&this._strictGetNode(a),this._children[a].keys()},b.prototype.addNode=function(b,c){return b=a.prototype.addNode.call(this,b,c),this._parents[b]=null,this._children[b]=new d,this._children[null].add(b),b},b.prototype.delNode=function(b){var c=this.parent(b);return this._children[b].keys().forEach(function(a){this.parent(a,c)},this),this._children[c].remove(b),delete this._parents[b],delete this._children[b],a.prototype.delNode.call(this,b)},b.prototype.copy=function(){var b=a.prototype.copy.call(this);return this.nodes().forEach(function(a){b.parent(a,this.parent(a))},this),b},b.prototype.filterNodes=function(b){function c(a){var b=d.parent(a);return null===b||e.hasNode(b)?(f[a]=b,b):b in f?f[b]:c(b)}var d=this,e=a.prototype.filterNodes.call(this,b),f={};return e.eachNode(function(a){e.parent(a,c(a))}),e},b}var d=a("cp-data").Set;b.exports=c},{"cp-data":34}],29:[function(a,b,c){function d(a){return Object.prototype.toString.call(a).slice(8,-1)}var e=a("../Graph"),f=a("../Digraph"),g=a("../CGraph"),h=a("../CDigraph");c.decode=function(a,b,c){if(c=c||f,"Array"!==d(a))throw new Error("nodes is not an Array");if("Array"!==d(b))throw new Error("edges is not an Array");if("string"==typeof c)switch(c){case"graph":c=e;break;case"digraph":c=f;break;case"cgraph":c=g;break;case"cdigraph":c=h;break;default:throw new Error("Unrecognized graph type: "+c)}var i=new c;return a.forEach(function(a){i.addNode(a.id,a.value)}),i.parent&&a.forEach(function(a){a.children&&a.children.forEach(function(b){i.parent(b,a.id)})}),b.forEach(function(a){i.addEdge(a.id,a.u,a.v,a.value)}),i},c.encode=function(a){var b=[],c=[];a.eachNode(function(c,d){var e={id:c,value:d};if(a.children){var f=a.children(c);f.length&&(e.children=f)}b.push(e)}),a.eachEdge(function(a,b,d,e){c.push({id:a,u:b,v:d,value:e})});var d;if(a instanceof h)d="cdigraph";else if(a instanceof g)d="cgraph";else if(a instanceof f)d="digraph";else{if(!(a instanceof e))throw new Error("Couldn't determine type of graph: "+a);d="graph"}return{nodes:b,edges:c,type:d}}},{"../CDigraph":13,"../CGraph":14,"../Digraph":15,"../Graph":16}],30:[function(a,b,c){var d=a("cp-data").Set;c.all=function(){return function(){return!0}},c.nodesFromList=function(a){var b=new d(a);return function(a){return b.has(a)}}},{"cp-data":34}],31:[function(a){var b=a("./Graph"),c=a("./Digraph");b.prototype.toDigraph=b.prototype.asDirected=function(){var a=new c;return this.eachNode(function(b,c){a.addNode(b,c)}),this.eachEdge(function(b,c,d,e){a.addEdge(null,c,d,e),a.addEdge(null,d,c,e)}),a},c.prototype.toGraph=c.prototype.asUndirected=function(){var a=new b;return this.eachNode(function(b,c){a.addNode(b,c)}),this.eachEdge(function(b,c,d,e){a.addEdge(b,c,d,e)}),a}},{"./Digraph":15,"./Graph":16}],32:[function(a,b,c){c.values=function(a){var b,c=Object.keys(a),d=c.length,e=new Array(d);for(b=0;d>b;++b)e[b]=a[c[b]];return e}},{}],33:[function(a,b){b.exports="0.7.0"},{}],34:[function(a,b,c){c.Set=a("./lib/Set"),c.PriorityQueue=a("./lib/PriorityQueue"),c.version=a("./lib/version")},{"./lib/PriorityQueue":35,"./lib/Set":36,"./lib/version":37}],35:[function(a,b){function c(){this._arr=[],this._keyIndices={}}b.exports=c,c.prototype.size=function(){return this._arr.length},c.prototype.keys=function(){return this._arr.map(function(a){return a.key})},c.prototype.has=function(a){return a in this._keyIndices},c.prototype.priority=function(a){var b=this._keyIndices[a];return void 0!==b?this._arr[b].priority:void 0},c.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},c.prototype.add=function(a,b){if(!(a in this._keyIndices)){var c={key:a,priority:b},d=this._arr.length;return this._keyIndices[a]=d,this._arr.push(c),this._decrease(d),!0}return!1},c.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var a=this._arr.pop();return delete this._keyIndices[a.key],this._heapify(0),a.key},c.prototype.decrease=function(a,b){var c=this._keyIndices[a];if(b>this._arr[c].priority)throw new Error("New priority is greater than current priority. Key: "+a+" Old: "+this._arr[c].priority+" New: "+b);this._arr[c].priority=b,this._decrease(c)},c.prototype._heapify=function(a){var b=this._arr,c=2*a,d=c+1,e=a;c0&&(b=a>>1,!(c[b].priorityb;++b)this.add(a[b])}function d(a){var b,c=Object.keys(a),d=c.length,e=new Array(d);for(b=0;d>b;++b)e[b]=a[c[b]];return e}b.exports=c,c.intersect=function(a){if(0===a.length)return new c;for(var b=new c(a[0].keys?a[0].keys():a[0]),d=1,e=a.length;e>d;++d)for(var f=b.keys(),g=a[d].keys?a[d]:new c(a[d]),h=0,i=f.length;i>h;++h){var j=f[h];g.has(j)||b.remove(j)}return b},c.union=function(a){for(var b=a.reduce(function(a,b){return a+(b.size?b.size():b.length)},0),d=new Array(b),e=0,f=0,g=a.length;g>f;++f)for(var h=a[f],i=h.keys?h.keys():h,j=0,k=i.length;k>j;++j)d[e++]=i[j];return new c(d)},c.prototype.size=function(){return this._size},c.prototype.keys=function(){return d(this._keys)},c.prototype.has=function(a){return a in this._keys},c.prototype.add=function(a){return a in this._keys?!1:(this._keys[a]=a,++this._size,!0)},c.prototype.remove=function(a){return a in this._keys?(delete this._keys[a],--this._size,!0):!1}},{}],37:[function(a,b){b.exports="1.1.0"},{}]},{},[1]);