Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aureooms-js-adjacency-list

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aureooms-js-adjacency-list - npm Package Compare versions

Comparing version 3.0.4 to 4.0.1

2

bower.json

@@ -15,3 +15,3 @@ {

],
"version": "3.0.4",
"version": "4.0.1",
"main": "js/dist/adjacency-list.js",

@@ -18,0 +18,0 @@ "homepage": "http://aureooms.github.io/js-adjacency-list/",

@@ -7,3 +7,3 @@ {

"description": "adjacency list code bricks for JavaScript",
"version": "3.0.4",
"version": "4.0.1",
"main": "js/dist/adjacency-list.js",

@@ -10,0 +10,0 @@ "name": "aureooms-js-adjacency-list",

@@ -331,49 +331,7 @@ "use strict";

Graph.prototype.initr = regeneratorRuntime.mark(function callee$3$0(v) {
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
return context$4$0.delegateYield(this.pred.get(v), "t0", 1);
var _iteratorNormalCompletion5, _didIteratorError5, _iteratorError5, _iterator5, _step5, e;
case 1:
case "end":
return context$4$0.stop();
}
}, callee$3$0, this);
});
Graph.prototype.outitr = regeneratorRuntime.mark(function callee$3$0(v) {
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
return context$4$0.delegateYield(this.succ.get(v), "t0", 1);
case 1:
case "end":
return context$4$0.stop();
}
}, callee$3$0, this);
});
Graph.prototype.nitr = regeneratorRuntime.mark(function callee$3$0(u) {
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
return context$4$0.delegateYield(this.dsitr(u), "t0", 1);
case 1:
return context$4$0.delegateYield(this.dpitr(u), "t1", 2);
case 2:
case "end":
return context$4$0.stop();
}
}, callee$3$0, this);
});
Graph.prototype.dsitr = regeneratorRuntime.mark(function callee$3$0(u) {
var _iteratorNormalCompletion5, _didIteratorError5, _iteratorError5, _iterator5, _step5, v;
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
_iteratorNormalCompletion5 = true;

@@ -383,3 +341,3 @@ _didIteratorError5 = false;

context$4$0.prev = 3;
_iterator5 = this.succ.get(u)[Symbol.iterator]();
_iterator5 = this.pred.get(v)[Symbol.iterator]();

@@ -392,5 +350,5 @@ case 5:

v = _step5.value.v;
e = _step5.value;
context$4$0.next = 9;
return v;
return e.ref;

@@ -443,4 +401,4 @@ case 9:

Graph.prototype.dpitr = regeneratorRuntime.mark(function callee$3$0(u) {
var _iteratorNormalCompletion6, _didIteratorError6, _iteratorError6, _iterator6, _step6, v;
Graph.prototype.outitr = regeneratorRuntime.mark(function callee$3$0(v) {
var _iteratorNormalCompletion6, _didIteratorError6, _iteratorError6, _iterator6, _step6, e;

@@ -454,3 +412,3 @@ return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

context$4$0.prev = 3;
_iterator6 = this.pred.get(u)[Symbol.iterator]();
_iterator6 = this.succ.get(v)[Symbol.iterator]();

@@ -463,5 +421,5 @@ case 5:

v = _step6.value.v;
e = _step6.value;
context$4$0.next = 9;
return v;
return e.ref;

@@ -514,5 +472,21 @@ case 9:

Graph.prototype.edges = regeneratorRuntime.mark(function callee$3$0() {
var _iteratorNormalCompletion7, _didIteratorError7, _iteratorError7, _iterator7, _step7, e;
Graph.prototype.nitr = regeneratorRuntime.mark(function callee$3$0(u) {
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
return context$4$0.delegateYield(this.dsitr(u), "t0", 1);
case 1:
return context$4$0.delegateYield(this.dpitr(u), "t1", 2);
case 2:
case "end":
return context$4$0.stop();
}
}, callee$3$0, this);
});
Graph.prototype.dsitr = regeneratorRuntime.mark(function callee$3$0(u) {
var _iteratorNormalCompletion7, _didIteratorError7, _iteratorError7, _iterator7, _step7, v;
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

@@ -525,3 +499,3 @@ while (1) switch (context$4$0.prev = context$4$0.next) {

context$4$0.prev = 3;
_iterator7 = this.eitr()[Symbol.iterator]();
_iterator7 = this.succ.get(u)[Symbol.iterator]();

@@ -534,5 +508,5 @@ case 5:

e = _step7.value;
v = _step7.value.v;
context$4$0.next = 9;
return [e.u, e.v, e];
return v;

@@ -585,2 +559,194 @@ case 9:

Graph.prototype.dpitr = regeneratorRuntime.mark(function callee$3$0(u) {
var _iteratorNormalCompletion8, _didIteratorError8, _iteratorError8, _iterator8, _step8, v;
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
_iteratorNormalCompletion8 = true;
_didIteratorError8 = false;
_iteratorError8 = undefined;
context$4$0.prev = 3;
_iterator8 = this.pred.get(u)[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done) {
context$4$0.next = 12;
break;
}
v = _step8.value.v;
context$4$0.next = 9;
return v;
case 9:
_iteratorNormalCompletion8 = true;
context$4$0.next = 5;
break;
case 12:
context$4$0.next = 18;
break;
case 14:
context$4$0.prev = 14;
context$4$0.t0 = context$4$0["catch"](3);
_didIteratorError8 = true;
_iteratorError8 = context$4$0.t0;
case 18:
context$4$0.prev = 18;
context$4$0.prev = 19;
if (!_iteratorNormalCompletion8 && _iterator8["return"]) {
_iterator8["return"]();
}
case 21:
context$4$0.prev = 21;
if (!_didIteratorError8) {
context$4$0.next = 24;
break;
}
throw _iteratorError8;
case 24:
return context$4$0.finish(21);
case 25:
return context$4$0.finish(18);
case 26:
case "end":
return context$4$0.stop();
}
}, callee$3$0, this, [[3, 14, 18, 26], [19,, 21, 25]]);
});
Graph.prototype.vertices = Graph.prototype.vitr;
Graph.prototype.edges = regeneratorRuntime.mark(function callee$3$0() {
var _iteratorNormalCompletion9, _didIteratorError9, _iteratorError9, _iterator9, _step9, _step9$value, _, edges, _iteratorNormalCompletion10, _didIteratorError10, _iteratorError10, _iterator10, _step10, e;
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
_iteratorNormalCompletion9 = true;
_didIteratorError9 = false;
_iteratorError9 = undefined;
context$4$0.prev = 3;
_iterator9 = this.succ[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done) {
context$4$0.next = 38;
break;
}
_step9$value = _slicedToArray(_step9.value, 2);
_ = _step9$value[0];
edges = _step9$value[1];
_iteratorNormalCompletion10 = true;
_didIteratorError10 = false;
_iteratorError10 = undefined;
context$4$0.prev = 12;
_iterator10 = edges[Symbol.iterator]();
case 14:
if (_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done) {
context$4$0.next = 21;
break;
}
e = _step10.value;
context$4$0.next = 18;
return [e.u, e.v, e.ref];
case 18:
_iteratorNormalCompletion10 = true;
context$4$0.next = 14;
break;
case 21:
context$4$0.next = 27;
break;
case 23:
context$4$0.prev = 23;
context$4$0.t0 = context$4$0["catch"](12);
_didIteratorError10 = true;
_iteratorError10 = context$4$0.t0;
case 27:
context$4$0.prev = 27;
context$4$0.prev = 28;
if (!_iteratorNormalCompletion10 && _iterator10["return"]) {
_iterator10["return"]();
}
case 30:
context$4$0.prev = 30;
if (!_didIteratorError10) {
context$4$0.next = 33;
break;
}
throw _iteratorError10;
case 33:
return context$4$0.finish(30);
case 34:
return context$4$0.finish(27);
case 35:
_iteratorNormalCompletion9 = true;
context$4$0.next = 5;
break;
case 38:
context$4$0.next = 44;
break;
case 40:
context$4$0.prev = 40;
context$4$0.t1 = context$4$0["catch"](3);
_didIteratorError9 = true;
_iteratorError9 = context$4$0.t1;
case 44:
context$4$0.prev = 44;
context$4$0.prev = 45;
if (!_iteratorNormalCompletion9 && _iterator9["return"]) {
_iterator9["return"]();
}
case 47:
context$4$0.prev = 47;
if (!_didIteratorError9) {
context$4$0.next = 50;
break;
}
throw _iteratorError9;
case 50:
return context$4$0.finish(47);
case 51:
return context$4$0.finish(44);
case 52:
case "end":
return context$4$0.stop();
}
}, callee$3$0, this, [[3, 40, 44, 52], [12, 23, 27, 35], [28,, 30, 34], [45,, 47, 51]]);
});
Graph.prototype.incident = regeneratorRuntime.mark(function callee$3$0(u) {

@@ -603,3 +769,3 @@ return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

Graph.prototype.ingoing = regeneratorRuntime.mark(function callee$3$0(u) {
var _iteratorNormalCompletion8, _didIteratorError8, _iteratorError8, _iterator8, _step8, e;
var _iteratorNormalCompletion11, _didIteratorError11, _iteratorError11, _iterator11, _step11, e;

@@ -609,10 +775,10 @@ return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

case 0:
_iteratorNormalCompletion8 = true;
_didIteratorError8 = false;
_iteratorError8 = undefined;
_iteratorNormalCompletion11 = true;
_didIteratorError11 = false;
_iteratorError11 = undefined;
context$4$0.prev = 3;
_iterator8 = this.initr(u)[Symbol.iterator]();
_iterator11 = this.pred.get(u)[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done) {
if (_iteratorNormalCompletion11 = (_step11 = _iterator11.next()).done) {
context$4$0.next = 12;

@@ -622,8 +788,8 @@ break;

e = _step8.value;
e = _step11.value;
context$4$0.next = 9;
return [e.u, e.v, e];
return [e.v, e.u, e.ref];
case 9:
_iteratorNormalCompletion8 = true;
_iteratorNormalCompletion11 = true;
context$4$0.next = 5;

@@ -639,4 +805,4 @@ break;

context$4$0.t0 = context$4$0["catch"](3);
_didIteratorError8 = true;
_iteratorError8 = context$4$0.t0;
_didIteratorError11 = true;
_iteratorError11 = context$4$0.t0;

@@ -647,4 +813,4 @@ case 18:

if (!_iteratorNormalCompletion8 && _iterator8["return"]) {
_iterator8["return"]();
if (!_iteratorNormalCompletion11 && _iterator11["return"]) {
_iterator11["return"]();
}

@@ -655,3 +821,3 @@

if (!_didIteratorError8) {
if (!_didIteratorError11) {
context$4$0.next = 24;

@@ -661,3 +827,3 @@ break;

throw _iteratorError8;
throw _iteratorError11;

@@ -678,3 +844,3 @@ case 24:

Graph.prototype.outgoing = regeneratorRuntime.mark(function callee$3$0(u) {
var _iteratorNormalCompletion9, _didIteratorError9, _iteratorError9, _iterator9, _step9, e;
var _iteratorNormalCompletion12, _didIteratorError12, _iteratorError12, _iterator12, _step12, e;

@@ -684,10 +850,10 @@ return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

case 0:
_iteratorNormalCompletion9 = true;
_didIteratorError9 = false;
_iteratorError9 = undefined;
_iteratorNormalCompletion12 = true;
_didIteratorError12 = false;
_iteratorError12 = undefined;
context$4$0.prev = 3;
_iterator9 = this.outitr(u)[Symbol.iterator]();
_iterator12 = this.succ.get(u)[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done) {
if (_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done) {
context$4$0.next = 12;

@@ -697,8 +863,8 @@ break;

e = _step9.value;
e = _step12.value;
context$4$0.next = 9;
return [e.u, e.v, e];
return [e.u, e.v, e.ref];
case 9:
_iteratorNormalCompletion9 = true;
_iteratorNormalCompletion12 = true;
context$4$0.next = 5;

@@ -714,4 +880,4 @@ break;

context$4$0.t0 = context$4$0["catch"](3);
_didIteratorError9 = true;
_iteratorError9 = context$4$0.t0;
_didIteratorError12 = true;
_iteratorError12 = context$4$0.t0;

@@ -722,4 +888,4 @@ case 18:

if (!_iteratorNormalCompletion9 && _iterator9["return"]) {
_iterator9["return"]();
if (!_iteratorNormalCompletion12 && _iterator12["return"]) {
_iterator12["return"]();
}

@@ -730,3 +896,3 @@

if (!_didIteratorError9) {
if (!_didIteratorError12) {
context$4$0.next = 24;

@@ -736,3 +902,3 @@ break;

throw _iteratorError9;
throw _iteratorError12;

@@ -754,3 +920,3 @@ case 24:

return [e.u, e.v];
return e.list === this.succ.get(e.u) ? [e.u, e.v] : [e.v, e.u];
};

@@ -810,22 +976,22 @@

// remove all incident edges
var _iteratorNormalCompletion10 = true;
var _didIteratorError10 = false;
var _iteratorError10 = undefined;
var _iteratorNormalCompletion13 = true;
var _didIteratorError13 = false;
var _iteratorError13 = undefined;
try {
for (var _iterator10 = this.iitr(v)[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {
var e = _step10.value;
for (var _iterator13 = this.iitr(v)[Symbol.iterator](), _step13; !(_iteratorNormalCompletion13 = (_step13 = _iterator13.next()).done); _iteratorNormalCompletion13 = true) {
var e = _step13.value;
this.edel(e);
} // remove vertex
} catch (err) {
_didIteratorError10 = true;
_iteratorError10 = err;
_didIteratorError13 = true;
_iteratorError13 = err;
} finally {
try {
if (!_iteratorNormalCompletion10 && _iterator10["return"]) {
_iterator10["return"]();
if (!_iteratorNormalCompletion13 && _iterator13["return"]) {
_iterator13["return"]();
}
} finally {
if (_didIteratorError10) {
throw _iteratorError10;
if (_didIteratorError13) {
throw _iteratorError13;
}

@@ -915,3 +1081,3 @@ }

Graph.prototype.nitr = regeneratorRuntime.mark(function callee$3$0(w) {
var _iteratorNormalCompletion11, _didIteratorError11, _iteratorError11, _iterator11, _step11, _step11$value, u, v;
var _iteratorNormalCompletion14, _didIteratorError14, _iteratorError14, _iterator14, _step14, _step14$value, u, v;

@@ -921,10 +1087,10 @@ return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

case 0:
_iteratorNormalCompletion11 = true;
_didIteratorError11 = false;
_iteratorError11 = undefined;
_iteratorNormalCompletion14 = true;
_didIteratorError14 = false;
_iteratorError14 = undefined;
context$4$0.prev = 3;
_iterator11 = w.E[Symbol.iterator]();
_iterator14 = w.E[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion11 = (_step11 = _iterator11.next()).done) {
if (_iteratorNormalCompletion14 = (_step14 = _iterator14.next()).done) {
context$4$0.next = 14;

@@ -934,5 +1100,5 @@ break;

_step11$value = _step11.value;
u = _step11$value.u;
v = _step11$value.v;
_step14$value = _step14.value;
u = _step14$value.u;
v = _step14$value.v;
context$4$0.next = 11;

@@ -942,3 +1108,3 @@ return u === w ? v : u;

case 11:
_iteratorNormalCompletion11 = true;
_iteratorNormalCompletion14 = true;
context$4$0.next = 5;

@@ -954,4 +1120,4 @@ break;

context$4$0.t0 = context$4$0["catch"](3);
_didIteratorError11 = true;
_iteratorError11 = context$4$0.t0;
_didIteratorError14 = true;
_iteratorError14 = context$4$0.t0;

@@ -962,4 +1128,4 @@ case 20:

if (!_iteratorNormalCompletion11 && _iterator11["return"]) {
_iterator11["return"]();
if (!_iteratorNormalCompletion14 && _iterator14["return"]) {
_iterator14["return"]();
}

@@ -970,3 +1136,3 @@

if (!_didIteratorError11) {
if (!_didIteratorError14) {
context$4$0.next = 26;

@@ -976,3 +1142,3 @@ break;

throw _iteratorError11;
throw _iteratorError14;

@@ -995,4 +1161,6 @@ case 26:

Graph.prototype.vertices = Graph.prototype.vitr;
Graph.prototype.edges = regeneratorRuntime.mark(function callee$3$0() {
var _iteratorNormalCompletion12, _didIteratorError12, _iteratorError12, _iterator12, _step12, e;
var _iteratorNormalCompletion15, _didIteratorError15, _iteratorError15, _iterator15, _step15, e;

@@ -1002,10 +1170,10 @@ return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

case 0:
_iteratorNormalCompletion12 = true;
_didIteratorError12 = false;
_iteratorError12 = undefined;
_iteratorNormalCompletion15 = true;
_didIteratorError15 = false;
_iteratorError15 = undefined;
context$4$0.prev = 3;
_iterator12 = this.eitr()[Symbol.iterator]();
_iterator15 = this.eitr()[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done) {
if (_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done) {
context$4$0.next = 12;

@@ -1015,3 +1183,3 @@ break;

e = _step12.value;
e = _step15.value;
context$4$0.next = 9;

@@ -1021,3 +1189,3 @@ return [e.u, e.v, e];

case 9:
_iteratorNormalCompletion12 = true;
_iteratorNormalCompletion15 = true;
context$4$0.next = 5;

@@ -1033,4 +1201,4 @@ break;

context$4$0.t0 = context$4$0["catch"](3);
_didIteratorError12 = true;
_iteratorError12 = context$4$0.t0;
_didIteratorError15 = true;
_iteratorError15 = context$4$0.t0;

@@ -1041,4 +1209,4 @@ case 18:

if (!_iteratorNormalCompletion12 && _iterator12["return"]) {
_iterator12["return"]();
if (!_iteratorNormalCompletion15 && _iterator15["return"]) {
_iterator15["return"]();
}

@@ -1049,3 +1217,3 @@

if (!_didIteratorError12) {
if (!_didIteratorError15) {
context$4$0.next = 24;

@@ -1055,3 +1223,3 @@ break;

throw _iteratorError12;
throw _iteratorError15;

@@ -1072,3 +1240,3 @@ case 24:

Graph.prototype.incident = regeneratorRuntime.mark(function callee$3$0(v) {
var _iteratorNormalCompletion13, _didIteratorError13, _iteratorError13, _iterator13, _step13, e;
var _iteratorNormalCompletion16, _didIteratorError16, _iteratorError16, _iterator16, _step16, e;

@@ -1078,10 +1246,10 @@ return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

case 0:
_iteratorNormalCompletion13 = true;
_didIteratorError13 = false;
_iteratorError13 = undefined;
_iteratorNormalCompletion16 = true;
_didIteratorError16 = false;
_iteratorError16 = undefined;
context$4$0.prev = 3;
_iterator13 = this.iitr(v)[Symbol.iterator]();
_iterator16 = this.iitr(v)[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion13 = (_step13 = _iterator13.next()).done) {
if (_iteratorNormalCompletion16 = (_step16 = _iterator16.next()).done) {
context$4$0.next = 12;

@@ -1091,3 +1259,3 @@ break;

e = _step13.value;
e = _step16.value;
context$4$0.next = 9;

@@ -1097,3 +1265,3 @@ return [e.u, e.v, e];

case 9:
_iteratorNormalCompletion13 = true;
_iteratorNormalCompletion16 = true;
context$4$0.next = 5;

@@ -1109,4 +1277,4 @@ break;

context$4$0.t0 = context$4$0["catch"](3);
_didIteratorError13 = true;
_iteratorError13 = context$4$0.t0;
_didIteratorError16 = true;
_iteratorError16 = context$4$0.t0;

@@ -1117,4 +1285,4 @@ case 18:

if (!_iteratorNormalCompletion13 && _iterator13["return"]) {
_iterator13["return"]();
if (!_iteratorNormalCompletion16 && _iterator16["return"]) {
_iterator16["return"]();
}

@@ -1125,3 +1293,3 @@

if (!_didIteratorError13) {
if (!_didIteratorError16) {
context$4$0.next = 24;

@@ -1131,3 +1299,3 @@ break;

throw _iteratorError13;
throw _iteratorError16;

@@ -1134,0 +1302,0 @@ case 24:

@@ -1,2 +0,2 @@

"use strict";var _slicedToArray=function(){function e(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(u){i=!0,a=u}finally{try{!n&&s["return"]&&s["return"]()}finally{if(i)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){var e=function(e,t){var r=function(e,t,r){this.u=e,this.v=t,this.ref=null,this.twin=null,this.iterator=null,this.list=r};e.DiEdge=r;var n=function(){this.iterator=null};e.DiVertex=n;var i=function(e,t){this.u=e,this.v=t,this.iterator=null,this.uiterator=null,this.viterator=null};e.Edge=i;var a=function(e,i){var a=function(){this.V=new e,this.succ=new i,this.pred=new i};return a.prototype.vadd=function(){var t=new n;return this.succ.set(t,new e),this.pred.set(t,new e),t.iterator=this.V.push(t),t},a.prototype.vdel=function(e){var r=!0,n=!1,i=t;try{for(var a,o=this.initr(e)[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.edel(s)}}catch(u){n=!0,i=u}finally{try{!r&&o["return"]&&o["return"]()}finally{if(n)throw i}}var c=!0,p=!1,h=t;try{for(var f,v=this.outitr(e)[Symbol.iterator]();!(c=(f=v.next()).done);c=!0){var s=f.value;this.edel(s)}}catch(u){p=!0,h=u}finally{try{!c&&v["return"]&&v["return"]()}finally{if(p)throw h}}this.pred["delete"](e),this.succ["delete"](e),this.V.erase(e.iterator)},a.prototype.eadd=function(e,t){var n=new r(e,t,this.succ.get(e)),i=new r(t,e,this.pred.get(t));return n.iterator=n.list.push(n),i.iterator=i.list.push(i),n.twin=i,i.twin=n,n.ref=n,i.ref=n,n},a.prototype.edel=function(e){e.list.erase(e.iterator),e.twin.list.erase(e.twin.iterator)},a.prototype.vitr=regeneratorRuntime.mark(function o(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.V,"t0",1);case 1:case"end":return e.stop()}},o,this)}),a.prototype.eitr=regeneratorRuntime.mark(function s(){var e,r,n,i,a,o,u,c,p,h,f,v,d,l;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=!0,r=!1,n=t,s.prev=3,i=this.succ[Symbol.iterator]();case 5:if(e=(a=i.next()).done){s.next=38;break}o=_slicedToArray(a.value,2),u=o[0],c=o[1],p=!0,h=!1,f=t,s.prev=12,v=c[Symbol.iterator]();case 14:if(p=(d=v.next()).done){s.next=21;break}return l=d.value,s.next=18,l.ref;case 18:p=!0,s.next=14;break;case 21:s.next=27;break;case 23:s.prev=23,s.t0=s["catch"](12),h=!0,f=s.t0;case 27:s.prev=27,s.prev=28,!p&&v["return"]&&v["return"]();case 30:if(s.prev=30,!h){s.next=33;break}throw f;case 33:return s.finish(30);case 34:return s.finish(27);case 35:e=!0,s.next=5;break;case 38:s.next=44;break;case 40:s.prev=40,s.t1=s["catch"](3),r=!0,n=s.t1;case 44:s.prev=44,s.prev=45,!e&&i["return"]&&i["return"]();case 47:if(s.prev=47,!r){s.next=50;break}throw n;case 50:return s.finish(47);case 51:return s.finish(44);case 52:case"end":return s.stop()}},s,this,[[3,40,44,52],[12,23,27,35],[28,,30,34],[45,,47,51]])}),a.prototype.iitr=regeneratorRuntime.mark(function u(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.initr(e),"t0",1);case 1:return t.delegateYield(this.outitr(e),"t1",2);case 2:case"end":return t.stop()}},u,this)}),a.prototype.initr=regeneratorRuntime.mark(function c(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.pred.get(e),"t0",1);case 1:case"end":return t.stop()}},c,this)}),a.prototype.outitr=regeneratorRuntime.mark(function p(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.succ.get(e),"t0",1);case 1:case"end":return t.stop()}},p,this)}),a.prototype.nitr=regeneratorRuntime.mark(function h(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.dsitr(e),"t0",1);case 1:return t.delegateYield(this.dpitr(e),"t1",2);case 2:case"end":return t.stop()}},h,this)}),a.prototype.dsitr=regeneratorRuntime.mark(function f(e){var r,n,i,a,o,s;return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=!0,n=!1,i=t,u.prev=3,a=this.succ.get(e)[Symbol.iterator]();case 5:if(r=(o=a.next()).done){u.next=12;break}return s=o.value.v,u.next=9,s;case 9:r=!0,u.next=5;break;case 12:u.next=18;break;case 14:u.prev=14,u.t0=u["catch"](3),n=!0,i=u.t0;case 18:u.prev=18,u.prev=19,!r&&a["return"]&&a["return"]();case 21:if(u.prev=21,!n){u.next=24;break}throw i;case 24:return u.finish(21);case 25:return u.finish(18);case 26:case"end":return u.stop()}},f,this,[[3,14,18,26],[19,,21,25]])}),a.prototype.dpitr=regeneratorRuntime.mark(function v(e){var r,n,i,a,o,s;return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=!0,n=!1,i=t,u.prev=3,a=this.pred.get(e)[Symbol.iterator]();case 5:if(r=(o=a.next()).done){u.next=12;break}return s=o.value.v,u.next=9,s;case 9:r=!0,u.next=5;break;case 12:u.next=18;break;case 14:u.prev=14,u.t0=u["catch"](3),n=!0,i=u.t0;case 18:u.prev=18,u.prev=19,!r&&a["return"]&&a["return"]();case 21:if(u.prev=21,!n){u.next=24;break}throw i;case 24:return u.finish(21);case 25:return u.finish(18);case 26:case"end":return u.stop()}},v,this,[[3,14,18,26],[19,,21,25]])}),a.prototype.edges=regeneratorRuntime.mark(function d(){var e,r,n,i,a,o;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=!0,r=!1,n=t,s.prev=3,i=this.eitr()[Symbol.iterator]();case 5:if(e=(a=i.next()).done){s.next=12;break}return o=a.value,s.next=9,[o.u,o.v,o];case 9:e=!0,s.next=5;break;case 12:s.next=18;break;case 14:s.prev=14,s.t0=s["catch"](3),r=!0,n=s.t0;case 18:s.prev=18,s.prev=19,!e&&i["return"]&&i["return"]();case 21:if(s.prev=21,!r){s.next=24;break}throw n;case 24:return s.finish(21);case 25:return s.finish(18);case 26:case"end":return s.stop()}},d,this,[[3,14,18,26],[19,,21,25]])}),a.prototype.incident=regeneratorRuntime.mark(function l(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.ingoing(e),"t0",1);case 1:return t.delegateYield(this.outgoing(e),"t1",2);case 2:case"end":return t.stop()}},l,this)}),a.prototype.ingoing=regeneratorRuntime.mark(function y(e){var r,n,i,a,o,s;return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=!0,n=!1,i=t,u.prev=3,a=this.initr(e)[Symbol.iterator]();case 5:if(r=(o=a.next()).done){u.next=12;break}return s=o.value,u.next=9,[s.u,s.v,s];case 9:r=!0,u.next=5;break;case 12:u.next=18;break;case 14:u.prev=14,u.t0=u["catch"](3),n=!0,i=u.t0;case 18:u.prev=18,u.prev=19,!r&&a["return"]&&a["return"]();case 21:if(u.prev=21,!n){u.next=24;break}throw i;case 24:return u.finish(21);case 25:return u.finish(18);case 26:case"end":return u.stop()}},y,this,[[3,14,18,26],[19,,21,25]])}),a.prototype.outgoing=regeneratorRuntime.mark(function x(e){var r,n,i,a,o,s;return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=!0,n=!1,i=t,u.prev=3,a=this.outitr(e)[Symbol.iterator]();case 5:if(r=(o=a.next()).done){u.next=12;break}return s=o.value,u.next=9,[s.u,s.v,s];case 9:r=!0,u.next=5;break;case 12:u.next=18;break;case 14:u.prev=14,u.t0=u["catch"](3),n=!0,i=u.t0;case 18:u.prev=18,u.prev=19,!r&&a["return"]&&a["return"]();case 21:if(u.prev=21,!n){u.next=24;break}throw i;case 24:return u.finish(21);case 25:return u.finish(18);case 26:case"end":return u.stop()}},x,this,[[3,14,18,26],[19,,21,25]])}),a.prototype.endpoints=function(e){return[e.u,e.v]},a.prototype.reverse=function(){var e=[this.pred,this.succ];return this.succ=e[0],this.pred=e[1],this},a};e.MultiDiGraph=a;var o=function(e){var r=function(){this.V=new e,this.E=new e};return r.prototype.vadd=function(){var t=new s(new e);return t.iterator=this.V.push(t),t},r.prototype.vdel=function(e){var r=!0,n=!1,i=t;try{for(var a,o=this.iitr(e)[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.edel(s)}}catch(u){n=!0,i=u}finally{try{!r&&o["return"]&&o["return"]()}finally{if(n)throw i}}this.V.erase(e.iterator)},r.prototype.eadd=function(e,t){var r=new i(e,t);return r.iterator=this.E.push(r),r.uiterator=e.E.push(r),e!==t&&(r.viterator=t.E.push(r)),r},r.prototype.edel=function(e){this.E.erase(e.iterator),e.u.E.erase(e.uiterator),e.u!==e.v&&e.v.E.erase(e.viterator)},r.prototype.vitr=regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.V,"t0",1);case 1:case"end":return e.stop()}},n,this)}),r.prototype.eitr=regeneratorRuntime.mark(function a(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.E,"t0",1);case 1:case"end":return e.stop()}},a,this)}),r.prototype.iitr=regeneratorRuntime.mark(function o(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e.E,"t0",1);case 1:case"end":return t.stop()}},o,this)}),r.prototype.initr=r.prototype.iitr,r.prototype.outitr=r.prototype.iitr,r.prototype.nitr=regeneratorRuntime.mark(function u(e){var r,n,i,a,o,s,c,p;return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=!0,n=!1,i=t,u.prev=3,a=e.E[Symbol.iterator]();case 5:if(r=(o=a.next()).done){u.next=14;break}return s=o.value,c=s.u,p=s.v,u.next=11,c===e?p:c;case 11:r=!0,u.next=5;break;case 14:u.next=20;break;case 16:u.prev=16,u.t0=u["catch"](3),n=!0,i=u.t0;case 20:u.prev=20,u.prev=21,!r&&a["return"]&&a["return"]();case 23:if(u.prev=23,!n){u.next=26;break}throw i;case 26:return u.finish(23);case 27:return u.finish(20);case 28:case"end":return u.stop()}},u,this,[[3,16,20,28],[21,,23,27]])}),r.prototype.dsitr=r.prototype.nitr,r.prototype.dpitr=r.prototype.nitr,r.prototype.edges=regeneratorRuntime.mark(function c(){var e,r,n,i,a,o;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=!0,r=!1,n=t,s.prev=3,i=this.eitr()[Symbol.iterator]();case 5:if(e=(a=i.next()).done){s.next=12;break}return o=a.value,s.next=9,[o.u,o.v,o];case 9:e=!0,s.next=5;break;case 12:s.next=18;break;case 14:s.prev=14,s.t0=s["catch"](3),r=!0,n=s.t0;case 18:s.prev=18,s.prev=19,!e&&i["return"]&&i["return"]();case 21:if(s.prev=21,!r){s.next=24;break}throw n;case 24:return s.finish(21);case 25:return s.finish(18);case 26:case"end":return s.stop()}},c,this,[[3,14,18,26],[19,,21,25]])}),r.prototype.incident=regeneratorRuntime.mark(function p(e){var r,n,i,a,o,s;return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=!0,n=!1,i=t,u.prev=3,a=this.iitr(e)[Symbol.iterator]();case 5:if(r=(o=a.next()).done){u.next=12;break}return s=o.value,u.next=9,[s.u,s.v,s];case 9:r=!0,u.next=5;break;case 12:u.next=18;break;case 14:u.prev=14,u.t0=u["catch"](3),n=!0,i=u.t0;case 18:u.prev=18,u.prev=19,!r&&a["return"]&&a["return"]();case 21:if(u.prev=21,!n){u.next=24;break}throw i;case 24:return u.finish(21);case 25:return u.finish(18);case 26:case"end":return u.stop()}},p,this,[[3,14,18,26],[19,,21,25]])}),r.prototype.ingoing=r.prototype.incident,r.prototype.outgoing=r.prototype.incident,r.prototype.endpoints=function(e){return[e.u,e.v]},r.prototype.reverse=function(){},r};e.MultiGraph=o;var s=function(e){this.iterator=null,this.E=e};return e.Vertex=s,e};"object"==typeof exports?e(exports):"function"==typeof define&&define.amd?define("aureooms-js-adjacency-list",[],function(){return e({})}):"object"==typeof window&&"object"==typeof window.document?e(window.adjacencylist={}):console.error("unable to detect type of module to define for aureooms-js-adjacency-list")}();
"use strict";var _slicedToArray=function(){function e(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(c){a=!0,i=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(a)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){var e=function(e,t){var r=function(e,t,r){this.u=e,this.v=t,this.ref=null,this.twin=null,this.iterator=null,this.list=r};e.DiEdge=r;var n=function(){this.iterator=null};e.DiVertex=n;var a=function(e,t){this.u=e,this.v=t,this.iterator=null,this.uiterator=null,this.viterator=null};e.Edge=a;var i=function(e,a){var i=function(){this.V=new e,this.succ=new a,this.pred=new a};return i.prototype.vadd=function(){var t=new n;return this.succ.set(t,new e),this.pred.set(t,new e),t.iterator=this.V.push(t),t},i.prototype.vdel=function(e){var r=!0,n=!1,a=t;try{for(var i,o=this.initr(e)[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;this.edel(s)}}catch(c){n=!0,a=c}finally{try{!r&&o["return"]&&o["return"]()}finally{if(n)throw a}}var u=!0,p=!1,f=t;try{for(var h,v=this.outitr(e)[Symbol.iterator]();!(u=(h=v.next()).done);u=!0){var s=h.value;this.edel(s)}}catch(c){p=!0,f=c}finally{try{!u&&v["return"]&&v["return"]()}finally{if(p)throw f}}this.pred["delete"](e),this.succ["delete"](e),this.V.erase(e.iterator)},i.prototype.eadd=function(e,t){var n=new r(e,t,this.succ.get(e)),a=new r(t,e,this.pred.get(t));return n.iterator=n.list.push(n),a.iterator=a.list.push(a),n.twin=a,a.twin=n,n.ref=n,a.ref=n,n},i.prototype.edel=function(e){e.list.erase(e.iterator),e.twin.list.erase(e.twin.iterator)},i.prototype.vitr=regeneratorRuntime.mark(function o(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.V,"t0",1);case 1:case"end":return e.stop()}},o,this)}),i.prototype.eitr=regeneratorRuntime.mark(function s(){var e,r,n,a,i,o,c,u,p,f,h,v,d,l;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=!0,r=!1,n=t,s.prev=3,a=this.succ[Symbol.iterator]();case 5:if(e=(i=a.next()).done){s.next=38;break}o=_slicedToArray(i.value,2),c=o[0],u=o[1],p=!0,f=!1,h=t,s.prev=12,v=u[Symbol.iterator]();case 14:if(p=(d=v.next()).done){s.next=21;break}return l=d.value,s.next=18,l.ref;case 18:p=!0,s.next=14;break;case 21:s.next=27;break;case 23:s.prev=23,s.t0=s["catch"](12),f=!0,h=s.t0;case 27:s.prev=27,s.prev=28,!p&&v["return"]&&v["return"]();case 30:if(s.prev=30,!f){s.next=33;break}throw h;case 33:return s.finish(30);case 34:return s.finish(27);case 35:e=!0,s.next=5;break;case 38:s.next=44;break;case 40:s.prev=40,s.t1=s["catch"](3),r=!0,n=s.t1;case 44:s.prev=44,s.prev=45,!e&&a["return"]&&a["return"]();case 47:if(s.prev=47,!r){s.next=50;break}throw n;case 50:return s.finish(47);case 51:return s.finish(44);case 52:case"end":return s.stop()}},s,this,[[3,40,44,52],[12,23,27,35],[28,,30,34],[45,,47,51]])}),i.prototype.iitr=regeneratorRuntime.mark(function c(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.initr(e),"t0",1);case 1:return t.delegateYield(this.outitr(e),"t1",2);case 2:case"end":return t.stop()}},c,this)}),i.prototype.initr=regeneratorRuntime.mark(function u(e){var r,n,a,i,o,s;return regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:r=!0,n=!1,a=t,c.prev=3,i=this.pred.get(e)[Symbol.iterator]();case 5:if(r=(o=i.next()).done){c.next=12;break}return s=o.value,c.next=9,s.ref;case 9:r=!0,c.next=5;break;case 12:c.next=18;break;case 14:c.prev=14,c.t0=c["catch"](3),n=!0,a=c.t0;case 18:c.prev=18,c.prev=19,!r&&i["return"]&&i["return"]();case 21:if(c.prev=21,!n){c.next=24;break}throw a;case 24:return c.finish(21);case 25:return c.finish(18);case 26:case"end":return c.stop()}},u,this,[[3,14,18,26],[19,,21,25]])}),i.prototype.outitr=regeneratorRuntime.mark(function p(e){var r,n,a,i,o,s;return regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:r=!0,n=!1,a=t,c.prev=3,i=this.succ.get(e)[Symbol.iterator]();case 5:if(r=(o=i.next()).done){c.next=12;break}return s=o.value,c.next=9,s.ref;case 9:r=!0,c.next=5;break;case 12:c.next=18;break;case 14:c.prev=14,c.t0=c["catch"](3),n=!0,a=c.t0;case 18:c.prev=18,c.prev=19,!r&&i["return"]&&i["return"]();case 21:if(c.prev=21,!n){c.next=24;break}throw a;case 24:return c.finish(21);case 25:return c.finish(18);case 26:case"end":return c.stop()}},p,this,[[3,14,18,26],[19,,21,25]])}),i.prototype.nitr=regeneratorRuntime.mark(function f(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.dsitr(e),"t0",1);case 1:return t.delegateYield(this.dpitr(e),"t1",2);case 2:case"end":return t.stop()}},f,this)}),i.prototype.dsitr=regeneratorRuntime.mark(function h(e){var r,n,a,i,o,s;return regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:r=!0,n=!1,a=t,c.prev=3,i=this.succ.get(e)[Symbol.iterator]();case 5:if(r=(o=i.next()).done){c.next=12;break}return s=o.value.v,c.next=9,s;case 9:r=!0,c.next=5;break;case 12:c.next=18;break;case 14:c.prev=14,c.t0=c["catch"](3),n=!0,a=c.t0;case 18:c.prev=18,c.prev=19,!r&&i["return"]&&i["return"]();case 21:if(c.prev=21,!n){c.next=24;break}throw a;case 24:return c.finish(21);case 25:return c.finish(18);case 26:case"end":return c.stop()}},h,this,[[3,14,18,26],[19,,21,25]])}),i.prototype.dpitr=regeneratorRuntime.mark(function v(e){var r,n,a,i,o,s;return regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:r=!0,n=!1,a=t,c.prev=3,i=this.pred.get(e)[Symbol.iterator]();case 5:if(r=(o=i.next()).done){c.next=12;break}return s=o.value.v,c.next=9,s;case 9:r=!0,c.next=5;break;case 12:c.next=18;break;case 14:c.prev=14,c.t0=c["catch"](3),n=!0,a=c.t0;case 18:c.prev=18,c.prev=19,!r&&i["return"]&&i["return"]();case 21:if(c.prev=21,!n){c.next=24;break}throw a;case 24:return c.finish(21);case 25:return c.finish(18);case 26:case"end":return c.stop()}},v,this,[[3,14,18,26],[19,,21,25]])}),i.prototype.vertices=i.prototype.vitr,i.prototype.edges=regeneratorRuntime.mark(function d(){var e,r,n,a,i,o,s,c,u,p,f,h,v,l;return regeneratorRuntime.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:e=!0,r=!1,n=t,d.prev=3,a=this.succ[Symbol.iterator]();case 5:if(e=(i=a.next()).done){d.next=38;break}o=_slicedToArray(i.value,2),s=o[0],c=o[1],u=!0,p=!1,f=t,d.prev=12,h=c[Symbol.iterator]();case 14:if(u=(v=h.next()).done){d.next=21;break}return l=v.value,d.next=18,[l.u,l.v,l.ref];case 18:u=!0,d.next=14;break;case 21:d.next=27;break;case 23:d.prev=23,d.t0=d["catch"](12),p=!0,f=d.t0;case 27:d.prev=27,d.prev=28,!u&&h["return"]&&h["return"]();case 30:if(d.prev=30,!p){d.next=33;break}throw f;case 33:return d.finish(30);case 34:return d.finish(27);case 35:e=!0,d.next=5;break;case 38:d.next=44;break;case 40:d.prev=40,d.t1=d["catch"](3),r=!0,n=d.t1;case 44:d.prev=44,d.prev=45,!e&&a["return"]&&a["return"]();case 47:if(d.prev=47,!r){d.next=50;break}throw n;case 50:return d.finish(47);case 51:return d.finish(44);case 52:case"end":return d.stop()}},d,this,[[3,40,44,52],[12,23,27,35],[28,,30,34],[45,,47,51]])}),i.prototype.incident=regeneratorRuntime.mark(function l(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.ingoing(e),"t0",1);case 1:return t.delegateYield(this.outgoing(e),"t1",2);case 2:case"end":return t.stop()}},l,this)}),i.prototype.ingoing=regeneratorRuntime.mark(function x(e){var r,n,a,i,o,s;return regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:r=!0,n=!1,a=t,c.prev=3,i=this.pred.get(e)[Symbol.iterator]();case 5:if(r=(o=i.next()).done){c.next=12;break}return s=o.value,c.next=9,[s.v,s.u,s.ref];case 9:r=!0,c.next=5;break;case 12:c.next=18;break;case 14:c.prev=14,c.t0=c["catch"](3),n=!0,a=c.t0;case 18:c.prev=18,c.prev=19,!r&&i["return"]&&i["return"]();case 21:if(c.prev=21,!n){c.next=24;break}throw a;case 24:return c.finish(21);case 25:return c.finish(18);case 26:case"end":return c.stop()}},x,this,[[3,14,18,26],[19,,21,25]])}),i.prototype.outgoing=regeneratorRuntime.mark(function y(e){var r,n,a,i,o,s;return regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:r=!0,n=!1,a=t,c.prev=3,i=this.succ.get(e)[Symbol.iterator]();case 5:if(r=(o=i.next()).done){c.next=12;break}return s=o.value,c.next=9,[s.u,s.v,s.ref];case 9:r=!0,c.next=5;break;case 12:c.next=18;break;case 14:c.prev=14,c.t0=c["catch"](3),n=!0,a=c.t0;case 18:c.prev=18,c.prev=19,!r&&i["return"]&&i["return"]();case 21:if(c.prev=21,!n){c.next=24;break}throw a;case 24:return c.finish(21);case 25:return c.finish(18);case 26:case"end":return c.stop()}},y,this,[[3,14,18,26],[19,,21,25]])}),i.prototype.endpoints=function(e){return e.list===this.succ.get(e.u)?[e.u,e.v]:[e.v,e.u]},i.prototype.reverse=function(){var e=[this.pred,this.succ];return this.succ=e[0],this.pred=e[1],this},i};e.MultiDiGraph=i;var o=function(e){var r=function(){this.V=new e,this.E=new e};return r.prototype.vadd=function(){var t=new s(new e);return t.iterator=this.V.push(t),t},r.prototype.vdel=function(e){var r=!0,n=!1,a=t;try{for(var i,o=this.iitr(e)[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;this.edel(s)}}catch(c){n=!0,a=c}finally{try{!r&&o["return"]&&o["return"]()}finally{if(n)throw a}}this.V.erase(e.iterator)},r.prototype.eadd=function(e,t){var r=new a(e,t);return r.iterator=this.E.push(r),r.uiterator=e.E.push(r),e!==t&&(r.viterator=t.E.push(r)),r},r.prototype.edel=function(e){this.E.erase(e.iterator),e.u.E.erase(e.uiterator),e.u!==e.v&&e.v.E.erase(e.viterator)},r.prototype.vitr=regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.V,"t0",1);case 1:case"end":return e.stop()}},n,this)}),r.prototype.eitr=regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.E,"t0",1);case 1:case"end":return e.stop()}},i,this)}),r.prototype.iitr=regeneratorRuntime.mark(function o(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e.E,"t0",1);case 1:case"end":return t.stop()}},o,this)}),r.prototype.initr=r.prototype.iitr,r.prototype.outitr=r.prototype.iitr,r.prototype.nitr=regeneratorRuntime.mark(function c(e){var r,n,a,i,o,s,u,p;return regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:r=!0,n=!1,a=t,c.prev=3,i=e.E[Symbol.iterator]();case 5:if(r=(o=i.next()).done){c.next=14;break}return s=o.value,u=s.u,p=s.v,c.next=11,u===e?p:u;case 11:r=!0,c.next=5;break;case 14:c.next=20;break;case 16:c.prev=16,c.t0=c["catch"](3),n=!0,a=c.t0;case 20:c.prev=20,c.prev=21,!r&&i["return"]&&i["return"]();case 23:if(c.prev=23,!n){c.next=26;break}throw a;case 26:return c.finish(23);case 27:return c.finish(20);case 28:case"end":return c.stop()}},c,this,[[3,16,20,28],[21,,23,27]])}),r.prototype.dsitr=r.prototype.nitr,r.prototype.dpitr=r.prototype.nitr,r.prototype.vertices=r.prototype.vitr,r.prototype.edges=regeneratorRuntime.mark(function u(){var e,r,n,a,i,o;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=!0,r=!1,n=t,s.prev=3,a=this.eitr()[Symbol.iterator]();case 5:if(e=(i=a.next()).done){s.next=12;break}return o=i.value,s.next=9,[o.u,o.v,o];case 9:e=!0,s.next=5;break;case 12:s.next=18;break;case 14:s.prev=14,s.t0=s["catch"](3),r=!0,n=s.t0;case 18:s.prev=18,s.prev=19,!e&&a["return"]&&a["return"]();case 21:if(s.prev=21,!r){s.next=24;break}throw n;case 24:return s.finish(21);case 25:return s.finish(18);case 26:case"end":return s.stop()}},u,this,[[3,14,18,26],[19,,21,25]])}),r.prototype.incident=regeneratorRuntime.mark(function p(e){var r,n,a,i,o,s;return regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:r=!0,n=!1,a=t,c.prev=3,i=this.iitr(e)[Symbol.iterator]();case 5:if(r=(o=i.next()).done){c.next=12;break}return s=o.value,c.next=9,[s.u,s.v,s];case 9:r=!0,c.next=5;break;case 12:c.next=18;break;case 14:c.prev=14,c.t0=c["catch"](3),n=!0,a=c.t0;case 18:c.prev=18,c.prev=19,!r&&i["return"]&&i["return"]();case 21:if(c.prev=21,!n){c.next=24;break}throw a;case 24:return c.finish(21);case 25:return c.finish(18);case 26:case"end":return c.stop()}},p,this,[[3,14,18,26],[19,,21,25]])}),r.prototype.ingoing=r.prototype.incident,r.prototype.outgoing=r.prototype.incident,r.prototype.endpoints=function(e){return[e.u,e.v]},r.prototype.reverse=function(){},r};e.MultiGraph=o;var s=function(e){this.iterator=null,this.E=e};return e.Vertex=s,e};"object"==typeof exports?e(exports):"function"==typeof define&&define.amd?define("aureooms-js-adjacency-list",[],function(){return e({})}):"object"==typeof window&&"object"==typeof window.document?e(window.adjacencylist={}):console.error("unable to detect type of module to define for aureooms-js-adjacency-list")}();
//# sourceMappingURL=js/dist/adjacency-list.js.map

