compare-dependencies
Version:
Compares listed dependencies between two package.json objects.
7 lines • 21.5 kB
JavaScript
/*!
*** compare-dependencies 2.0.0
*** Copyright © 2019, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid)
*** @license MIT
*** See https://github.com/Jaid/compare-dependencies
!*/
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=78)}([function(t,e,n){const r=/^([~\^])?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?$/,o=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([\da-z-]+(?:\.[\da-z-]+)*))?(\+[\da-z-]+)?$/i;e.semverRegEx=o,e.shortSemverRegEx=r;const i=Symbol("major"),s=Symbol("minor"),u=Symbol("patch"),c=Symbol("pre"),a=Symbol("build"),f=Symbol("tag");let p=/^\d+$/;class h{constructor(t){let e=t.match(o);e?(this[i]=parseInt(e[1],10),this[s]=parseInt(e[2],10),this[u]=parseInt(e[3],10),this[c]=e[4]&&e[4].split("."),this[a]=e[5]):this[f]=t}get major(){return this[i]}get minor(){return this[s]}get patch(){return this[u]}get pre(){return this[c]}get build(){return this[a]}get tag(){return this[f]}gt(t){return 1===h.compare(this,t)}lt(t){return-1===h.compare(this,t)}eq(t){if(t instanceof h||(t=new h(t)),this[f]&&t[f])return this[f]===t[f];if(this[f]||t[f])return!1;if(this[i]!==t[i])return!1;if(this[s]!==t[s])return!1;if(this[u]!==t[u])return!1;if(void 0===this[c]&&void 0===t[c])return!0;if(void 0===this[c]||void 0===t[c])return!1;if(this[c].length!==t[c].length)return!1;for(let e=0;e<this[c].length;e++)if(this[c][e]!==t[c][e])return!1;return this[a]===t[a]}matches(t,e=!1){return t instanceof _||(t=new _(t)),t.has(this,e)}toString(){return this[f]?this[f]:this[i]+"."+this[s]+"."+this[u]+(this[c]?"-"+this[c].join("."):"")+(this[a]?this[a]:"")}static isValid(t){let e=t.match(o);return e&&void 0!==e[2]&&void 0!==e[3]}static compare(t,e){return t instanceof h||(t=new h(t)),e instanceof h||(e=new h(e)),t[f]&&e[f]?0:t[f]?-1:e[f]?1:t[i]!==e[i]?t[i]>e[i]?1:-1:t[s]!==e[s]?t[s]>e[s]?1:-1:t[u]!==e[u]?t[u]>e[u]?1:-1:t[c]||e[c]?t[c]?e[c]?l(t[c],e[c]):-1:1:0}}function l(t,e){for(let n=0,r=Math.min(t.length,e.length);r>n;n++)if(t[n]!==e[n]){let r=t[n].match(p),o=e[n].match(p);return r&&!o?-1:o&&!r?1:r&&o?parseInt(t[n],10)>parseInt(e[n],10)?1:-1:t[n]>e[n]?1:-1}return t.length===e.length?0:t.length>e.length?1:-1}e.Semver=h;const d=0,v=1,y=2,g=3,x=Symbol("type"),b=Symbol("version");class _{constructor(t){if("*"===t||""===t)return void(this[x]=d);let e=t.match(r);e?(e[1]&&(t=t.substr(1)),void 0===e[3]?(this[b]=new h(t+".0.0"),this[x]=v):(this[b]=new h(t+".0"),"^"===e[1]&&"0"!==e[2]?this[x]=v:this[x]=y),this[b][c]=this[b][c]||[]):t.startsWith("^^")?(this[b]=new h(t.substr(2)),this[x]=v):"^"===t[0]?(this[b]=new h(t.substr(1)),0===this[b][i]?0===this[b][s]?this[x]=g:this[x]=y:this[x]=v):"~"===t[0]?(this[b]=new h(t.substr(1)),this[x]=y):(this[b]=new h(t),this[x]=g),this[b][f]&&this[x]!==g&&(this[x]=g)}get isExact(){return this[x]===g}get isExactSemver(){return this[x]===g&&void 0===this.version[f]}get isExactTag(){return this[x]===g&&void 0!==this.version[f]}get isStable(){return this[x]===y}get isMajor(){return this[x]===v}get isWildcard(){return this[x]===d}get type(){switch(this[x]){case d:return"wildcard";case v:return"major";case y:return"stable";case g:return"exact"}}get version(){return this[b]}gt(t){return 1===_.compare(this,t)}lt(t){return-1===_.compare(this,t)}eq(t){return 0===_.compare(this,t)}has(t,e=!1){return t instanceof h||(t=new h(t)),this[x]===d?e||!t[c]&&!t[f]:this[x]===g?this[b].eq(t):!t[f]&&this[b][i]===t[i]&&(this[x]===v?this[b][s]<=t[s]:this[b][s]===t[s])&&(this[x]===v&&this[b][s]!==t[s]||this[b][u]<=t[u])&&(void 0===t[c]||0===t[c].length||(void 0===this[b][c]||0===this[b][c].length?e:(!1!==e||this[b][s]===t[s]&&this[b][u]===t[u])&&1!==l(this[b][c],t[c])))}contains(t){return t instanceof _||(t=new _(t)),this[x]===d||t[x]!==d&&t[x]>=this[x]&&this.has(t[b],!0)}intersect(t){if(t instanceof _||(t=new _(t)),this[x]===d&&t[x]===d)return this;if(this[x]===d)return t;if(t[x]===d)return this;if(this[x]===g)return t.has(this[b],!0)?this:void 0;if(t[x]===g)return this.has(t[b],!0)?t:void 0;let e,n,r;if(t[b].gt(this[b])?(e=t,n=this,r=!0):(e=this,n=t,r=!1),!n.has(e[b],!0))return;if(n[x]===v)return r?t:this;let o=new _(e[b].toString());return o[x]=y,o}bestMatch(t,e=!1){let n;return t.forEach(t=>{t instanceof h||(t=new h(t)),this.has(t,e)&&(n?1===h.compare(t,n)&&(n=t):n=t)}),n}toString(){let t=this[b];switch(this[x]){case d:return"*";case v:return 0===t[i]&&0===t[s]&&0===t[u]?"0":t[c]&&0===t[c].length&&0===t[u]?"^"+t[i]+"."+t[s]:"^"+t.toString();case y:return t[c]&&0===t[c].length&&0===t[u]||0===t[i]&&0===t[s]?t[i]+"."+t[s]:"~"+t.toString();case g:return t.toString()}}static match(t,e,n=!1){return e instanceof h||(e=new h(e)),e.matches(t,n)}static isValid(t){let e=new _(t);return e[x]!==g||void 0===e[b][f]}static compare(t,e){if(t instanceof _||(t=new _(t)),e instanceof _||(e=new _(e)),t[x]===d&&e[x]===d)return 0;if(t[x]===d)return 1;if(e[x]===d)return-1;let n=h.compare(t[b],e[b]);return 0!==n?n:t[x]===e[x]?0:t[x]>e[x]?1:-1}}e.SemverRange=_},function(t,e,n){var r=n(5)(Object,"create");t.exports=r},function(t,e,n){var r=n(45);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(51);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(29),o=n(37);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(7).Symbol;t.exports=r},function(t,e,n){var r=n(30),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(24),o=n(61),i=n(18),s=n(20),u=i(function(t,e){return s(t)?r(t,o(e,1,s,!0)):[]});t.exports=u},function(t,e,n){var r=n(25),o=n(55),i=n(56);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=o,s.prototype.has=i,t.exports=s},function(t,e,n){var r=n(13),o=n(4);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(6),o=n(32),i=n(33),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(57);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(19),o=n(67),i=n(69);t.exports=function(t,e){return i(o(t,e,r),t+"")}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(74),o=n(9);t.exports=function(t){return o(t)&&r(t)}},function(t,e,n){var r=n(8),o=n(76),i=n(18),s=n(77),u=i(function(t){var e=r(t,s);return e.length&&e[0]===t[0]?o(e):[]});t.exports=u},function(t,e){t.exports=function(t,e,n){if(0===arguments.length)return[];if(1===arguments.length){if(null==t)return[];if(Array.isArray(t))return t}return Array.prototype.slice.call(arguments)}},function(t,e,n){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){var r=n(5),o=n(13),i=n(14),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(0),o=n(2);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(0),o=n(1);t.exports=function(t){return"number"==typeof t||o(t)&&"[object Number]"==r(t)}},function(t,e,n){var r=n(10).Symbol;t.exports=r},function(t,e,n){var r=n(0),o=n(1);t.exports=function(t){return!0===t||!1===t||o(t)&&"[object Boolean]"==r(t)}},function(t,e,n){var r=n(0),o=n(15),i=n(1);t.exports=function(t){return"string"==typeof t||!o(t)&&i(t)&&"[object String]"==r(t)}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){n.r(e),n.d(e,"isEmpty",function(){return y});var r=n(6),o=n.n(r),i=n(2),s=n.n(i),u=n(3),c=n.n(u),a=n(4),f=n.n(a),p=n(7),h=n.n(p),l=n(8),d=n.n(l);const v=t=>{var e,n,r,i,u,a,p,l;return e=t,!d()(e)&&(n=t,!!c()(n)||(r=t,!!f()(r))||(i=t,o()(i)?!0===t:(u=t,h()(u)?t.trim().length>0:(a=t.length,f()(a)?t.length>0:(p=t.length,c()(p)?t.length()>0:(l=t,!!s()(l)&&Object.keys(t).length>0))))))},y=t=>!v(t);e.default=v},function(t,e,n){var r=n(11),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(12))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(5),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[u]=n:delete t[u]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){var n=Array.isArray;t.exports=n}])},function(t,e,n){var r=n(11),o=n(14),i=n(15),s=n(8),u=n(16),c=n(17);t.exports=function(t,e,n,a){var f=-1,p=o,h=!0,l=t.length,d=[],v=e.length;if(!l)return d;n&&(e=s(e,u(n))),a?(p=i,h=!1):200>e.length||(p=c,h=!1,e=new r(e));t:for(;++f<l;){var y=t[f],g=null==n?y:n(y);if(y=a||0!==y?y:0,h&&g==g){for(var x=v;x--;)if(e[x]===g)continue t;d.push(y)}else p(e,g,a)||d.push(y)}return d}},function(t,e,n){var r=n(26),o=n(50),i=n(52),s=n(53),u=n(54);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(27),o=n(42),i=n(49);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(28),o=n(38),i=n(39),s=n(40),u=n(41);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(1);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(12),o=n(34),i=n(4),s=n(36),u=Function.prototype,c=Object.prototype,a=u.toString,f=c.hasOwnProperty,p=RegExp("^"+a.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:/^\[object .+?Constructor\]$/).test(s(t))}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(31))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(6),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[u]=n:delete t[u]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,o=n(35),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(7)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(1),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(1),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(1);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(43),o=n(44),i=n(46),s=n(47),u=n(48);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(2),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return n>=0&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(2);t.exports=function(t){var e=this.__data__,n=r(e,t);return 0>n?void 0:e[n][1]}},function(t,e,n){var r=n(2);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(2);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return 0>o?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(5)(n(7),"Map");t.exports=r},function(t,e,n){var r=n(3);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(3);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(3);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(3);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(58),o=n(59),i=n(60);t.exports=function(t,e,n){return e==e?i(t,e,n):r(t,o,n)}},function(t,e){t.exports=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}},function(t,e,n){var r=n(62),o=n(63);t.exports=function t(e,n,i,s,u){var c=-1,a=e.length;for(i||(i=o),u||(u=[]);++c<a;){var f=e[c];n>0&&i(f)?n>1?t(f,n-1,i,s,u):r(u,f):s||(u[u.length]=f)}return u}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e,n){var r=n(6),o=n(64),i=n(66),s=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(s&&t&&t[s])}},function(t,e,n){var r=n(65),o=n(9),i=Object.prototype,s=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&s.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(13),o=n(9);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(68),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,s=-1,u=o(i.length-e,0),c=Array(u);++s<u;)c[s]=i[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=i[s];return a[e]=n(c),r(t,this,a)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(70),o=n(73)(r);t.exports=o},function(t,e,n){var r=n(71),o=n(72),i=n(19),s=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=s},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){var r=n(5),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(12),o=n(75);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&9007199254740991>=t}},function(t,e,n){var r=n(11),o=n(14),i=n(15),s=n(8),u=n(16),c=n(17),a=Math.min;t.exports=function(t,e,n){for(var f=n?i:o,p=t[0].length,h=t.length,l=h,d=Array(h),v=1/0,y=[];l--;){var g=t[l];l&&e&&(g=s(g,u(e))),v=a(g.length,v),d[l]=n||!e&&(120>p||120>g.length)?void 0:new r(l&&g)}g=t[0];var x=-1,b=d[0];t:for(;++x<p&&y.length<v;){var _=g[x],m=e?e(_):_;if(_=n||0!==_?_:0,!(b?c(b,m):f(y,m,n))){for(l=h;--l;){var j=d[l];if(!(j?c(j,m):f(t[l],m,n)))continue t}b&&b.push(m),y.push(_)}}return y}},function(t,e,n){var r=n(20);t.exports=function(t){return r(t)?t:[]}},function(t,e,n){n.r(e);var r=n(10),o=n.n(r),i=n(21),s=n.n(i),u={production:{key:"dependencies",title:"Production dependencies"},peer:{key:"peerDependencies",title:"Peer dependencies"},optional:{key:"optionalDependencies",title:"Optional dependencies"},bundled:{key:["bundledDependencies","bundleDependencies"],title:"Bundled dependencies"},development:{key:"devDependencies",title:"Development dependencies"}},c=n(0),a=n(4),f=n.n(a),p=n(22),h=n.n(p),l=n(23),d=n.n(l);class v{constructor(t){this.dependencies={},this.dependencyNames=new Set;for(const[e,{key:n,title:r}]of Object.entries(u)){const r={};for(const e of h()(n)){const n=t[e];if(f()(n)&&d()(n)){Object.assign(r,n);for(const t of Object.keys(n))this.dependencyNames.add(t)}}this.dependencies[e]=r}}getDependenciesForType(t){return this.dependencies[t]}getDependencyNamesForType(t){return Object.keys(this.dependencies[t])}getDependencyNames(){return this.dependencyNames}hasDependency(t){return this.dependencyNames.has(t)}getTypesForDependencyName(t){const e=[];for(const n of Object.keys(u))this.dependencies[n][t]&&e.push(n);return e}}e.default=(t,e)=>{const n=new v(t),r=new v(e),i={};for(const[t,{key:e,title:a}]of Object.entries(u)){const e=n.getDependencyNamesForType(t),u=r.getDependencyNamesForType(t),a=o()(u,e),f=o()(e,u),p={added:[],removed:[],upgraded:[],downgraded:[],locked:[],unlocked:[],moved:[]};for(const e of a)n.hasDependency(e)||p.added.push({name:e,range:new c.SemverRange(r.getDependenciesForType(t)[e])});for(const e of f)n.hasDependency(e)&&p.removed.push({name:e,range:new c.SemverRange(n.getDependenciesForType(t)[e])});for(const e of a.filter(t=>n.hasDependency(t)))p.moved.push({name:e,newType:t,oldTypes:n.getTypesForDependencyName(e)});const h=s()(e,u);for(const e of h){const o=new c.SemverRange(n.getDependenciesForType(t)[e]),i=new c.SemverRange(r.getDependenciesForType(t)[e]);if(!o.eq(i)){if(o.isExact&&!i.isExact){p.unlocked.push({name:e,oldRange:o,newRange:i});continue}if(!o.isExact&&i.isExact){p.locked.push({name:e,oldRange:o,newRange:i});continue}if(i.gt(o)){p.upgraded.push({name:e,oldRange:o,newRange:i});continue}if(o.gt(i)){p.downgraded.push({name:e,oldRange:o,newRange:i});continue}}}i[t]=p}return i}}])});