@hpcc-js/util
Advanced tools
Comparing version 2.13.0 to 2.14.0
@@ -6,2 +6,54 @@ # Change Log | ||
# [2.14.0](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/util@2.11.2...@hpcc-js/util@2.14.0) (2020-05-15) | ||
### Features | ||
* Initial OJS Support ([09e72a5](https://github.com/hpcc-systems/Visualization/commit/09e72a522046d0f14eef5f5418d07ea771886ed9)) | ||
## 2.15.16 (2020-05-14) | ||
## 2.15.15 (2020-05-12) | ||
## 2.15.14 (2020-05-07) | ||
## 2.15.13 (2020-04-24) | ||
## 2.15.12 (2020-04-22) | ||
## 2.15.11 (2020-04-21) | ||
## 2.15.10 (2020-04-21) | ||
## 2.15.9 (2020-04-17) | ||
## 2.15.7 (2020-04-11) | ||
### Features | ||
* **dispatch:** Add better typing for dispatch messages ([b7c0c6f](https://github.com/hpcc-systems/Visualization/commit/b7c0c6f969ac8f54a0b4ccc18c78dc7aee02e5b3)) | ||
# [2.13.0](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/util@2.11.2...@hpcc-js/util@2.13.0) (2020-05-12) | ||
@@ -8,0 +60,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@hpcc-js/util"]={})}(this,function(t){"use strict";var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,r)};function r(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function i(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],s=0,u=i.length;s<u;s++,o++)n[o]=i[s];return n}function s(t,e,r,n){void 0===n&&(n=function(t,e){return e});var o={update:[],exit:[],enter:[]};if(t===e)return o.update=t,o;var i={};e.forEach(function(t){i[r(t)]=t});for(var s=0,u=t;s<u.length;s++){var a=u[s],p=r(a),h=i[p];void 0!==h?(delete i[p],o.update.push(n(a,h))):o.exit.push(a)}for(var c in i)o.enter.push(i[c]);return o}function u(t,e){if(0===e.length)return t;for(var r=0;r<e.length;++r){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t<0?-2*t:t}function a(t,e,r,n){var o,i=u(u(u(t,r),(o=e,Object.prototype.toString.call(o))),typeof e);return null===e?u(i,"null"):void 0===e?u(i,"undefined"):"object"==typeof e?-1!==n.indexOf(e)?u(i,"[Circular]"+r):(n.push(e),function(t,e,r){return"function"==typeof e.hashSum?e.hashSum():Object.keys(e).sort().reduce(function(t,n){return a(t,e[n],n,r)},t)}(i,e,n)):u(i,e.toString())}function p(t){return function(t,e){for(;t.length<e;)t="0"+t;return t}(a(0,t,"",[]).toString(16),8)}var h=function(){function t(t){this._cache={},this._calcID=t}return t.hash=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p(n({},t))},t.prototype.has=function(t){return this._calcID(t)in this._cache},t.prototype.set=function(t){return this._cache[this._calcID(t)]=t,t},t.prototype.get=function(t,e){var r=this._cache[this._calcID(t)];return r||(e?this.set(e()):null)},t}(),c=function(){function t(t){this._cache={},this._calcID=t}return t.hash=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p(n({},t))},t.prototype.has=function(t){return this._calcID(t)in this._cache},t.prototype.set=function(t,e){return this._cache[this._calcID(t)]=e,e},t.prototype.get=function(t,e){var r=this._cache[this._calcID(t)];return r||(e?this.set(t,e()):Promise.resolve(null))},t}();var f=function(){function t(){this._q=[]}return t.prototype.isTop=function(t){return this._q[0]===t},t.prototype.push=function(t){var e=this,r=t.then(function(t){return e.isTop(r)?(e._q.shift(),t):new Promise(function(n,o){var i=setInterval(function(){e.isTop(r)&&(clearInterval(i),e._q.shift(),n(t))},20)})});return this._q.push(r),r},t}(),d=function(){function t(t){if(this.store={},t)for(var e in t)this.set(e,t[e])}return t.prototype.set=function(t,e){var r=this.store[t];return this.store[t]=e,r},t.prototype.get=function(t){return this.store[t]},t.prototype.has=function(t){return void 0!==this.store[t]},t.prototype.remove=function(t){delete this.store[t]},t.prototype.keys=function(){var t=[];for(var e in this.store)t.push(e);return t},t.prototype.values=function(){var t=[];for(var e in this.store)t.push(this.store[e]);return t},t}(),l=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.set=function(e,r){return t.prototype.set.call(this,e.toLowerCase(),r)},e.prototype.get=function(e){return t.prototype.get.call(this,e.toLowerCase())},e.prototype.has=function(e){return t.prototype.has.call(this,e.toLowerCase())},e.prototype.remove=function(e){return t.prototype.remove.call(this,e.toLowerCase())},e}(d);var v=function(){return function(t,e){this.props={},this._graph=t,this.parent=e}}(),g=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.subgraphs=[],o.vertices=[],o.edges=[],r&&r._addSubgraph(o),o._=n,o}return r(e,t),e.prototype.remove=function(t){void 0===t&&(t=!0),this._graph.removeSubgraph(this,t)},e.prototype.createSubgraph=function(t){return this._graph.createSubgraph(this,t)},e.prototype._addSubgraph=function(t){if(this.subgraphs.indexOf(t)>=0)throw new Error("Subgraph already exists");this.subgraphs.push(t)},e.prototype._removeSubgraph=function(t){var e=this.subgraphs.indexOf(t);if(e<0)throw new Error("Subgraph does not exist");this.subgraphs.splice(e,1)},e.prototype.removeAllSubgraphs=function(){for(var t=this.subgraphs.length-1;t>=0;--t)this._graph.removeSubgraph(this.subgraphs[t],!0)},e.prototype.createVertex=function(t){return this._graph.createVertex(this,t)},e.prototype._addVertex=function(t){if(this.vertices.indexOf(t)>=0)throw new Error("Vertex already exists");this.vertices.push(t)},e.prototype._removeVertex=function(t){var e=this.vertices.indexOf(t);if(e<0)throw new Error("Vertex does not exist");this.vertices.splice(e,1)},e.prototype.removeAllVertices=function(){for(var t=this.vertices.length-1;t>=0;--t)this._graph.removeVertex(this.vertices[t],!0)},e.prototype.createEdge=function(t,e,r){return this._graph.createEdge(this,t,e,r)},e.prototype._addEdge=function(t){if(this.edges.indexOf(t)>=0)throw new Error("Edge already exists");this.edges.push(t)},e.prototype._removeEdge=function(t){var e=this.edges.indexOf(t);if(e<0)throw new Error("Edge does not exist");this.edges.splice(e,1)},e.prototype._add=function(t){t instanceof e?this._addSubgraph(t):t instanceof _?this._addVertex(t):this._addEdge(t)},e}(v),_=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.inEdges=[],o.outEdges=[],r._addVertex(o),o._=n,o}return r(e,t),Object.defineProperty(e.prototype,"edges",{get:function(){return i(this.inEdges,this.outEdges)},enumerable:!0,configurable:!0}),e.prototype.remove=function(t,e){return void 0===t&&(t=!0),this._graph.removeVertex(this,t,e)},e.prototype.addInEdge=function(t){this.inEdges.push(t)},e.prototype.removeInEdge=function(t){var e=this.inEdges.indexOf(t);if(e<0)throw new Error("In edge does not exist");this.inEdges.splice(e,1)},e.prototype.addOutEdge=function(t){this.outEdges.push(t)},e.prototype.removeOutEdge=function(t){var e=this.outEdges.indexOf(t);if(e<0)throw new Error("Out edge does not exist");this.outEdges.splice(e,1)},e}(v),y=function(t){function e(e,r,n,o,i){var s=t.call(this,e,r)||this;if(!n)throw new Error("Missing source vertex");if(!o)throw new Error("Missing target vertex");return r._addEdge(s),s.source=n,s.source.addOutEdge(s),s.target=o,s.target.addInEdge(s),s._=i,s}return r(e,t),e.prototype.remove=function(){this._graph.removeEdge(this)},e}(v),b=function(){function t(t,e){void 0===t&&(t=function(t){return""+t._}),this._allSubgraphs=[],this._allSubgraphsMap={},this._allVertices=[],this._allVerticesMap={},this._allEdges=[],this._allEdgesMap={},this.root=new g(this,null,e),this.idOf=t}return t.prototype.createSubgraph=function(t,e){var r=new g(this,t||this.root,e);return this._allSubgraphs.push(r),this._allSubgraphsMap[this.idOf(r)]=r,r},t.prototype.removeSubgraph=function(t,e){var r=this;void 0===e&&(e=!0);var n=this._allSubgraphs.indexOf(t);if(n<0)throw new Error("Subgraph does not exist");this._allSubgraphs.splice(n,1),delete this._allSubgraphsMap[this.idOf(t)],t.parent&&t.parent._removeSubgraph(t),t.edges.forEach(function(n){return e?r.removeEdge(n):t.parent._addEdge(n)}),t.vertices.forEach(function(n){return e?r.removeVertex(n,e):t.parent._addVertex(n)}),t.subgraphs.forEach(function(n){return e?r.removeSubgraph(n,e):t.parent._addSubgraph(n)})},Object.defineProperty(t.prototype,"subgraphs",{get:function(){return this._allSubgraphs},enumerable:!0,configurable:!0}),t.prototype.subgraph=function(t){return this._allSubgraphsMap[t]},t.prototype.createVertex=function(t,e){var r=new _(this,t,e);return this._allVertices.push(r),this._allVerticesMap[this.idOf(r)]=r,r},t.prototype.removeVertex=function(t,e,r){var n=this;void 0===e&&(e=!0);var o=this._allVertices.indexOf(t);if(o<0)throw new Error("Vertex does not exist");this._allVertices.splice(o,1),delete this._allVerticesMap[this.idOf(t)],t.parent&&t.parent._removeVertex(t),e||t.inEdges.forEach(function(e){t.outEdges.forEach(function(t){n.createEdge(n.root,e.source,t.target,r?r(e.source._,t.target._):void 0)})}),t.inEdges.forEach(function(t){return n.removeEdge(t)}),t.outEdges.forEach(function(t){return n.removeEdge(t)})},Object.defineProperty(t.prototype,"vertices",{get:function(){return this._allVertices},enumerable:!0,configurable:!0}),t.prototype.vertex=function(t){return this._allVerticesMap[t]},t.prototype.createEdge=function(t,e,r,n){var o=new y(this,t,e,r,n);return this._allEdges.push(o),this._allEdgesMap[this.idOf(o)]=o,o},t.prototype.removeEdge=function(t){var e=this._allEdges.indexOf(t);if(e<0)throw new Error("Edge does not exist");this._allEdges.splice(e,1),delete this._allEdgesMap[this.idOf(t)],t.parent&&t.parent._removeEdge(t),t.source.removeOutEdge(t),t.target.removeInEdge(t)},Object.defineProperty(t.prototype,"edges",{get:function(){return this._allEdges},enumerable:!0,configurable:!0}),t.prototype.edge=function(t){return this._allEdgesMap[t]},t.prototype._walk=function(t,e){for(var r=0,n=t.subgraphs;r<n.length;r++){var o=n[r];switch(e(o)){case"abort":return!0;case"stepover":break;default:if(this._walk(o,e))return!0}}for(var i=0,s=t.vertices;i<s.length;i++){if("abort"===e(s[i]))return!0}},t.prototype.walk=function(t){this._walk(this.root,t);for(var e=0,r=this._allEdges;e<r.length;e++){if("abort"===t(r[e]))return!0}},t.prototype.clone=function(){var t,e,r=new(0,this.constructor)(this.idOf,this.root._),n=(t=[],e=[],{put:function(r,n){var o=t.indexOf(r);-1===o?(t.push(r),e.push(n)):e[o]=n},get:function(r){return e[t.indexOf(r)]}});return n.put(this.root,r.root),this.walk(function(t){var e=n.get(t.parent);if(t instanceof g)n.put(t,e.createSubgraph(t._));else if(t instanceof _)n.put(t,e.createVertex(t._));else if(t instanceof y){var r=n.get(t.source),o=n.get(t.target);e.createEdge(r,o,t._)}}),r},t}();var E=function(){function t(t,e){this._graph=t,this._=e}return t.prototype.id=function(){return this._graph.id(this._)},t}(),w=function(t){function e(e,r){return t.call(this,e,r)||this}return r(e,t),e.prototype.clearParent=function(){return this._parent&&(this._parent.removeChild(this),delete this._parent),this},e.prototype.parent=function(t){return 0===arguments.length?this._parent:(this._parent!==t&&(this._parent&&this._parent.removeChild(this),this._parent=t,this._parent&&this._parent.addChild(this)),this)},e}(E),m=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n._children=[],n}return r(e,t),e.prototype.children=function(){return this._children},e.prototype.addChild=function(t){this._children.push(t)},e.prototype.removeChild=function(t){this._children=this._children.filter(function(e){return e.id!==t.id})},e}(w),x=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n._inEdges=[],n._outEdges=[],n}return r(e,t),e.prototype.edges=function(){return i(this._inEdges,this._outEdges)},e.prototype.edgeCount=function(){return this._outEdges.length+this._inEdges.length},e.prototype.inEdges=function(){return this._inEdges},e.prototype.addInEdge=function(t){this._inEdges.push(t)},e.prototype.removeInEdge=function(t){this._outEdges=this._outEdges.filter(function(e){return e._.id!==t})},e.prototype.outEdges=function(){return this._outEdges},e.prototype.addOutEdge=function(t){this._outEdges.push(t)},e.prototype.removeOutEdge=function(t){this._outEdges=this._outEdges.filter(function(e){return e._.id!==t})},e}(w),M=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i._source=n,i._target=o,i}return r(e,t),e}(E),O=function(){function t(t){void 0===t&&(t=!0),this._subgraphMap={},this._vertexMap={},this._edgeMap={},this._idFunc=function(t){return"function"==typeof t.id?t.id():t.id},this._sourceFunc=function(t){return"function"==typeof t.source?t.source():t.source},this._targetFunc=function(t){return"function"==typeof t.target?t.target():t.target},this._updateFunc=function(t,e){return e},this._directed=t}return t.prototype.clear=function(){return this._subgraphMap={},this._vertexMap={},this._edgeMap={},this},t.prototype.clearParents=function(){for(var t in this._subgraphMap)this._subgraphMap[t].clearParent();for(var t in this._vertexMap)this._vertexMap[t].clearParent();return this},t.prototype.isDirected=function(){return this._directed},t.prototype.idFunc=function(t){return this._idFunc=t,this},t.prototype.sourceFunc=function(t){return this._sourceFunc=t,this},t.prototype.targetFunc=function(t){return this._targetFunc=t,this},t.prototype.updateFunc=function(t){return this._updateFunc=t,this},t.prototype.id=function(t){return this._idFunc(t)},t.prototype.type=function(t){return this.subgraphExists(t)?"S":this.vertexExists(t)?"V":this.edgeExists(t)?"E":""},t.prototype.isSubgraph=function(t){return this.subgraphExists(this.id(t))},t.prototype.isVertex=function(t){return this.vertexExists(this.id(t))},t.prototype.isEdge=function(t){return this.edgeExists(this.id(t))},t.prototype.item=function(t){return this.subgraphExists(t)?this.subgraph(t):this.vertexExists(t)?this.vertex(t):this.edgeExists(t)?this.edge(t):void 0},t.prototype.subgraphs=function(){var t=[];for(var e in this._subgraphMap)t.push(this._subgraphMap[e]._);return t},t.prototype.subgraphExists=function(t){return!!this._subgraphMap[t]},t.prototype.subgraph=function(t){return this._subgraphMap[t]._},t.prototype.addSubgraph=function(t,e){var r=this._idFunc(t);if(this._subgraphMap[r])throw new Error("Subgraph '"+r+"' already exists.");var n=new m(this,t);if(e){var o=this._idFunc(e);if(!this._subgraphMap[o])throw new Error("Subgraph '"+o+"' does not exist.");n.parent(this._subgraphMap[o])}return this._subgraphMap[r]=n,this},t.prototype.mergeSubgraphs=function(t){var e=this;void 0===t&&(t=[]);var r=s(this.subgraphs(),t,function(t){return e._idFunc(t)},this._updateFunc);return r.exit.forEach(function(t){return e.removeSubgraph(e._idFunc(t))}),r.enter.forEach(function(t){return e.addSubgraph(t)}),r.update.forEach(function(t){return e.updateSubgraph(t)}),this},t.prototype.updateSubgraph=function(t){var e=this._idFunc(t),r=this._subgraphMap[e];if(!r)throw new Error("Subgraph '"+e+"' does not exist.");return r._=t,this},t.prototype.removeSubgraph=function(t,e){var r=this;void 0===e&&(e=!0);var n=this._subgraphMap[t];if(!n)throw new Error("Subgraph '"+t+"' does not exist.");return n.children().forEach(function(t){e?t.parent(n.parent()):t instanceof m?r.removeSubgraph(t.id()):r.removeVertex(t.id())}),delete this._subgraphMap[t],this},t.prototype.subgraphParent=function(t,e){var r=this._subgraphMap[t];if(!r)throw new Error("Subgraph '"+t+"' does not exist.");if(void 0===e){var n=r.parent();return n?n._:void 0}var o=this._subgraphMap[e];if(!o)throw new Error("Vertex parent '"+o+"' does not exist.");return r.parent(o),this},t.prototype.vertices=function(){var t=[];for(var e in this._vertexMap)t.push(this._vertexMap[e]._);return t},t.prototype.vertexExists=function(t){return!!this._vertexMap[t]},t.prototype.vertex=function(t){return this._vertexMap[t]._},t.prototype.edges=function(t){if(t)return this._vertexMap[t].edges().map(function(t){return t._});var e=[];for(var r in this._edgeMap)e.push(this._edgeMap[r]._);return e},t.prototype.inEdges=function(t){return this._vertexMap[t].inEdges().map(function(t){return t._})},t.prototype.outEdges=function(t){return this._vertexMap[t].outEdges().map(function(t){return t._})},t.prototype._neighbors=function(t){return i(this._vertexMap[t].outEdges().map(function(t){return t._target}),this._vertexMap[t].inEdges().map(function(t){return t._source}))},t.prototype.neighbors=function(t){return this._neighbors(t).map(function(t){return t._})},t.prototype.singleNeighbors=function(t){return this._neighbors(t).filter(function(t){return 1===t.edgeCount()}).map(function(t){return t._})},t.prototype.addVertex=function(t,e){var r=this._idFunc(t);if(this._vertexMap[r])throw new Error("Vertex '"+r+"' already exists.");var n=new x(this,t);if(e){var o=this._idFunc(e);if(!this.subgraphExists(o))throw new Error("Subgraph '"+o+"' does not exist.");n.parent(this._subgraphMap[o])}return this._vertexMap[r]=n,this},t.prototype.mergeVertices=function(t){var e=this,r=s(this.vertices(),t,function(t){return e._idFunc(t)},this._updateFunc);return r.exit.forEach(function(t){return e.removeVertex(e._idFunc(t))}),r.enter.forEach(function(t){return e.addVertex(t)}),r.update.forEach(function(t){return e.updateVertex(t)}),this},t.prototype.updateVertex=function(t){var e=this._idFunc(t),r=this._vertexMap[e];if(!r)throw new Error("Vertex '"+e+"' does not exist.");return r._=t,this},t.prototype.removeVertex=function(t){var e=this,r=this._vertexMap[t];if(!r)throw new Error("Vertex '"+t+"' does not exist.");return r.edges().forEach(function(t){e.removeEdge(t.id())}),delete this._vertexMap[t],this},t.prototype.vertexParent=function(t,e){var r=this._vertexMap[t];if(!r)throw new Error("Vertex '"+t+"' does not exist.");if(void 0===e){var n=r.parent();return n?n._:void 0}var o=this._subgraphMap[e];if(!o)throw new Error("Vertex parent '"+o+"' does not exist.");return r.parent(o),this},t.prototype.edgeExists=function(t){return!!this._edgeMap[t]},t.prototype.edge=function(t){return this._edgeMap[t]._},t.prototype.addEdge=function(t){var e=this._idFunc(t),r=this._sourceFunc(t),n=this._targetFunc(t);if(this._edgeMap[e])throw new Error("Edge '"+e+"' already exists.");if(!this.vertexExists(r))throw new Error("Edge Source '"+r+"' does not exist.");if(!this.vertexExists(n))throw new Error("Edge Target '"+n+"' does not exist.");var o=new M(this,t,this._vertexMap[r],this._vertexMap[n]);return this._edgeMap[e]=o,this._vertexMap[r].addOutEdge(o),this._vertexMap[n].addInEdge(o),this},t.prototype.mergeEdges=function(t){var e=this,r=s(this.edges(),t,function(t){return e._idFunc(t)},this._updateFunc);return r.exit.forEach(function(t){return e.removeEdge(e._idFunc(t))}),r.enter.forEach(function(t){return e.addEdge(t)}),r.update.forEach(function(t){return e.updateEdge(t)}),this},t.prototype.updateEdge=function(t){var e=this._idFunc(t),r=this._edgeMap[e];if(!r)throw new Error("Edge '"+e+"' does not exist.");return r._=t,this},t.prototype.removeEdge=function(t){var e=this._edgeMap[t];if(!e)throw new Error("Edge '"+t+"' does not exist.");var r=this._sourceFunc(e);if(!this.vertexExists(r))throw new Error("Edge Source'"+r+"' does not exist.");this._vertexMap[r].removeOutEdge(t);var n=this._targetFunc(e);if(!this.vertexExists(n))throw new Error("Edge Target'"+n+"' does not exist.");return this._vertexMap[n].removeInEdge(t),delete this._edgeMap[t],this},t.prototype._hwalk=function(t,e){var r=this;return t instanceof m?e("subgraph",t._,t.children().map(function(t){return r._hwalk(t,e)})):e("vertex",t._)},t.prototype.hierarchy=function(t){var e=[];for(var r in this._subgraphMap){var n=this._subgraphMap[r];void 0===n.parent()&&e.push(this._hwalk(n,t))}for(var r in this._vertexMap){var o=this._vertexMap[r];void 0===o.parent()&&e.push(this._hwalk(o,t))}return e},t.prototype.dijkstra=function(t,e){var r=this.edges(),n=new S,o={},i={},s={};function u(t,e){var r=1/0,n=null;return t.forEach(function(t){e[t]<r&&(r=e[t],n=t)}),n}for(var a=0;a<r.length;a++){var p=this._sourceFunc(r[a]),h=this._targetFunc(r[a]);n.add(p),n.add(h),i[p]=1/0,i[h]=1/0,void 0===s[p]&&(s[p]={}),void 0===s[h]&&(s[h]={}),s[p][h]=1,s[h][p]=1}for(i[t]=0;n.size;){var c=u(n,i);if(null===c)break;var f=Object.keys(s[c]).filter(function(t){return n.has(t)});if(n.delete(c),c===e)break;for(var d=0,l=f;d<l.length;d++){var v=l[d],g=i[c]+s[c][v];g<i[v]&&(i[v]=g,o[v]=c)}}for(var _=e,y=[_],b=0;void 0!==o[_];)y.unshift(o[_]),b+=s[_][o[_]],_=o[_];return{ids:y,len:b}},t}(),S=function(){function t(){this._content=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this._content.length},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._content.indexOf(t)>=0},t.prototype.add=function(t){this.has(t)||this._content.push(t)},t.prototype.delete=function(t){var e=this._content.indexOf(t);e>=0&&this._content.splice(e,1)},t.prototype.forEach=function(t){this._content.forEach(t)},t}(),V=Array.isArray,k=Object.keys,I=Object.prototype.hasOwnProperty;function D(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var r,n=V(t),o=V(e),i=void 0,s=void 0;if(n&&o){if((r=t.length)!==e.length)return!1;for(i=r;0!=i--;)if(!D(t[i],e[i]))return!1;return!0}if(n!==o)return!1;var u=t instanceof Date,a=e instanceof Date;if(u!==a)return!1;if(u&&a)return t.getTime()===e.getTime();var p=t instanceof RegExp,h=e instanceof RegExp;if(p!==h)return!1;if(p&&h)return t.toString()===e.toString();var c=k(t);if((r=c.length)!==k(e).length)return!1;for(i=r;0!=i--;)if(!I.call(e,c[i]))return!1;for(i=r;0!=i--;)if(!D(t[s=c[i]],e[s]))return!1;return!0}return t!=t&&e!=e}var F,L=new Function("return this;")(),T="undefined"!=typeof window&&L===window,j="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,C=j&&null!=process.env&&(null!=process.env.TRAVIS||null!=process.env.GITHUB_ACTIONS),P=function(){function t(){this.stack=[]}return t.prototype.push=function(t){return this.stack.push(t),t},t.prototype.pop=function(){return this.stack.pop()},t.prototype.top=function(){return this.stack.length?this.stack[this.stack.length-1]:void 0},t.prototype.depth=function(){return this.stack.length},t}();(F=t.Level||(t.Level={}))[F.debug=0]="debug",F[F.info=1]="info",F[F.notice=2]="notice",F[F.warning=3]="warning",F[F.error=4]="error",F[F.critical=5]="critical",F[F.alert=6]="alert",F[F.emergency=7]="emergency";var N={debug:"cyan",info:"green",notice:"grey",warning:"blue",error:"red",critical:"magenta",alert:"magenta",emergency:"magenta"},A=function(){function e(){}return e.prototype.write=function(e,r,n,o){j?console.log("["+e+"] "+t.Level[r].toUpperCase()+" "+n+": "+o):console.log("["+e+"] %c"+t.Level[r].toUpperCase()+"%c "+n+": "+o,"color:"+N[t.Level[r]],"")},e}(),X=function(){function e(){this._levelStack=new P,this._level=t.Level.info,this._filter="",this._writer=new A}return e.Instance=function(){return this._instance||(this._instance=new this)},e.prototype.stringify=function(t){var e=[];return JSON.stringify(t,function(t,r){if("object"==typeof r&&null!==r){if(-1!==e.indexOf(r))return;e.push(r)}return r},2)},e.prototype.writer=function(t){return void 0===t?this._writer:(this._writer=t,this)},e.prototype.log=function(t,e,r){t<this._level||this._filter&&this._filter!==e||("string"!=typeof r&&(r=this.stringify(r)),this._writer.write((new Date).toISOString(),t,e,r))},e.prototype.debug=function(e,r){this.log(t.Level.debug,e,r)},e.prototype.info=function(e,r){this.log(t.Level.info,e,r)},e.prototype.notice=function(e,r){this.log(t.Level.notice,e,r)},e.prototype.warning=function(e,r){this.log(t.Level.warning,e,r)},e.prototype.error=function(e,r){this.log(t.Level.error,e,r)},e.prototype.critical=function(e,r){this.log(t.Level.critical,e,r)},e.prototype.alert=function(e,r){this.log(t.Level.alert,e,r)},e.prototype.emergency=function(e,r){this.log(t.Level.emergency,e,r)},e.prototype.level=function(t){return void 0===t?this._level:(this._level=t,this)},e.prototype.pushLevel=function(t){return this._levelStack.push(this._level),this._level=t,this},e.prototype.popLevel=function(){return this._level=this._levelStack.pop(),this},e.prototype.filter=function(t){return void 0===t?this._filter:(this._filter=t,this)},e}(),q=X.Instance(),B=function(){function t(t){this._scopeID=t}return t.prototype.debug=function(t){q.debug(this._scopeID,t)},t.prototype.info=function(t){q.info(this._scopeID,t)},t.prototype.notice=function(t){q.notice(this._scopeID,t)},t.prototype.warning=function(t){q.warning(this._scopeID,t)},t.prototype.error=function(t){q.error(this._scopeID,t)},t.prototype.critical=function(t){q.critical(this._scopeID,t)},t.prototype.alert=function(t){q.alert(this._scopeID,t)},t.prototype.emergency=function(t){q.emergency(this._scopeID,t)},t.prototype.pushLevel=function(t){return q.pushLevel(t),this},t.prototype.popLevel=function(){return q.popLevel(),this},t}();function G(t,e,r){var n=r-e,o=t-e;return o-Math.floor(o/n)*n+e}function R(t,e){if(void 0!==t&&void 0!==e){for(var r=0,n=t.split(".");r<n.length;r++){var o=n[r];if(!e.hasOwnProperty(o))return;e=e[o]}return e}}function z(t,e){var r={};for(var n in e){var o=e[n];o instanceof Array||"object"==typeof o&&(o=H(t[n],o)),n in t&&(t[n]===o||n in r&&r[n]===o)||(t[n]=o)}return t}function H(t){void 0===t&&(t={});for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if("object"!=typeof t)throw new Error('Destination "'+t+'" must be an object.');for(var n=0,o=e;n<o.length;n++){z(t,o[n])}return t}var U,J=function(){function t(t,e,r){this.eventTarget=t,this.eventID=e,this.callback=r}return t.prototype.release=function(){this.eventTarget.removeObserver(this.eventID,this.callback)},t.prototype.unwatch=function(){this.release()},t}(),K=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._eventObservers={}}return t.prototype.addObserver=function(t,e){var r=this._eventObservers[t];return r||(r=[],this._eventObservers[t]=r),r.push(e),new J(this,t,e)},t.prototype.removeObserver=function(t,e){var r=this._eventObservers[t];if(r)for(var n=r.length-1;n>=0;--n)r[n]===e&&r.splice(n,1);return this},t.prototype.dispatchEvent=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=this._eventObservers[t];if(n)for(var o=0,i=n;o<i.length;o++){i[o].apply(void 0,e)}return this},t.prototype._hasObserver=function(t){var e=this._eventObservers[t];for(var r in e)if(e[r])return!0;return!1},t.prototype.hasObserver=function(t){if(void 0!==t)return this._hasObserver(t);for(var e in this._eventObservers)if(this._hasObserver(e))return!0;return!1},t}();!function(){if(L.requestAnimationFrame)U=L.requestAnimationFrame;else{var t=0;U=function(e){var r=(new Date).getTime(),n=Math.max(0,16-(r-t)),o=setTimeout(function(){return e(r+n)},n);return t=r+n,o}}}();var $=function(){function t(){}return Object.defineProperty(t.prototype,"canConflate",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.conflate=function(t){return!1},t.prototype.void=function(){return!1},t}(),Q=function(){function t(){this._observerID=0,this._observers=[],this._messageBuffer=[]}return t.prototype.observers=function(){return this._observers},t.prototype.messages=function(){var t=[];return this._messageBuffer.forEach(function(e){t.some(function(t){return t.canConflate&&t.conflate(e)})||t.push(e)}),t},t.prototype.dispatchAll=function(){this.dispatch(this.messages()),this.flush()},t.prototype.dispatch=function(t){0!==t.length&&this.observers().forEach(function(e){var r=t.filter(function(t){return!t.void()&&(void 0===e.type||t instanceof e.type)});r.length&&e.callback(r)})},t.prototype.hasObserver=function(){return this._observers.length>0},t.prototype.flush=function(){this._messageBuffer=[]},t.prototype.send=function(t){this.dispatch([t])},t.prototype.post=function(t){var e=this;this._messageBuffer.push(t),U(function(){return e.dispatchAll()})},t.prototype.attach=function(t,e){var r=this,n=++this._observerID;return this._observers.push({id:n,type:e,callback:t}),{release:function(){r._observers=r._observers.filter(function(t){return t.id!==n})},unwatch:function(){this.release()}}},t}(),W=function(){function t(t){this.name="",this.$={},this._children=[],this.content="",this.name=t}return t.prototype.appendAttribute=function(t,e){this.$[t]=e},t.prototype.appendContent=function(t){this.content+=t},t.prototype.appendChild=function(t){this._children.push(t)},t.prototype.children=function(t){return void 0===t?this._children:this._children.filter(function(e){return e.name===t})},t}(),Y=function(){function t(){this.stack=new P}return t.prototype.walkDoc=function(t){var e=this._startXMLNode(t);if(t.attributes)for(var r=0;r<t.attributes.length;++r){var n=t.attributes.item(r);this.attributes(n.nodeName,n.nodeValue)}if(this.startXMLNode(e),t.childNodes)for(r=0;r<t.childNodes.length;++r){var o=t.childNodes.item(r);o.nodeType===o.TEXT_NODE?this.characters(o.nodeValue):this.walkDoc(o)}this.endXMLNode(this.stack.pop())},t.prototype._startXMLNode=function(t){var e=new W(t.nodeName);return this.stack.depth()?this.stack.top().appendChild(e):this.root=e,this.stack.push(e)},t.prototype.parse=function(t){var e=(new DOMParser).parseFromString(t,"application/xml");this.startDocument(),this.walkDoc(e),this.endDocument()},t.prototype.startDocument=function(){},t.prototype.endDocument=function(){},t.prototype.startXMLNode=function(t){},t.prototype.endXMLNode=function(t){},t.prototype.attributes=function(t,e){this.stack.top().appendAttribute(t,e)},t.prototype.characters=function(t){this.stack.top().appendContent(t)},t}(),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.startXMLNode=function(e){t.prototype.startXMLNode.call(this,e),e.name},e.prototype.endXMLNode=function(e){e.name,t.prototype.endXMLNode.call(this,e)},e}(Y);var tt=function(t){function e(e,r,n){var o=t.call(this)||this;return o.property=e,o.newValue=r,o.oldValue=n,o}return r(e,t),Object.defineProperty(e.prototype,"canConflate",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.conflate=function(t){return this.property===t.property&&(this.newValue=t.newValue,!0)},e.prototype.void=function(){return this.newValue===this.oldValue},e}($),et=function(){function t(){this._espState={},this._dispatch=new Q,this._monitorTickCount=0}return t.prototype.clear=function(t){this._espState={},void 0!==t&&this.set(t),this._monitorTickCount=0},t.prototype.get=function(t,e){return void 0===t?this._espState:this.has(t)?this._espState[t]:e},t.prototype.set=function(t,e){if("string"==typeof t)return this.setSingle(t,e);this.setAll(t)},t.prototype.setSingle=function(t,e){var r=this._espState[t];this._espState[t]=e,this._dispatch.post(new tt(t,e,r))},t.prototype.setAll=function(t){for(var e in t)t.hasOwnProperty(e)&&this.setSingle(e,t[e])},t.prototype.has=function(t){return void 0!==this._espState[t]},t.prototype.addObserver=function(t,e,r){if(this.isCallback(e)){if("changed"!==t)throw new Error("Invalid eventID: "+t);return this._dispatch.attach(function(t){e(t.map(function(t){return{id:t.property,oldValue:t.oldValue,newValue:t.newValue}}))})}if("propChanged"!==t)throw new Error("Invalid eventID: "+t);return this._dispatch.attach(function(t){var n=t.filter(function(t){return t.property===e});if(n.length){n.length>1&&console.warn("Should only be 1 message?");var o=n[n.length-1];r({id:o.property,oldValue:o.oldValue,newValue:o.newValue})}})},t.prototype.on=function(t,e,r){return this.addObserver(t,e,r),this},t.prototype.isCallback=function(t){return"function"==typeof t},t.prototype.hasEventListener=function(){return this._dispatch.hasObserver()},t.prototype.refresh=function(t){return e=this,r=void 0,i=function(){return o(this,function(t){switch(t.label){case 0:return[4,Promise.resolve()];case 1:return t.sent(),[2,this]}})},new((n=void 0)||(n=Promise))(function(t,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function u(t){try{a(i.throw(t))}catch(t){o(t)}}function a(e){e.done?t(e.value):new n(function(t){t(e.value)}).then(s,u)}a((i=i.apply(e,r||[])).next())});var e,r,n,i},t.prototype._monitor=function(){var t=this;this._monitorHandle?this._monitorTickCount=0:this._monitorHandle=setTimeout(function(){(t.hasEventListener()?t.refresh():Promise.resolve()).then(function(){t._monitor()}),delete t._monitorHandle},this._monitorTimeoutDuraction())},t.prototype._monitorTimeoutDuraction=function(){return++this._monitorTickCount,this._monitorTickCount<=1?0:3e4},t.prototype.watch=function(t,e){var r=this;if(void 0===e&&(e=!0),"function"!=typeof t)throw new Error("Invalid Callback");e&&setTimeout(function(){var e=r.get(),n=[];for(var o in e)e.hasOwnProperty(e)&&n.push({id:o,newValue:e[o],oldValue:void 0});t(n)},0);var n=this.addObserver("changed",t);return this._monitor(),n},t}();function rt(t,e){if("string"!=typeof e)return t;if(0===e.length)return t;for(;0===t.indexOf(e);)t=t.substring(1);for(;nt(t,e);)t=t.substring(0,t.length-1);return t}function nt(t,e,r){var n=t.toString();("number"!=typeof r||!isFinite(r)||Math.floor(r)!==r||r>n.length)&&(r=n.length),r-=e.length;var o=n.lastIndexOf(e,r);return-1!==o&&o===r}t.AsyncCache=c,t.AsyncOrderedQueue=f,t.BUILD_VERSION="2.15.16",t.Cache=h,t.Dictionary=d,t.DictionaryNoCase=l,t.Dispatch=Q,t.Edge=y,t.Graph=b,t.Graph2=O,t.GraphItem=v,t.Logging=X,t.Message=$,t.Observable=K,t.PKG_NAME="@hpcc-js/util",t.PKG_VERSION="2.13.0",t.SAXStackParser=Y,t.ScopedLogging=B,t.Stack=P,t.StateObject=et,t.Subgraph=g,t.Vertex=_,t.XMLNode=W,t.classID2Meta=function(t){var e=t.split("_"),r=e[1].split(".");return{module:"@hpcc-js/"+e[0],file:r[0],class:r[1]||r[0]}},t.compare=function(t,e){for(var r={update:[],exit:[],enter:i(e)},n=0,o=t;n<o.length;n++){var s=o[n],u=r.enter.indexOf(s);u>=0?(r.update.push(s),r.enter.splice(u,1)):r.exit.push(s)}return r},t.compare2=s,t.debounce=function(t,e){var r={};return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=p(n);return r[i]||(r[i]={clockStart:Date.now(),promise:t.apply(void 0,n).then(function(t){return void 0===e?r[i]=null:setTimeout(function(){r[i]=null},Math.max(e-(Date.now()-r[i].clockStart),0)),t}).catch(function(t){throw r[i]=null,t})}),r[i].promise}},t.deepEquals=D,t.deepMixin=H,t.deepMixinT=function(t){void 0===t&&(t={});for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return H.apply(void 0,i([t],e))},t.degreesToRadians=function(t){return t*(Math.PI/180)},t.endsWith=nt,t.espTime2Seconds=function(t){if(!t)return 0;if(!isNaN(Number(t)))return Number(t);var e=t.indexOf("ns");if(-1!==e)return parseFloat(t.substr(0,e))/1e9;var r=t.indexOf("ms");if(-1!==r)return parseFloat(t.substr(0,r))/1e3;var n=t.indexOf("s");if(-1!==n&&-1===t.indexOf("days"))return parseFloat(t.substr(0,n));for(var o=t.split(" days "),i=o.length>1?parseFloat(o[0]):0,s=0,u=(o.length>1?o[1]:o[0]).split(":").reverse(),a=0;a<u.length;++a)s+=parseFloat(u[a])*Math.pow(60,a);return 24*i*60*60+s},t.exists=function(t,e){return void 0!==R(t,e)},t.find=function(t,e){if(null==t)throw new TypeError('"o" is null or not defined');var r=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<r;){var i=t[o];if(e.call(n,i,o,t))return i;o++}},t.hashSum=p,t.inner=R,t.isArray=function(t){return void 0!==Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},t.isBrowser=T,t.isCI=C,t.isNode=j,t.join=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(t.length&&t[0].length&&"/"===t[0].charAt(0)?"/":"")+t.map(function(t){return rt(t,"/")}).join("/")},t.logger=q,t.normalize=G,t.normalizeDegrees=function(t,e,r){return void 0===e&&(e=-180),void 0===r&&(r=180),G(t,e,r)},t.normalizeRadians=function(t,e,r){return void 0===e&&(e=-Math.PI),void 0===r&&(r=Math.PI),G(t,e,r)},t.promiseTimeout=function(t,e){var r,n=new Promise(function(e,n){r=setTimeout(function(){clearTimeout(r),n("Timed out in "+t+"ms.")},t)});return Promise.race([e,n]).then(function(t){return clearTimeout(r),t}).catch(function(t){throw clearTimeout(r),t})},t.radiansToDegrees=function(t){return t*(180/Math.PI)},t.root=L,t.safeStringify=function(t){var e=[];return JSON.stringify(t,function(t,r){if("object"==typeof r&&null!==r){if(-1!==e.indexOf(r))return;e.push(r)}return r})},t.scopedLogger=function(t,e){return void 0===e&&(e=!1),e&&q.filter(t),new B(t)},t.trim=rt,t.update=function(t,e){return D(t,e)?t:e},t.xml2json=function(t){var e=new Z;return e.parse(t),e.root},Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@hpcc-js/util"]={})}(this,function(t){"use strict";var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,r)};function r(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function i(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],s=0,u=i.length;s<u;s++,o++)n[o]=i[s];return n}function s(t,e,r,n){void 0===n&&(n=function(t,e){return e});var o={update:[],exit:[],enter:[]};if(t===e)return o.update=t,o;var i={};e.forEach(function(t){i[r(t)]=t});for(var s=0,u=t;s<u.length;s++){var a=u[s],p=r(a),h=i[p];void 0!==h?(delete i[p],o.update.push(n(a,h))):o.exit.push(a)}for(var c in i)o.enter.push(i[c]);return o}function u(t,e){if(0===e.length)return t;for(var r=0;r<e.length;++r){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t<0?-2*t:t}function a(t,e,r,n){var o,i=u(u(u(t,r),(o=e,Object.prototype.toString.call(o))),typeof e);return null===e?u(i,"null"):void 0===e?u(i,"undefined"):"object"==typeof e?-1!==n.indexOf(e)?u(i,"[Circular]"+r):(n.push(e),function(t,e,r){return"function"==typeof e.hashSum?e.hashSum():Object.keys(e).sort().reduce(function(t,n){return a(t,e[n],n,r)},t)}(i,e,n)):u(i,e.toString())}function p(t){return function(t,e){for(;t.length<e;)t="0"+t;return t}(a(0,t,"",[]).toString(16),8)}var h=function(){function t(t){this._cache={},this._calcID=t}return t.hash=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p(n({},t))},t.prototype.has=function(t){return this._calcID(t)in this._cache},t.prototype.set=function(t){return this._cache[this._calcID(t)]=t,t},t.prototype.get=function(t,e){var r=this._cache[this._calcID(t)];return r||(e?this.set(e()):null)},t}(),c=function(){function t(t){this._cache={},this._calcID=t}return t.hash=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p(n({},t))},t.prototype.has=function(t){return this._calcID(t)in this._cache},t.prototype.set=function(t,e){return this._cache[this._calcID(t)]=e,e},t.prototype.get=function(t,e){var r=this._cache[this._calcID(t)];return r||(e?this.set(t,e()):Promise.resolve(null))},t}();var f=function(){function t(){this._q=[]}return t.prototype.isTop=function(t){return this._q[0]===t},t.prototype.push=function(t){var e=this,r=t.then(function(t){return e.isTop(r)?(e._q.shift(),t):new Promise(function(n,o){var i=setInterval(function(){e.isTop(r)&&(clearInterval(i),e._q.shift(),n(t))},20)})});return this._q.push(r),r},t}(),d=function(){function t(t){if(this.store={},t)for(var e in t)this.set(e,t[e])}return t.prototype.set=function(t,e){var r=this.store[t];return this.store[t]=e,r},t.prototype.get=function(t){return this.store[t]},t.prototype.has=function(t){return void 0!==this.store[t]},t.prototype.remove=function(t){delete this.store[t]},t.prototype.keys=function(){var t=[];for(var e in this.store)t.push(e);return t},t.prototype.values=function(){var t=[];for(var e in this.store)t.push(this.store[e]);return t},t}(),l=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.set=function(e,r){return t.prototype.set.call(this,e.toLowerCase(),r)},e.prototype.get=function(e){return t.prototype.get.call(this,e.toLowerCase())},e.prototype.has=function(e){return t.prototype.has.call(this,e.toLowerCase())},e.prototype.remove=function(e){return t.prototype.remove.call(this,e.toLowerCase())},e}(d);var v=function(){return function(t,e){this.props={},this._graph=t,this.parent=e}}(),g=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.subgraphs=[],o.vertices=[],o.edges=[],r&&r._addSubgraph(o),o._=n,o}return r(e,t),e.prototype.remove=function(t){void 0===t&&(t=!0),this._graph.removeSubgraph(this,t)},e.prototype.createSubgraph=function(t){return this._graph.createSubgraph(this,t)},e.prototype._addSubgraph=function(t){if(this.subgraphs.indexOf(t)>=0)throw new Error("Subgraph already exists");this.subgraphs.push(t)},e.prototype._removeSubgraph=function(t){var e=this.subgraphs.indexOf(t);if(e<0)throw new Error("Subgraph does not exist");this.subgraphs.splice(e,1)},e.prototype.removeAllSubgraphs=function(){for(var t=this.subgraphs.length-1;t>=0;--t)this._graph.removeSubgraph(this.subgraphs[t],!0)},e.prototype.createVertex=function(t){return this._graph.createVertex(this,t)},e.prototype._addVertex=function(t){if(this.vertices.indexOf(t)>=0)throw new Error("Vertex already exists");this.vertices.push(t)},e.prototype._removeVertex=function(t){var e=this.vertices.indexOf(t);if(e<0)throw new Error("Vertex does not exist");this.vertices.splice(e,1)},e.prototype.removeAllVertices=function(){for(var t=this.vertices.length-1;t>=0;--t)this._graph.removeVertex(this.vertices[t],!0)},e.prototype.createEdge=function(t,e,r){return this._graph.createEdge(this,t,e,r)},e.prototype._addEdge=function(t){if(this.edges.indexOf(t)>=0)throw new Error("Edge already exists");this.edges.push(t)},e.prototype._removeEdge=function(t){var e=this.edges.indexOf(t);if(e<0)throw new Error("Edge does not exist");this.edges.splice(e,1)},e.prototype._add=function(t){t instanceof e?this._addSubgraph(t):t instanceof _?this._addVertex(t):this._addEdge(t)},e}(v),_=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.inEdges=[],o.outEdges=[],r._addVertex(o),o._=n,o}return r(e,t),Object.defineProperty(e.prototype,"edges",{get:function(){return i(this.inEdges,this.outEdges)},enumerable:!0,configurable:!0}),e.prototype.remove=function(t,e){return void 0===t&&(t=!0),this._graph.removeVertex(this,t,e)},e.prototype.addInEdge=function(t){this.inEdges.push(t)},e.prototype.removeInEdge=function(t){var e=this.inEdges.indexOf(t);if(e<0)throw new Error("In edge does not exist");this.inEdges.splice(e,1)},e.prototype.addOutEdge=function(t){this.outEdges.push(t)},e.prototype.removeOutEdge=function(t){var e=this.outEdges.indexOf(t);if(e<0)throw new Error("Out edge does not exist");this.outEdges.splice(e,1)},e}(v),y=function(t){function e(e,r,n,o,i){var s=t.call(this,e,r)||this;if(!n)throw new Error("Missing source vertex");if(!o)throw new Error("Missing target vertex");return r._addEdge(s),s.source=n,s.source.addOutEdge(s),s.target=o,s.target.addInEdge(s),s._=i,s}return r(e,t),e.prototype.remove=function(){this._graph.removeEdge(this)},e}(v),b=function(){function t(t,e){void 0===t&&(t=function(t){return""+t._}),this._allSubgraphs=[],this._allSubgraphsMap={},this._allVertices=[],this._allVerticesMap={},this._allEdges=[],this._allEdgesMap={},this.root=new g(this,null,e),this.idOf=t}return t.prototype.createSubgraph=function(t,e){var r=new g(this,t||this.root,e);return this._allSubgraphs.push(r),this._allSubgraphsMap[this.idOf(r)]=r,r},t.prototype.removeSubgraph=function(t,e){var r=this;void 0===e&&(e=!0);var n=this._allSubgraphs.indexOf(t);if(n<0)throw new Error("Subgraph does not exist");this._allSubgraphs.splice(n,1),delete this._allSubgraphsMap[this.idOf(t)],t.parent&&t.parent._removeSubgraph(t),t.edges.forEach(function(n){return e?r.removeEdge(n):t.parent._addEdge(n)}),t.vertices.forEach(function(n){return e?r.removeVertex(n,e):t.parent._addVertex(n)}),t.subgraphs.forEach(function(n){return e?r.removeSubgraph(n,e):t.parent._addSubgraph(n)})},Object.defineProperty(t.prototype,"subgraphs",{get:function(){return this._allSubgraphs},enumerable:!0,configurable:!0}),t.prototype.subgraph=function(t){return this._allSubgraphsMap[t]},t.prototype.createVertex=function(t,e){var r=new _(this,t,e);return this._allVertices.push(r),this._allVerticesMap[this.idOf(r)]=r,r},t.prototype.removeVertex=function(t,e,r){var n=this;void 0===e&&(e=!0);var o=this._allVertices.indexOf(t);if(o<0)throw new Error("Vertex does not exist");this._allVertices.splice(o,1),delete this._allVerticesMap[this.idOf(t)],t.parent&&t.parent._removeVertex(t),e||t.inEdges.forEach(function(e){t.outEdges.forEach(function(t){n.createEdge(n.root,e.source,t.target,r?r(e.source._,t.target._):void 0)})}),t.inEdges.forEach(function(t){return n.removeEdge(t)}),t.outEdges.forEach(function(t){return n.removeEdge(t)})},Object.defineProperty(t.prototype,"vertices",{get:function(){return this._allVertices},enumerable:!0,configurable:!0}),t.prototype.vertex=function(t){return this._allVerticesMap[t]},t.prototype.createEdge=function(t,e,r,n){var o=new y(this,t,e,r,n);return this._allEdges.push(o),this._allEdgesMap[this.idOf(o)]=o,o},t.prototype.removeEdge=function(t){var e=this._allEdges.indexOf(t);if(e<0)throw new Error("Edge does not exist");this._allEdges.splice(e,1),delete this._allEdgesMap[this.idOf(t)],t.parent&&t.parent._removeEdge(t),t.source.removeOutEdge(t),t.target.removeInEdge(t)},Object.defineProperty(t.prototype,"edges",{get:function(){return this._allEdges},enumerable:!0,configurable:!0}),t.prototype.edge=function(t){return this._allEdgesMap[t]},t.prototype._walk=function(t,e){for(var r=0,n=t.subgraphs;r<n.length;r++){var o=n[r];switch(e(o)){case"abort":return!0;case"stepover":break;default:if(this._walk(o,e))return!0}}for(var i=0,s=t.vertices;i<s.length;i++){if("abort"===e(s[i]))return!0}},t.prototype.walk=function(t){this._walk(this.root,t);for(var e=0,r=this._allEdges;e<r.length;e++){if("abort"===t(r[e]))return!0}},t.prototype.clone=function(){var t,e,r=new(0,this.constructor)(this.idOf,this.root._),n=(t=[],e=[],{put:function(r,n){var o=t.indexOf(r);-1===o?(t.push(r),e.push(n)):e[o]=n},get:function(r){return e[t.indexOf(r)]}});return n.put(this.root,r.root),this.walk(function(t){var e=n.get(t.parent);if(t instanceof g)n.put(t,e.createSubgraph(t._));else if(t instanceof _)n.put(t,e.createVertex(t._));else if(t instanceof y){var r=n.get(t.source),o=n.get(t.target);e.createEdge(r,o,t._)}}),r},t}();var E=function(){function t(t,e){this._graph=t,this._=e}return t.prototype.id=function(){return this._graph.id(this._)},t}(),w=function(t){function e(e,r){return t.call(this,e,r)||this}return r(e,t),e.prototype.clearParent=function(){return this._parent&&(this._parent.removeChild(this),delete this._parent),this},e.prototype.parent=function(t){return 0===arguments.length?this._parent:(this._parent!==t&&(this._parent&&this._parent.removeChild(this),this._parent=t,this._parent&&this._parent.addChild(this)),this)},e}(E),m=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n._children=[],n}return r(e,t),e.prototype.children=function(){return this._children},e.prototype.addChild=function(t){this._children.push(t)},e.prototype.removeChild=function(t){this._children=this._children.filter(function(e){return e.id!==t.id})},e}(w),x=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n._inEdges=[],n._outEdges=[],n}return r(e,t),e.prototype.edges=function(){return i(this._inEdges,this._outEdges)},e.prototype.edgeCount=function(){return this._outEdges.length+this._inEdges.length},e.prototype.inEdges=function(){return this._inEdges},e.prototype.addInEdge=function(t){this._inEdges.push(t)},e.prototype.removeInEdge=function(t){this._outEdges=this._outEdges.filter(function(e){return e._.id!==t})},e.prototype.outEdges=function(){return this._outEdges},e.prototype.addOutEdge=function(t){this._outEdges.push(t)},e.prototype.removeOutEdge=function(t){this._outEdges=this._outEdges.filter(function(e){return e._.id!==t})},e}(w),M=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i._source=n,i._target=o,i}return r(e,t),e}(E),O=function(){function t(t){void 0===t&&(t=!0),this._subgraphMap={},this._vertexMap={},this._edgeMap={},this._idFunc=function(t){return"function"==typeof t.id?t.id():t.id},this._sourceFunc=function(t){return"function"==typeof t.source?t.source():t.source},this._targetFunc=function(t){return"function"==typeof t.target?t.target():t.target},this._updateFunc=function(t,e){return e},this._directed=t}return t.prototype.clear=function(){return this._subgraphMap={},this._vertexMap={},this._edgeMap={},this},t.prototype.clearParents=function(){for(var t in this._subgraphMap)this._subgraphMap[t].clearParent();for(var t in this._vertexMap)this._vertexMap[t].clearParent();return this},t.prototype.isDirected=function(){return this._directed},t.prototype.idFunc=function(t){return this._idFunc=t,this},t.prototype.sourceFunc=function(t){return this._sourceFunc=t,this},t.prototype.targetFunc=function(t){return this._targetFunc=t,this},t.prototype.updateFunc=function(t){return this._updateFunc=t,this},t.prototype.id=function(t){return this._idFunc(t)},t.prototype.type=function(t){return this.subgraphExists(t)?"S":this.vertexExists(t)?"V":this.edgeExists(t)?"E":""},t.prototype.isSubgraph=function(t){return this.subgraphExists(this.id(t))},t.prototype.isVertex=function(t){return this.vertexExists(this.id(t))},t.prototype.isEdge=function(t){return this.edgeExists(this.id(t))},t.prototype.item=function(t){return this.subgraphExists(t)?this.subgraph(t):this.vertexExists(t)?this.vertex(t):this.edgeExists(t)?this.edge(t):void 0},t.prototype.subgraphs=function(){var t=[];for(var e in this._subgraphMap)t.push(this._subgraphMap[e]._);return t},t.prototype.subgraphExists=function(t){return!!this._subgraphMap[t]},t.prototype.subgraph=function(t){return this._subgraphMap[t]._},t.prototype.addSubgraph=function(t,e){var r=this._idFunc(t);if(this._subgraphMap[r])throw new Error("Subgraph '"+r+"' already exists.");var n=new m(this,t);if(e){var o=this._idFunc(e);if(!this._subgraphMap[o])throw new Error("Subgraph '"+o+"' does not exist.");n.parent(this._subgraphMap[o])}return this._subgraphMap[r]=n,this},t.prototype.mergeSubgraphs=function(t){var e=this;void 0===t&&(t=[]);var r=s(this.subgraphs(),t,function(t){return e._idFunc(t)},this._updateFunc);return r.exit.forEach(function(t){return e.removeSubgraph(e._idFunc(t))}),r.enter.forEach(function(t){return e.addSubgraph(t)}),r.update.forEach(function(t){return e.updateSubgraph(t)}),this},t.prototype.updateSubgraph=function(t){var e=this._idFunc(t),r=this._subgraphMap[e];if(!r)throw new Error("Subgraph '"+e+"' does not exist.");return r._=t,this},t.prototype.removeSubgraph=function(t,e){var r=this;void 0===e&&(e=!0);var n=this._subgraphMap[t];if(!n)throw new Error("Subgraph '"+t+"' does not exist.");return n.children().forEach(function(t){e?t.parent(n.parent()):t instanceof m?r.removeSubgraph(t.id()):r.removeVertex(t.id())}),delete this._subgraphMap[t],this},t.prototype.subgraphParent=function(t,e){var r=this._subgraphMap[t];if(!r)throw new Error("Subgraph '"+t+"' does not exist.");if(void 0===e){var n=r.parent();return n?n._:void 0}var o=this._subgraphMap[e];if(!o)throw new Error("Vertex parent '"+o+"' does not exist.");return r.parent(o),this},t.prototype.vertices=function(){var t=[];for(var e in this._vertexMap)t.push(this._vertexMap[e]._);return t},t.prototype.vertexExists=function(t){return!!this._vertexMap[t]},t.prototype.vertex=function(t){return this._vertexMap[t]._},t.prototype.edges=function(t){if(t)return this._vertexMap[t].edges().map(function(t){return t._});var e=[];for(var r in this._edgeMap)e.push(this._edgeMap[r]._);return e},t.prototype.inEdges=function(t){return this._vertexMap[t].inEdges().map(function(t){return t._})},t.prototype.outEdges=function(t){return this._vertexMap[t].outEdges().map(function(t){return t._})},t.prototype._neighbors=function(t){return i(this._vertexMap[t].outEdges().map(function(t){return t._target}),this._vertexMap[t].inEdges().map(function(t){return t._source}))},t.prototype.neighbors=function(t){return this._neighbors(t).map(function(t){return t._})},t.prototype.singleNeighbors=function(t){return this._neighbors(t).filter(function(t){return 1===t.edgeCount()}).map(function(t){return t._})},t.prototype.addVertex=function(t,e){var r=this._idFunc(t);if(this._vertexMap[r])throw new Error("Vertex '"+r+"' already exists.");var n=new x(this,t);if(e){var o=this._idFunc(e);if(!this.subgraphExists(o))throw new Error("Subgraph '"+o+"' does not exist.");n.parent(this._subgraphMap[o])}return this._vertexMap[r]=n,this},t.prototype.mergeVertices=function(t){var e=this,r=s(this.vertices(),t,function(t){return e._idFunc(t)},this._updateFunc);return r.exit.forEach(function(t){return e.removeVertex(e._idFunc(t))}),r.enter.forEach(function(t){return e.addVertex(t)}),r.update.forEach(function(t){return e.updateVertex(t)}),this},t.prototype.updateVertex=function(t){var e=this._idFunc(t),r=this._vertexMap[e];if(!r)throw new Error("Vertex '"+e+"' does not exist.");return r._=t,this},t.prototype.removeVertex=function(t){var e=this,r=this._vertexMap[t];if(!r)throw new Error("Vertex '"+t+"' does not exist.");return r.edges().forEach(function(t){e.removeEdge(t.id())}),delete this._vertexMap[t],this},t.prototype.vertexParent=function(t,e){var r=this._vertexMap[t];if(!r)throw new Error("Vertex '"+t+"' does not exist.");if(void 0===e){var n=r.parent();return n?n._:void 0}var o=this._subgraphMap[e];if(!o)throw new Error("Vertex parent '"+o+"' does not exist.");return r.parent(o),this},t.prototype.edgeExists=function(t){return!!this._edgeMap[t]},t.prototype.edge=function(t){return this._edgeMap[t]._},t.prototype.addEdge=function(t){var e=this._idFunc(t),r=this._sourceFunc(t),n=this._targetFunc(t);if(this._edgeMap[e])throw new Error("Edge '"+e+"' already exists.");if(!this.vertexExists(r))throw new Error("Edge Source '"+r+"' does not exist.");if(!this.vertexExists(n))throw new Error("Edge Target '"+n+"' does not exist.");var o=new M(this,t,this._vertexMap[r],this._vertexMap[n]);return this._edgeMap[e]=o,this._vertexMap[r].addOutEdge(o),this._vertexMap[n].addInEdge(o),this},t.prototype.mergeEdges=function(t){var e=this,r=s(this.edges(),t,function(t){return e._idFunc(t)},this._updateFunc);return r.exit.forEach(function(t){return e.removeEdge(e._idFunc(t))}),r.enter.forEach(function(t){return e.addEdge(t)}),r.update.forEach(function(t){return e.updateEdge(t)}),this},t.prototype.updateEdge=function(t){var e=this._idFunc(t),r=this._edgeMap[e];if(!r)throw new Error("Edge '"+e+"' does not exist.");return r._=t,this},t.prototype.removeEdge=function(t){var e=this._edgeMap[t];if(!e)throw new Error("Edge '"+t+"' does not exist.");var r=this._sourceFunc(e);if(!this.vertexExists(r))throw new Error("Edge Source'"+r+"' does not exist.");this._vertexMap[r].removeOutEdge(t);var n=this._targetFunc(e);if(!this.vertexExists(n))throw new Error("Edge Target'"+n+"' does not exist.");return this._vertexMap[n].removeInEdge(t),delete this._edgeMap[t],this},t.prototype._hwalk=function(t,e){var r=this;return t instanceof m?e("subgraph",t._,t.children().map(function(t){return r._hwalk(t,e)})):e("vertex",t._)},t.prototype.hierarchy=function(t){var e=[];for(var r in this._subgraphMap){var n=this._subgraphMap[r];void 0===n.parent()&&e.push(this._hwalk(n,t))}for(var r in this._vertexMap){var o=this._vertexMap[r];void 0===o.parent()&&e.push(this._hwalk(o,t))}return e},t.prototype.dijkstra=function(t,e){var r=this.edges(),n=new S,o={},i={},s={};function u(t,e){var r=1/0,n=null;return t.forEach(function(t){e[t]<r&&(r=e[t],n=t)}),n}for(var a=0;a<r.length;a++){var p=this._sourceFunc(r[a]),h=this._targetFunc(r[a]);n.add(p),n.add(h),i[p]=1/0,i[h]=1/0,void 0===s[p]&&(s[p]={}),void 0===s[h]&&(s[h]={}),s[p][h]=1,s[h][p]=1}for(i[t]=0;n.size;){var c=u(n,i);if(null===c)break;var f=Object.keys(s[c]).filter(function(t){return n.has(t)});if(n.delete(c),c===e)break;for(var d=0,l=f;d<l.length;d++){var v=l[d],g=i[c]+s[c][v];g<i[v]&&(i[v]=g,o[v]=c)}}for(var _=e,y=[_],b=0;void 0!==o[_];)y.unshift(o[_]),b+=s[_][o[_]],_=o[_];return{ids:y,len:b}},t}(),S=function(){function t(){this._content=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this._content.length},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._content.indexOf(t)>=0},t.prototype.add=function(t){this.has(t)||this._content.push(t)},t.prototype.delete=function(t){var e=this._content.indexOf(t);e>=0&&this._content.splice(e,1)},t.prototype.forEach=function(t){this._content.forEach(t)},t}(),V=Array.isArray,k=Object.keys,I=Object.prototype.hasOwnProperty;function D(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var r,n=V(t),o=V(e),i=void 0,s=void 0;if(n&&o){if((r=t.length)!==e.length)return!1;for(i=r;0!=i--;)if(!D(t[i],e[i]))return!1;return!0}if(n!==o)return!1;var u=t instanceof Date,a=e instanceof Date;if(u!==a)return!1;if(u&&a)return t.getTime()===e.getTime();var p=t instanceof RegExp,h=e instanceof RegExp;if(p!==h)return!1;if(p&&h)return t.toString()===e.toString();var c=k(t);if((r=c.length)!==k(e).length)return!1;for(i=r;0!=i--;)if(!I.call(e,c[i]))return!1;for(i=r;0!=i--;)if(!D(t[s=c[i]],e[s]))return!1;return!0}return t!=t&&e!=e}var F,L=new Function("return this;")(),T="undefined"!=typeof window&&L===window,j="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,C=j&&null!=process.env&&(null!=process.env.TRAVIS||null!=process.env.GITHUB_ACTIONS),P=function(){function t(){this.stack=[]}return t.prototype.push=function(t){return this.stack.push(t),t},t.prototype.pop=function(){return this.stack.pop()},t.prototype.top=function(){return this.stack.length?this.stack[this.stack.length-1]:void 0},t.prototype.depth=function(){return this.stack.length},t}();(F=t.Level||(t.Level={}))[F.debug=0]="debug",F[F.info=1]="info",F[F.notice=2]="notice",F[F.warning=3]="warning",F[F.error=4]="error",F[F.critical=5]="critical",F[F.alert=6]="alert",F[F.emergency=7]="emergency";var N={debug:"cyan",info:"green",notice:"grey",warning:"blue",error:"red",critical:"magenta",alert:"magenta",emergency:"magenta"},A=function(){function e(){}return e.prototype.write=function(e,r,n,o){j?console.log("["+e+"] "+t.Level[r].toUpperCase()+" "+n+": "+o):console.log("["+e+"] %c"+t.Level[r].toUpperCase()+"%c "+n+": "+o,"color:"+N[t.Level[r]],"")},e}(),X=function(){function e(){this._levelStack=new P,this._level=t.Level.info,this._filter="",this._writer=new A}return e.Instance=function(){return this._instance||(this._instance=new this)},e.prototype.stringify=function(t){var e=[];return JSON.stringify(t,function(t,r){if("object"==typeof r&&null!==r){if(-1!==e.indexOf(r))return;e.push(r)}return r},2)},e.prototype.writer=function(t){return void 0===t?this._writer:(this._writer=t,this)},e.prototype.log=function(t,e,r){t<this._level||this._filter&&this._filter!==e||("string"!=typeof r&&(r=this.stringify(r)),this._writer.write((new Date).toISOString(),t,e,r))},e.prototype.debug=function(e,r){this.log(t.Level.debug,e,r)},e.prototype.info=function(e,r){this.log(t.Level.info,e,r)},e.prototype.notice=function(e,r){this.log(t.Level.notice,e,r)},e.prototype.warning=function(e,r){this.log(t.Level.warning,e,r)},e.prototype.error=function(e,r){this.log(t.Level.error,e,r)},e.prototype.critical=function(e,r){this.log(t.Level.critical,e,r)},e.prototype.alert=function(e,r){this.log(t.Level.alert,e,r)},e.prototype.emergency=function(e,r){this.log(t.Level.emergency,e,r)},e.prototype.level=function(t){return void 0===t?this._level:(this._level=t,this)},e.prototype.pushLevel=function(t){return this._levelStack.push(this._level),this._level=t,this},e.prototype.popLevel=function(){return this._level=this._levelStack.pop(),this},e.prototype.filter=function(t){return void 0===t?this._filter:(this._filter=t,this)},e}(),q=X.Instance(),B=function(){function t(t){this._scopeID=t}return t.prototype.debug=function(t){q.debug(this._scopeID,t)},t.prototype.info=function(t){q.info(this._scopeID,t)},t.prototype.notice=function(t){q.notice(this._scopeID,t)},t.prototype.warning=function(t){q.warning(this._scopeID,t)},t.prototype.error=function(t){q.error(this._scopeID,t)},t.prototype.critical=function(t){q.critical(this._scopeID,t)},t.prototype.alert=function(t){q.alert(this._scopeID,t)},t.prototype.emergency=function(t){q.emergency(this._scopeID,t)},t.prototype.pushLevel=function(t){return q.pushLevel(t),this},t.prototype.popLevel=function(){return q.popLevel(),this},t}();function G(t,e,r){var n=r-e,o=t-e;return o-Math.floor(o/n)*n+e}function R(t,e){if(void 0!==t&&void 0!==e){for(var r=0,n=t.split(".");r<n.length;r++){var o=n[r];if(!e.hasOwnProperty(o))return;e=e[o]}return e}}function z(t,e){var r={};for(var n in e){var o=e[n];o instanceof Array||"object"==typeof o&&(o=H(t[n],o)),n in t&&(t[n]===o||n in r&&r[n]===o)||(t[n]=o)}return t}function H(t){void 0===t&&(t={});for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if("object"!=typeof t)throw new Error('Destination "'+t+'" must be an object.');for(var n=0,o=e;n<o.length;n++){z(t,o[n])}return t}var U,J=function(){function t(t,e,r){this.eventTarget=t,this.eventID=e,this.callback=r}return t.prototype.release=function(){this.eventTarget.removeObserver(this.eventID,this.callback)},t.prototype.unwatch=function(){this.release()},t}(),K=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._eventObservers={}}return t.prototype.addObserver=function(t,e){var r=this._eventObservers[t];return r||(r=[],this._eventObservers[t]=r),r.push(e),new J(this,t,e)},t.prototype.removeObserver=function(t,e){var r=this._eventObservers[t];if(r)for(var n=r.length-1;n>=0;--n)r[n]===e&&r.splice(n,1);return this},t.prototype.dispatchEvent=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=this._eventObservers[t];if(n)for(var o=0,i=n;o<i.length;o++){i[o].apply(void 0,e)}return this},t.prototype._hasObserver=function(t){var e=this._eventObservers[t];for(var r in e)if(e[r])return!0;return!1},t.prototype.hasObserver=function(t){if(void 0!==t)return this._hasObserver(t);for(var e in this._eventObservers)if(this._hasObserver(e))return!0;return!1},t}();!function(){if(L.requestAnimationFrame)U=L.requestAnimationFrame;else{var t=0;U=function(e){var r=(new Date).getTime(),n=Math.max(0,16-(r-t)),o=setTimeout(function(){return e(r+n)},n);return t=r+n,o}}}();var $=function(){function t(){}return Object.defineProperty(t.prototype,"canConflate",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.conflate=function(t){return!1},t.prototype.void=function(){return!1},t}(),Q=function(){function t(){this._observerID=0,this._observers=[],this._messageBuffer=[]}return t.prototype.observers=function(){return this._observers},t.prototype.messages=function(){var t=[];return this._messageBuffer.forEach(function(e){t.some(function(t){return t.canConflate&&t.conflate(e)})||t.push(e)}),t},t.prototype.dispatchAll=function(){this.dispatch(this.messages()),this.flush()},t.prototype.dispatch=function(t){0!==t.length&&this.observers().forEach(function(e){var r=t.filter(function(t){return!t.void()&&(void 0===e.type||t instanceof e.type)});r.length&&e.callback(r)})},t.prototype.hasObserver=function(){return this._observers.length>0},t.prototype.flush=function(){this._messageBuffer=[]},t.prototype.send=function(t){this.dispatch([t])},t.prototype.post=function(t){var e=this;this._messageBuffer.push(t),U(function(){return e.dispatchAll()})},t.prototype.attach=function(t,e){var r=this,n=++this._observerID;return this._observers.push({id:n,type:e,callback:t}),{release:function(){r._observers=r._observers.filter(function(t){return t.id!==n})},unwatch:function(){this.release()}}},t}(),W=function(){function t(t){this.name="",this.$={},this._children=[],this.content="",this.name=t}return t.prototype.appendAttribute=function(t,e){this.$[t]=e},t.prototype.appendContent=function(t){this.content+=t},t.prototype.appendChild=function(t){this._children.push(t)},t.prototype.children=function(t){return void 0===t?this._children:this._children.filter(function(e){return e.name===t})},t}(),Y=function(){function t(){this.stack=new P}return t.prototype.walkDoc=function(t){var e=this._startXMLNode(t);if(t.attributes)for(var r=0;r<t.attributes.length;++r){var n=t.attributes.item(r);this.attributes(n.nodeName,n.nodeValue)}if(this.startXMLNode(e),t.childNodes)for(r=0;r<t.childNodes.length;++r){var o=t.childNodes.item(r);o.nodeType===o.TEXT_NODE?this.characters(o.nodeValue):this.walkDoc(o)}this.endXMLNode(this.stack.pop())},t.prototype._startXMLNode=function(t){var e=new W(t.nodeName);return this.stack.depth()?this.stack.top().appendChild(e):this.root=e,this.stack.push(e)},t.prototype.parse=function(t){var e=(new DOMParser).parseFromString(t,"application/xml");this.startDocument(),this.walkDoc(e),this.endDocument()},t.prototype.startDocument=function(){},t.prototype.endDocument=function(){},t.prototype.startXMLNode=function(t){},t.prototype.endXMLNode=function(t){},t.prototype.attributes=function(t,e){this.stack.top().appendAttribute(t,e)},t.prototype.characters=function(t){this.stack.top().appendContent(t)},t}(),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.startXMLNode=function(e){t.prototype.startXMLNode.call(this,e),e.name},e.prototype.endXMLNode=function(e){e.name,t.prototype.endXMLNode.call(this,e)},e}(Y);var tt=function(t){function e(e,r,n){var o=t.call(this)||this;return o.property=e,o.newValue=r,o.oldValue=n,o}return r(e,t),Object.defineProperty(e.prototype,"canConflate",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.conflate=function(t){return this.property===t.property&&(this.newValue=t.newValue,!0)},e.prototype.void=function(){return this.newValue===this.oldValue},e}($),et=function(){function t(){this._espState={},this._dispatch=new Q,this._monitorTickCount=0}return t.prototype.clear=function(t){this._espState={},void 0!==t&&this.set(t),this._monitorTickCount=0},t.prototype.get=function(t,e){return void 0===t?this._espState:this.has(t)?this._espState[t]:e},t.prototype.set=function(t,e){if("string"==typeof t)return this.setSingle(t,e);this.setAll(t)},t.prototype.setSingle=function(t,e){var r=this._espState[t];this._espState[t]=e,this._dispatch.post(new tt(t,e,r))},t.prototype.setAll=function(t){for(var e in t)t.hasOwnProperty(e)&&this.setSingle(e,t[e])},t.prototype.has=function(t){return void 0!==this._espState[t]},t.prototype.addObserver=function(t,e,r){if(this.isCallback(e)){if("changed"!==t)throw new Error("Invalid eventID: "+t);return this._dispatch.attach(function(t){e(t.map(function(t){return{id:t.property,oldValue:t.oldValue,newValue:t.newValue}}))})}if("propChanged"!==t)throw new Error("Invalid eventID: "+t);return this._dispatch.attach(function(t){var n=t.filter(function(t){return t.property===e});if(n.length){n.length>1&&console.warn("Should only be 1 message?");var o=n[n.length-1];r({id:o.property,oldValue:o.oldValue,newValue:o.newValue})}})},t.prototype.on=function(t,e,r){return this.addObserver(t,e,r),this},t.prototype.isCallback=function(t){return"function"==typeof t},t.prototype.hasEventListener=function(){return this._dispatch.hasObserver()},t.prototype.refresh=function(t){return e=this,r=void 0,i=function(){return o(this,function(t){switch(t.label){case 0:return[4,Promise.resolve()];case 1:return t.sent(),[2,this]}})},new((n=void 0)||(n=Promise))(function(t,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function u(t){try{a(i.throw(t))}catch(t){o(t)}}function a(e){e.done?t(e.value):new n(function(t){t(e.value)}).then(s,u)}a((i=i.apply(e,r||[])).next())});var e,r,n,i},t.prototype._monitor=function(){var t=this;this._monitorHandle?this._monitorTickCount=0:this._monitorHandle=setTimeout(function(){(t.hasEventListener()?t.refresh():Promise.resolve()).then(function(){t._monitor()}),delete t._monitorHandle},this._monitorTimeoutDuraction())},t.prototype._monitorTimeoutDuraction=function(){return++this._monitorTickCount,this._monitorTickCount<=1?0:3e4},t.prototype.watch=function(t,e){var r=this;if(void 0===e&&(e=!0),"function"!=typeof t)throw new Error("Invalid Callback");e&&setTimeout(function(){var e=r.get(),n=[];for(var o in e)e.hasOwnProperty(e)&&n.push({id:o,newValue:e[o],oldValue:void 0});t(n)},0);var n=this.addObserver("changed",t);return this._monitor(),n},t}();function rt(t,e){if("string"!=typeof e)return t;if(0===e.length)return t;for(;0===t.indexOf(e);)t=t.substring(1);for(;nt(t,e);)t=t.substring(0,t.length-1);return t}function nt(t,e,r){var n=t.toString();("number"!=typeof r||!isFinite(r)||Math.floor(r)!==r||r>n.length)&&(r=n.length),r-=e.length;var o=n.lastIndexOf(e,r);return-1!==o&&o===r}t.AsyncCache=c,t.AsyncOrderedQueue=f,t.BUILD_VERSION="2.15.17",t.Cache=h,t.Dictionary=d,t.DictionaryNoCase=l,t.Dispatch=Q,t.Edge=y,t.Graph=b,t.Graph2=O,t.GraphItem=v,t.Logging=X,t.Message=$,t.Observable=K,t.PKG_NAME="@hpcc-js/util",t.PKG_VERSION="2.14.0",t.SAXStackParser=Y,t.ScopedLogging=B,t.Stack=P,t.StateObject=et,t.Subgraph=g,t.Vertex=_,t.XMLNode=W,t.classID2Meta=function(t){var e=t.split("_"),r=e[1].split(".");return{module:"@hpcc-js/"+e[0],file:r[0],class:r[1]||r[0]}},t.compare=function(t,e){for(var r={update:[],exit:[],enter:i(e)},n=0,o=t;n<o.length;n++){var s=o[n],u=r.enter.indexOf(s);u>=0?(r.update.push(s),r.enter.splice(u,1)):r.exit.push(s)}return r},t.compare2=s,t.debounce=function(t,e){var r={};return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=p(n);return r[i]||(r[i]={clockStart:Date.now(),promise:t.apply(void 0,n).then(function(t){return void 0===e?r[i]=null:setTimeout(function(){r[i]=null},Math.max(e-(Date.now()-r[i].clockStart),0)),t}).catch(function(t){throw r[i]=null,t})}),r[i].promise}},t.deepEquals=D,t.deepMixin=H,t.deepMixinT=function(t){void 0===t&&(t={});for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return H.apply(void 0,i([t],e))},t.degreesToRadians=function(t){return t*(Math.PI/180)},t.endsWith=nt,t.espTime2Seconds=function(t){if(!t)return 0;if(!isNaN(Number(t)))return Number(t);var e=t.indexOf("ns");if(-1!==e)return parseFloat(t.substr(0,e))/1e9;var r=t.indexOf("ms");if(-1!==r)return parseFloat(t.substr(0,r))/1e3;var n=t.indexOf("s");if(-1!==n&&-1===t.indexOf("days"))return parseFloat(t.substr(0,n));for(var o=t.split(" days "),i=o.length>1?parseFloat(o[0]):0,s=0,u=(o.length>1?o[1]:o[0]).split(":").reverse(),a=0;a<u.length;++a)s+=parseFloat(u[a])*Math.pow(60,a);return 24*i*60*60+s},t.exists=function(t,e){return void 0!==R(t,e)},t.find=function(t,e){if(null==t)throw new TypeError('"o" is null or not defined');var r=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<r;){var i=t[o];if(e.call(n,i,o,t))return i;o++}},t.hashSum=p,t.inner=R,t.isArray=function(t){return void 0!==Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},t.isBrowser=T,t.isCI=C,t.isNode=j,t.join=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(t.length&&t[0].length&&"/"===t[0].charAt(0)?"/":"")+t.map(function(t){return rt(t,"/")}).join("/")},t.logger=q,t.normalize=G,t.normalizeDegrees=function(t,e,r){return void 0===e&&(e=-180),void 0===r&&(r=180),G(t,e,r)},t.normalizeRadians=function(t,e,r){return void 0===e&&(e=-Math.PI),void 0===r&&(r=Math.PI),G(t,e,r)},t.promiseTimeout=function(t,e){var r,n=new Promise(function(e,n){r=setTimeout(function(){clearTimeout(r),n("Timed out in "+t+"ms.")},t)});return Promise.race([e,n]).then(function(t){return clearTimeout(r),t}).catch(function(t){throw clearTimeout(r),t})},t.radiansToDegrees=function(t){return t*(180/Math.PI)},t.root=L,t.safeStringify=function(t){var e=[];return JSON.stringify(t,function(t,r){if("object"==typeof r&&null!==r){if(-1!==e.indexOf(r))return;e.push(r)}return r})},t.scopedLogger=function(t,e){return void 0===e&&(e=!1),e&&q.filter(t),new B(t)},t.trim=rt,t.update=function(t,e){return D(t,e)?t:e},t.xml2json=function(t){var e=new Z;return e.parse(t),e.root},Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=index.min.js.map |
export var PKG_NAME = "@hpcc-js/util"; | ||
export var PKG_VERSION = "2.13.0"; | ||
export var BUILD_VERSION = "2.15.16"; | ||
export var PKG_VERSION = "2.14.0"; | ||
export var BUILD_VERSION = "2.15.17"; | ||
//# sourceMappingURL=__package__.js.map |
@@ -0,0 +0,0 @@ import { __spreadArrays } from "tslib"; |
@@ -0,0 +0,0 @@ import { __assign } from "tslib"; |
@@ -0,0 +0,0 @@ import { hashSum } from "./hashSum"; |
@@ -0,0 +0,0 @@ import { __extends } from "tslib"; |
@@ -0,0 +0,0 @@ import { root } from "./platform"; |
@@ -0,0 +0,0 @@ export function espTime2Seconds(duration) { |
@@ -0,0 +0,0 @@ import { __extends, __spreadArrays } from "tslib"; |
@@ -0,0 +0,0 @@ import { __extends, __spreadArrays } from "tslib"; |
@@ -0,0 +0,0 @@ // Ported to TypeScript from: https://github.com/bevacqua/hash-sum |
@@ -0,0 +0,0 @@ var isArray = Array.isArray; |
@@ -0,0 +0,0 @@ export * from "./__package__"; |
@@ -0,0 +0,0 @@ import { isNode } from "./platform"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { __spreadArrays } from "tslib"; |
@@ -0,0 +0,0 @@ var ObserverHandle = /** @class */ (function () { |
@@ -0,0 +0,0 @@ // @ts-ignore |
@@ -0,0 +0,0 @@ import { __extends } from "tslib"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { __awaiter, __extends, __generator } from "tslib"; |
@@ -0,0 +0,0 @@ export function trim(str, char) { |
@@ -0,0 +0,0 @@ import { trim } from "./string"; |
{ | ||
"name": "@hpcc-js/util", | ||
"version": "2.13.0", | ||
"version": "2.14.0", | ||
"description": "hpcc-js - Utilities", | ||
"main": "dist/index.js", | ||
"module": "dist/index.es6", | ||
"module": "lib-es6/index", | ||
"unpkg": "dist/index.min.js", | ||
@@ -31,5 +31,7 @@ "jsdelivr": "dist/index.min.js", | ||
}, | ||
"dependencies": { | ||
"tslib": "1.10.0" | ||
}, | ||
"devDependencies": { | ||
"@hpcc-js/bundle": "^2.10.12", | ||
"es6-promise": "4.2.8", | ||
"npm-run-all": "4.1.5", | ||
@@ -44,3 +46,2 @@ "rimraf": "2.6.3", | ||
"terser": "4.0.0", | ||
"tslib": "1.10.0", | ||
"tslint": "5.17.0", | ||
@@ -61,3 +62,3 @@ "typedoc": "0.14.2", | ||
"homepage": "https://github.com/hpcc-systems/Visualization", | ||
"gitHead": "05352b06a0d7d2a2234efb48ae1fdf2a124ff8aa" | ||
"gitHead": "82bc33112b1b3333c17687d78a89ca98ed2fa6a4" | ||
} |
export declare const PKG_NAME = "@hpcc-js/util"; | ||
export declare const PKG_VERSION = "2.13.0"; | ||
export declare const BUILD_VERSION = "2.15.16"; | ||
export declare const PKG_VERSION = "2.14.0"; | ||
export declare const BUILD_VERSION = "2.15.17"; | ||
//# sourceMappingURL=__package__.d.ts.map |
@@ -0,0 +0,0 @@ export declare function find<T>(o: ReadonlyArray<T>, predicate: (value: T, index: number) => boolean): T | undefined; |
@@ -0,0 +0,0 @@ export declare class Cache<I, C> { |
@@ -0,0 +0,0 @@ export declare function debounce<R extends Promise<any>>(fn: () => R, timeout?: number): () => R; |
@@ -0,0 +0,0 @@ export declare type StringAnyMap = { |
@@ -0,0 +0,0 @@ import { IObserverHandle } from "./observer"; |
export declare function espTime2Seconds(duration: string): number; | ||
//# sourceMappingURL=esp.d.ts.map |
@@ -0,0 +0,0 @@ export declare class GraphItem<S, V, E> { |
@@ -0,0 +0,0 @@ declare class GraphItem<T = any> { |
export declare function hashSum(o: any): string; | ||
//# sourceMappingURL=hashSum.d.ts.map |
export declare function deepEquals(a: any, b: any): boolean; | ||
export declare function update<T>(origItem: T, newItem: T): T; | ||
//# sourceMappingURL=immutable.d.ts.map |
@@ -0,0 +0,0 @@ export * from "./__package__"; |
@@ -0,0 +0,0 @@ export declare enum Level { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export declare const root: any; |
@@ -0,0 +0,0 @@ import { StringAnyMap } from "./dictionary"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { IObserverHandle } from "./dispatch"; |
export declare function trim(str: string, char: string): string; | ||
export declare function endsWith(origString: string, searchString: string, position?: number): boolean; | ||
//# sourceMappingURL=string.d.ts.map |
export declare function join(...args: string[]): string; | ||
//# sourceMappingURL=url.d.ts.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13
614949
1
95
5218
+ Addedtslib@1.10.0
+ Addedtslib@1.10.0(transitive)