@@ -118,3 +118,3 @@

yield* this.pred.get( v ) ;
for ( let e of this.pred.get( v ) ) yield e.ref ;

@@ -125,3 +125,3 @@ } ;

yield* this.succ.get( v ) ;
for ( let e of this.succ.get( v ) ) yield e.ref ;

@@ -149,6 +149,12 @@ } ;

Graph.prototype.vertices = Graph.prototype.vitr ;
Graph.prototype.edges = function* ( ) {
for ( let e of this.eitr( ) ) yield [ e.u , e.v , e ] ;
for ( let [ _ , edges ] of this.succ ) {
for ( let e of edges ) yield [ e.u , e.v , e.ref ] ;
}
} ;

@@ -165,3 +171,3 @@

for ( let e of this.initr( u ) ) yield [ e.u , e.v , e ] ;
for ( let e of this.pred.get( u ) ) yield [ e.v , e.u , e.ref ] ;

@@ -172,3 +178,3 @@ } ;

for ( let e of this.outitr( u ) ) yield [ e.u , e.v , e ] ;
for ( let e of this.succ.get( u ) ) yield [ e.u , e.v , e.ref ] ;

@@ -180,3 +186,3 @@ } ;

return [ e.u , e.v ] ;
return e.list === this.succ.get( e.u ) ? [ e.u , e.v ] : [ e.v , e.u ] ;

@@ -183,0 +189,0 @@ } ;

@@ -112,2 +112,4 @@

Graph.prototype.vertices = Graph.prototype.vitr ;
Graph.prototype.edges = function* ( ) {

@@ -114,0 +116,0 @@

{
"main": "js/dist/adjacency-list.js",
"version": "3.0.4",
"version": "4.0.1",
"bugs": {

@@ -5,0 +5,0 @@ "url": "https://github.com/aureooms/js-adjacency-list/issues"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc