@vitessce/csv 3.6.0 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +291 -774
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1130,11 +1130,45 @@ const CoordinationType$1 = {
1130
1130
  CoordinationType$1.EMBEDDING_OBS_SET_LABEL_SIZE,
1131
1131
  CoordinationType$1.EMBEDDING_OBS_RADIUS,
1132
1132
  CoordinationType$1.EMBEDDING_OBS_OPACITY,
1133
+ CoordinationType$1.SPATIAL_ZOOM,
1134
+ CoordinationType$1.SPATIAL_ROTATION,
1135
+ CoordinationType$1.SPATIAL_ROTATION_X,
1136
+ CoordinationType$1.SPATIAL_ROTATION_Y,
1137
+ CoordinationType$1.SPATIAL_ROTATION_Z,
1138
+ CoordinationType$1.SPATIAL_ROTATION_ORBIT,
1139
+ CoordinationType$1.SPATIAL_TARGET_X,
1140
+ CoordinationType$1.SPATIAL_TARGET_Y,
1141
+ CoordinationType$1.SPATIAL_TARGET_Z,
1142
+ CoordinationType$1.SPATIAL_AXIS_FIXED,
1143
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
1133
1144
  CoordinationType$1.FEATURE_AGGREGATION_STRATEGY
1134
1145
  ];
