@vitessce/schemas 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 +6 -6
package/dist/index.js CHANGED
@@ -5933,11 +5933,25 @@ function requireConstants() {
5933
5933
  const MAX_SAFE_INTEGER2 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
5934
5934
  9007199254740991;
5935
5935
  const MAX_SAFE_COMPONENT_LENGTH = 16;
5936
+ const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
5937
+ const RELEASE_TYPES = [
5938
+ "major",
5939
+ "premajor",
5940
+ "minor",
5941
+ "preminor",
5942
+ "patch",
5943
+ "prepatch",
5944
+ "prerelease"
5945
+ ];
5936
5946
  constants = {
5937
- SEMVER_SPEC_VERSION,
5938
5947
  MAX_LENGTH,
5948
+ MAX_SAFE_COMPONENT_LENGTH,
5949
+ MAX_SAFE_BUILD_LENGTH,
5939
5950
  MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2,
5940
- MAX_SAFE_COMPONENT_LENGTH
5951
+ RELEASE_TYPES,
5952
+ SEMVER_SPEC_VERSION,
5953
+ FLAG_INCLUDE_PRERELEASE: 1,
5954
+ FLAG_LOOSE: 2
5941
5955
  };
5942
5956
  return constants;
5943
5957
  }
@@ -5956,30 +5970,49 @@ function requireRe() {
5956
5970
  if (hasRequiredRe) return re.exports;
5957
5971
  hasRequiredRe = 1;
5958
5972
  (function(module2, exports2) {
5959
- const { MAX_SAFE_COMPONENT_LENGTH } = requireConstants();
5973
+ const {
5974
+ MAX_SAFE_COMPONENT_LENGTH,
5975
+ MAX_SAFE_BUILD_LENGTH,
5976
+ MAX_LENGTH
5977
+ } = requireConstants();
5960
5978
  const debug = requireDebug();
5961
5979
  exports2 = module2.exports = {};
5962
5980
  const re2 = exports2.re = [];
5981
+ const safeRe = exports2.safeRe = [];
5963
5982
  const src = exports2.src = [];
5964
5983
  const t = exports2.t = {};
5965
5984
  let R = 0;
5985
+ const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
5986
+ const safeRegexReplacements = [
5987
+ ["\\s", 1],
5988
+ ["\\d", MAX_LENGTH],
5989
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
5990
+ ];
5991
+ const makeSafeRegex = (value) => {
5992
+ for (const [token, max] of safeRegexReplacements) {
5993
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
5994
+ }
5995
+ return value;
5996
+ };
5966
5997
  const createToken = (name, value, isGlobal) => {
5998
+ const safe = makeSafeRegex(value);
5967
5999
  const index = R++;
5968
6000
  debug(name, index, value);
5969
6001
  t[name] = index;
5970
6002
  src[index] = value;
5971
6003
  re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
6004
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
5972
6005
  };
5973
6006
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
5974
- createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
5975
- createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
6007
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
6008
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
5976
6009
  createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
5977
6010
  createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
5978
6011
  createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
5979
6012
  createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
5980
6013
  createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
5981
6014
  createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
5982
- createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
6015
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
5983
6016
  createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
5984
6017
  createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
5985
6018
  createToken("FULL", `^${src[t.FULLPLAIN]}$`);
@@ -5992,8 +6025,11 @@ function requireRe() {
5992
6025
  createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
5993
6026
  createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
5994
6027
  createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
5995
- createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
6028
+ createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
6029
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
6030
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
5996
6031
  createToken("COERCERTL", src[t.COERCE], true);
6032
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
5997
6033
  createToken("LONETILDE", "(?:~>?)");
5998
6034
  createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
5999
6035
  exports2.tildeTrimReplace = "$1~";
@@ -6021,11 +6057,17 @@ var hasRequiredParseOptions;
6021
6057
  function requireParseOptions() {
6022
6058
  if (hasRequiredParseOptions) return parseOptions_1;
6023
6059
  hasRequiredParseOptions = 1;
6024
- const opts = ["includePrerelease", "loose", "rtl"];
6025
- const parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((o, k) => {
6026
- o[k] = true;
6027
- return o;
6028
- }, {});
6060
+ const looseOption = Object.freeze({ loose: true });
6061
+ const emptyOpts = Object.freeze({});
6062
+ const parseOptions = (options) => {
6063
+ if (!options) {
6064
+ return emptyOpts;
6065
+ }
6066
+ if (typeof options !== "object") {
6067
+ return looseOption;
6068
+ }
6069
+ return options;
6070
+ };
6029
6071
  parseOptions_1 = parseOptions;
6030
6072
  return parseOptions_1;
6031
6073
  }
@@ -6058,7 +6100,7 @@ function requireSemver$1() {
6058
6100
  hasRequiredSemver$1 = 1;
6059
6101
  const debug = requireDebug();
6060
6102
  const { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2 } = requireConstants();
6061
- const { re: re2, t } = requireRe();
6103
+ const { safeRe: re2, t } = requireRe();
6062
6104
  const parseOptions = requireParseOptions();
6063
6105
  const { compareIdentifiers } = requireIdentifiers();
6064
6106
  class SemVer {
@@ -6071,7 +6113,7 @@ function requireSemver$1() {
6071
6113
  version = version.version;
6072
6114
  }
6073
6115
  } else if (typeof version !== "string") {
6074
- throw new TypeError(`Invalid Version: ${version}`);
6116
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
6075
6117
  }
6076
6118
  if (version.length > MAX_LENGTH) {
6077
6119
  throw new TypeError(
@@ -6181,7 +6223,7 @@ function requireSemver$1() {
6181
6223
  do {
6182
6224
  const a = this.build[i];
6183
6225
  const b = other.build[i];
6184
- debug("prerelease compare", i, a, b);
6226
+ debug("build compare", i, a, b);
6185
6227
  if (a === void 0 && b === void 0) {
6186
6228
  return 0;
6187
6229
  } else if (b === void 0) {
@@ -6197,33 +6239,33 @@ function requireSemver$1() {
6197
6239
  }
6198
6240
  // preminor will bump the version up to the next minor release, and immediately
6199
6241
  // down to pre-release. premajor and prepatch work the same way.
6200
- inc(release, identifier) {
6242
+ inc(release, identifier, identifierBase) {
6201
6243
  switch (release) {
6202
6244
  case "premajor":
6203
6245
  this.prerelease.length = 0;
6204
6246
  this.patch = 0;
6205
6247
  this.minor = 0;
6206
6248
  this.major++;
6207
- this.inc("pre", identifier);
6249
+ this.inc("pre", identifier, identifierBase);
6208
6250
  break;
6209
6251
  case "preminor":
6210
6252
  this.prerelease.length = 0;
6211
6253
  this.patch = 0;
6212
6254
  this.minor++;
6213
- this.inc("pre", identifier);
6255
+ this.inc("pre", identifier, identifierBase);
6214
6256
  break;
6215
6257
  case "prepatch":
6216
6258
  this.prerelease.length = 0;
6217
- this.inc("patch", identifier);
6218
- this.inc("pre", identifier);
6259
+ this.inc("patch", identifier, identifierBase);
6260
+ this.inc("pre", identifier, identifierBase);
6219
6261
  break;
6220
6262
  // If the input is a non-prerelease version, this acts the same as
6221
6263
  // prepatch.
6222
6264
  case "prerelease":
6223
6265
  if (this.prerelease.length === 0) {
6224
- this.inc("patch", identifier);
6266
+ this.inc("patch", identifier, identifierBase);
6225
6267
  }
6226
- this.inc("pre", identifier);
6268
+ this.inc("pre", identifier, identifierBase);
6227
6269
  break;
6228
6270
  case "major":
6229
6271
  if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
@@ -6248,9 +6290,13 @@ function requireSemver$1() {
6248
6290
  break;
6249
6291
  // This probably shouldn't be used publicly.
6250
6292
  // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
6251
- case "pre":
6293
+ case "pre": {
6294
+ const base = Number(identifierBase) ? 1 : 0;
6295
+ if (!identifier && identifierBase === false) {
6296
+ throw new Error("invalid increment argument: identifier is empty");
6297
+ }
6252
6298
  if (this.prerelease.length === 0) {
6253
- this.prerelease = [0];
6299
+ this.prerelease = [base];
6254
6300
  } else {
6255
6301
  let i = this.prerelease.length;
6256
6302
  while (--i >= 0) {
@@ -6260,24 +6306,34 @@ function requireSemver$1() {
6260
6306
  }
6261
6307
  }
6262
6308
  if (i === -1) {
6263
- this.prerelease.push(0);
6309
+ if (identifier === this.prerelease.join(".") && identifierBase === false) {
6310
+ throw new Error("invalid increment argument: identifier already exists");
6311
+ }
6312
+ this.prerelease.push(base);
6264
6313
  }
6265
6314
  }
6266
6315
  if (identifier) {
6316
+ let prerelease = [identifier, base];
6317
+ if (identifierBase === false) {
6318
+ prerelease = [identifier];
6319
+ }
6267
6320
  if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
6268
6321
  if (isNaN(this.prerelease[1])) {
6269
- this.prerelease = [identifier, 0];
6322
+ this.prerelease = prerelease;
6270
6323
  }
6271
6324
  } else {
6272
- this.prerelease = [identifier, 0];
6325
+ this.prerelease = prerelease;
6273
6326
  }
6274
6327
  }
6275
6328
  break;
6329
+ }
6276
6330
  default:
6277
6331
  throw new Error(`invalid increment argument: ${release}`);
6278
6332
  }
6279
- this.format();
6280
- this.raw = this.version;
6333
+ this.raw = this.format();
6334
+ if (this.build.length) {
6335
+ this.raw += `+${this.build.join(".")}`;
6336
+ }
6281
6337
  return this;
6282
6338
  }
6283
6339
  }
@@ -6289,29 +6345,18 @@ var hasRequiredParse;
6289
6345
  function requireParse() {
6290
6346
  if (hasRequiredParse) return parse_1;
6291
6347
  hasRequiredParse = 1;
6292
- const { MAX_LENGTH } = requireConstants();
6293
- const { re: re2, t } = requireRe();
6294
6348
  const SemVer = requireSemver$1();
6295
- const parseOptions = requireParseOptions();
6296
- const parse = (version, options) => {
6297
- options = parseOptions(options);
6349
+ const parse = (version, options, throwErrors = false) => {
6298
6350
  if (version instanceof SemVer) {
6299
6351
  return version;
6300
6352
  }
6301
- if (typeof version !== "string") {
6302
- return null;
6303
- }
6304
- if (version.length > MAX_LENGTH) {
6305
- return null;
6306
- }
6307
- const r = options.loose ? re2[t.LOOSE] : re2[t.FULL];
6308
- if (!r.test(version)) {
6309
- return null;
6310
- }
6311
6353
  try {
6312
6354
  return new SemVer(version, options);
6313
6355
  } catch (er) {
6314
- return null;
6356
+ if (!throwErrors) {
6357
+ return null;
6358
+ }
6359
+ throw er;
6315
6360
  }
6316
6361
  };
6317
6362
  parse_1 = parse;
@@ -6349,8 +6394,9 @@ function requireInc() {
6349
6394
  if (hasRequiredInc) return inc_1;
6350
6395
  hasRequiredInc = 1;
6351
6396
  const SemVer = requireSemver$1();
6352
- const inc = (version, release, options, identifier) => {
6397
+ const inc = (version, release, options, identifier, identifierBase) => {
6353
6398
  if (typeof options === "string") {
6399
+ identifierBase = identifier;
6354
6400
  identifier = options;
6355
6401
  options = void 0;
6356
6402
  }
@@ -6358,7 +6404,7 @@ function requireInc() {
6358
6404
  return new SemVer(
6359
6405
  version instanceof SemVer ? version.version : version,
6360
6406
  options
6361
- ).inc(release, identifier).version;
6407
+ ).inc(release, identifier, identifierBase).version;
6362
6408
  } catch (er) {
6363
6409
  return null;
6364
6410
  }
@@ -6366,51 +6412,47 @@ function requireInc() {
6366
6412
  inc_1 = inc;
6367
6413
  return inc_1;
6368
6414
  }
6369
- var compare_1;
6370
- var hasRequiredCompare;
6371
- function requireCompare() {
6372
- if (hasRequiredCompare) return compare_1;
6373
- hasRequiredCompare = 1;
6374
- const SemVer = requireSemver$1();
6375
- const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
6376
- compare_1 = compare;
6377
- return compare_1;
6378
- }
6379
- var eq_1;
6380
- var hasRequiredEq;
6381
- function requireEq() {
6382
- if (hasRequiredEq) return eq_1;
6383
- hasRequiredEq = 1;
6384
- const compare = requireCompare();
6385
- const eq2 = (a, b, loose) => compare(a, b, loose) === 0;
6386
- eq_1 = eq2;
6387
- return eq_1;
6388
- }
6389
6415
  var diff_1;
6390
6416
  var hasRequiredDiff;
6391
6417
  function requireDiff() {
6392
6418
  if (hasRequiredDiff) return diff_1;
6393
6419
  hasRequiredDiff = 1;
6394
6420
  const parse = requireParse();
6395
- const eq2 = requireEq();
6396
6421
  const diff = (version1, version2) => {
6397
- if (eq2(version1, version2)) {
6422
+ const v1 = parse(version1, null, true);
6423
+ const v2 = parse(version2, null, true);
6424
+ const comparison = v1.compare(v2);
6425
+ if (comparison === 0) {
6398
6426
  return null;
6399
- } else {
6400
- const v1 = parse(version1);
6401
- const v2 = parse(version2);
6402
- const hasPre = v1.prerelease.length || v2.prerelease.length;
6403
- const prefix = hasPre ? "pre" : "";
6404
- const defaultResult = hasPre ? "prerelease" : "";
6405
- for (const key in v1) {
6406
- if (key === "major" || key === "minor" || key === "patch") {
6407
- if (v1[key] !== v2[key]) {
6408
- return prefix + key;
6409
- }
6410
- }
6427
+ }
6428
+ const v1Higher = comparison > 0;
6429
+ const highVersion = v1Higher ? v1 : v2;
6430
+ const lowVersion = v1Higher ? v2 : v1;
6431
+ const highHasPre = !!highVersion.prerelease.length;
6432
+ const lowHasPre = !!lowVersion.prerelease.length;
6433
+ if (lowHasPre && !highHasPre) {
6434
+ if (!lowVersion.patch && !lowVersion.minor) {
6435
+ return "major";
6411
6436
  }
6412
- return defaultResult;
6437
+ if (highVersion.patch) {
6438
+ return "patch";
6439
+ }
6440
+ if (highVersion.minor) {
6441
+ return "minor";
6442
+ }
6443
+ return "major";
6444
+ }
6445
+ const prefix = highHasPre ? "pre" : "";
6446
+ if (v1.major !== v2.major) {
6447
+ return prefix + "major";
6448
+ }
6449
+ if (v1.minor !== v2.minor) {
6450
+ return prefix + "minor";
6451
+ }
6452
+ if (v1.patch !== v2.patch) {
6453
+ return prefix + "patch";
6413
6454
  }
6455
+ return "prerelease";
6414
6456
  };
6415
6457
  diff_1 = diff;
6416
6458
  return diff_1;
@@ -6458,6 +6500,16 @@ function requirePrerelease() {
6458
6500
  prerelease_1 = prerelease;
6459
6501
  return prerelease_1;
6460
6502
  }
6503
+ var compare_1;
6504
+ var hasRequiredCompare;
6505
+ function requireCompare() {
6506
+ if (hasRequiredCompare) return compare_1;
6507
+ hasRequiredCompare = 1;
6508
+ const SemVer = requireSemver$1();
6509
+ const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
6510
+ compare_1 = compare;
6511
+ return compare_1;
6512
+ }
6461
6513
  var rcompare_1;
6462
6514
  var hasRequiredRcompare;
6463
6515
  function requireRcompare() {
@@ -6532,6 +6584,16 @@ function requireLt() {
6532
6584
  lt_1 = lt;
6533
6585
  return lt_1;
6534
6586
  }
6587
+ var eq_1;
6588
+ var hasRequiredEq;
6589
+ function requireEq() {
6590
+ if (hasRequiredEq) return eq_1;
6591
+ hasRequiredEq = 1;
6592
+ const compare = requireCompare();
6593
+ const eq2 = (a, b, loose) => compare(a, b, loose) === 0;
6594
+ eq_1 = eq2;
6595
+ return eq_1;
6596
+ }
6535
6597
  var neq_1;
6536
6598
  var hasRequiredNeq;
6537
6599
  function requireNeq() {
@@ -6619,7 +6681,7 @@ function requireCoerce() {
6619
6681
  hasRequiredCoerce = 1;
6620
6682
  const SemVer = requireSemver$1();
6621
6683
  const parse = requireParse();
6622
- const { re: re2, t } = requireRe();
6684
+ const { safeRe: re2, t } = requireRe();
6623
6685
  const coerce2 = (version, options) => {
6624
6686
  if (version instanceof SemVer) {
6625
6687
  return version;
@@ -6633,682 +6695,75 @@ function requireCoerce() {
6633
6695
  options = options || {};
6634
6696
  let match = null;
6635
6697
  if (!options.rtl) {
6636
- match = version.match(re2[t.COERCE]);
6698
+ match = version.match(options.includePrerelease ? re2[t.COERCEFULL] : re2[t.COERCE]);
6637
6699
  } else {
6700
+ const coerceRtlRegex = options.includePrerelease ? re2[t.COERCERTLFULL] : re2[t.COERCERTL];
6638
6701
  let next;
6639
- while ((next = re2[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
6702
+ while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
6640
6703
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
6641
6704
  match = next;
6642
6705
  }
6643
- re2[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
6706
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
6644
6707
  }
6645
- re2[t.COERCERTL].lastIndex = -1;
6708
+ coerceRtlRegex.lastIndex = -1;
6646
6709
  }
6647
6710
  if (match === null) {
6648
6711
  return null;
6649
6712
  }
6650
- return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
6713
+ const major = match[2];
6714
+ const minor = match[3] || "0";
6715
+ const patch = match[4] || "0";
6716
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
6717
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
6718
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
6651
6719
  };
6652
6720
  coerce_1 = coerce2;
6653
6721
  return coerce_1;
6654
6722
  }
6655
- var iterator;
6656
- var hasRequiredIterator;
6657
- function requireIterator() {
6658
- if (hasRequiredIterator) return iterator;
6659
- hasRequiredIterator = 1;
6660
- iterator = function(Yallist) {
6661
- Yallist.prototype[Symbol.iterator] = function* () {
6662
- for (let walker = this.head; walker; walker = walker.next) {
6663
- yield walker.value;
6664
- }
6665
- };
6666
- };
6667
- return iterator;
6668
- }
6669
- var yallist;
6670
- var hasRequiredYallist;
6671
- function requireYallist() {
6672
- if (hasRequiredYallist) return yallist;
6673
- hasRequiredYallist = 1;
6674
- yallist = Yallist;
6675
- Yallist.Node = Node;
6676
- Yallist.create = Yallist;
6677
- function Yallist(list) {
6678
- var self2 = this;
6679
- if (!(self2 instanceof Yallist)) {
6680
- self2 = new Yallist();
6681
- }
6682
- self2.tail = null;
6683
- self2.head = null;
6684
- self2.length = 0;
6685
- if (list && typeof list.forEach === "function") {
6686
- list.forEach(function(item) {
6687
- self2.push(item);
6688
- });
6689
- } else if (arguments.length > 0) {
6690
- for (var i = 0, l = arguments.length; i < l; i++) {
6691
- self2.push(arguments[i]);
6692
- }
6693
- }
6694
- return self2;
6695
- }
6696
- Yallist.prototype.removeNode = function(node) {
6697
- if (node.list !== this) {
6698
- throw new Error("removing node which does not belong to this list");
6699
- }
6700
- var next = node.next;
6701
- var prev = node.prev;
6702
- if (next) {
6703
- next.prev = prev;
6704
- }
6705
- if (prev) {
6706
- prev.next = next;
6707
- }
6708
- if (node === this.head) {
6709
- this.head = next;
6710
- }
6711
- if (node === this.tail) {
6712
- this.tail = prev;
6713
- }
6714
- node.list.length--;
6715
- node.next = null;
6716
- node.prev = null;
6717
- node.list = null;
6718
- return next;
6719
- };
6720
- Yallist.prototype.unshiftNode = function(node) {
6721
- if (node === this.head) {
6722
- return;
6723
- }
6724
- if (node.list) {
6725
- node.list.removeNode(node);
6726
- }
6727
- var head = this.head;
6728
- node.list = this;
6729
- node.next = head;
6730
- if (head) {
6731
- head.prev = node;
6732
- }
6733
- this.head = node;
6734
- if (!this.tail) {
6735
- this.tail = node;
6736
- }
6737
- this.length++;
6738
- };
6739
- Yallist.prototype.pushNode = function(node) {
6740
- if (node === this.tail) {
6741
- return;
6742
- }
6743
- if (node.list) {
6744
- node.list.removeNode(node);
6745
- }
6746
- var tail = this.tail;
6747
- node.list = this;
6748
- node.prev = tail;
6749
- if (tail) {
6750
- tail.next = node;
6751
- }
6752
- this.tail = node;
6753
- if (!this.head) {
6754
- this.head = node;
6755
- }
6756
- this.length++;
6757
- };
6758
- Yallist.prototype.push = function() {
6759
- for (var i = 0, l = arguments.length; i < l; i++) {
6760
- push(this, arguments[i]);
6761
- }
6762
- return this.length;
6763
- };
6764
- Yallist.prototype.unshift = function() {
6765
- for (var i = 0, l = arguments.length; i < l; i++) {
6766
- unshift(this, arguments[i]);
6767
- }
6768
- return this.length;
6769
- };
6770
- Yallist.prototype.pop = function() {
6771
- if (!this.tail) {
6772
- return void 0;
6773
- }
6774
- var res = this.tail.value;
6775
- this.tail = this.tail.prev;
6776
- if (this.tail) {
6777
- this.tail.next = null;
6778
- } else {
6779
- this.head = null;
6780
- }
6781
- this.length--;
6782
- return res;
6783
- };
6784
- Yallist.prototype.shift = function() {
6785
- if (!this.head) {
6786
- return void 0;
6787
- }
6788
- var res = this.head.value;
6789
- this.head = this.head.next;
6790
- if (this.head) {
6791
- this.head.prev = null;
6792
- } else {
6793
- this.tail = null;
6794
- }
6795
- this.length--;
6796
- return res;
6797
- };
6798
- Yallist.prototype.forEach = function(fn, thisp) {
6799
- thisp = thisp || this;
6800
- for (var walker = this.head, i = 0; walker !== null; i++) {
6801
- fn.call(thisp, walker.value, i, this);
6802
- walker = walker.next;
6803
- }
6804
- };
6805
- Yallist.prototype.forEachReverse = function(fn, thisp) {
6806
- thisp = thisp || this;
6807
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
6808
- fn.call(thisp, walker.value, i, this);
6809
- walker = walker.prev;
6810
- }
6811
- };
6812
- Yallist.prototype.get = function(n) {
6813
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
6814
- walker = walker.next;
6815
- }
6816
- if (i === n && walker !== null) {
6817
- return walker.value;
6818
- }
6819
- };
6820
- Yallist.prototype.getReverse = function(n) {
6821
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
6822
- walker = walker.prev;
6823
- }
6824
- if (i === n && walker !== null) {
6825
- return walker.value;
6826
- }
6827
- };
6828
- Yallist.prototype.map = function(fn, thisp) {
6829
- thisp = thisp || this;
6830
- var res = new Yallist();
6831
- for (var walker = this.head; walker !== null; ) {
6832
- res.push(fn.call(thisp, walker.value, this));
6833
- walker = walker.next;
6834
- }
6835
- return res;
6836
- };
6837
- Yallist.prototype.mapReverse = function(fn, thisp) {
6838
- thisp = thisp || this;
6839
- var res = new Yallist();
6840
- for (var walker = this.tail; walker !== null; ) {
6841
- res.push(fn.call(thisp, walker.value, this));
6842
- walker = walker.prev;
6843
- }
6844
- return res;
6845
- };
6846
- Yallist.prototype.reduce = function(fn, initial) {
6847
- var acc;
6848
- var walker = this.head;
6849
- if (arguments.length > 1) {
6850
- acc = initial;
6851
- } else if (this.head) {
6852
- walker = this.head.next;
6853
- acc = this.head.value;
6854
- } else {
6855
- throw new TypeError("Reduce of empty list with no initial value");
6856
- }
6857
- for (var i = 0; walker !== null; i++) {
6858
- acc = fn(acc, walker.value, i);
6859
- walker = walker.next;
6860
- }
6861
- return acc;
6862
- };
6863
- Yallist.prototype.reduceReverse = function(fn, initial) {
6864
- var acc;
6865
- var walker = this.tail;
6866
- if (arguments.length > 1) {
6867
- acc = initial;
6868
- } else if (this.tail) {
6869
- walker = this.tail.prev;
6870
- acc = this.tail.value;
6871
- } else {
6872
- throw new TypeError("Reduce of empty list with no initial value");
6873
- }
6874
- for (var i = this.length - 1; walker !== null; i--) {
6875
- acc = fn(acc, walker.value, i);
6876
- walker = walker.prev;
6877
- }
6878
- return acc;
6879
- };
6880
- Yallist.prototype.toArray = function() {
6881
- var arr = new Array(this.length);
6882
- for (var i = 0, walker = this.head; walker !== null; i++) {
6883
- arr[i] = walker.value;
6884
- walker = walker.next;
6885
- }
6886
- return arr;
6887
- };
6888
- Yallist.prototype.toArrayReverse = function() {
6889
- var arr = new Array(this.length);
6890
- for (var i = 0, walker = this.tail; walker !== null; i++) {
6891
- arr[i] = walker.value;
6892
- walker = walker.prev;
6893
- }
6894
- return arr;
6895
- };
6896
- Yallist.prototype.slice = function(from, to) {
6897
- to = to || this.length;
6898
- if (to < 0) {
6899
- to += this.length;
6900
- }
6901
- from = from || 0;
6902
- if (from < 0) {
6903
- from += this.length;
6904
- }
6905
- var ret = new Yallist();
6906
- if (to < from || to < 0) {
6907
- return ret;
6908
- }
6909
- if (from < 0) {
6910
- from = 0;
6911
- }
6912
- if (to > this.length) {
6913
- to = this.length;
6914
- }
6915
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
6916
- walker = walker.next;
6917
- }
6918
- for (; walker !== null && i < to; i++, walker = walker.next) {
6919
- ret.push(walker.value);
6920
- }
6921
- return ret;
6922
- };
6923
- Yallist.prototype.sliceReverse = function(from, to) {
6924
- to = to || this.length;
6925
- if (to < 0) {
6926
- to += this.length;
6927
- }
6928
- from = from || 0;
6929
- if (from < 0) {
6930
- from += this.length;
6931
- }
6932
- var ret = new Yallist();
6933
- if (to < from || to < 0) {
6934
- return ret;
6935
- }
6936
- if (from < 0) {
6937
- from = 0;
6938
- }
6939
- if (to > this.length) {
6940
- to = this.length;
6941
- }
6942
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
6943
- walker = walker.prev;
6944
- }
6945
- for (; walker !== null && i > from; i--, walker = walker.prev) {
6946
- ret.push(walker.value);
6947
- }
6948
- return ret;
6949
- };
6950
- Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
6951
- if (start > this.length) {
6952
- start = this.length - 1;
6953
- }
6954
- if (start < 0) {
6955
- start = this.length + start;
6956
- }
6957
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
6958
- walker = walker.next;
6959
- }
6960
- var ret = [];
6961
- for (var i = 0; walker && i < deleteCount; i++) {
6962
- ret.push(walker.value);
6963
- walker = this.removeNode(walker);
6964
- }
6965
- if (walker === null) {
6966
- walker = this.tail;
6967
- }
6968
- if (walker !== this.head && walker !== this.tail) {
6969
- walker = walker.prev;
6970
- }
6971
- for (var i = 0; i < nodes.length; i++) {
6972
- walker = insert(this, walker, nodes[i]);
6973
- }
6974
- return ret;
6975
- };
6976
- Yallist.prototype.reverse = function() {
6977
- var head = this.head;
6978
- var tail = this.tail;
6979
- for (var walker = head; walker !== null; walker = walker.prev) {
6980
- var p = walker.prev;
6981
- walker.prev = walker.next;
6982
- walker.next = p;
6983
- }
6984
- this.head = tail;
6985
- this.tail = head;
6986
- return this;
6987
- };
6988
- function insert(self2, node, value) {
6989
- var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2);
6990
- if (inserted.next === null) {
6991
- self2.tail = inserted;
6992
- }
6993
- if (inserted.prev === null) {
6994
- self2.head = inserted;
6995
- }
6996
- self2.length++;
6997
- return inserted;
6998
- }
6999
- function push(self2, item) {
7000
- self2.tail = new Node(item, self2.tail, null, self2);
7001
- if (!self2.head) {
7002
- self2.head = self2.tail;
7003
- }
7004
- self2.length++;
7005
- }
7006
- function unshift(self2, item) {
7007
- self2.head = new Node(item, null, self2.head, self2);
7008
- if (!self2.tail) {
7009
- self2.tail = self2.head;
7010
- }
7011
- self2.length++;
7012
- }
7013
- function Node(value, prev, next, list) {
7014
- if (!(this instanceof Node)) {
7015
- return new Node(value, prev, next, list);
7016
- }
7017
- this.list = list;
7018
- this.value = value;
7019
- if (prev) {
7020
- prev.next = this;
7021
- this.prev = prev;
7022
- } else {
7023
- this.prev = null;
7024
- }
7025
- if (next) {
7026
- next.prev = this;
7027
- this.next = next;
7028
- } else {
7029
- this.next = null;
7030
- }
7031
- }
7032
- try {
7033
- requireIterator()(Yallist);
7034
- } catch (er) {
7035
- }
7036
- return yallist;
7037
- }
7038
- var lruCache;
7039
- var hasRequiredLruCache;
7040
- function requireLruCache() {
7041
- if (hasRequiredLruCache) return lruCache;
7042
- hasRequiredLruCache = 1;
7043
- const Yallist = requireYallist();
7044
- const MAX = Symbol("max");
7045
- const LENGTH = Symbol("length");
7046
- const LENGTH_CALCULATOR = Symbol("lengthCalculator");
7047
- const ALLOW_STALE = Symbol("allowStale");
7048
- const MAX_AGE = Symbol("maxAge");
7049
- const DISPOSE = Symbol("dispose");
7050
- const NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
7051
- const LRU_LIST = Symbol("lruList");
7052
- const CACHE = Symbol("cache");
7053
- const UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
7054
- const naiveLength = () => 1;
6723
+ var lrucache;
6724
+ var hasRequiredLrucache;
6725
+ function requireLrucache() {
6726
+ if (hasRequiredLrucache) return lrucache;
6727
+ hasRequiredLrucache = 1;
7055
6728
  class LRUCache {
7056
- constructor(options) {
7057
- if (typeof options === "number")
7058
- options = { max: options };
7059
- if (!options)
7060
- options = {};
7061
- if (options.max && (typeof options.max !== "number" || options.max < 0))
7062
- throw new TypeError("max must be a non-negative number");
7063
- this[MAX] = options.max || Infinity;
7064
- const lc = options.length || naiveLength;
7065
- this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
7066
- this[ALLOW_STALE] = options.stale || false;
7067
- if (options.maxAge && typeof options.maxAge !== "number")
7068
- throw new TypeError("maxAge must be a number");
7069
- this[MAX_AGE] = options.maxAge || 0;
7070
- this[DISPOSE] = options.dispose;
7071
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
7072
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
7073
- this.reset();
7074
- }
7075
- // resize the cache when the max changes.
7076
- set max(mL) {
7077
- if (typeof mL !== "number" || mL < 0)
7078
- throw new TypeError("max must be a non-negative number");
7079
- this[MAX] = mL || Infinity;
7080
- trim(this);
7081
- }
7082
- get max() {
7083
- return this[MAX];
7084
- }
7085
- set allowStale(allowStale) {
7086
- this[ALLOW_STALE] = !!allowStale;
7087
- }
7088
- get allowStale() {
7089
- return this[ALLOW_STALE];
7090
- }
7091
- set maxAge(mA) {
7092
- if (typeof mA !== "number")
7093
- throw new TypeError("maxAge must be a non-negative number");
7094
- this[MAX_AGE] = mA;
7095
- trim(this);
7096
- }
7097
- get maxAge() {
7098
- return this[MAX_AGE];
7099
- }
7100
- // resize the cache when the lengthCalculator changes.
7101
- set lengthCalculator(lC) {
7102
- if (typeof lC !== "function")
7103
- lC = naiveLength;
7104
- if (lC !== this[LENGTH_CALCULATOR]) {
7105
- this[LENGTH_CALCULATOR] = lC;
7106
- this[LENGTH] = 0;
7107
- this[LRU_LIST].forEach((hit) => {
7108
- hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
7109
- this[LENGTH] += hit.length;
7110
- });
7111
- }
7112
- trim(this);
7113
- }
7114
- get lengthCalculator() {
7115
- return this[LENGTH_CALCULATOR];
7116
- }
7117
- get length() {
7118
- return this[LENGTH];
7119
- }
7120
- get itemCount() {
7121
- return this[LRU_LIST].length;
7122
- }
7123
- rforEach(fn, thisp) {
7124
- thisp = thisp || this;
7125
- for (let walker = this[LRU_LIST].tail; walker !== null; ) {
7126
- const prev = walker.prev;
7127
- forEachStep(this, fn, walker, thisp);
7128
- walker = prev;
7129
- }
7130
- }
7131
- forEach(fn, thisp) {
7132
- thisp = thisp || this;
7133
- for (let walker = this[LRU_LIST].head; walker !== null; ) {
7134
- const next = walker.next;
7135
- forEachStep(this, fn, walker, thisp);
7136
- walker = next;
7137
- }
7138
- }
7139
- keys() {
7140
- return this[LRU_LIST].toArray().map((k) => k.key);
7141
- }
7142
- values() {
7143
- return this[LRU_LIST].toArray().map((k) => k.value);
7144
- }
7145
- reset() {
7146
- if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
7147
- this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
7148
- }
7149
- this[CACHE] = /* @__PURE__ */ new Map();
7150
- this[LRU_LIST] = new Yallist();
7151
- this[LENGTH] = 0;
7152
- }
7153
- dump() {
7154
- return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
7155
- k: hit.key,
7156
- v: hit.value,
7157
- e: hit.now + (hit.maxAge || 0)
7158
- }).toArray().filter((h) => h);
7159
- }
7160
- dumpLru() {
7161
- return this[LRU_LIST];
7162
- }
7163
- set(key, value, maxAge) {
7164
- maxAge = maxAge || this[MAX_AGE];
7165
- if (maxAge && typeof maxAge !== "number")
7166
- throw new TypeError("maxAge must be a number");
7167
- const now = maxAge ? Date.now() : 0;
7168
- const len = this[LENGTH_CALCULATOR](value, key);
7169
- if (this[CACHE].has(key)) {
7170
- if (len > this[MAX]) {
7171
- del(this, this[CACHE].get(key));
7172
- return false;
7173
- }
7174
- const node = this[CACHE].get(key);
7175
- const item = node.value;
7176
- if (this[DISPOSE]) {
7177
- if (!this[NO_DISPOSE_ON_SET])
7178
- this[DISPOSE](key, item.value);
7179
- }
7180
- item.now = now;
7181
- item.maxAge = maxAge;
7182
- item.value = value;
7183
- this[LENGTH] += len - item.length;
7184
- item.length = len;
7185
- this.get(key);
7186
- trim(this);
7187
- return true;
7188
- }
7189
- const hit = new Entry(key, value, len, now, maxAge);
7190
- if (hit.length > this[MAX]) {
7191
- if (this[DISPOSE])
7192
- this[DISPOSE](key, value);
7193
- return false;
7194
- }
7195
- this[LENGTH] += hit.length;
7196
- this[LRU_LIST].unshift(hit);
7197
- this[CACHE].set(key, this[LRU_LIST].head);
7198
- trim(this);
7199
- return true;
7200
- }
7201
- has(key) {
7202
- if (!this[CACHE].has(key)) return false;
7203
- const hit = this[CACHE].get(key).value;
7204
- return !isStale(this, hit);
6729
+ constructor() {
6730
+ this.max = 1e3;
6731
+ this.map = /* @__PURE__ */ new Map();
7205
6732
  }
7206
6733
  get(key) {
7207
- return get(this, key, true);
7208
- }
7209
- peek(key) {
7210
- return get(this, key, false);
7211
- }
7212
- pop() {
7213
- const node = this[LRU_LIST].tail;
7214
- if (!node)
7215
- return null;
7216
- del(this, node);
7217
- return node.value;
7218
- }
7219
- del(key) {
7220
- del(this, this[CACHE].get(key));
7221
- }
7222
- load(arr) {
7223
- this.reset();
7224
- const now = Date.now();
7225
- for (let l = arr.length - 1; l >= 0; l--) {
7226
- const hit = arr[l];
7227
- const expiresAt = hit.e || 0;
7228
- if (expiresAt === 0)
7229
- this.set(hit.k, hit.v);
7230
- else {
7231
- const maxAge = expiresAt - now;
7232
- if (maxAge > 0) {
7233
- this.set(hit.k, hit.v, maxAge);
7234
- }
7235
- }
6734
+ const value = this.map.get(key);
6735
+ if (value === void 0) {
6736
+ return void 0;
6737
+ } else {
6738
+ this.map.delete(key);
6739
+ this.map.set(key, value);
6740
+ return value;
7236
6741
  }
7237
6742
  }
7238
- prune() {
7239
- this[CACHE].forEach((value, key) => get(this, key, false));
6743
+ delete(key) {
6744
+ return this.map.delete(key);
7240
6745
  }
7241
- }
7242
- const get = (self2, key, doUse) => {
7243
- const node = self2[CACHE].get(key);
7244
- if (node) {
7245
- const hit = node.value;
7246
- if (isStale(self2, hit)) {
7247
- del(self2, node);
7248
- if (!self2[ALLOW_STALE])
7249
- return void 0;
7250
- } else {
7251
- if (doUse) {
7252
- if (self2[UPDATE_AGE_ON_GET])
7253
- node.value.now = Date.now();
7254
- self2[LRU_LIST].unshiftNode(node);
6746
+ set(key, value) {
6747
+ const deleted = this.delete(key);
6748
+ if (!deleted && value !== void 0) {
6749
+ if (this.map.size >= this.max) {
6750
+ const firstKey = this.map.keys().next().value;
6751
+ this.delete(firstKey);
7255
6752
  }
6753
+ this.map.set(key, value);
7256
6754
  }
7257
- return hit.value;
7258
- }
7259
- };
7260
- const isStale = (self2, hit) => {
7261
- if (!hit || !hit.maxAge && !self2[MAX_AGE])
7262
- return false;
7263
- const diff = Date.now() - hit.now;
7264
- return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
7265
- };
7266
- const trim = (self2) => {
7267
- if (self2[LENGTH] > self2[MAX]) {
7268
- for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
7269
- const prev = walker.prev;
7270
- del(self2, walker);
7271
- walker = prev;
7272
- }
7273
- }
7274
- };
7275
- const del = (self2, node) => {
7276
- if (node) {
7277
- const hit = node.value;
7278
- if (self2[DISPOSE])
7279
- self2[DISPOSE](hit.key, hit.value);
7280
- self2[LENGTH] -= hit.length;
7281
- self2[CACHE].delete(hit.key);
7282
- self2[LRU_LIST].removeNode(node);
6755
+ return this;
7283
6756
  }
7284
- };
7285
- class Entry {
7286
- constructor(key, value, length, now, maxAge) {
7287
- this.key = key;
7288
- this.value = value;
7289
- this.length = length;
7290
- this.now = now;
7291
- this.maxAge = maxAge || 0;
7292
- }
7293
- }
7294
- const forEachStep = (self2, fn, node, thisp) => {
7295
- let hit = node.value;
7296
- if (isStale(self2, hit)) {
7297
- del(self2, node);
7298
- if (!self2[ALLOW_STALE])
7299
- hit = void 0;
7300
- }
7301
- if (hit)
7302
- fn.call(thisp, hit.value, hit.key, self2);
7303
- };
7304
- lruCache = LRUCache;
7305
- return lruCache;
6757
+ }
6758
+ lrucache = LRUCache;
6759
+ return lrucache;
7306
6760
  }
7307
6761
  var range;
7308
6762
  var hasRequiredRange;
7309
6763
  function requireRange() {
7310
6764
  if (hasRequiredRange) return range;
7311
6765
  hasRequiredRange = 1;
6766
+ const SPACE_CHARACTERS = /\s+/g;
7312
6767
  class Range {
7313
6768
  constructor(range2, options) {
7314
6769
  options = parseOptions(options);
@@ -7322,16 +6777,16 @@ function requireRange() {
7322
6777
  if (range2 instanceof Comparator) {
7323
6778
  this.raw = range2.value;
7324
6779
  this.set = [[range2]];
7325
- this.format();
6780
+ this.formatted = void 0;
7326
6781
  return this;
7327
6782
  }
7328
6783
  this.options = options;
7329
6784
  this.loose = !!options.loose;
7330
6785
  this.includePrerelease = !!options.includePrerelease;
7331
- this.raw = range2;
7332
- this.set = range2.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
6786
+ this.raw = range2.trim().replace(SPACE_CHARACTERS, " ");
6787
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
7333
6788
  if (!this.set.length) {
7334
- throw new TypeError(`Invalid SemVer Range: ${range2}`);
6789
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
7335
6790
  }
7336
6791
  if (this.set.length > 1) {
7337
6792
  const first = this.set[0];
@@ -7347,21 +6802,35 @@ function requireRange() {
7347
6802
  }
7348
6803
  }
7349
6804
  }
7350
- this.format();
6805
+ this.formatted = void 0;
6806
+ }
6807
+ get range() {
6808
+ if (this.formatted === void 0) {
6809
+ this.formatted = "";
6810
+ for (let i = 0; i < this.set.length; i++) {
6811
+ if (i > 0) {
6812
+ this.formatted += "||";
6813
+ }
6814
+ const comps = this.set[i];
6815
+ for (let k = 0; k < comps.length; k++) {
6816
+ if (k > 0) {
6817
+ this.formatted += " ";
6818
+ }
6819
+ this.formatted += comps[k].toString().trim();
6820
+ }
6821
+ }
6822
+ }
6823
+ return this.formatted;
7351
6824
  }
7352
6825
  format() {
7353
- this.range = this.set.map((comps) => {
7354
- return comps.join(" ").trim();
7355
- }).join("||").trim();
7356
6826
  return this.range;
7357
6827
  }
7358
6828
  toString() {
7359
6829
  return this.range;
7360
6830
  }
7361
6831
  parseRange(range2) {
7362
- range2 = range2.trim();
7363
- const memoOpts = Object.keys(this.options).join(",");
7364
- const memoKey = `parseRange:${memoOpts}:${range2}`;
6832
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
6833
+ const memoKey = memoOpts + ":" + range2;
7365
6834
  const cached = cache.get(memoKey);
7366
6835
  if (cached) {
7367
6836
  return cached;
@@ -7373,8 +6842,9 @@ function requireRange() {
7373
6842
  range2 = range2.replace(re2[t.COMPARATORTRIM], comparatorTrimReplace);
7374
6843
  debug("comparator trim", range2);
7375
6844
  range2 = range2.replace(re2[t.TILDETRIM], tildeTrimReplace);
6845
+ debug("tilde trim", range2);
7376
6846
  range2 = range2.replace(re2[t.CARETTRIM], caretTrimReplace);
7377
- range2 = range2.split(/\s+/).join(" ");
6847
+ debug("caret trim", range2);
7378
6848
  let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
7379
6849
  if (loose) {
7380
6850
  rangeList = rangeList.filter((comp) => {
@@ -7433,19 +6903,20 @@ function requireRange() {
7433
6903
  }
7434
6904
  }
7435
6905
  range = Range;
7436
- const LRU = requireLruCache();
7437
- const cache = new LRU({ max: 1e3 });
6906
+ const LRU = requireLrucache();
6907
+ const cache = new LRU();
7438
6908
  const parseOptions = requireParseOptions();
7439
6909
  const Comparator = requireComparator();
7440
6910
  const debug = requireDebug();
7441
6911
  const SemVer = requireSemver$1();
7442
6912
  const {
7443
- re: re2,
6913
+ safeRe: re2,
7444
6914
  t,
7445
6915
  comparatorTrimReplace,
7446
6916
  tildeTrimReplace,
7447
6917
  caretTrimReplace
7448
6918
  } = requireRe();
6919
+ const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants();
7449
6920
  const isNullSet = (c) => c.value === "<0.0.0-0";
7450
6921
  const isAny = (c) => c.value === "";
7451
6922
  const isSatisfiable = (comparators, options) => {
@@ -7473,9 +6944,9 @@ function requireRange() {
7473
6944
  return comp;
7474
6945
  };
7475
6946
  const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
7476
- const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => {
7477
- return replaceTilde(c, options);
7478
- }).join(" ");
6947
+ const replaceTildes = (comp, options) => {
6948
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
6949
+ };
7479
6950
  const replaceTilde = (comp, options) => {
7480
6951
  const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
7481
6952
  return comp.replace(r, (_, M, m, p, pr) => {
@@ -7497,9 +6968,9 @@ function requireRange() {
7497
6968
  return ret;
7498
6969
  });
7499
6970
  };
7500
- const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => {
7501
- return replaceCaret(c, options);
7502
- }).join(" ");
6971
+ const replaceCarets = (comp, options) => {
6972
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
6973
+ };
7503
6974
  const replaceCaret = (comp, options) => {
7504
6975
  debug("caret", comp, options);
7505
6976
  const r = options.loose ? re2[t.CARETLOOSE] : re2[t.CARET];
@@ -7546,9 +7017,7 @@ function requireRange() {
7546
7017
  };
7547
7018
  const replaceXRanges = (comp, options) => {
7548
7019
  debug("replaceXRanges", comp, options);
7549
- return comp.split(/\s+/).map((c) => {
7550
- return replaceXRange(c, options);
7551
- }).join(" ");
7020
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
7552
7021
  };
7553
7022
  const replaceXRange = (comp, options) => {
7554
7023
  comp = comp.trim();
@@ -7613,7 +7082,7 @@ function requireRange() {
7613
7082
  debug("replaceGTE0", comp, options);
7614
7083
  return comp.trim().replace(re2[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
7615
7084
  };
7616
- const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
7085
+ const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
7617
7086
  if (isX(fM)) {
7618
7087
  from = "";
7619
7088
  } else if (isX(fm)) {
@@ -7684,6 +7153,7 @@ function requireComparator() {
7684
7153
  comp = comp.value;
7685
7154
  }
7686
7155
  }
7156
+ comp = comp.trim().split(/\s+/).join(" ");
7687
7157
  debug("comparator", comp, options);
7688
7158
  this.options = options;
7689
7159
  this.loose = !!options.loose;
@@ -7732,12 +7202,6 @@ function requireComparator() {
7732
7202
  if (!(comp instanceof Comparator)) {
7733
7203
  throw new TypeError("a Comparator is required");
7734
7204
  }
7735
- if (!options || typeof options !== "object") {
7736
- options = {
7737
- loose: !!options,
7738
- includePrerelease: false
7739
- };
7740
- }
7741
7205
  if (this.operator === "") {
7742
7206
  if (this.value === "") {
7743
7207
  return true;
@@ -7749,18 +7213,34 @@ function requireComparator() {
7749
7213
  }
7750
7214
  return new Range(this.value, options).test(comp.semver);
7751
7215
  }
7752
- const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
7753
- const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
7754
- const sameSemVer = this.semver.version === comp.semver.version;
7755
- const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
7756
- const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
7757
- const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
7758
- return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
7216
+ options = parseOptions(options);
7217
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
7218
+ return false;
7219
+ }
7220
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
7221
+ return false;
7222
+ }
7223
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
7224
+ return true;
7225
+ }
7226
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
7227
+ return true;
7228
+ }
7229
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
7230
+ return true;
7231
+ }
7232
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
7233
+ return true;
7234
+ }
7235
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
7236
+ return true;
7237
+ }
7238
+ return false;
7759
7239
  }
7760
7240
  }
7761
7241
  comparator = Comparator;
7762
7242
  const parseOptions = requireParseOptions();
7763
- const { re: re2, t } = requireRe();
7243
+ const { safeRe: re2, t } = requireRe();
7764
7244
  const cmp = requireCmp();
7765
7245
  const debug = requireDebug();
7766
7246
  const SemVer = requireSemver$1();
@@ -8025,7 +7505,7 @@ function requireIntersects() {
8025
7505
  const intersects = (r1, r2, options) => {
8026
7506
  r1 = new Range(r1, options);
8027
7507
  r2 = new Range(r2, options);
8028
- return r1.intersects(r2);
7508
+ return r1.intersects(r2, options);
8029
7509
  };
8030
7510
  intersects_1 = intersects;
8031
7511
  return intersects_1;
@@ -8111,6 +7591,8 @@ function requireSubset() {
8111
7591
  }
8112
7592
  return true;
8113
7593
  };
7594
+ const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
7595
+ const minimumVersion = [new Comparator(">=0.0.0")];
8114
7596
  const simpleSubset = (sub, dom, options) => {
8115
7597
  if (sub === dom) {
8116
7598
  return true;
@@ -8119,16 +7601,16 @@ function requireSubset() {
8119
7601
  if (dom.length === 1 && dom[0].semver === ANY) {
8120
7602
  return true;
8121
7603
  } else if (options.includePrerelease) {
8122
- sub = [new Comparator(">=0.0.0-0")];
7604
+ sub = minimumVersionWithPreRelease;
8123
7605
  } else {
8124
- sub = [new Comparator(">=0.0.0")];
7606
+ sub = minimumVersion;
8125
7607
  }
8126
7608
  }
8127
7609
  if (dom.length === 1 && dom[0].semver === ANY) {
8128
7610
  if (options.includePrerelease) {
8129
7611
  return true;
8130
7612
  } else {
8131
- dom = [new Comparator(">=0.0.0")];
7613
+ dom = minimumVersion;
8132
7614
  }
8133
7615
  }
8134
7616
  const eqSet = /* @__PURE__ */ new Set();
@@ -8329,6 +7811,7 @@ function requireSemver() {
8329
7811
  src: internalRe.src,
8330
7812
  tokens: internalRe.t,
8331
7813
  SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION,
7814
+ RELEASE_TYPES: constants2.RELEASE_TYPES,
8332
7815
  compareIdentifiers: identifiers2.compareIdentifiers,
8333
7816
  rcompareIdentifiers: identifiers2.rcompareIdentifiers
8334
7817
  };
@@ -8884,11 +8367,45 @@ const CoordinationType$1 = {
8884
8367
  CoordinationType$1.EMBEDDING_OBS_SET_LABEL_SIZE,
8885
8368
  CoordinationType$1.EMBEDDING_OBS_RADIUS,
8886
8369
  CoordinationType$1.EMBEDDING_OBS_OPACITY,
8370
+ CoordinationType$1.SPATIAL_ZOOM,
8371
+ CoordinationType$1.SPATIAL_ROTATION,
8372
+ CoordinationType$1.SPATIAL_ROTATION_X,
8373
+ CoordinationType$1.SPATIAL_ROTATION_Y,
8374
+ CoordinationType$1.SPATIAL_ROTATION_Z,
8375
+ CoordinationType$1.SPATIAL_ROTATION_ORBIT,
8376
+ CoordinationType$1.SPATIAL_TARGET_X,
8377
+ CoordinationType$1.SPATIAL_TARGET_Y,
8378
+ CoordinationType$1.SPATIAL_TARGET_Z,
8379
+ CoordinationType$1.SPATIAL_AXIS_FIXED,
8380
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
8887
8381
  CoordinationType$1.FEATURE_AGGREGATION_STRATEGY
8888
8382
  ];
8889
8383
  ({
8890
8384
  [ViewType$1.NEUROGLANCER]: [
8891
- CoordinationType$1.DATASET
8385
+ CoordinationType$1.DATASET,
8386
+ CoordinationType$1.SPATIAL_TARGET_X,
8387
+ CoordinationType$1.SPATIAL_TARGET_Y,
8388
+ CoordinationType$1.SPATIAL_TARGET_Z,
8389
+ CoordinationType$1.SPATIAL_ROTATION_X,
8390
+ CoordinationType$1.SPATIAL_ROTATION_Y,
8391
+ CoordinationType$1.SPATIAL_ROTATION_Z,
8392
+ CoordinationType$1.SPATIAL_AXIS_FIXED,
8393
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
8394
+ CoordinationType$1.SPATIAL_ZOOM,
8395
+ CoordinationType$1.OBS_FILTER,
8396
+ CoordinationType$1.OBS_HIGHLIGHT,
8397
+ CoordinationType$1.OBS_SET_SELECTION,
8398
+ CoordinationType$1.OBS_SET_FILTER,
8399
+ CoordinationType$1.OBS_SET_HIGHLIGHT,
8400
+ CoordinationType$1.OBS_SET_COLOR,
8401
+ CoordinationType$1.OBS_TYPE,
8402
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
8403
+ CoordinationType$1.OBS_SET_COLOR,
8404
+ CoordinationType$1.OBS_COLOR_ENCODING,
8405
+ CoordinationType$1.OBS_SET_SELECTION,
8406
+ CoordinationType$1.EMBEDDING_TYPE,
8407
+ CoordinationType$1.OBS_COLOR_ENCODING,
8408
+ CoordinationType$1.TOOLTIPS_VISIBLE
8892
8409
  ],
8893
8410
  [ViewType$1.SCATTERPLOT]: [
8894
8411
  CoordinationType$1.DATASET,