1135
1146
  ({
1136
1147
  [ViewType$1.NEUROGLANCER]: [
1137
- CoordinationType$1.DATASET
1148
+ CoordinationType$1.DATASET,
1149
+ CoordinationType$1.SPATIAL_TARGET_X,
1150
+ CoordinationType$1.SPATIAL_TARGET_Y,
1151
+ CoordinationType$1.SPATIAL_TARGET_Z,
1152
+ CoordinationType$1.SPATIAL_ROTATION_X,
1153
+ CoordinationType$1.SPATIAL_ROTATION_Y,
1154
+ CoordinationType$1.SPATIAL_ROTATION_Z,
1155
+ CoordinationType$1.SPATIAL_AXIS_FIXED,
1156
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
1157
+ CoordinationType$1.SPATIAL_ZOOM,
1158
+ CoordinationType$1.OBS_FILTER,
1159
+ CoordinationType$1.OBS_HIGHLIGHT,
1160
+ CoordinationType$1.OBS_SET_SELECTION,
1161
+ CoordinationType$1.OBS_SET_FILTER,
1162
+ CoordinationType$1.OBS_SET_HIGHLIGHT,
1163
+ CoordinationType$1.OBS_SET_COLOR,
1164
+ CoordinationType$1.OBS_TYPE,
1165
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
1166
+ CoordinationType$1.OBS_SET_COLOR,
1167
+ CoordinationType$1.OBS_COLOR_ENCODING,
1168
+ CoordinationType$1.OBS_SET_SELECTION,
1169
+ CoordinationType$1.EMBEDDING_TYPE,
1170
+ CoordinationType$1.OBS_COLOR_ENCODING,
1171
+ CoordinationType$1.TOOLTIPS_VISIBLE
1138
1172
  ],
1139
1173
  [ViewType$1.SCATTERPLOT]: [
1140
1174
  CoordinationType$1.DATASET,
@@ -8520,11 +8554,25 @@ function requireConstants() {
8520
8554
  const MAX_SAFE_INTEGER2 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
8521
8555
  9007199254740991;
8522
8556
  const MAX_SAFE_COMPONENT_LENGTH = 16;
8557
+ const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
8558
+ const RELEASE_TYPES = [
8559
+ "major",
8560
+ "premajor",
8561
+ "minor",
8562
+ "preminor",
8563
+ "patch",
8564
+ "prepatch",
8565
+ "prerelease"
8566
+ ];
8523
8567
  constants = {
8524
- SEMVER_SPEC_VERSION,
8525
8568
  MAX_LENGTH,
8569
+ MAX_SAFE_COMPONENT_LENGTH,
8570
+ MAX_SAFE_BUILD_LENGTH,
8526
8571
  MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2,
8527
- MAX_SAFE_COMPONENT_LENGTH
8572
+ RELEASE_TYPES,
8573
+ SEMVER_SPEC_VERSION,
8574
+ FLAG_INCLUDE_PRERELEASE: 1,
8575
+ FLAG_LOOSE: 2
8528
8576
  };
8529
8577
  return constants;
8530
8578
  }
@@ -8543,30 +8591,49 @@ function requireRe() {
8543
8591
  if (hasRequiredRe) return re.exports;
8544
8592
  hasRequiredRe = 1;
8545
8593
  (function(module2, exports2) {
8546
- const { MAX_SAFE_COMPONENT_LENGTH } = requireConstants();
8594
+ const {
8595
+ MAX_SAFE_COMPONENT_LENGTH,
8596
+ MAX_SAFE_BUILD_LENGTH,
8597
+ MAX_LENGTH
8598
+ } = requireConstants();
8547
8599
  const debug = requireDebug();
8548
8600
  exports2 = module2.exports = {};
8549
8601
  const re2 = exports2.re = [];
8602
+ const safeRe = exports2.safeRe = [];
8550
8603
  const src = exports2.src = [];
8551
8604
  const t = exports2.t = {};
8552
8605
  let R = 0;
8606
+ const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
8607
+ const safeRegexReplacements = [
8608
+ ["\\s", 1],
8609
+ ["\\d", MAX_LENGTH],
8610
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
8611
+ ];
8612
+ const makeSafeRegex = (value) => {
8613
+ for (const [token, max] of safeRegexReplacements) {
8614
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
8615
+ }
8616
+ return value;
8617
+ };
8553
8618
  const createToken = (name, value, isGlobal) => {
8619
+ const safe = makeSafeRegex(value);
8554
8620
  const index = R++;
8555
8621
  debug(name, index, value);
8556
8622
  t[name] = index;
8557
8623
  src[index] = value;
8558
8624
  re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
8625
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
8559
8626
  };
8560
8627
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
8561
- createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
8562
- createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
8628
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
8629
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
8563
8630
  createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
8564
8631
  createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
8565
8632
  createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
8566
8633
  createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
8567
8634
  createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
8568
8635
  createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
8569
- createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
8636
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
8570
8637
  createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
8571
8638
  createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
8572
8639
  createToken("FULL", `^${src[t.FULLPLAIN]}$`);
@@ -8579,8 +8646,11 @@ function requireRe() {
8579
8646
  createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
8580
8647
  createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
8581
8648
  createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
8582
- createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
8649
+ createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
8650
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
8651
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
8583
8652
  createToken("COERCERTL", src[t.COERCE], true);
8653
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
8584
8654
  createToken("LONETILDE", "(?:~>?)");
8585
8655
  createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
8586
8656
  exports2.tildeTrimReplace = "$1~";
@@ -8608,11 +8678,17 @@ var hasRequiredParseOptions;
8608
8678
  function requireParseOptions() {
8609
8679
  if (hasRequiredParseOptions) return parseOptions_1;
8610
8680
  hasRequiredParseOptions = 1;
8611
- const opts = ["includePrerelease", "loose", "rtl"];
8612
- const parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((o, k) => {
8613
- o[k] = true;
8614
- return o;
8615
- }, {});
8681
+ const looseOption = Object.freeze({ loose: true });
8682
+ const emptyOpts = Object.freeze({});
8683
+ const parseOptions = (options) => {
8684
+ if (!options) {
8685
+ return emptyOpts;
8686
+ }
8687
+ if (typeof options !== "object") {
8688
+ return looseOption;
8689
+ }
8690
+ return options;
8691
+ };
8616
8692
  parseOptions_1 = parseOptions;
8617
8693
  return parseOptions_1;
8618
8694
  }
@@ -8645,7 +8721,7 @@ function requireSemver$1() {
8645
8721
  hasRequiredSemver$1 = 1;
8646
8722
  const debug = requireDebug();
8647
8723
  const { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2 } = requireConstants();
8648
- const { re: re2, t } = requireRe();
8724
+ const { safeRe: re2, t } = requireRe();
8649
8725
  const parseOptions = requireParseOptions();
8650
8726
  const { compareIdentifiers } = requireIdentifiers();
8651
8727
  class SemVer {
@@ -8658,7 +8734,7 @@ function requireSemver$1() {
8658
8734
  version = version.version;
8659
8735
  }
8660
8736
  } else if (typeof version !== "string") {
8661
- throw new TypeError(`Invalid Version: ${version}`);
8737
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
8662
8738
  }
8663
8739
  if (version.length > MAX_LENGTH) {
8664
8740
  throw new TypeError(
@@ -8768,7 +8844,7 @@ function requireSemver$1() {
8768
8844
  do {
8769
8845
  const a = this.build[i];
8770
8846
  const b = other.build[i];
8771
- debug("prerelease compare", i, a, b);
8847
+ debug("build compare", i, a, b);
8772
8848
  if (a === void 0 && b === void 0) {
8773
8849
  return 0;
8774
8850
  } else if (b === void 0) {
@@ -8784,33 +8860,33 @@ function requireSemver$1() {
8784
8860
  }
8785
8861
  // preminor will bump the version up to the next minor release, and immediately
8786
8862
  // down to pre-release. premajor and prepatch work the same way.
8787
- inc(release, identifier) {
8863
+ inc(release, identifier, identifierBase) {
8788
8864
  switch (release) {
8789
8865
  case "premajor":
8790
8866
  this.prerelease.length = 0;
8791
8867
  this.patch = 0;
8792
8868
  this.minor = 0;
8793
8869
  this.major++;
8794
- this.inc("pre", identifier);
8870
+ this.inc("pre", identifier, identifierBase);
8795
8871
  break;
8796
8872
  case "preminor":
8797
8873
  this.prerelease.length = 0;
8798
8874
  this.patch = 0;
8799
8875
  this.minor++;
8800
- this.inc("pre", identifier);
8876
+ this.inc("pre", identifier, identifierBase);
8801
8877
  break;
8802
8878
  case "prepatch":
8803
8879
  this.prerelease.length = 0;
8804
- this.inc("patch", identifier);
8805
- this.inc("pre", identifier);
8880
+ this.inc("patch", identifier, identifierBase);
8881
+ this.inc("pre", identifier, identifierBase);
8806
8882
  break;
8807
8883
  // If the input is a non-prerelease version, this acts the same as
8808
8884
  // prepatch.
8809
8885
  case "prerelease":
8810
8886
  if (this.prerelease.length === 0) {
8811
- this.inc("patch", identifier);
8887
+ this.inc("patch", identifier, identifierBase);
8812
8888
  }
8813
- this.inc("pre", identifier);
8889
+ this.inc("pre", identifier, identifierBase);
8814
8890
  break;
8815
8891
  case "major":
8816
8892
  if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
@@ -8835,9 +8911,13 @@ function requireSemver$1() {
8835
8911
  break;
8836
8912
  // This probably shouldn't be used publicly.
8837
8913
  // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
8838
- case "pre":
8914
+ case "pre": {
8915
+ const base = Number(identifierBase) ? 1 : 0;
8916
+ if (!identifier && identifierBase === false) {
8917
+ throw new Error("invalid increment argument: identifier is empty");
8918
+ }
8839
8919
  if (this.prerelease.length === 0) {
8840
- this.prerelease = [0];
8920
+ this.prerelease = [base];
8841
8921
  } else {
8842
8922
  let i = this.prerelease.length;
8843
8923
  while (--i >= 0) {
@@ -8847,24 +8927,34 @@ function requireSemver$1() {
8847
8927
  }
8848
8928
  }
8849
8929
  if (i === -1) {
8850
- this.prerelease.push(0);
8930
+ if (identifier === this.prerelease.join(".") && identifierBase === false) {
8931
+ throw new Error("invalid increment argument: identifier already exists");
8932
+ }
8933
+ this.prerelease.push(base);
8851
8934
  }
8852
8935
  }
8853
8936
  if (identifier) {
8937
+ let prerelease = [identifier, base];
8938
+ if (identifierBase === false) {
8939
+ prerelease = [identifier];
8940
+ }
8854
8941
  if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
8855
8942
  if (isNaN(this.prerelease[1])) {
8856
- this.prerelease = [identifier, 0];
8943
+ this.prerelease = prerelease;
8857
8944
  }
8858
8945
  } else {
8859
- this.prerelease = [identifier, 0];
8946
+ this.prerelease = prerelease;
8860
8947
  }
8861
8948
  }
8862
8949
  break;
8950
+ }
8863
8951
  default:
8864
8952
  throw new Error(`invalid increment argument: ${release}`);
8865
8953
  }
8866
- this.format();
8867
- this.raw = this.version;
8954
+ this.raw = this.format();
8955
+ if (this.build.length) {
8956
+ this.raw += `+${this.build.join(".")}`;
8957
+ }
8868
8958
  return this;
8869
8959
  }
8870
8960
  }
@@ -8876,29 +8966,18 @@ var hasRequiredParse;
8876
8966
  function requireParse() {
8877
8967
  if (hasRequiredParse) return parse_1;
8878
8968
  hasRequiredParse = 1;
8879
- const { MAX_LENGTH } = requireConstants();
8880
- const { re: re2, t } = requireRe();
8881
8969
  const SemVer = requireSemver$1();
8882
- const parseOptions = requireParseOptions();
8883
- const parse = (version, options) => {
8884
- options = parseOptions(options);
8970
+ const parse = (version, options, throwErrors = false) => {
8885
8971
  if (version instanceof SemVer) {
8886
8972
  return version;
8887
8973
  }
8888
- if (typeof version !== "string") {
8889
- return null;
8890
- }
8891
- if (version.length > MAX_LENGTH) {
8892
- return null;
8893
- }
8894
- const r = options.loose ? re2[t.LOOSE] : re2[t.FULL];
8895
- if (!r.test(version)) {
8896
- return null;
8897
- }
8898
8974
  try {
8899
8975
  return new SemVer(version, options);
8900
8976
  } catch (er) {
8901
- return null;
8977
+ if (!throwErrors) {
8978
+ return null;
8979
+ }
8980
+ throw er;
8902
8981
  }
8903
8982
  };
8904
8983
  parse_1 = parse;
@@ -8936,8 +9015,9 @@ function requireInc() {
8936
9015
  if (hasRequiredInc) return inc_1;
8937
9016
  hasRequiredInc = 1;
8938
9017
  const SemVer = requireSemver$1();
8939
- const inc = (version, release, options, identifier) => {
9018
+ const inc = (version, release, options, identifier, identifierBase) => {
8940
9019
  if (typeof options === "string") {
9020
+ identifierBase = identifier;
8941
9021
  identifier = options;
8942
9022
  options = void 0;
8943
9023
  }
@@ -8945,7 +9025,7 @@ function requireInc() {
8945
9025
  return new SemVer(
8946
9026
  version instanceof SemVer ? version.version : version,
8947
9027
  options
8948
- ).inc(release, identifier).version;
9028
+ ).inc(release, identifier, identifierBase).version;
8949
9029
  } catch (er) {
8950
9030
  return null;
8951
9031
  }
@@ -8953,51 +9033,47 @@ function requireInc() {
8953
9033
  inc_1 = inc;
8954
9034
  return inc_1;
8955
9035
  }
8956
- var compare_1;
8957
- var hasRequiredCompare;
8958
- function requireCompare() {
8959
- if (hasRequiredCompare) return compare_1;
8960
- hasRequiredCompare = 1;
8961
- const SemVer = requireSemver$1();
8962
- const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
8963
- compare_1 = compare;
8964
- return compare_1;
8965
- }
8966
- var eq_1;
8967
- var hasRequiredEq;
8968
- function requireEq() {
8969
- if (hasRequiredEq) return eq_1;
8970
- hasRequiredEq = 1;
8971
- const compare = requireCompare();
8972
- const eq2 = (a, b, loose) => compare(a, b, loose) === 0;
8973
- eq_1 = eq2;
8974
- return eq_1;
8975
- }
8976
9036
  var diff_1;
8977
9037
  var hasRequiredDiff;
8978
9038
  function requireDiff() {
8979
9039
  if (hasRequiredDiff) return diff_1;
8980
9040
  hasRequiredDiff = 1;
8981
9041
  const parse = requireParse();
8982
- const eq2 = requireEq();
8983
9042
  const diff = (version1, version2) => {
8984
- if (eq2(version1, version2)) {
9043
+ const v1 = parse(version1, null, true);
9044
+ const v2 = parse(version2, null, true);
9045
+ const comparison = v1.compare(v2);
9046
+ if (comparison === 0) {
8985
9047
  return null;
8986
- } else {
8987
- const v1 = parse(version1);
8988
- const v2 = parse(version2);
8989
- const hasPre = v1.prerelease.length || v2.prerelease.length;
8990
- const prefix = hasPre ? "pre" : "";
8991
- const defaultResult = hasPre ? "prerelease" : "";
8992
- for (const key in v1) {
8993
- if (key === "major" || key === "minor" || key === "patch") {
8994
- if (v1[key] !== v2[key]) {
8995
- return prefix + key;
8996
- }
8997
- }
9048
+ }
9049
+ const v1Higher = comparison > 0;
9050
+ const highVersion = v1Higher ? v1 : v2;
9051
+ const lowVersion = v1Higher ? v2 : v1;
9052
+ const highHasPre = !!highVersion.prerelease.length;
9053
+ const lowHasPre = !!lowVersion.prerelease.length;
9054
+ if (lowHasPre && !highHasPre) {
9055
+ if (!lowVersion.patch && !lowVersion.minor) {
9056
+ return "major";
9057
+ }
9058
+ if (highVersion.patch) {
9059
+ return "patch";
9060
+ }
9061
+ if (highVersion.minor) {
9062
+ return "minor";
8998
9063
  }
8999
- return defaultResult;
9064
+ return "major";
9000
9065
  }
9066
+ const prefix = highHasPre ? "pre" : "";
9067
+ if (v1.major !== v2.major) {
9068
+ return prefix + "major";
9069
+ }
9070
+ if (v1.minor !== v2.minor) {
9071
+ return prefix + "minor";
9072
+ }
9073
+ if (v1.patch !== v2.patch) {
9074
+ return prefix + "patch";
9075
+ }
9076
+ return "prerelease";
9001
9077
  };
9002
9078
  diff_1 = diff;
9003
9079
  return diff_1;
@@ -9045,6 +9121,16 @@ function requirePrerelease() {
9045
9121
  prerelease_1 = prerelease;
9046
9122
  return prerelease_1;
9047
9123
  }
9124
+ var compare_1;
9125
+ var hasRequiredCompare;
9126
+ function requireCompare() {
9127
+ if (hasRequiredCompare) return compare_1;
9128
+ hasRequiredCompare = 1;
9129
+ const SemVer = requireSemver$1();
9130
+ const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
9131
+ compare_1 = compare;
9132
+ return compare_1;
9133
+ }
9048
9134
  var rcompare_1;
9049
9135
  var hasRequiredRcompare;
9050
9136
  function requireRcompare() {
@@ -9119,6 +9205,16 @@ function requireLt() {
9119
9205
  lt_1 = lt;
9120
9206
  return lt_1;
9121
9207
  }
9208
+ var eq_1;
9209
+ var hasRequiredEq;
9210
+ function requireEq() {
9211
+ if (hasRequiredEq) return eq_1;
9212
+ hasRequiredEq = 1;
9213
+ const compare = requireCompare();
9214
+ const eq2 = (a, b, loose) => compare(a, b, loose) === 0;
9215
+ eq_1 = eq2;
9216
+ return eq_1;
9217
+ }
9122
9218
  var neq_1;
9123
9219
  var hasRequiredNeq;
9124
9220
  function requireNeq() {
@@ -9206,7 +9302,7 @@ function requireCoerce() {
9206
9302
  hasRequiredCoerce = 1;
9207
9303
  const SemVer = requireSemver$1();
9208
9304
  const parse = requireParse();
9209
- const { re: re2, t } = requireRe();
9305
+ const { safeRe: re2, t } = requireRe();
9210
9306
  const coerce2 = (version, options) => {
9211
9307
  if (version instanceof SemVer) {
9212
9308
  return version;
@@ -9220,682 +9316,75 @@ function requireCoerce() {
9220
9316
  options = options || {};
9221
9317
  let match = null;
9222
9318
  if (!options.rtl) {
9223
- match = version.match(re2[t.COERCE]);
9319
+ match = version.match(options.includePrerelease ? re2[t.COERCEFULL] : re2[t.COERCE]);
9224
9320
  } else {
9321
+ const coerceRtlRegex = options.includePrerelease ? re2[t.COERCERTLFULL] : re2[t.COERCERTL];
9225
9322
  let next;
9226
- while ((next = re2[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
9323
+ while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
9227
9324
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
9228
9325
  match = next;
9229
9326
  }
9230
- re2[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
9327
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
9231
9328
  }
9232
- re2[t.COERCERTL].lastIndex = -1;
9329
+ coerceRtlRegex.lastIndex = -1;
9233
9330
  }
9234
9331
  if (match === null) {
9235
9332
  return null;
9236
9333
  }
9237
- return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
9334
+ const major = match[2];
9335
+ const minor = match[3] || "0";
9336
+ const patch = match[4] || "0";
9337
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
9338
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
9339
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
9238
9340
  };
9239
9341
  coerce_1 = coerce2;
9240
9342
  return coerce_1;
9241
9343
  }
9242
- var iterator;
9243
- var hasRequiredIterator;
9244
- function requireIterator() {
9245
- if (hasRequiredIterator) return iterator;
9246
- hasRequiredIterator = 1;
9247
- iterator = function(Yallist) {
9248
- Yallist.prototype[Symbol.iterator] = function* () {
9249
- for (let walker = this.head; walker; walker = walker.next) {
9250
- yield walker.value;
9251
- }
9252
- };
9253
- };
9254
- return iterator;
9255
- }
9256
- var yallist;
9257
- var hasRequiredYallist;
9258
- function requireYallist() {
9259
- if (hasRequiredYallist) return yallist;
9260
- hasRequiredYallist = 1;
9261
- yallist = Yallist;
9262
- Yallist.Node = Node;
9263
- Yallist.create = Yallist;
9264
- function Yallist(list) {
9265
- var self2 = this;
9266
- if (!(self2 instanceof Yallist)) {
9267
- self2 = new Yallist();
9268
- }
9269
- self2.tail = null;
9270
- self2.head = null;
9271
- self2.length = 0;
9272
- if (list && typeof list.forEach === "function") {
9273
- list.forEach(function(item) {
9274
- self2.push(item);
9275
- });
9276
- } else if (arguments.length > 0) {
9277
- for (var i = 0, l = arguments.length; i < l; i++) {
9278
- self2.push(arguments[i]);
9279
- }
9280
- }
9281
- return self2;
9282
- }
9283
- Yallist.prototype.removeNode = function(node) {
9284
- if (node.list !== this) {
9285
- throw new Error("removing node which does not belong to this list");
9286
- }
9287
- var next = node.next;
9288
- var prev = node.prev;
9289
- if (next) {
9290
- next.prev = prev;
9291
- }
9292
- if (prev) {
9293
- prev.next = next;
9294
- }
9295
- if (node === this.head) {
9296
- this.head = next;
9297
- }
9298
- if (node === this.tail) {
9299
- this.tail = prev;
9300
- }
9301
- node.list.length--;
9302
- node.next = null;
9303
- node.prev = null;
9304
- node.list = null;
9305
- return next;
9306
- };
9307
- Yallist.prototype.unshiftNode = function(node) {
9308
- if (node === this.head) {
9309
- return;
9310
- }
9311
- if (node.list) {
9312
- node.list.removeNode(node);
9313
- }
9314
- var head = this.head;
9315
- node.list = this;
9316
- node.next = head;
9317
- if (head) {
9318
- head.prev = node;
9319
- }
9320
- this.head = node;
9321
- if (!this.tail) {
9322
- this.tail = node;
9323
- }
9324
- this.length++;
9325
- };
9326
- Yallist.prototype.pushNode = function(node) {
9327
- if (node === this.tail) {
9328
- return;
9329
- }
9330
- if (node.list) {
9331
- node.list.removeNode(node);
9332
- }
9333
- var tail = this.tail;
9334
- node.list = this;
9335
- node.prev = tail;
9336
- if (tail) {
9337
- tail.next = node;
9338
- }
9339
- this.tail = node;
9340
- if (!this.head) {
9341
- this.head = node;
9342
- }
9343
- this.length++;
9344
- };
9345
- Yallist.prototype.push = function() {
9346
- for (var i = 0, l = arguments.length; i < l; i++) {
9347
- push(this, arguments[i]);
9348
- }
9349
- return this.length;
9350
- };
9351
- Yallist.prototype.unshift = function() {
9352
- for (var i = 0, l = arguments.length; i < l; i++) {
9353
- unshift(this, arguments[i]);
9354
- }
9355
- return this.length;
9356
- };
9357
- Yallist.prototype.pop = function() {
9358
- if (!this.tail) {
9359
- return void 0;
9360
- }
9361
- var res = this.tail.value;
9362
- this.tail = this.tail.prev;
9363
- if (this.tail) {
9364
- this.tail.next = null;
9365
- } else {
9366
- this.head = null;
9367
- }
9368
- this.length--;
9369
- return res;
9370
- };
9371
- Yallist.prototype.shift = function() {
9372
- if (!this.head) {
9373
- return void 0;
9374
- }
9375
- var res = this.head.value;
9376
- this.head = this.head.next;
9377
- if (this.head) {
9378
- this.head.prev = null;
9379
- } else {
9380
- this.tail = null;
9381
- }
9382
- this.length--;
9383
- return res;
9384
- };
9385
- Yallist.prototype.forEach = function(fn, thisp) {
9386
- thisp = thisp || this;
9387
- for (var walker = this.head, i = 0; walker !== null; i++) {
9388
- fn.call(thisp, walker.value, i, this);
9389
- walker = walker.next;
9390
- }
9391
- };
9392
- Yallist.prototype.forEachReverse = function(fn, thisp) {
9393
- thisp = thisp || this;
9394
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
9395
- fn.call(thisp, walker.value, i, this);
9396
- walker = walker.prev;
9397
- }
9398
- };
9399
- Yallist.prototype.get = function(n) {
9400
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
9401
- walker = walker.next;
9402
- }
9403
- if (i === n && walker !== null) {
9404
- return walker.value;
9405
- }
9406
- };
9407
- Yallist.prototype.getReverse = function(n) {
9408
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
9409
- walker = walker.prev;
9410
- }
9411
- if (i === n && walker !== null) {
9412
- return walker.value;
9413
- }
9414
- };
9415
- Yallist.prototype.map = function(fn, thisp) {
9416
- thisp = thisp || this;
9417
- var res = new Yallist();
9418
- for (var walker = this.head; walker !== null; ) {
9419
- res.push(fn.call(thisp, walker.value, this));
9420
- walker = walker.next;
9421
- }
9422
- return res;
9423
- };
9424
- Yallist.prototype.mapReverse = function(fn, thisp) {
9425
- thisp = thisp || this;
9426
- var res = new Yallist();
9427
- for (var walker = this.tail; walker !== null; ) {
9428
- res.push(fn.call(thisp, walker.value, this));
9429
- walker = walker.prev;
9430
- }
9431
- return res;
9432
- };
9433
- Yallist.prototype.reduce = function(fn, initial) {
9434
- var acc;
9435
- var walker = this.head;
9436
- if (arguments.length > 1) {
9437
- acc = initial;
9438
- } else if (this.head) {
9439
- walker = this.head.next;
9440
- acc = this.head.value;
9441
- } else {
9442
- throw new TypeError("Reduce of empty list with no initial value");
9443
- }
9444
- for (var i = 0; walker !== null; i++) {
9445
- acc = fn(acc, walker.value, i);
9446
- walker = walker.next;
9447
- }
9448
- return acc;
9449
- };
9450
- Yallist.prototype.reduceReverse = function(fn, initial) {
9451
- var acc;
9452
- var walker = this.tail;
9453
- if (arguments.length > 1) {
9454
- acc = initial;
9455
- } else if (this.tail) {
9456
- walker = this.tail.prev;
9457
- acc = this.tail.value;
9458
- } else {
9459
- throw new TypeError("Reduce of empty list with no initial value");
9460
- }
9461
- for (var i = this.length - 1; walker !== null; i--) {
9462
- acc = fn(acc, walker.value, i);
9463
- walker = walker.prev;
9464
- }
9465
- return acc;
9466
- };
9467
- Yallist.prototype.toArray = function() {
9468
- var arr = new Array(this.length);
9469
- for (var i = 0, walker = this.head; walker !== null; i++) {
9470
- arr[i] = walker.value;
9471
- walker = walker.next;
9472
- }
9473
- return arr;
9474
- };
9475
- Yallist.prototype.toArrayReverse = function() {
9476
- var arr = new Array(this.length);
9477
- for (var i = 0, walker = this.tail; walker !== null; i++) {
9478
- arr[i] = walker.value;
9479
- walker = walker.prev;
9480
- }
9481
- return arr;
9482
- };
9483
- Yallist.prototype.slice = function(from, to) {
9484
- to = to || this.length;
9485
- if (to < 0) {
9486
- to += this.length;
9487
- }
9488
- from = from || 0;
9489
- if (from < 0) {
9490
- from += this.length;
9491
- }
9492
- var ret = new Yallist();
9493
- if (to < from || to < 0) {
9494
- return ret;
9495
- }
9496
- if (from < 0) {
9497
- from = 0;
9498
- }
9499
- if (to > this.length) {
9500
- to = this.length;
9501
- }
9502
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
9503
- walker = walker.next;
9504
- }
9505
- for (; walker !== null && i < to; i++, walker = walker.next) {
9506
- ret.push(walker.value);
9507
- }
9508
- return ret;
9509
- };
9510
- Yallist.prototype.sliceReverse = function(from, to) {
9511
- to = to || this.length;
9512
- if (to < 0) {
9513
- to += this.length;
9514
- }
9515
- from = from || 0;
9516
- if (from < 0) {
9517
- from += this.length;
9518
- }
9519
- var ret = new Yallist();
9520
- if (to < from || to < 0) {
9521
- return ret;
9522
- }
9523
- if (from < 0) {
9524
- from = 0;
9525
- }
9526
- if (to > this.length) {
9527
- to = this.length;
9528
- }
9529
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
9530
- walker = walker.prev;
9531
- }
9532
- for (; walker !== null && i > from; i--, walker = walker.prev) {
9533
- ret.push(walker.value);
9534
- }
9535
- return ret;
9536
- };
9537
- Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
9538
- if (start > this.length) {
9539
- start = this.length - 1;
9540
- }
9541
- if (start < 0) {
9542
- start = this.length + start;
9543
- }
9544
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
9545
- walker = walker.next;
9546
- }
9547
- var ret = [];
9548
- for (var i = 0; walker && i < deleteCount; i++) {
9549
- ret.push(walker.value);
9550
- walker = this.removeNode(walker);
9551
- }
9552
- if (walker === null) {
9553
- walker = this.tail;
9554
- }
9555
- if (walker !== this.head && walker !== this.tail) {
9556
- walker = walker.prev;
9557
- }
9558
- for (var i = 0; i < nodes.length; i++) {
9559
- walker = insert(this, walker, nodes[i]);
9560
- }
9561
- return ret;
9562
- };
9563
- Yallist.prototype.reverse = function() {
9564
- var head = this.head;
9565
- var tail = this.tail;
9566
- for (var walker = head; walker !== null; walker = walker.prev) {
9567
- var p = walker.prev;
9568
- walker.prev = walker.next;
9569
- walker.next = p;
9570
- }
9571
- this.head = tail;
9572
- this.tail = head;
9573
- return this;
9574
- };
9575
- function insert(self2, node, value) {
9576
- var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2);
9577
- if (inserted.next === null) {
9578
- self2.tail = inserted;
9579
- }
9580
- if (inserted.prev === null) {
9581
- self2.head = inserted;
9582
- }
9583
- self2.length++;
9584
- return inserted;
9585
- }
9586
- function push(self2, item) {
9587
- self2.tail = new Node(item, self2.tail, null, self2);
9588
- if (!self2.head) {
9589
- self2.head = self2.tail;
9590
- }
9591
- self2.length++;
9592
- }
9593
- function unshift(self2, item) {
9594
- self2.head = new Node(item, null, self2.head, self2);
9595
- if (!self2.tail) {
9596
- self2.tail = self2.head;
9597
- }
9598
- self2.length++;
9599
- }
9600
- function Node(value, prev, next, list) {
9601
- if (!(this instanceof Node)) {
9602
- return new Node(value, prev, next, list);
9603
- }
9604
- this.list = list;
9605
- this.value = value;
9606
- if (prev) {
9607
- prev.next = this;
9608
- this.prev = prev;
9609
- } else {
9610
- this.prev = null;
9611
- }
9612
- if (next) {
9613
- next.prev = this;
9614
- this.next = next;
9615
- } else {
9616
- this.next = null;
9617
- }
9618
- }
9619
- try {
9620
- requireIterator()(Yallist);
9621
- } catch (er) {
9622
- }
9623
- return yallist;
9624
- }
9625
- var lruCache;
9626
- var hasRequiredLruCache;
9627
- function requireLruCache() {
9628
- if (hasRequiredLruCache) return lruCache;
9629
- hasRequiredLruCache = 1;
9630
- const Yallist = requireYallist();
9631
- const MAX = Symbol("max");
9632
- const LENGTH = Symbol("length");
9633
- const LENGTH_CALCULATOR = Symbol("lengthCalculator");
9634
- const ALLOW_STALE = Symbol("allowStale");
9635
- const MAX_AGE = Symbol("maxAge");
9636
- const DISPOSE = Symbol("dispose");
9637
- const NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
9638
- const LRU_LIST = Symbol("lruList");
9639
- const CACHE = Symbol("cache");
9640
- const UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
9641
- const naiveLength = () => 1;
9344
+ var lrucache;
9345
+ var hasRequiredLrucache;
9346
+ function requireLrucache() {
9347
+ if (hasRequiredLrucache) return lrucache;
9348
+ hasRequiredLrucache = 1;
9642
9349
  class LRUCache {
9643
- constructor(options) {
9644
- if (typeof options === "number")
9645
- options = { max: options };
9646
- if (!options)
9647
- options = {};
9648
- if (options.max && (typeof options.max !== "number" || options.max < 0))
9649
- throw new TypeError("max must be a non-negative number");
9650
- this[MAX] = options.max || Infinity;
9651
- const lc = options.length || naiveLength;
9652
- this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
9653
- this[ALLOW_STALE] = options.stale || false;
9654
- if (options.maxAge && typeof options.maxAge !== "number")
9655
- throw new TypeError("maxAge must be a number");
9656
- this[MAX_AGE] = options.maxAge || 0;
9657
- this[DISPOSE] = options.dispose;
9658
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
9659
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
9660
- this.reset();
9661
- }
9662
- // resize the cache when the max changes.
9663
- set max(mL) {
9664
- if (typeof mL !== "number" || mL < 0)
9665
- throw new TypeError("max must be a non-negative number");
9666
- this[MAX] = mL || Infinity;
9667
- trim(this);
9668
- }
9669
- get max() {
9670
- return this[MAX];
9671
- }
9672
- set allowStale(allowStale) {
9673
- this[ALLOW_STALE] = !!allowStale;
9674
- }
9675
- get allowStale() {
9676
- return this[ALLOW_STALE];
9677
- }
9678
- set maxAge(mA) {
9679
- if (typeof mA !== "number")
9680
- throw new TypeError("maxAge must be a non-negative number");
9681
- this[MAX_AGE] = mA;
9682
- trim(this);
9683
- }
9684
- get maxAge() {
9685
- return this[MAX_AGE];
9686
- }
9687
- // resize the cache when the lengthCalculator changes.
9688
- set lengthCalculator(lC) {
9689
- if (typeof lC !== "function")
9690
- lC = naiveLength;
9691
- if (lC !== this[LENGTH_CALCULATOR]) {
9692
- this[LENGTH_CALCULATOR] = lC;
9693
- this[LENGTH] = 0;
9694
- this[LRU_LIST].forEach((hit) => {
9695
- hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
9696
- this[LENGTH] += hit.length;
9697
- });
9698
- }
9699
- trim(this);
9700
- }
9701
- get lengthCalculator() {
9702
- return this[LENGTH_CALCULATOR];
9703
- }
9704
- get length() {
9705
- return this[LENGTH];
9706
- }
9707
- get itemCount() {
9708
- return this[LRU_LIST].length;
9709
- }
9710
- rforEach(fn, thisp) {
9711
- thisp = thisp || this;
9712
- for (let walker = this[LRU_LIST].tail; walker !== null; ) {
9713
- const prev = walker.prev;
9714
- forEachStep(this, fn, walker, thisp);
9715
- walker = prev;
9716
- }
9717
- }
9718
- forEach(fn, thisp) {
9719
- thisp = thisp || this;
9720
- for (let walker = this[LRU_LIST].head; walker !== null; ) {
9721
- const next = walker.next;
9722
- forEachStep(this, fn, walker, thisp);
9723
- walker = next;
9724
- }
9725
- }
9726
- keys() {
9727
- return this[LRU_LIST].toArray().map((k) => k.key);
9728
- }
9729
- values() {
9730
- return this[LRU_LIST].toArray().map((k) => k.value);
9731
- }
9732
- reset() {
9733
- if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
9734
- this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
9735
- }
9736
- this[CACHE] = /* @__PURE__ */ new Map();
9737
- this[LRU_LIST] = new Yallist();
9738
- this[LENGTH] = 0;
9739
- }
9740
- dump() {
9741
- return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
9742
- k: hit.key,
9743
- v: hit.value,
9744
- e: hit.now + (hit.maxAge || 0)
9745
- }).toArray().filter((h) => h);
9746
- }
9747
- dumpLru() {
9748
- return this[LRU_LIST];
9749
- }
9750
- set(key, value, maxAge) {
9751
- maxAge = maxAge || this[MAX_AGE];
9752
- if (maxAge && typeof maxAge !== "number")
9753
- throw new TypeError("maxAge must be a number");
9754
- const now = maxAge ? Date.now() : 0;
9755
- const len = this[LENGTH_CALCULATOR](value, key);
9756
- if (this[CACHE].has(key)) {
9757
- if (len > this[MAX]) {
9758
- del(this, this[CACHE].get(key));
9759
- return false;
9760
- }
9761
- const node = this[CACHE].get(key);
9762
- const item = node.value;
9763
- if (this[DISPOSE]) {
9764
- if (!this[NO_DISPOSE_ON_SET])
9765
- this[DISPOSE](key, item.value);
9766
- }
9767
- item.now = now;
9768
- item.maxAge = maxAge;
9769
- item.value = value;
9770
- this[LENGTH] += len - item.length;
9771
- item.length = len;
9772
- this.get(key);
9773
- trim(this);
9774
- return true;
9775
- }
9776
- const hit = new Entry(key, value, len, now, maxAge);
9777
- if (hit.length > this[MAX]) {
9778
- if (this[DISPOSE])
9779
- this[DISPOSE](key, value);
9780
- return false;
9781
- }
9782
- this[LENGTH] += hit.length;
9783
- this[LRU_LIST].unshift(hit);
9784
- this[CACHE].set(key, this[LRU_LIST].head);
9785
- trim(this);
9786
- return true;
9787
- }
9788
- has(key) {
9789
- if (!this[CACHE].has(key)) return false;
9790
- const hit = this[CACHE].get(key).value;
9791
- return !isStale(this, hit);
9350
+ constructor() {
9351
+ this.max = 1e3;
9352
+ this.map = /* @__PURE__ */ new Map();
9792
9353
  }
9793
9354
  get(key) {
9794
- return get(this, key, true);
9795
- }
9796
- peek(key) {
9797
- return get(this, key, false);
9798
- }
9799
- pop() {
9800
- const node = this[LRU_LIST].tail;
9801
- if (!node)
9802
- return null;
9803
- del(this, node);
9804
- return node.value;
9805
- }
9806
- del(key) {
9807
- del(this, this[CACHE].get(key));
9808
- }
9809
- load(arr) {
9810
- this.reset();
9811
- const now = Date.now();
9812
- for (let l = arr.length - 1; l >= 0; l--) {
9813
- const hit = arr[l];
9814
- const expiresAt = hit.e || 0;
9815
- if (expiresAt === 0)
9816
- this.set(hit.k, hit.v);
9817
- else {
9818
- const maxAge = expiresAt - now;
9819
- if (maxAge > 0) {
9820
- this.set(hit.k, hit.v, maxAge);
9821
- }
9822
- }
9355
+ const value = this.map.get(key);
9356
+ if (value === void 0) {
9357
+ return void 0;
9358
+ } else {
9359
+ this.map.delete(key);
9360
+ this.map.set(key, value);
9361
+ return value;
9823
9362
  }
9824
9363
  }
9825
- prune() {
9826
- this[CACHE].forEach((value, key) => get(this, key, false));
9364
+ delete(key) {
9365
+ return this.map.delete(key);
9827
9366
  }
9828
- }
9829
- const get = (self2, key, doUse) => {
9830
- const node = self2[CACHE].get(key);
9831
- if (node) {
9832
- const hit = node.value;
9833
- if (isStale(self2, hit)) {
9834
- del(self2, node);
9835
- if (!self2[ALLOW_STALE])
9836
- return void 0;
9837
- } else {
9838
- if (doUse) {
9839
- if (self2[UPDATE_AGE_ON_GET])
9840
- node.value.now = Date.now();
9841
- self2[LRU_LIST].unshiftNode(node);
9367
+ set(key, value) {
9368
+ const deleted = this.delete(key);
9369
+ if (!deleted && value !== void 0) {
9370
+ if (this.map.size >= this.max) {
9371
+ const firstKey = this.map.keys().next().value;
9372
+ this.delete(firstKey);
9842
9373
  }
9374
+ this.map.set(key, value);
9843
9375
  }
9844
- return hit.value;
9845
- }
9846
- };
9847
- const isStale = (self2, hit) => {
9848
- if (!hit || !hit.maxAge && !self2[MAX_AGE])
9849
- return false;
9850
- const diff = Date.now() - hit.now;
9851
- return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
9852
- };
9853
- const trim = (self2) => {
9854
- if (self2[LENGTH] > self2[MAX]) {
9855
- for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
9856
- const prev = walker.prev;
9857
- del(self2, walker);
9858
- walker = prev;
9859
- }
9860
- }
9861
- };
9862
- const del = (self2, node) => {
9863
- if (node) {
9864
- const hit = node.value;
9865
- if (self2[DISPOSE])
9866
- self2[DISPOSE](hit.key, hit.value);
9867
- self2[LENGTH] -= hit.length;
9868
- self2[CACHE].delete(hit.key);
9869
- self2[LRU_LIST].removeNode(node);
9376
+ return this;
9870
9377
  }
9871
- };
9872
- class Entry {
9873
- constructor(key, value, length, now, maxAge) {
9874
- this.key = key;
9875
- this.value = value;
9876
- this.length = length;
9877
- this.now = now;
9878
- this.maxAge = maxAge || 0;
9879
- }
9880
- }
9881
- const forEachStep = (self2, fn, node, thisp) => {
9882
- let hit = node.value;
9883
- if (isStale(self2, hit)) {
9884
- del(self2, node);
9885
- if (!self2[ALLOW_STALE])
9886
- hit = void 0;
9887
- }
9888
- if (hit)
9889
- fn.call(thisp, hit.value, hit.key, self2);
9890
- };
9891
- lruCache = LRUCache;
9892
- return lruCache;
9378
+ }
9379
+ lrucache = LRUCache;
9380
+ return lrucache;
9893
9381
  }
9894
9382
  var range;
9895
9383
  var hasRequiredRange;
9896
9384
  function requireRange() {
9897
9385
  if (hasRequiredRange) return range;
9898
9386
  hasRequiredRange = 1;
9387
+ const SPACE_CHARACTERS = /\s+/g;
9899
9388
  class Range {
9900
9389
  constructor(range2, options) {
9901
9390
  options = parseOptions(options);
@@ -9909,16 +9398,16 @@ function requireRange() {
9909
9398
  if (range2 instanceof Comparator) {
9910
9399
  this.raw = range2.value;
9911
9400
  this.set = [[range2]];
9912
- this.format();
9401
+ this.formatted = void 0;
9913
9402
  return this;
9914
9403
  }
9915
9404
  this.options = options;
9916
9405
  this.loose = !!options.loose;
9917
9406
  this.includePrerelease = !!options.includePrerelease;
9918
- this.raw = range2;
9919
- this.set = range2.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
9407
+ this.raw = range2.trim().replace(SPACE_CHARACTERS, " ");
9408
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
9920
9409
  if (!this.set.length) {
9921
- throw new TypeError(`Invalid SemVer Range: ${range2}`);
9410
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
9922
9411
  }
9923
9412
  if (this.set.length > 1) {
9924
9413
  const first = this.set[0];
@@ -9934,21 +9423,35 @@ function requireRange() {
9934
9423
  }
9935
9424
  }
9936
9425
  }
9937
- this.format();
9426
+ this.formatted = void 0;
9427
+ }
9428
+ get range() {
9429
+ if (this.formatted === void 0) {
9430
+ this.formatted = "";
9431
+ for (let i = 0; i < this.set.length; i++) {
9432
+ if (i > 0) {
9433
+ this.formatted += "||";
9434
+ }
9435
+ const comps = this.set[i];
9436
+ for (let k = 0; k < comps.length; k++) {
9437
+ if (k > 0) {
9438
+ this.formatted += " ";
9439
+ }
9440
+ this.formatted += comps[k].toString().trim();
9441
+ }
9442
+ }
9443
+ }
9444
+ return this.formatted;
9938
9445
  }
9939
9446
  format() {
9940
- this.range = this.set.map((comps) => {
9941
- return comps.join(" ").trim();
9942
- }).join("||").trim();
9943
9447
  return this.range;
9944
9448
  }
9945
9449
  toString() {
9946
9450
  return this.range;
9947
9451
  }
9948
9452
  parseRange(range2) {
9949
- range2 = range2.trim();
9950
- const memoOpts = Object.keys(this.options).join(",");
9951
- const memoKey = `parseRange:${memoOpts}:${range2}`;
9453
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
9454
+ const memoKey = memoOpts + ":" + range2;
9952
9455
  const cached = cache.get(memoKey);
9953
9456
  if (cached) {
9954
9457
  return cached;
@@ -9960,8 +9463,9 @@ function requireRange() {
9960
9463
  range2 = range2.replace(re2[t.COMPARATORTRIM], comparatorTrimReplace);
9961
9464
  debug("comparator trim", range2);
9962
9465
  range2 = range2.replace(re2[t.TILDETRIM], tildeTrimReplace);
9466
+ debug("tilde trim", range2);
9963
9467
  range2 = range2.replace(re2[t.CARETTRIM], caretTrimReplace);
9964
- range2 = range2.split(/\s+/).join(" ");
9468
+ debug("caret trim", range2);
9965
9469
  let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
9966
9470
  if (loose) {
9967
9471
  rangeList = rangeList.filter((comp) => {
@@ -10020,19 +9524,20 @@ function requireRange() {
10020
9524
  }
10021
9525
  }
10022
9526
  range = Range;
10023
- const LRU = requireLruCache();
10024
- const cache = new LRU({ max: 1e3 });
9527
+ const LRU = requireLrucache();
9528
+ const cache = new LRU();
10025
9529
  const parseOptions = requireParseOptions();
10026
9530
  const Comparator = requireComparator();
10027
9531
  const debug = requireDebug();
10028
9532
  const SemVer = requireSemver$1();
10029
9533
  const {
10030
- re: re2,
9534
+ safeRe: re2,
10031
9535
  t,
10032
9536
  comparatorTrimReplace,
10033
9537
  tildeTrimReplace,
10034
9538
  caretTrimReplace
10035
9539
  } = requireRe();
9540
+ const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants();
10036
9541
  const isNullSet = (c) => c.value === "<0.0.0-0";
10037
9542
  const isAny = (c) => c.value === "";
10038
9543
  const isSatisfiable = (comparators, options) => {
@@ -10060,9 +9565,9 @@ function requireRange() {
10060
9565
  return comp;
10061
9566
  };
10062
9567
  const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
10063
- const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => {
10064
- return replaceTilde(c, options);
10065
- }).join(" ");
9568
+ const replaceTildes = (comp, options) => {
9569
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
9570
+ };
10066
9571
  const replaceTilde = (comp, options) => {
10067
9572
  const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
10068
9573
  return comp.replace(r, (_, M, m, p, pr) => {
@@ -10084,9 +9589,9 @@ function requireRange() {
10084
9589
  return ret;
10085
9590
  });
10086
9591
  };
10087
- const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => {
10088
- return replaceCaret(c, options);
10089
- }).join(" ");
9592
+ const replaceCarets = (comp, options) => {
9593
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
9594
+ };
10090
9595
  const replaceCaret = (comp, options) => {
10091
9596
  debug("caret", comp, options);
10092
9597
  const r = options.loose ? re2[t.CARETLOOSE] : re2[t.CARET];
@@ -10133,9 +9638,7 @@ function requireRange() {
10133
9638
  };
10134
9639
  const replaceXRanges = (comp, options) => {
10135
9640
  debug("replaceXRanges", comp, options);
10136
- return comp.split(/\s+/).map((c) => {
10137
- return replaceXRange(c, options);
10138
- }).join(" ");
9641
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
10139
9642
  };
10140
9643
  const replaceXRange = (comp, options) => {
10141
9644
  comp = comp.trim();
@@ -10200,7 +9703,7 @@ function requireRange() {
10200
9703
  debug("replaceGTE0", comp, options);
10201
9704
  return comp.trim().replace(re2[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
10202
9705
  };
10203
- const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
9706
+ const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
10204
9707
  if (isX(fM)) {
10205
9708
  from = "";
10206
9709
  } else if (isX(fm)) {
@@ -10271,6 +9774,7 @@ function requireComparator() {
10271
9774
  comp = comp.value;
10272
9775
  }
10273
9776
  }
9777
+ comp = comp.trim().split(/\s+/).join(" ");
10274
9778
  debug("comparator", comp, options);
10275
9779
  this.options = options;
10276
9780
  this.loose = !!options.loose;
@@ -10319,12 +9823,6 @@ function requireComparator() {
10319
9823
  if (!(comp instanceof Comparator)) {
10320
9824
  throw new TypeError("a Comparator is required");
10321
9825
  }
10322
- if (!options || typeof options !== "object") {
10323
- options = {
10324
- loose: !!options,
10325
- includePrerelease: false
10326
- };
10327
- }
10328
9826
  if (this.operator === "") {
10329
9827
  if (this.value === "") {
10330
9828
  return true;
@@ -10336,18 +9834,34 @@ function requireComparator() {
10336
9834
  }
10337
9835
  return new Range(this.value, options).test(comp.semver);
10338
9836
  }
10339
- const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
10340
- const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
10341
- const sameSemVer = this.semver.version === comp.semver.version;
10342
- const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
10343
- const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
10344
- const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
10345
- return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
9837
+ options = parseOptions(options);
9838
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
9839
+ return false;
9840
+ }
9841
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
9842
+ return false;
9843
+ }
9844
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
9845
+ return true;
9846
+ }
9847
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
9848
+ return true;
9849
+ }
9850
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
9851
+ return true;
9852
+ }
9853
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
9854
+ return true;
9855
+ }
9856
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
9857
+ return true;
9858
+ }
9859
+ return false;
10346
9860
  }
10347
9861
  }
10348
9862
  comparator = Comparator;
10349
9863
  const parseOptions = requireParseOptions();
10350
- const { re: re2, t } = requireRe();
9864
+ const { safeRe: re2, t } = requireRe();
10351
9865
  const cmp = requireCmp();
10352
9866
  const debug = requireDebug();
10353
9867
  const SemVer = requireSemver$1();
@@ -10612,7 +10126,7 @@ function requireIntersects() {
10612
10126
  const intersects = (r1, r2, options) => {
10613
10127
  r1 = new Range(r1, options);
10614
10128
  r2 = new Range(r2, options);
10615
- return r1.intersects(r2);
10129
+ return r1.intersects(r2, options);
10616
10130
  };
10617
10131
  intersects_1 = intersects;
10618
10132
  return intersects_1;
@@ -10698,6 +10212,8 @@ function requireSubset() {
10698
10212
  }
10699
10213
  return true;
10700
10214
  };
10215
+ const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
10216
+ const minimumVersion = [new Comparator(">=0.0.0")];
10701
10217
  const simpleSubset = (sub, dom, options) => {
10702
10218
  if (sub === dom) {
10703
10219
  return true;
@@ -10706,16 +10222,16 @@ function requireSubset() {
10706
10222
  if (dom.length === 1 && dom[0].semver === ANY) {
10707
10223
  return true;
10708
10224
  } else if (options.includePrerelease) {
10709
- sub = [new Comparator(">=0.0.0-0")];
10225
+ sub = minimumVersionWithPreRelease;
10710
10226
  } else {
10711
- sub = [new Comparator(">=0.0.0")];
10227
+ sub = minimumVersion;
10712
10228
  }
10713
10229
  }
10714
10230
  if (dom.length === 1 && dom[0].semver === ANY) {
10715
10231
  if (options.includePrerelease) {
10716
10232
  return true;
10717
10233
  } else {
10718
- dom = [new Comparator(">=0.0.0")];
10234
+ dom = minimumVersion;
10719
10235
  }
10720
10236
  }
10721
10237
  const eqSet = /* @__PURE__ */ new Set();
@@ -10916,6 +10432,7 @@ function requireSemver() {
10916
10432
  src: internalRe.src,
10917
10433
  tokens: internalRe.t,
10918
10434
  SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION,
10435
+ RELEASE_TYPES: constants2.RELEASE_TYPES,
10919
10436
  compareIdentifiers: identifiers2.compareIdentifiers,
10920
10437
  rcompareIdentifiers: identifiers2.rcompareIdentifiers
10921
10438
  };