@nebula.js/stardust 5.2.0 → 5.3.0

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.
package/core/esm/dev.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v5.2.0
2
+ * @nebula.js/stardust v5.3.0
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -717,14 +717,14 @@ function _defineProperty(e, r, t) {
717
717
  writable: !0
718
718
  }) : e[r] = t, e;
719
719
  }
720
- function _extends$2() {
721
- return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
720
+ function _extends$6() {
721
+ return _extends$6 = Object.assign ? Object.assign.bind() : function (n) {
722
722
  for (var e = 1; e < arguments.length; e++) {
723
723
  var t = arguments[e];
724
724
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
725
725
  }
726
726
  return n;
727
- }, _extends$2.apply(null, arguments);
727
+ }, _extends$6.apply(null, arguments);
728
728
  }
729
729
  function ownKeys(e, r) {
730
730
  var t = Object.keys(e);
@@ -751,18 +751,18 @@ function _objectWithoutProperties(e, t) {
751
751
  if (null == e) return {};
752
752
  var o,
753
753
  r,
754
- i = _objectWithoutPropertiesLoose$1(e, t);
754
+ i = _objectWithoutPropertiesLoose$2(e, t);
755
755
  if (Object.getOwnPropertySymbols) {
756
- var n = Object.getOwnPropertySymbols(e);
757
- for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
756
+ var s = Object.getOwnPropertySymbols(e);
757
+ for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
758
758
  }
759
759
  return i;
760
760
  }
761
- function _objectWithoutPropertiesLoose$1(r, e) {
761
+ function _objectWithoutPropertiesLoose$2(r, e) {
762
762
  if (null == r) return {};
763
763
  var t = {};
764
764
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
765
- if (e.indexOf(n) >= 0) continue;
765
+ if (e.includes(n)) continue;
766
766
  t[n] = r[n];
767
767
  }
768
768
  return t;
@@ -3923,24 +3923,32 @@ var formatMuiErrorMessage = /*#__PURE__*/Object.freeze({
3923
3923
 
3924
3924
  var THEME_ID = '$$material';
3925
3925
 
3926
- function _extends$1() {
3927
- return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
3928
- for (var e = 1; e < arguments.length; e++) {
3929
- var t = arguments[e];
3930
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
3926
+ function _extends$5() {
3927
+ _extends$5 = Object.assign ? Object.assign.bind() : function (target) {
3928
+ for (var i = 1; i < arguments.length; i++) {
3929
+ var source = arguments[i];
3930
+ for (var key in source) {
3931
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
3932
+ target[key] = source[key];
3933
+ }
3934
+ }
3931
3935
  }
3932
- return n;
3933
- }, _extends$1.apply(null, arguments);
3936
+ return target;
3937
+ };
3938
+ return _extends$5.apply(this, arguments);
3934
3939
  }
3935
3940
 
3936
- function _objectWithoutPropertiesLoose(r, e) {
3937
- if (null == r) return {};
3938
- var t = {};
3939
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
3940
- if (e.indexOf(n) >= 0) continue;
3941
- t[n] = r[n];
3941
+ function _objectWithoutPropertiesLoose$1(source, excluded) {
3942
+ if (source == null) return {};
3943
+ var target = {};
3944
+ var sourceKeys = Object.keys(source);
3945
+ var key, i;
3946
+ for (i = 0; i < sourceKeys.length; i++) {
3947
+ key = sourceKeys[i];
3948
+ if (excluded.indexOf(key) >= 0) continue;
3949
+ target[key] = source[key];
3942
3950
  }
3943
- return t;
3951
+ return target;
3944
3952
  }
3945
3953
 
3946
3954
  /*
@@ -5243,7 +5251,7 @@ function GlobalStyles(props) {
5243
5251
  }
5244
5252
 
5245
5253
  /**
5246
- * @mui/styled-engine v5.15.14
5254
+ * @mui/styled-engine v5.16.4
5247
5255
  *
5248
5256
  * @license MIT
5249
5257
  * This source code is licensed under the MIT license found in the
@@ -5274,6 +5282,49 @@ var styledEngine = /*#__PURE__*/Object.freeze({
5274
5282
  keyframes: keyframes
5275
5283
  });
5276
5284
 
5285
+ function _extends$4() {
5286
+ _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
5287
+ for (var i = 1; i < arguments.length; i++) {
5288
+ var source = arguments[i];
5289
+ for (var key in source) {
5290
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
5291
+ target[key] = source[key];
5292
+ }
5293
+ }
5294
+ }
5295
+ return target;
5296
+ };
5297
+ return _extends$4.apply(this, arguments);
5298
+ }
5299
+
5300
+ function _objectWithoutPropertiesLoose(source, excluded) {
5301
+ if (source == null) return {};
5302
+ var target = {};
5303
+ var sourceKeys = Object.keys(source);
5304
+ var key, i;
5305
+ for (i = 0; i < sourceKeys.length; i++) {
5306
+ key = sourceKeys[i];
5307
+ if (excluded.indexOf(key) >= 0) continue;
5308
+ target[key] = source[key];
5309
+ }
5310
+ return target;
5311
+ }
5312
+
5313
+ function _extends$3() {
5314
+ _extends$3 = Object.assign ? Object.assign.bind() : function (target) {
5315
+ for (var i = 1; i < arguments.length; i++) {
5316
+ var source = arguments[i];
5317
+ for (var key in source) {
5318
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
5319
+ target[key] = source[key];
5320
+ }
5321
+ }
5322
+ }
5323
+ return target;
5324
+ };
5325
+ return _extends$3.apply(this, arguments);
5326
+ }
5327
+
5277
5328
  // https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
5278
5329
  function isPlainObject(item) {
5279
5330
  if (typeof item !== 'object' || item === null) {
@@ -5295,7 +5346,7 @@ function deepClone(source) {
5295
5346
  function deepmerge$1(target, source, options = {
5296
5347
  clone: true
5297
5348
  }) {
5298
- const output = options.clone ? _extends$1({}, target) : target;
5349
+ const output = options.clone ? _extends$3({}, target) : target;
5299
5350
  if (isPlainObject(target) && isPlainObject(source)) {
5300
5351
  Object.keys(source).forEach(key => {
5301
5352
  if (isPlainObject(source[key]) &&
@@ -5328,7 +5379,7 @@ const sortBreakpointsValues = values => {
5328
5379
  // Sort in ascending order
5329
5380
  breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
5330
5381
  return breakpointsAsArray.reduce((acc, obj) => {
5331
- return _extends$1({}, acc, {
5382
+ return _extends$4({}, acc, {
5332
5383
  [obj.key]: obj.val
5333
5384
  });
5334
5385
  }, {});
@@ -5385,7 +5436,7 @@ function createBreakpoints(breakpoints) {
5385
5436
  }
5386
5437
  return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
5387
5438
  }
5388
- return _extends$1({
5439
+ return _extends$4({
5389
5440
  keys,
5390
5441
  values: sortedValues,
5391
5442
  up,
@@ -6432,15 +6483,15 @@ function createTheme$2(options = {}, ...args) {
6432
6483
  direction: 'ltr',
6433
6484
  components: {},
6434
6485
  // Inject component definitions.
6435
- palette: _extends$1({
6486
+ palette: _extends$4({
6436
6487
  mode: 'light'
6437
6488
  }, paletteInput),
6438
6489
  spacing,
6439
- shape: _extends$1({}, shape, shapeInput)
6490
+ shape: _extends$4({}, shape, shapeInput)
6440
6491
  }, other);
6441
6492
  muiTheme.applyStyles = applyStyles;
6442
6493
  muiTheme = args.reduce((acc, argument) => deepmerge$1(acc, argument), muiTheme);
6443
- muiTheme.unstable_sxConfig = _extends$1({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
6494
+ muiTheme.unstable_sxConfig = _extends$4({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
6444
6495
  muiTheme.unstable_sx = function sx(props) {
6445
6496
  return styleFunctionSx$1({
6446
6497
  sx: props,
@@ -6505,12 +6556,12 @@ function extendSxProp(props) {
6505
6556
  if (!isPlainObject(result)) {
6506
6557
  return systemProps;
6507
6558
  }
6508
- return _extends$1({}, systemProps, result);
6559
+ return _extends$4({}, systemProps, result);
6509
6560
  };
6510
6561
  } else {
6511
- finalSx = _extends$1({}, systemProps, inSx);
6562
+ finalSx = _extends$4({}, systemProps, inSx);
6512
6563
  }
6513
- return _extends$1({}, otherProps, {
6564
+ return _extends$4({}, otherProps, {
6514
6565
  sx: finalSx
6515
6566
  });
6516
6567
  }
@@ -6653,10 +6704,10 @@ var getDisplayName = /*#__PURE__*/Object.freeze({
6653
6704
  * @returns {object} resolved props
6654
6705
  */
6655
6706
  function resolveProps(defaultProps, props) {
6656
- const output = _extends$1({}, props);
6707
+ const output = _extends$3({}, props);
6657
6708
  Object.keys(defaultProps).forEach(propName => {
6658
6709
  if (propName.toString().match(/^(components|slots)$/)) {
6659
- output[propName] = _extends$1({}, defaultProps[propName], output[propName]);
6710
+ output[propName] = _extends$3({}, defaultProps[propName], output[propName]);
6660
6711
  } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
6661
6712
  const defaultSlotProps = defaultProps[propName] || {};
6662
6713
  const slotProps = props[propName];
@@ -6668,7 +6719,7 @@ function resolveProps(defaultProps, props) {
6668
6719
  // Reduce the iteration if the default slot props is empty
6669
6720
  output[propName] = slotProps;
6670
6721
  } else {
6671
- output[propName] = _extends$1({}, slotProps);
6722
+ output[propName] = _extends$3({}, slotProps);
6672
6723
  Object.keys(defaultSlotProps).forEach(slotPropName => {
6673
6724
  output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
6674
6725
  });
@@ -6680,36 +6731,6 @@ function resolveProps(defaultProps, props) {
6680
6731
  return output;
6681
6732
  }
6682
6733
 
6683
- function getThemeProps(params) {
6684
- const {
6685
- theme,
6686
- name,
6687
- props
6688
- } = params;
6689
- if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {
6690
- return props;
6691
- }
6692
- return resolveProps(theme.components[name].defaultProps, props);
6693
- }
6694
-
6695
- function useThemeProps$1({
6696
- props,
6697
- name,
6698
- defaultTheme,
6699
- themeId
6700
- }) {
6701
- let theme = useTheme$3(defaultTheme);
6702
- if (themeId) {
6703
- theme = theme[themeId] || theme;
6704
- }
6705
- const mergedProps = getThemeProps({
6706
- theme,
6707
- name,
6708
- props
6709
- });
6710
- return mergedProps;
6711
- }
6712
-
6713
6734
  /**
6714
6735
  * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
6715
6736
  * This is useful for effects that are only needed for client-side rendering but not for SSR.
@@ -6728,6 +6749,21 @@ var clamp = /*#__PURE__*/Object.freeze({
6728
6749
  default: clamp$1
6729
6750
  });
6730
6751
 
6752
+ function _extends$2() {
6753
+ _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
6754
+ for (var i = 1; i < arguments.length; i++) {
6755
+ var source = arguments[i];
6756
+ for (var key in source) {
6757
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
6758
+ target[key] = source[key];
6759
+ }
6760
+ }
6761
+ }
6762
+ return target;
6763
+ };
6764
+ return _extends$2.apply(this, arguments);
6765
+ }
6766
+
6731
6767
  /**
6732
6768
  * Safe chained function.
6733
6769
  *
@@ -7125,7 +7161,7 @@ function mergeOuterLocalTheme(outerTheme, localTheme) {
7125
7161
  const mergedTheme = localTheme(outerTheme);
7126
7162
  return mergedTheme;
7127
7163
  }
7128
- return _extends$1({}, outerTheme, localTheme);
7164
+ return _extends$2({}, outerTheme, localTheme);
7129
7165
  }
7130
7166
 
7131
7167
  /**
@@ -7159,18 +7195,62 @@ function RtlProvider(_ref) {
7159
7195
  value
7160
7196
  } = _ref,
7161
7197
  props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
7162
- return /*#__PURE__*/jsxRuntimeExports.jsx(RtlContext.Provider, _extends$1({
7198
+ return /*#__PURE__*/jsxRuntimeExports.jsx(RtlContext.Provider, _extends$4({
7163
7199
  value: value != null ? value : true
7164
7200
  }, props));
7165
7201
  }
7166
7202
 
7203
+ const PropsContext = /*#__PURE__*/React.createContext(undefined);
7204
+ function DefaultPropsProvider({
7205
+ value,
7206
+ children
7207
+ }) {
7208
+ return /*#__PURE__*/jsxRuntimeExports.jsx(PropsContext.Provider, {
7209
+ value: value,
7210
+ children: children
7211
+ });
7212
+ }
7213
+ function getThemeProps(params) {
7214
+ const {
7215
+ theme,
7216
+ name,
7217
+ props
7218
+ } = params;
7219
+ if (!theme || !theme.components || !theme.components[name]) {
7220
+ return props;
7221
+ }
7222
+ const config = theme.components[name];
7223
+ if (config.defaultProps) {
7224
+ // compatible with v5 signature
7225
+ return resolveProps(config.defaultProps, props);
7226
+ }
7227
+ if (!config.styleOverrides && !config.variants) {
7228
+ // v6 signature, no property 'defaultProps'
7229
+ return resolveProps(config, props);
7230
+ }
7231
+ return props;
7232
+ }
7233
+ function useDefaultProps$1({
7234
+ props,
7235
+ name
7236
+ }) {
7237
+ const ctx = React.useContext(PropsContext);
7238
+ return getThemeProps({
7239
+ props,
7240
+ name,
7241
+ theme: {
7242
+ components: ctx
7243
+ }
7244
+ });
7245
+ }
7246
+
7167
7247
  const EMPTY_THEME = {};
7168
7248
  function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
7169
7249
  return React.useMemo(() => {
7170
7250
  const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
7171
7251
  if (typeof localTheme === 'function') {
7172
7252
  const mergedTheme = localTheme(resolvedTheme);
7173
- const result = themeId ? _extends$1({}, upperTheme, {
7253
+ const result = themeId ? _extends$4({}, upperTheme, {
7174
7254
  [themeId]: mergedTheme
7175
7255
  }) : mergedTheme;
7176
7256
  // must return a function for the private theme to NOT merge with the upper theme.
@@ -7180,9 +7260,9 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
7180
7260
  }
7181
7261
  return result;
7182
7262
  }
7183
- return themeId ? _extends$1({}, upperTheme, {
7263
+ return themeId ? _extends$4({}, upperTheme, {
7184
7264
  [themeId]: localTheme
7185
- }) : _extends$1({}, upperTheme, localTheme);
7265
+ }) : _extends$4({}, upperTheme, localTheme);
7186
7266
  }, [themeId, upperTheme, localTheme, isPrivate]);
7187
7267
  }
7188
7268
 
@@ -7210,7 +7290,10 @@ function ThemeProvider$1(props) {
7210
7290
  value: engineTheme,
7211
7291
  children: /*#__PURE__*/jsxRuntimeExports.jsx(RtlProvider, {
7212
7292
  value: rtlValue,
7213
- children: children
7293
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(DefaultPropsProvider, {
7294
+ value: engineTheme == null ? void 0 : engineTheme.components,
7295
+ children: children
7296
+ })
7214
7297
  })
7215
7298
  })
7216
7299
  });
@@ -7227,8 +7310,8 @@ function adaptV4Theme(inputTheme) {
7227
7310
  props = {},
7228
7311
  styleOverrides = {}
7229
7312
  } = inputTheme,
7230
- other = _objectWithoutPropertiesLoose(inputTheme, _excluded$d);
7231
- const theme = _extends$1({}, other, {
7313
+ other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$d);
7314
+ const theme = _extends$5({}, other, {
7232
7315
  components: {}
7233
7316
  });
7234
7317
 
@@ -7262,13 +7345,13 @@ function adaptV4Theme(inputTheme) {
7262
7345
  // theme.mixins.gutters
7263
7346
  const breakpoints = createBreakpoints(inputTheme.breakpoints || {});
7264
7347
  const spacing = theme.spacing;
7265
- theme.mixins = _extends$1({
7348
+ theme.mixins = _extends$5({
7266
7349
  gutters: (styles = {}) => {
7267
- return _extends$1({
7350
+ return _extends$5({
7268
7351
  paddingLeft: spacing(2),
7269
7352
  paddingRight: spacing(2)
7270
7353
  }, styles, {
7271
- [breakpoints.up('sm')]: _extends$1({
7354
+ [breakpoints.up('sm')]: _extends$5({
7272
7355
  paddingLeft: spacing(3),
7273
7356
  paddingRight: spacing(3)
7274
7357
  }, styles[breakpoints.up('sm')])
@@ -7279,9 +7362,9 @@ function adaptV4Theme(inputTheme) {
7279
7362
  type: typeInput,
7280
7363
  mode: modeInput
7281
7364
  } = palette,
7282
- paletteRest = _objectWithoutPropertiesLoose(palette, _excluded2$2);
7365
+ paletteRest = _objectWithoutPropertiesLoose$1(palette, _excluded2$2);
7283
7366
  const finalMode = modeInput || typeInput || 'light';
7284
- theme.palette = _extends$1({
7367
+ theme.palette = _extends$5({
7285
7368
  // theme.palette.text.hint
7286
7369
  text: {
7287
7370
  hint: finalMode === 'dark' ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.38)'
@@ -7293,7 +7376,7 @@ function adaptV4Theme(inputTheme) {
7293
7376
  }
7294
7377
 
7295
7378
  function createMixins(breakpoints, mixins) {
7296
- return _extends$1({
7379
+ return _extends$5({
7297
7380
  toolbar: {
7298
7381
  minHeight: 56,
7299
7382
  [breakpoints.up('xs')]: {
@@ -7310,24 +7393,24 @@ function createMixins(breakpoints, mixins) {
7310
7393
 
7311
7394
  var colorManipulator = {};
7312
7395
 
7313
- var interopRequireDefault = {exports: {}};
7396
+ var interopRequireDefault$1 = {exports: {}};
7314
7397
 
7315
7398
  (function (module) {
7316
- function _interopRequireDefault(e) {
7317
- return e && e.__esModule ? e : {
7318
- "default": e
7399
+ function _interopRequireDefault(obj) {
7400
+ return obj && obj.__esModule ? obj : {
7401
+ "default": obj
7319
7402
  };
7320
7403
  }
7321
7404
  module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
7322
- } (interopRequireDefault));
7405
+ } (interopRequireDefault$1));
7323
7406
 
7324
- var interopRequireDefaultExports = interopRequireDefault.exports;
7407
+ var interopRequireDefaultExports$1 = interopRequireDefault$1.exports;
7325
7408
 
7326
7409
  var require$$1 = /*@__PURE__*/getAugmentedNamespace(formatMuiErrorMessage);
7327
7410
 
7328
7411
  var require$$2 = /*@__PURE__*/getAugmentedNamespace(clamp);
7329
7412
 
7330
- var _interopRequireDefault$2 = interopRequireDefaultExports;
7413
+ var _interopRequireDefault$2 = interopRequireDefaultExports$1;
7331
7414
  Object.defineProperty(colorManipulator, "__esModule", {
7332
7415
  value: true
7333
7416
  });
@@ -7984,7 +8067,7 @@ function createPalette(palette) {
7984
8067
  contrastThreshold = 3,
7985
8068
  tonalOffset = 0.2
7986
8069
  } = palette,
7987
- other = _objectWithoutPropertiesLoose(palette, _excluded$c);
8070
+ other = _objectWithoutPropertiesLoose$1(palette, _excluded$c);
7988
8071
  const primary = palette.primary || getDefaultPrimary(mode);
7989
8072
  const secondary = palette.secondary || getDefaultSecondary(mode);
7990
8073
  const error = palette.error || getDefaultError(mode);
@@ -8006,7 +8089,7 @@ function createPalette(palette) {
8006
8089
  lightShade = 300,
8007
8090
  darkShade = 700
8008
8091
  }) => {
8009
- color = _extends$1({}, color);
8092
+ color = _extends$5({}, color);
8010
8093
  if (!color.main && color[mainShade]) {
8011
8094
  color.main = color[mainShade];
8012
8095
  }
@@ -8027,9 +8110,9 @@ function createPalette(palette) {
8027
8110
  dark: dark$1,
8028
8111
  light: light$1
8029
8112
  };
8030
- const paletteOutput = deepmerge$1(_extends$1({
8113
+ const paletteOutput = deepmerge$1(_extends$5({
8031
8114
  // A collection of common colors.
8032
- common: _extends$1({}, common),
8115
+ common: _extends$5({}, common),
8033
8116
  // prevent mutable object.
8034
8117
  // The palette mode, can be light or dark.
8035
8118
  mode,
@@ -8114,10 +8197,10 @@ function createTypography(palette, typography) {
8114
8197
  allVariants,
8115
8198
  pxToRem: pxToRem2
8116
8199
  } = _ref,
8117
- other = _objectWithoutPropertiesLoose(_ref, _excluded$b);
8200
+ other = _objectWithoutPropertiesLoose$1(_ref, _excluded$b);
8118
8201
  const coef = fontSize / 14;
8119
8202
  const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
8120
- const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$1({
8203
+ const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$5({
8121
8204
  fontFamily,
8122
8205
  fontWeight,
8123
8206
  fontSize: pxToRem(size),
@@ -8149,7 +8232,7 @@ function createTypography(palette, typography) {
8149
8232
  letterSpacing: 'inherit'
8150
8233
  }
8151
8234
  };
8152
- return deepmerge$1(_extends$1({
8235
+ return deepmerge$1(_extends$5({
8153
8236
  htmlFontSize,
8154
8237
  pxToRem,
8155
8238
  fontFamily,
@@ -8216,18 +8299,18 @@ function getAutoHeightDuration(height) {
8216
8299
  return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
8217
8300
  }
8218
8301
  function createTransitions(inputTransitions) {
8219
- const mergedEasing = _extends$1({}, easing, inputTransitions.easing);
8220
- const mergedDuration = _extends$1({}, duration, inputTransitions.duration);
8302
+ const mergedEasing = _extends$5({}, easing, inputTransitions.easing);
8303
+ const mergedDuration = _extends$5({}, duration, inputTransitions.duration);
8221
8304
  const create = (props = ['all'], options = {}) => {
8222
8305
  const {
8223
8306
  duration: durationOption = mergedDuration.standard,
8224
8307
  easing: easingOption = mergedEasing.easeInOut,
8225
8308
  delay = 0
8226
8309
  } = options;
8227
- _objectWithoutPropertiesLoose(options, _excluded$a);
8310
+ _objectWithoutPropertiesLoose$1(options, _excluded$a);
8228
8311
  return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
8229
8312
  };
8230
- return _extends$1({
8313
+ return _extends$5({
8231
8314
  getAutoHeightDuration,
8232
8315
  create
8233
8316
  }, inputTransitions, {
@@ -8257,7 +8340,7 @@ function createTheme(options = {}, ...args) {
8257
8340
  transitions: transitionsInput = {},
8258
8341
  typography: typographyInput = {}
8259
8342
  } = options,
8260
- other = _objectWithoutPropertiesLoose(options, _excluded$9);
8343
+ other = _objectWithoutPropertiesLoose$1(options, _excluded$9);
8261
8344
  if (options.vars) {
8262
8345
  throw new Error(formatMuiErrorMessage$1(18));
8263
8346
  }
@@ -8270,11 +8353,11 @@ function createTheme(options = {}, ...args) {
8270
8353
  shadows: shadows.slice(),
8271
8354
  typography: createTypography(palette, typographyInput),
8272
8355
  transitions: createTransitions(transitionsInput),
8273
- zIndex: _extends$1({}, zIndex)
8356
+ zIndex: _extends$5({}, zIndex)
8274
8357
  });
8275
8358
  muiTheme = deepmerge$1(muiTheme, other);
8276
8359
  muiTheme = args.reduce((acc, argument) => deepmerge$1(acc, argument), muiTheme);
8277
- muiTheme.unstable_sxConfig = _extends$1({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
8360
+ muiTheme.unstable_sxConfig = _extends$5({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
8278
8361
  muiTheme.unstable_sx = function sx(props) {
8279
8362
  return styleFunctionSx$1({
8280
8363
  sx: props,
@@ -8291,40 +8374,33 @@ function useTheme$1() {
8291
8374
  return theme[THEME_ID] || theme;
8292
8375
  }
8293
8376
 
8294
- function useThemeProps({
8295
- props,
8296
- name
8297
- }) {
8298
- return useThemeProps$1({
8299
- props,
8300
- name,
8301
- defaultTheme,
8302
- themeId: THEME_ID
8303
- });
8304
- }
8305
-
8306
8377
  var createStyled$1 = {};
8307
8378
 
8308
- var _extends = {exports: {}};
8379
+ var _extends$1 = {exports: {}};
8309
8380
 
8310
8381
  var hasRequired_extends;
8311
8382
 
8312
8383
  function require_extends () {
8313
- if (hasRequired_extends) return _extends.exports;
8384
+ if (hasRequired_extends) return _extends$1.exports;
8314
8385
  hasRequired_extends = 1;
8315
8386
  (function (module) {
8316
8387
  function _extends() {
8317
- return (module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
8318
- for (var e = 1; e < arguments.length; e++) {
8319
- var t = arguments[e];
8320
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8388
+ module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
8389
+ for (var i = 1; i < arguments.length; i++) {
8390
+ var source = arguments[i];
8391
+ for (var key in source) {
8392
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8393
+ target[key] = source[key];
8394
+ }
8395
+ }
8321
8396
  }
8322
- return n;
8323
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _extends.apply(null, arguments);
8397
+ return target;
8398
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
8399
+ return _extends.apply(this, arguments);
8324
8400
  }
8325
8401
  module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
8326
- } (_extends));
8327
- return _extends.exports;
8402
+ } (_extends$1));
8403
+ return _extends$1.exports;
8328
8404
  }
8329
8405
 
8330
8406
  var objectWithoutPropertiesLoose = {exports: {}};
@@ -8335,14 +8411,17 @@ function requireObjectWithoutPropertiesLoose () {
8335
8411
  if (hasRequiredObjectWithoutPropertiesLoose) return objectWithoutPropertiesLoose.exports;
8336
8412
  hasRequiredObjectWithoutPropertiesLoose = 1;
8337
8413
  (function (module) {
8338
- function _objectWithoutPropertiesLoose(r, e) {
8339
- if (null == r) return {};
8340
- var t = {};
8341
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
8342
- if (e.indexOf(n) >= 0) continue;
8343
- t[n] = r[n];
8414
+ function _objectWithoutPropertiesLoose(source, excluded) {
8415
+ if (source == null) return {};
8416
+ var target = {};
8417
+ var sourceKeys = Object.keys(source);
8418
+ var key, i;
8419
+ for (i = 0; i < sourceKeys.length; i++) {
8420
+ key = sourceKeys[i];
8421
+ if (excluded.indexOf(key) >= 0) continue;
8422
+ target[key] = source[key];
8344
8423
  }
8345
- return t;
8424
+ return target;
8346
8425
  }
8347
8426
  module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
8348
8427
  } (objectWithoutPropertiesLoose));
@@ -8361,7 +8440,7 @@ var require$$7 = /*@__PURE__*/getAugmentedNamespace(createTheme$1);
8361
8440
 
8362
8441
  var require$$8 = /*@__PURE__*/getAugmentedNamespace(styleFunctionSx);
8363
8442
 
8364
- var _interopRequireDefault$1 = interopRequireDefaultExports;
8443
+ var _interopRequireDefault$1 = interopRequireDefaultExports$1;
8365
8444
  Object.defineProperty(createStyled$1, "__esModule", {
8366
8445
  value: true
8367
8446
  });
@@ -8612,27 +8691,55 @@ function ThemeProvider(_ref) {
8612
8691
  let {
8613
8692
  theme: themeInput
8614
8693
  } = _ref,
8615
- props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
8694
+ props = _objectWithoutPropertiesLoose$1(_ref, _excluded$7);
8616
8695
  const scopedTheme = themeInput[THEME_ID];
8617
- return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$1({}, props, {
8696
+ return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$5({}, props, {
8618
8697
  themeId: scopedTheme ? THEME_ID : undefined,
8619
8698
  theme: scopedTheme || themeInput
8620
8699
  }));
8621
8700
  }
8622
8701
 
8623
- function _setPrototypeOf(t, e) {
8624
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
8625
- return t.__proto__ = e, t;
8626
- }, _setPrototypeOf(t, e);
8702
+ function useDefaultProps(params) {
8703
+ return useDefaultProps$1(params);
8704
+ }
8705
+
8706
+ function _extends() {
8707
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
8708
+ for (var i = 1; i < arguments.length; i++) {
8709
+ var source = arguments[i];
8710
+
8711
+ for (var key in source) {
8712
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8713
+ target[key] = source[key];
8714
+ }
8715
+ }
8716
+ }
8717
+
8718
+ return target;
8719
+ };
8720
+ return _extends.apply(this, arguments);
8721
+ }
8722
+
8723
+ function _setPrototypeOf(o, p) {
8724
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
8725
+ o.__proto__ = p;
8726
+ return o;
8727
+ };
8728
+ return _setPrototypeOf(o, p);
8627
8729
  }
8628
8730
 
8629
- function _inheritsLoose(t, o) {
8630
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
8731
+ function _inheritsLoose(subClass, superClass) {
8732
+ subClass.prototype = Object.create(superClass.prototype);
8733
+ subClass.prototype.constructor = subClass;
8734
+ _setPrototypeOf(subClass, superClass);
8631
8735
  }
8632
8736
 
8633
- function _assertThisInitialized(e) {
8634
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8635
- return e;
8737
+ function _assertThisInitialized(self) {
8738
+ if (self === void 0) {
8739
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8740
+ }
8741
+
8742
+ return self;
8636
8743
  }
8637
8744
 
8638
8745
  const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
@@ -8974,7 +9081,7 @@ function create$3(definition) {
8974
9081
  return cache[key];
8975
9082
  }
8976
9083
 
8977
- const NEBULA_VERSION_HASH = "01bb" ;
9084
+ const NEBULA_VERSION_HASH = "b434";
8978
9085
  ClassNameGenerator.configure(componentName => {
8979
9086
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
8980
9087
  });
@@ -9206,7 +9313,7 @@ function boot(_ref2) {
9206
9313
  const appRef = React__default.createRef();
9207
9314
  const element = document.createElement('div');
9208
9315
  element.style.display = 'none';
9209
- element.setAttribute('data-nebulajs-version', "5.2.0" );
9316
+ element.setAttribute('data-nebulajs-version', "5.3.0");
9210
9317
  element.setAttribute('data-app-id', app.id);
9211
9318
  document.body.appendChild(element);
9212
9319
  if (context) {
@@ -9590,7 +9697,7 @@ function SvgIcon$1(_ref) {
9590
9697
  return (
9591
9698
  /*#__PURE__*/
9592
9699
  // eslint-disable-next-line react/no-array-index-key
9593
- React__default.createElement(Type, _extends$2({
9700
+ React__default.createElement(Type, _extends$6({
9594
9701
  key: ix
9595
9702
  }, attrs))
9596
9703
  );
@@ -11216,6 +11323,78 @@ const KEYS = Object.freeze({
11216
11323
  isArrow: key => key === KEYS.ARROW_UP || key === KEYS.ARROW_DOWN || key === KEYS.ARROW_LEFT || key === KEYS.ARROW_RIGHT
11217
11324
  });
11218
11325
 
11326
+ function removeInnnerTabStops(container) {
11327
+ container === null || container === void 0 || container.querySelectorAll('[tabIndex="0"]').forEach(elm => {
11328
+ elm.setAttribute('tabIndex', -1);
11329
+ });
11330
+ }
11331
+ function removeLastFocused(container) {
11332
+ container === null || container === void 0 || container.querySelectorAll('.last-focused').forEach(elm => {
11333
+ elm.classList.remove('last-focused');
11334
+ });
11335
+ }
11336
+ function getVizCell(container) {
11337
+ return (container === null || container === void 0 ? void 0 : container.closest('.njs-cell')) || (container === null || container === void 0 ? void 0 : container.closest('.qv-gridcell')) || (container === null || container === void 0 ? void 0 : container.closest('.qv-gs-listbox'));
11338
+ }
11339
+
11340
+ // Emulate the keyboard hook, until we support it in the Listbox.
11341
+ function useTempKeyboard(_ref) {
11342
+ let {
11343
+ containerRef,
11344
+ enabled
11345
+ } = _ref;
11346
+ const [keyboardActive, setKeyboardActive] = useState$1(false);
11347
+ const keyboard = {
11348
+ enabled,
11349
+ active: keyboardActive,
11350
+ // innerTabStops: whether keyboard permits inner tab stops
11351
+ // (inner = everything inside .listbox-container)
11352
+
11353
+ innerTabStops: !enabled || keyboardActive,
11354
+ blur(resetFocus) {
11355
+ var _containerRef$current;
11356
+ if (!enabled) {
11357
+ return;
11358
+ }
11359
+ setKeyboardActive(false);
11360
+ const vizCell = getVizCell(containerRef.current) || ((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.parentElement);
11361
+ removeInnnerTabStops(containerRef.current);
11362
+ removeLastFocused(containerRef.current);
11363
+ if (resetFocus && vizCell) {
11364
+ // Move focus to the viz's cell.
11365
+ vizCell.setAttribute('tabIndex', 0);
11366
+ containerRef.current.setAttribute('tabIndex', -1);
11367
+ vizCell.focus();
11368
+ }
11369
+ },
11370
+ focus() {
11371
+ if (!enabled) {
11372
+ return;
11373
+ }
11374
+ setKeyboardActive(true);
11375
+ const c = containerRef.current;
11376
+ const searchField = c === null || c === void 0 ? void 0 : c.querySelector('.search input');
11377
+ const lastSelectedRow = c === null || c === void 0 ? void 0 : c.querySelector('.value.last-focused');
11378
+ const firstRowElement = c === null || c === void 0 ? void 0 : c.querySelector('.value.selector, .value');
11379
+ const confirmButton = c === null || c === void 0 ? void 0 : c.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
11380
+ const unlockCoverButton = c === null || c === void 0 ? void 0 : c.querySelector('#listbox-unlock-button');
11381
+ const cyclicButton = c === null || c === void 0 ? void 0 : c.querySelector('.listbox-cyclic-button');
11382
+ const elementToFocus = cyclicButton || searchField || lastSelectedRow || firstRowElement || unlockCoverButton || confirmButton;
11383
+ elementToFocus === null || elementToFocus === void 0 || elementToFocus.setAttribute('tabIndex', 0);
11384
+ elementToFocus === null || elementToFocus === void 0 || elementToFocus.focus();
11385
+ },
11386
+ focusSelection() {
11387
+ const unlockCoverButton = document.querySelector('#listbox-unlock-button');
11388
+ const confirmButton = document.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)');
11389
+ const btnToFocus = unlockCoverButton || confirmButton;
11390
+ btnToFocus === null || btnToFocus === void 0 || btnToFocus.setAttribute('tabIndex', 0);
11391
+ btnToFocus === null || btnToFocus === void 0 || btnToFocus.focus();
11392
+ return btnToFocus;
11393
+ }
11394
+ };
11395
+ return keyboard;
11396
+ }
11397
+
11219
11398
  const getElementIndex = currentTarget => +currentTarget.getAttribute('data-n');
11220
11399
  const focusSearch = container => {
11221
11400
  const searchField = container === null || container === void 0 ? void 0 : container.querySelector('.search input');
@@ -11223,10 +11402,49 @@ const focusSearch = container => {
11223
11402
  return searchField;
11224
11403
  };
11225
11404
  const focusRow = container => {
11226
- const row = container === null || container === void 0 ? void 0 : container.querySelector('.value.last-focused, .value.selector, .value');
11227
- row === null || row === void 0 || row.setAttribute('tabIndex', 0);
11228
- row === null || row === void 0 || row.focus();
11229
- return row;
11405
+ const lastFocusedRow = container === null || container === void 0 ? void 0 : container.querySelector('.value.last-focused');
11406
+ const selectorRow = container === null || container === void 0 ? void 0 : container.querySelector('.value.selector');
11407
+ const row = container === null || container === void 0 ? void 0 : container.querySelector('.value');
11408
+ const rowToFocus = lastFocusedRow || selectorRow || row;
11409
+ rowToFocus === null || rowToFocus === void 0 || rowToFocus.setAttribute('tabIndex', 0);
11410
+ rowToFocus === null || rowToFocus === void 0 || rowToFocus.focus();
11411
+ removeLastFocused(container);
11412
+ return rowToFocus;
11413
+ };
11414
+ const focusCyclicButton = container => {
11415
+ const button = container === null || container === void 0 ? void 0 : container.querySelector('.listbox-cyclic-button:not(:disabled)');
11416
+ button === null || button === void 0 || button.setAttribute('tabIndex', 0);
11417
+ button === null || button === void 0 || button.focus();
11418
+ return button;
11419
+ };
11420
+ const blur$1 = (event, keyboard) => {
11421
+ if (!keyboard.enabled) return;
11422
+ const {
11423
+ currentTarget,
11424
+ target
11425
+ } = event;
11426
+ const isFocusedOnListbox = target.classList.contains('listbox-container');
11427
+ const container = currentTarget.closest('.listbox-container');
11428
+ const vizCell = getVizCell(container);
11429
+ const isSingleListbox = (vizCell === null || vizCell === void 0 ? void 0 : vizCell.querySelectorAll('.listbox-container').length) === 1;
11430
+ if (isFocusedOnListbox || isSingleListbox) {
11431
+ // Move the focus from listbox container to the viz container.
11432
+ keyboard.blur(true);
11433
+ } else {
11434
+ // More than one listbox: Move focus from row to listbox container.
11435
+
11436
+ // 1. Remove last-focused class from row siblings.
11437
+ removeLastFocused(container);
11438
+
11439
+ // 2. Add last-focused class so we can re-focus it later.
11440
+ currentTarget.classList.add('last-focused');
11441
+
11442
+ // 3. Blur row and focus the listbox container.
11443
+ keyboard.blur();
11444
+ const c = currentTarget.closest('.listbox-container');
11445
+ c.setAttribute('tabIndex', -1);
11446
+ c === null || c === void 0 || c.focus();
11447
+ }
11230
11448
  };
11231
11449
 
11232
11450
  // Find next item index to focus in the dom element list on key up and key down
@@ -11339,28 +11557,33 @@ function getRowsKeyboardNavigation(_ref) {
11339
11557
  {
11340
11558
  // Try to focus search field, otherwise confirm button.
11341
11559
  const container = currentTarget.closest('.listbox-container');
11342
- const inSelection = isModal();
11343
-
11560
+ const inSelection = typeof isModal !== 'undefined' ? isModal() : undefined;
11344
11561
  // TODO: use a store to keep track of this row.
11345
11562
  currentTarget.classList.add('last-focused'); // so that we can go back here when we tab back
11346
11563
 
11564
+ const useDefaultBrowserSupport = !(keyboard !== null && keyboard !== void 0 && keyboard.enabled);
11565
+ if (useDefaultBrowserSupport) {
11566
+ if (!inSelection) return;
11567
+ keyboard.focusSelection();
11568
+ event.preventDefault();
11569
+ event.stopPropagation();
11570
+ return;
11571
+ }
11347
11572
  if (shiftKey) {
11348
- if (!focusSearch(container)) {
11573
+ if (!focusSearch(container) && !focusCyclicButton(container)) {
11349
11574
  if (inSelection) {
11350
11575
  keyboard.focusSelection();
11351
11576
  } else {
11352
- keyboard.blur(true);
11577
+ blur$1(event, keyboard);
11353
11578
  }
11354
11579
  }
11355
11580
  break;
11356
11581
  }
11357
11582
 
11358
11583
  // Without shift key
11359
- if (inSelection) {
11360
- keyboard.focusSelection();
11361
- } else {
11584
+ if (!keyboard.focusSelection() && !focusCyclicButton(container) && !focusSearch(container)) {
11362
11585
  currentTarget.blur();
11363
- keyboard.blur();
11586
+ blur$1(event, keyboard);
11364
11587
  }
11365
11588
  break;
11366
11589
  }
@@ -12352,7 +12575,7 @@ function createGridComponent(_ref2) {
12352
12575
  className: className,
12353
12576
  onScroll: this._onScroll,
12354
12577
  ref: this._outerRefSetter,
12355
- style: _extends$1({
12578
+ style: _extends({
12356
12579
  position: 'relative',
12357
12580
  height: height,
12358
12581
  width: width,
@@ -12851,7 +13074,7 @@ function createListComponent(_ref) {
12851
13074
  className: className,
12852
13075
  onScroll: onScroll,
12853
13076
  ref: this._outerRefSetter,
12854
- style: _extends$1({
13077
+ style: _extends({
12855
13078
  position: 'relative',
12856
13079
  height: height,
12857
13080
  width: width,
@@ -13406,7 +13629,7 @@ function getListBoxComponents(_ref) {
13406
13629
  local.current.listRef = ref;
13407
13630
  return /*#__PURE__*/React__default.createElement(StyledFixedSizeList
13408
13631
  // eslint-disable-next-line react/jsx-props-no-spreading
13409
- , _extends$2({}, commonComponentOptions, {
13632
+ , _extends$6({}, commonComponentOptions, {
13410
13633
  dataTestid: "fixed-size-list",
13411
13634
  scrollDisabled: constraints === null || constraints === void 0 ? void 0 : constraints.active,
13412
13635
  height: listHeight,
@@ -13483,7 +13706,7 @@ function getListBoxComponents(_ref) {
13483
13706
  };
13484
13707
  return /*#__PURE__*/React__default.createElement(StyledFixedSizeGrid
13485
13708
  // eslint-disable-next-line react/jsx-props-no-spreading
13486
- , _extends$2({}, commonComponentOptions, {
13709
+ , _extends$6({}, commonComponentOptions, {
13487
13710
  dataTestid: "fixed-size-grid",
13488
13711
  scrollDisabled: constraints === null || constraints === void 0 ? void 0 : constraints.active,
13489
13712
  height: gridHeight,
@@ -13907,6 +14130,19 @@ function ListBoxDisclaimer(_ref2) {
13907
14130
 
13908
14131
  var Close$1 = {};
13909
14132
 
14133
+ var interopRequireDefault = {exports: {}};
14134
+
14135
+ (function (module) {
14136
+ function _interopRequireDefault(obj) {
14137
+ return obj && obj.__esModule ? obj : {
14138
+ "default": obj
14139
+ };
14140
+ }
14141
+ module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
14142
+ } (interopRequireDefault));
14143
+
14144
+ var interopRequireDefaultExports = interopRequireDefault.exports;
14145
+
13910
14146
  var createSvgIcon$1 = {};
13911
14147
 
13912
14148
  function getSvgIconUtilityClass(slot) {
@@ -13967,7 +14203,7 @@ const SvgIconRoot = styled('svg', {
13967
14203
  };
13968
14204
  });
13969
14205
  const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
13970
- const props = useThemeProps({
14206
+ const props = useDefaultProps({
13971
14207
  props: inProps,
13972
14208
  name: 'MuiSvgIcon'
13973
14209
  });
@@ -13982,9 +14218,9 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
13982
14218
  titleAccess,
13983
14219
  viewBox = '0 0 24 24'
13984
14220
  } = props,
13985
- other = _objectWithoutPropertiesLoose(props, _excluded$5);
14221
+ other = _objectWithoutPropertiesLoose$1(props, _excluded$5);
13986
14222
  const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
13987
- const ownerState = _extends$1({}, props, {
14223
+ const ownerState = _extends$5({}, props, {
13988
14224
  color,
13989
14225
  component,
13990
14226
  fontSize,
@@ -13998,7 +14234,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
13998
14234
  more.viewBox = viewBox;
13999
14235
  }
14000
14236
  const classes = useUtilityClasses(ownerState);
14001
- return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$1({
14237
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$5({
14002
14238
  as: component,
14003
14239
  className: clsx(classes.root, className),
14004
14240
  focusable: "false",
@@ -14017,7 +14253,7 @@ SvgIcon.muiName = 'SvgIcon';
14017
14253
 
14018
14254
  function createSvgIcon(path, displayName) {
14019
14255
  function Component(props, ref) {
14020
- return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon, _extends$1({
14256
+ return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon, _extends$5({
14021
14257
  "data-testid": `${displayName}Icon`,
14022
14258
  ref: ref
14023
14259
  }, props, {
@@ -15006,7 +15242,7 @@ const More$1 = React__default.forwardRef((_ref3, ref) => {
15006
15242
  const autoFocusIndex = actions.findIndex(action => !action.disabled);
15007
15243
  return showActions && /*#__PURE__*/React__default.createElement(StyledPopover$1
15008
15244
  // eslint-disable-next-line react/jsx-props-no-spreading
15009
- , _extends$2({}, popoverProps, {
15245
+ , _extends$6({}, popoverProps, {
15010
15246
  onClose: onCloseOrActionClick,
15011
15247
  ref: ref,
15012
15248
  open: show,
@@ -15443,6 +15679,7 @@ function ListBoxSearch(_ref2) {
15443
15679
  dense = false,
15444
15680
  visible = true,
15445
15681
  autoFocus = true,
15682
+ beginSelectionOnFocus = true,
15446
15683
  wildCardSearch = false,
15447
15684
  searchEnabled,
15448
15685
  direction,
@@ -15500,11 +15737,20 @@ function ListBoxSearch(_ref2) {
15500
15737
  }
15501
15738
  return model.searchListObjectFor(TREE_PATH, searchValue);
15502
15739
  };
15740
+ const beginSelection = () => {
15741
+ const shouldBeginSelection = !selectionState.selectDisabled() && !selections.isModal();
15742
+ if (shouldBeginSelection) {
15743
+ selections.begin('/qListObjectDef');
15744
+ }
15745
+ };
15503
15746
  const handleFocus = () => {
15504
15747
  if (wildCardSearch) {
15505
15748
  setValue(WILDCARD);
15506
15749
  setWildcardOn(true);
15507
15750
  }
15751
+ if (beginSelectionOnFocus) {
15752
+ beginSelection();
15753
+ }
15508
15754
  };
15509
15755
  const hasHits = () => {
15510
15756
  const listCount = getStoreValue("listCount");
@@ -15526,11 +15772,6 @@ function ListBoxSearch(_ref2) {
15526
15772
  }
15527
15773
  return response;
15528
15774
  };
15529
- function focusRow(container) {
15530
- const row = (container === null || container === void 0 ? void 0 : container.querySelector('.last-focused')) || (container === null || container === void 0 ? void 0 : container.querySelector('[role="row"]:first-child'));
15531
- row === null || row === void 0 || row.setAttribute('tabIndex', 0);
15532
- row === null || row === void 0 || row.focus();
15533
- }
15534
15775
  const onKeyDown = async e => {
15535
15776
  const {
15536
15777
  currentTarget
@@ -15552,17 +15793,14 @@ function ListBoxSearch(_ref2) {
15552
15793
  case 'Tab':
15553
15794
  {
15554
15795
  if (e.shiftKey) {
15555
- keyboard.focusSelection();
15796
+ if (!focusCyclicButton(container)) {
15797
+ keyboard.focusSelection();
15798
+ }
15556
15799
  } else if (clearSearchRef.current) {
15557
15800
  clearSearchRef.current.focus();
15558
15801
  } else {
15559
15802
  // Focus the row we last visited or the first one.
15560
15803
  focusRow(container);
15561
-
15562
- // Clean up.
15563
- container === null || container === void 0 || container.querySelectorAll('.last-focused').forEach(elm => {
15564
- elm.classList.remove('last-focused');
15565
- });
15566
15804
  }
15567
15805
  break;
15568
15806
  }
@@ -15606,11 +15844,6 @@ function ListBoxSearch(_ref2) {
15606
15844
  } else {
15607
15845
  // Focus the row we last visited or the first one.
15608
15846
  focusRow(container);
15609
-
15610
- // Clean up.
15611
- container === null || container === void 0 || container.querySelectorAll('.last-focused').forEach(elm => {
15612
- elm.classList.remove('last-focused');
15613
- });
15614
15847
  }
15615
15848
  break;
15616
15849
  }
@@ -18240,7 +18473,8 @@ function ListBoxPopover(_ref) {
18240
18473
  }, [model]);
18241
18474
  const {
18242
18475
  translator,
18243
- themeApi
18476
+ themeApi,
18477
+ keyboardNavigation
18244
18478
  } = useContext(InstanceContext);
18245
18479
  const moreAlignTo = useRef();
18246
18480
  const containerRef = useRef();
@@ -18249,10 +18483,14 @@ function ListBoxPopover(_ref) {
18249
18483
  const [selectionState$1] = useState$1(() => selectionState({
18250
18484
  selectDisabled
18251
18485
  }));
18486
+ const keyboard = useTempKeyboard({
18487
+ containerRef,
18488
+ enabled: keyboardNavigation
18489
+ });
18252
18490
  const {
18253
18491
  checkboxes = checkboxesOption
18254
18492
  } = layout || {};
18255
- const themeSelectionColorsEnabled = flags.isEnabled('PS_22149_THEME_SELECTION_COLORS');
18493
+ const themeSelectionColorsEnabled = flags === null || flags === void 0 ? void 0 : flags.isEnabled('PS_22149_THEME_SELECTION_COLORS');
18256
18494
  const styles = getStyles({
18257
18495
  themeApi,
18258
18496
  theme,
@@ -18280,7 +18518,8 @@ function ListBoxPopover(_ref) {
18280
18518
  layout,
18281
18519
  model,
18282
18520
  translator,
18283
- selectionState: selectionState$1
18521
+ selectionState: selectionState$1,
18522
+ selections
18284
18523
  });
18285
18524
  const onCtrlF = () => {
18286
18525
  const input = searchContainerRef.current.querySelector('input');
@@ -18288,6 +18527,7 @@ function ListBoxPopover(_ref) {
18288
18527
  };
18289
18528
  const hasSelections$1 = hasSelections(layout);
18290
18529
  return /*#__PURE__*/React__default.createElement(Popover, {
18530
+ className: "listbox-container",
18291
18531
  open: open,
18292
18532
  onClose: popoverClose,
18293
18533
  anchorEl: alignTo.current,
@@ -18368,7 +18608,9 @@ function ListBoxPopover(_ref) {
18368
18608
  selections: selections,
18369
18609
  selectionState: selectionState$1,
18370
18610
  keyboard: {
18371
- enabled: false
18611
+ enabled: false,
18612
+ innerTabStops: true,
18613
+ focusSelection: keyboard.focusSelection
18372
18614
  },
18373
18615
  autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : true
18374
18616
  })), /*#__PURE__*/React__default.createElement(ListBox, {
@@ -18380,7 +18622,8 @@ function ListBoxPopover(_ref) {
18380
18622
  direction: "ltr",
18381
18623
  onSetListCount: c => setListCount(c),
18382
18624
  onCtrlF: onCtrlF,
18383
- styles: styles
18625
+ styles: styles,
18626
+ keyboard: keyboard
18384
18627
  }))));
18385
18628
  }
18386
18629
 
@@ -19537,114 +19780,17 @@ class AutoSizer extends Component {
19537
19780
  }
19538
19781
  }
19539
19782
 
19540
- function removeInnnerTabStops(container) {
19541
- container === null || container === void 0 || container.querySelectorAll('[tabIndex="0"]').forEach(elm => {
19542
- elm.setAttribute('tabIndex', -1);
19543
- });
19544
- }
19545
- function removeLastFocused(container) {
19546
- container === null || container === void 0 || container.querySelectorAll('.last-focused').forEach(elm => {
19547
- elm.classList.remove('last-focused');
19548
- });
19549
- }
19550
- function getVizCell(container) {
19551
- return (container === null || container === void 0 ? void 0 : container.closest('.njs-cell')) || (container === null || container === void 0 ? void 0 : container.closest('.qv-gridcell'));
19552
- }
19553
-
19554
- // Emulate the keyboard hook, until we support it in the Listbox.
19555
- function useTempKeyboard(_ref) {
19783
+ /* eslint-disable no-param-reassign */
19784
+ function getListboxContainerKeyboardNavigation(_ref) {
19556
19785
  let {
19557
- containerRef,
19558
- enabled
19786
+ keyboard,
19787
+ hovering,
19788
+ updateKeyScroll,
19789
+ currentScrollIndex,
19790
+ isModal,
19791
+ constraints,
19792
+ selections
19559
19793
  } = _ref;
19560
- const [keyboardActive, setKeyboardActive] = useState$1(false);
19561
- const keyboard = {
19562
- enabled,
19563
- active: keyboardActive,
19564
- // innerTabStops: whether keyboard permits inner tab stops
19565
- // (inner = everything inside .listbox-container)
19566
-
19567
- innerTabStops: !enabled || keyboardActive,
19568
- blur(resetFocus) {
19569
- var _containerRef$current;
19570
- if (!enabled) {
19571
- return;
19572
- }
19573
- setKeyboardActive(false);
19574
- const vizCell = getVizCell(containerRef.current) || ((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.parentElement);
19575
- removeInnnerTabStops(containerRef.current);
19576
- removeLastFocused(containerRef.current);
19577
- if (resetFocus && vizCell) {
19578
- // Move focus to the viz's cell.
19579
- vizCell.setAttribute('tabIndex', 0);
19580
- vizCell.focus();
19581
- }
19582
- },
19583
- focus() {
19584
- if (!enabled) {
19585
- return;
19586
- }
19587
- setKeyboardActive(true);
19588
- const c = containerRef.current;
19589
- const searchField = c === null || c === void 0 ? void 0 : c.querySelector('.search input');
19590
- const lastSelectedRow = c === null || c === void 0 ? void 0 : c.querySelector('.value.last-focused');
19591
- const firstRowElement = c === null || c === void 0 ? void 0 : c.querySelector('.value.selector, .value');
19592
- const confirmButton = c === null || c === void 0 ? void 0 : c.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
19593
- const unlockCoverButton = c === null || c === void 0 ? void 0 : c.querySelector('#listbox-unlock-button');
19594
- const elementToFocus = searchField || lastSelectedRow || firstRowElement || unlockCoverButton || confirmButton;
19595
- elementToFocus === null || elementToFocus === void 0 || elementToFocus.setAttribute('tabIndex', 0);
19596
- elementToFocus === null || elementToFocus === void 0 || elementToFocus.focus();
19597
- },
19598
- focusSelection() {
19599
- const unlockCoverButton = document.querySelector('#listbox-unlock-button');
19600
- const confirmButton = document.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
19601
- const btnToFocus = unlockCoverButton || confirmButton;
19602
- btnToFocus === null || btnToFocus === void 0 || btnToFocus.setAttribute('tabIndex', 0);
19603
- btnToFocus === null || btnToFocus === void 0 || btnToFocus.focus();
19604
- }
19605
- };
19606
- return keyboard;
19607
- }
19608
-
19609
- /* eslint-disable no-param-reassign */
19610
- function getListboxContainerKeyboardNavigation(_ref) {
19611
- let {
19612
- keyboard,
19613
- hovering,
19614
- updateKeyScroll,
19615
- containerRef,
19616
- currentScrollIndex,
19617
- isModal,
19618
- constraints
19619
- } = _ref;
19620
- const blur = event => {
19621
- const {
19622
- currentTarget,
19623
- target
19624
- } = event;
19625
- const isFocusedOnListbox = target.classList.contains('listbox-container');
19626
- const container = currentTarget.closest('.listbox-container');
19627
- const vizCell = getVizCell(container);
19628
- const isSingleListbox = (vizCell === null || vizCell === void 0 ? void 0 : vizCell.querySelectorAll('.listbox-container').length) === 1;
19629
- if (isFocusedOnListbox || isSingleListbox) {
19630
- // Move the focus from listbox container to the viz container.
19631
- keyboard.blur(true);
19632
- } else {
19633
- // More than one listbox: Move focus from row to listbox container.
19634
-
19635
- // 1. Remove last-focused class from row siblings.
19636
- removeLastFocused(containerRef.current);
19637
-
19638
- // 2. Add last-focused class so we can re-focus it later.
19639
- currentTarget.classList.add('last-focused');
19640
-
19641
- // 3. Blur row and focus the listbox container.
19642
- keyboard.blur();
19643
- const c = currentTarget.closest('.listbox-container');
19644
- c.setAttribute('tabIndex', -1);
19645
- c === null || c === void 0 || c.focus();
19646
- }
19647
- };
19648
19794
  const handleKeyDown = event => {
19649
19795
  const {
19650
19796
  keyCode,
@@ -19662,16 +19808,18 @@ function getListboxContainerKeyboardNavigation(_ref) {
19662
19808
  const inSelection = isModal();
19663
19809
  switch (keyCode) {
19664
19810
  case KEYS.TAB:
19665
- if (inSelection) {
19666
- if (shiftKey) {
19667
- focusRow(container) || focusSearch(container);
19668
- } else {
19669
- focusSearch(container) || focusRow(container);
19811
+ // Only react to tab after enter/space have been pressed or the target element is inside listbox (mouse case) or target is selection toolbar
19812
+ if (document.activeElement === container || !inSelection && !container.contains(document.activeElement)) return;
19813
+ if (shiftKey) {
19814
+ const focused = focusRow(container) || focusSearch(container);
19815
+ if (!focused) {
19816
+ blur$1(event, keyboard);
19670
19817
  }
19671
- } else if (shiftKey) {
19672
- keyboard.blur(true);
19673
19818
  } else {
19674
- break;
19819
+ const focused = focusCyclicButton(container) || focusSearch(container) || focusRow(container);
19820
+ if (!focused) {
19821
+ break;
19822
+ }
19675
19823
  }
19676
19824
  prevent();
19677
19825
  break;
@@ -19684,7 +19832,10 @@ function getListboxContainerKeyboardNavigation(_ref) {
19684
19832
  prevent();
19685
19833
  break;
19686
19834
  case KEYS.ESCAPE:
19687
- blur(event);
19835
+ blur$1(event, keyboard);
19836
+ if (selections.isActive()) {
19837
+ selections.cancel();
19838
+ }
19688
19839
  break;
19689
19840
  }
19690
19841
  };
@@ -19847,8 +19998,7 @@ function getListboxActionProps(_ref) {
19847
19998
  },
19848
19999
  extraItems,
19849
20000
  more: {
19850
- enabled: !isLocked && (showToolbar || selections.isActive()),
19851
- // show more button even when popover is not in selection mode
20001
+ enabled: !isLocked,
19852
20002
  actions: listboxSelectionToolbarItems,
19853
20003
  popoverProps: {
19854
20004
  elevation: 0
@@ -19859,7 +20009,7 @@ function getListboxActionProps(_ref) {
19859
20009
  }
19860
20010
  },
19861
20011
  selections: {
19862
- show: showToolbar && selections.isActive(),
20012
+ show: showToolbar,
19863
20013
  api: selections,
19864
20014
  onConfirm: () => {
19865
20015
  keyboard === null || keyboard === void 0 || keyboard.focus();
@@ -20002,7 +20152,8 @@ const createDimensionIconData = _ref => {
20002
20152
  app,
20003
20153
  selections,
20004
20154
  isPopover,
20005
- active
20155
+ active,
20156
+ keyboard
20006
20157
  } = _ref;
20007
20158
  switch (dimInfo.qGrouping) {
20008
20159
  case dimensionTypes.drillDown:
@@ -20014,21 +20165,52 @@ const createDimensionIconData = _ref => {
20014
20165
  case dimensionTypes.cyclic:
20015
20166
  {
20016
20167
  const clickable = app && active;
20168
+ const stepToNextField = () => {
20169
+ if (!isPopover) {
20170
+ selections.confirm();
20171
+ }
20172
+ app.getDimension(dimInfo.qLibraryId).then(dimensionModel => {
20173
+ if (!dimensionModel.stepCycle) {
20174
+ // eslint-disable-next-line no-console
20175
+ console.log("engine api spec version doesn't have support for function stepCycle");
20176
+ return;
20177
+ }
20178
+ dimensionModel.stepCycle(1);
20179
+ }).catch(() => null);
20180
+ };
20017
20181
  return {
20018
20182
  icon: clickable ? ReloadIcon : CyclicIcon,
20019
20183
  tooltip: 'Listbox.Cyclic',
20020
- onClick: clickable ? () => {
20021
- if (!isPopover) {
20022
- selections.confirm();
20023
- }
20024
- app.getDimension(dimInfo.qLibraryId).then(dimensionModel => {
20025
- if (!dimensionModel.stepCycle) {
20026
- // eslint-disable-next-line no-console
20027
- console.log("engine api spec version doesn't have support for function stepCycle");
20184
+ onClick: clickable ? stepToNextField : undefined,
20185
+ onKeyDown: clickable ? event => {
20186
+ const container = event.currentTarget.closest('.listbox-container');
20187
+ switch (event.keyCode) {
20188
+ case KEYS.SPACE:
20189
+ case KEYS.ENTER:
20190
+ stepToNextField();
20191
+ break;
20192
+ case KEYS.TAB:
20193
+ {
20194
+ const useDefaultBrowserSupport = !keyboard.enabled;
20195
+ if (useDefaultBrowserSupport) {
20196
+ return;
20197
+ }
20198
+ let focused;
20199
+ if (event.shiftKey) {
20200
+ focused = keyboard.focusSelection();
20201
+ } else {
20202
+ focused = focusSearch(container) || focusRow(container);
20203
+ }
20204
+ if (!focused) {
20205
+ blur$1(event, keyboard);
20206
+ }
20207
+ }
20208
+ break;
20209
+ default:
20028
20210
  return;
20029
- }
20030
- dimensionModel.stepCycle(1);
20031
- }).catch(() => null);
20211
+ }
20212
+ event.preventDefault();
20213
+ event.stopPropagation();
20032
20214
  } : undefined
20033
20215
  };
20034
20216
  }
@@ -20052,13 +20234,15 @@ function DimensionIcon(_ref) {
20052
20234
  iconData,
20053
20235
  translator,
20054
20236
  iconStyle,
20055
- disabled
20237
+ disabled,
20238
+ keyboard
20056
20239
  } = _ref;
20057
20240
  if (!iconData) return undefined;
20058
20241
  const {
20059
20242
  icon,
20060
20243
  tooltip,
20061
- onClick
20244
+ onClick = undefined,
20245
+ onKeyDown = undefined
20062
20246
  } = iconData;
20063
20247
  const Icon = icon;
20064
20248
  const title = translator.get(tooltip);
@@ -20066,11 +20250,14 @@ function DimensionIcon(_ref) {
20066
20250
  return isButton ? /*#__PURE__*/React__default.createElement(StyledButton, {
20067
20251
  variant: "outlined",
20068
20252
  onClick: onClick,
20069
- tabIndex: -1,
20253
+ tabIndex: keyboard.innerTabStops ? 0 : -1,
20070
20254
  title: title,
20071
20255
  size: "large",
20072
20256
  disableRipple: true,
20073
- disabled: disabled
20257
+ disabled: disabled,
20258
+ onKeyDown: onKeyDown,
20259
+ className: "listbox-cyclic-button",
20260
+ "data-testid": "listbox-cyclic-button"
20074
20261
  }, /*#__PURE__*/React__default.createElement(Icon, {
20075
20262
  style: iconStyle
20076
20263
  })) : /*#__PURE__*/React__default.createElement(Icon, {
@@ -20153,7 +20340,8 @@ function ListBoxHeader(_ref2) {
20153
20340
  app,
20154
20341
  selections,
20155
20342
  isPopover,
20156
- active: !(constraints !== null && constraints !== void 0 && constraints.active)
20343
+ active: !(constraints !== null && constraints !== void 0 && constraints.active),
20344
+ keyboard
20157
20345
  });
20158
20346
  const showUnlock = showLock && isLocked;
20159
20347
  const showLockIcon = !showLock && isLocked; // shows instead of the cover button when field/dim is locked.
@@ -20229,7 +20417,7 @@ function ListBoxHeader(_ref2) {
20229
20417
  keyboard,
20230
20418
  autoConfirm
20231
20419
  });
20232
- const actionsToolbar = /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$2({
20420
+ const actionsToolbar = /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$6({
20233
20421
  isRtl: isRtl,
20234
20422
  layout: layout
20235
20423
  }, toolbarProps));
@@ -20268,7 +20456,8 @@ function ListBoxHeader(_ref2) {
20268
20456
  iconData: iconData,
20269
20457
  iconStyle: iconStyle,
20270
20458
  disabled: selections.isActive() && isPopover,
20271
- translator: translator
20459
+ translator: translator,
20460
+ keyboard: keyboard
20272
20461
  })), /*#__PURE__*/React__default.createElement(Grid, {
20273
20462
  item: true,
20274
20463
  xs: true,
@@ -20389,7 +20578,7 @@ function ListBoxInline(_ref3) {
20389
20578
  const {
20390
20579
  checkboxes = checkboxesOption
20391
20580
  } = layout || {};
20392
- const themeSelectionColorsEnabled = flags.isEnabled('PS_22149_THEME_SELECTION_COLORS');
20581
+ const themeSelectionColorsEnabled = flags === null || flags === void 0 ? void 0 : flags.isEnabled('PS_22149_THEME_SELECTION_COLORS');
20393
20582
  const styles = getStyles({
20394
20583
  app,
20395
20584
  themeApi,
@@ -20445,7 +20634,8 @@ function ListBoxInline(_ref3) {
20445
20634
  app,
20446
20635
  appSelections,
20447
20636
  constraints,
20448
- isModal: isModalMode
20637
+ isModal: isModalMode,
20638
+ selections
20449
20639
  }), [keyboard, hovering, updateKeyScroll, containerRef, currentScrollIndex, app, appSelections, constraints, isModalMode]);
20450
20640
  useEffect$1(() => {
20451
20641
  document.addEventListener('keydown', globalKeyDown);
@@ -20606,6 +20796,7 @@ function ListBoxInline(_ref3) {
20606
20796
  visible: searchVisible,
20607
20797
  search: search,
20608
20798
  autoFocus: shouldAutoFocus,
20799
+ beginSelectionOnFocus: !isPopover,
20609
20800
  wildCardSearch: wildCardSearch,
20610
20801
  searchEnabled: searchEnabled,
20611
20802
  direction: direction,
@@ -22604,13 +22795,13 @@ function Progress(_ref2) {
22604
22795
  const s = SIZES[size];
22605
22796
  return /*#__PURE__*/React__default.createElement(Root, {
22606
22797
  className: classes$3.root
22607
- }, /*#__PURE__*/React__default.createElement(CircularProgress, _extends$2({
22798
+ }, /*#__PURE__*/React__default.createElement(CircularProgress, _extends$6({
22608
22799
  variant: "determinate",
22609
22800
  value: 100,
22610
22801
  className: classes$3.back,
22611
22802
  size: s,
22612
22803
  thickness: 3
22613
- }, props)), /*#__PURE__*/React__default.createElement(CircularProgress, _extends$2({
22804
+ }, props)), /*#__PURE__*/React__default.createElement(CircularProgress, _extends$6({
22614
22805
  variant: "indeterminate",
22615
22806
  disableShrink: true,
22616
22807
  className: classes$3.front,
@@ -22660,7 +22851,7 @@ function Cancel(_ref) {
22660
22851
  variant: "h6",
22661
22852
  align: "center",
22662
22853
  "data-tid": "update-active"
22663
- }, translator.get('Object.Update.Active')))), /*#__PURE__*/React__default.createElement(Grid, _extends$2({
22854
+ }, translator.get('Object.Update.Active')))), /*#__PURE__*/React__default.createElement(Grid, _extends$6({
22664
22855
  item: true
22665
22856
  }, props), /*#__PURE__*/React__default.createElement(Button, {
22666
22857
  variant: "contained",
@@ -22687,7 +22878,7 @@ function Retry(_ref2) {
22687
22878
  "data-tid": "update-cancelled"
22688
22879
  }, translator.get('Object.Update.Cancelled'))), /*#__PURE__*/React__default.createElement(Grid, {
22689
22880
  item: true
22690
- }, /*#__PURE__*/React__default.createElement(Button, _extends$2({
22881
+ }, /*#__PURE__*/React__default.createElement(Button, _extends$6({
22691
22882
  variant: "contained",
22692
22883
  onClick: retry
22693
22884
  }, props), translator.get('Retry'))));
@@ -27046,59 +27237,52 @@ function flagsFn () {
27046
27237
  }
27047
27238
 
27048
27239
  class LRUCache {
27049
- constructor () {
27240
+ constructor() {
27050
27241
  this.max = 1000;
27051
27242
  this.map = new Map();
27052
27243
  }
27053
-
27054
- get (key) {
27244
+ get(key) {
27055
27245
  const value = this.map.get(key);
27056
27246
  if (value === undefined) {
27057
- return undefined
27247
+ return undefined;
27058
27248
  } else {
27059
27249
  // Remove the key from the map and add it to the end
27060
27250
  this.map.delete(key);
27061
27251
  this.map.set(key, value);
27062
- return value
27252
+ return value;
27063
27253
  }
27064
27254
  }
27065
-
27066
- delete (key) {
27067
- return this.map.delete(key)
27255
+ delete(key) {
27256
+ return this.map.delete(key);
27068
27257
  }
27069
-
27070
- set (key, value) {
27258
+ set(key, value) {
27071
27259
  const deleted = this.delete(key);
27072
-
27073
27260
  if (!deleted && value !== undefined) {
27074
27261
  // If cache is full, delete the least recently used item
27075
27262
  if (this.map.size >= this.max) {
27076
27263
  const firstKey = this.map.keys().next().value;
27077
27264
  this.delete(firstKey);
27078
27265
  }
27079
-
27080
27266
  this.map.set(key, value);
27081
27267
  }
27082
-
27083
- return this
27268
+ return this;
27084
27269
  }
27085
27270
  }
27086
-
27087
27271
  var lrucache = LRUCache;
27088
27272
 
27089
27273
  // parse out just the options we care about
27090
- const looseOption = Object.freeze({ loose: true });
27091
- const emptyOpts = Object.freeze({ });
27274
+ const looseOption = Object.freeze({
27275
+ loose: true
27276
+ });
27277
+ const emptyOpts = Object.freeze({});
27092
27278
  const parseOptions$1 = options => {
27093
27279
  if (!options) {
27094
- return emptyOpts
27280
+ return emptyOpts;
27095
27281
  }
27096
-
27097
27282
  if (typeof options !== 'object') {
27098
- return looseOption
27283
+ return looseOption;
27099
27284
  }
27100
-
27101
- return options
27285
+ return options;
27102
27286
  };
27103
27287
  var parseOptions_1 = parseOptions$1;
27104
27288
 
@@ -27107,10 +27291,8 @@ var re$1 = {exports: {}};
27107
27291
  // Note: this is the semver.org version of the spec that it implements
27108
27292
  // Not necessarily the package version of this code.
27109
27293
  const SEMVER_SPEC_VERSION = '2.0.0';
27110
-
27111
27294
  const MAX_LENGTH$1 = 256;
27112
- const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER ||
27113
- /* istanbul ignore next */ 9007199254740991;
27295
+ const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */9007199254740991;
27114
27296
 
27115
27297
  // Max safe segment length for coercion.
27116
27298
  const MAX_SAFE_COMPONENT_LENGTH = 16;
@@ -27118,17 +27300,7 @@ const MAX_SAFE_COMPONENT_LENGTH = 16;
27118
27300
  // Max safe length for a build identifier. The max length minus 6 characters for
27119
27301
  // the shortest version with a build 0.0.0+BUILD.
27120
27302
  const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6;
27121
-
27122
- const RELEASE_TYPES = [
27123
- 'major',
27124
- 'premajor',
27125
- 'minor',
27126
- 'preminor',
27127
- 'patch',
27128
- 'prepatch',
27129
- 'prerelease',
27130
- ];
27131
-
27303
+ const RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];
27132
27304
  var constants = {
27133
27305
  MAX_LENGTH: MAX_LENGTH$1,
27134
27306
  MAX_SAFE_COMPONENT_LENGTH,
@@ -27137,443 +27309,352 @@ var constants = {
27137
27309
  RELEASE_TYPES,
27138
27310
  SEMVER_SPEC_VERSION,
27139
27311
  FLAG_INCLUDE_PRERELEASE: 0b001,
27140
- FLAG_LOOSE: 0b010,
27312
+ FLAG_LOOSE: 0b010
27141
27313
  };
27142
27314
 
27143
- const debug$1 = (
27144
- typeof process === 'object' &&
27145
- process.env &&
27146
- process.env.NODE_DEBUG &&
27147
- /\bsemver\b/i.test(process.env.NODE_DEBUG)
27148
- ) ? (...args) => console.error('SEMVER', ...args)
27149
- : () => {};
27150
-
27315
+ const debug$1 = typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? function () {
27316
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27317
+ args[_key] = arguments[_key];
27318
+ }
27319
+ return console.error('SEMVER', ...args);
27320
+ } : () => {};
27151
27321
  var debug_1 = debug$1;
27152
27322
 
27153
27323
  (function (module, exports) {
27154
- const {
27155
- MAX_SAFE_COMPONENT_LENGTH,
27156
- MAX_SAFE_BUILD_LENGTH,
27157
- MAX_LENGTH,
27158
- } = constants;
27159
- const debug = debug_1;
27160
- exports = module.exports = {};
27161
-
27162
- // The actual regexps go on exports.re
27163
- const re = exports.re = [];
27164
- const safeRe = exports.safeRe = [];
27165
- const src = exports.src = [];
27166
- const t = exports.t = {};
27167
- let R = 0;
27168
-
27169
- const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
27170
-
27171
- // Replace some greedy regex tokens to prevent regex dos issues. These regex are
27172
- // used internally via the safeRe object since all inputs in this library get
27173
- // normalized first to trim and collapse all extra whitespace. The original
27174
- // regexes are exported for userland consumption and lower level usage. A
27175
- // future breaking change could export the safer regex only with a note that
27176
- // all input should have extra whitespace removed.
27177
- const safeRegexReplacements = [
27178
- ['\\s', 1],
27179
- ['\\d', MAX_LENGTH],
27180
- [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
27181
- ];
27182
-
27183
- const makeSafeRegex = (value) => {
27184
- for (const [token, max] of safeRegexReplacements) {
27185
- value = value
27186
- .split(`${token}*`).join(`${token}{0,${max}}`)
27187
- .split(`${token}+`).join(`${token}{1,${max}}`);
27188
- }
27189
- return value
27190
- };
27191
-
27192
- const createToken = (name, value, isGlobal) => {
27193
- const safe = makeSafeRegex(value);
27194
- const index = R++;
27195
- debug(name, index, value);
27196
- t[name] = index;
27197
- src[index] = value;
27198
- re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
27199
- safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
27200
- };
27201
-
27202
- // The following Regular Expressions can be used for tokenizing,
27203
- // validating, and parsing SemVer version strings.
27204
-
27205
- // ## Numeric Identifier
27206
- // A single `0`, or a non-zero digit followed by zero or more digits.
27207
-
27208
- createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
27209
- createToken('NUMERICIDENTIFIERLOOSE', '\\d+');
27210
-
27211
- // ## Non-numeric Identifier
27212
- // Zero or more digits, followed by a letter or hyphen, and then zero or
27213
- // more letters, digits, or hyphens.
27214
-
27215
- createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
27216
-
27217
- // ## Main Version
27218
- // Three dot-separated numeric identifiers.
27219
-
27220
- createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
27221
- `(${src[t.NUMERICIDENTIFIER]})\\.` +
27222
- `(${src[t.NUMERICIDENTIFIER]})`);
27223
-
27224
- createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
27225
- `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
27226
- `(${src[t.NUMERICIDENTIFIERLOOSE]})`);
27227
-
27228
- // ## Pre-release Version Identifier
27229
- // A numeric identifier, or a non-numeric identifier.
27230
-
27231
- createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
27232
- }|${src[t.NONNUMERICIDENTIFIER]})`);
27233
-
27234
- createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
27235
- }|${src[t.NONNUMERICIDENTIFIER]})`);
27236
-
27237
- // ## Pre-release Version
27238
- // Hyphen, followed by one or more dot-separated pre-release version
27239
- // identifiers.
27240
-
27241
- createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
27242
- }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
27243
-
27244
- createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
27245
- }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
27246
-
27247
- // ## Build Metadata Identifier
27248
- // Any combination of digits, letters, or hyphens.
27249
-
27250
- createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`);
27251
-
27252
- // ## Build Metadata
27253
- // Plus sign, followed by one or more period-separated build metadata
27254
- // identifiers.
27255
-
27256
- createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
27257
- }(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
27258
-
27259
- // ## Full Version String
27260
- // A main version, followed optionally by a pre-release version and
27261
- // build metadata.
27262
-
27263
- // Note that the only major, minor, patch, and pre-release sections of
27264
- // the version string are capturing groups. The build metadata is not a
27265
- // capturing group, because it should not ever be used in version
27266
- // comparison.
27267
-
27268
- createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
27269
- }${src[t.PRERELEASE]}?${
27270
- src[t.BUILD]}?`);
27271
-
27272
- createToken('FULL', `^${src[t.FULLPLAIN]}$`);
27273
-
27274
- // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
27275
- // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
27276
- // common in the npm registry.
27277
- createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
27278
- }${src[t.PRERELEASELOOSE]}?${
27279
- src[t.BUILD]}?`);
27280
-
27281
- createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`);
27282
-
27283
- createToken('GTLT', '((?:<|>)?=?)');
27284
-
27285
- // Something like "2.*" or "1.2.x".
27286
- // Note that "x.x" is a valid xRange identifer, meaning "any version"
27287
- // Only the first item is strictly required.
27288
- createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
27289
- createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
27290
-
27291
- createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
27292
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
27293
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
27294
- `(?:${src[t.PRERELEASE]})?${
27295
- src[t.BUILD]}?` +
27296
- `)?)?`);
27297
-
27298
- createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
27299
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
27300
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
27301
- `(?:${src[t.PRERELEASELOOSE]})?${
27302
- src[t.BUILD]}?` +
27303
- `)?)?`);
27304
-
27305
- createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
27306
- createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
27307
-
27308
- // Coercion.
27309
- // Extract anything that could conceivably be a part of a valid semver
27310
- createToken('COERCEPLAIN', `${'(^|[^\\d])' +
27311
- '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
27312
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
27313
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
27314
- createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
27315
- createToken('COERCEFULL', src[t.COERCEPLAIN] +
27316
- `(?:${src[t.PRERELEASE]})?` +
27317
- `(?:${src[t.BUILD]})?` +
27318
- `(?:$|[^\\d])`);
27319
- createToken('COERCERTL', src[t.COERCE], true);
27320
- createToken('COERCERTLFULL', src[t.COERCEFULL], true);
27321
-
27322
- // Tilde ranges.
27323
- // Meaning is "reasonably at or greater than"
27324
- createToken('LONETILDE', '(?:~>?)');
27325
-
27326
- createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true);
27327
- exports.tildeTrimReplace = '$1~';
27328
-
27329
- createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
27330
- createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
27331
-
27332
- // Caret ranges.
27333
- // Meaning is "at least and backwards compatible with"
27334
- createToken('LONECARET', '(?:\\^)');
27335
-
27336
- createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true);
27337
- exports.caretTrimReplace = '$1^';
27338
-
27339
- createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
27340
- createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
27341
-
27342
- // A simple gt/lt/eq thing, or just "" to indicate "any version"
27343
- createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
27344
- createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
27345
-
27346
- // An expression to strip any whitespace between the gtlt and the thing
27347
- // it modifies, so that `> 1.2.3` ==> `>1.2.3`
27348
- createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
27349
- }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
27350
- exports.comparatorTrimReplace = '$1$2$3';
27351
-
27352
- // Something like `1.2.3 - 1.2.4`
27353
- // Note that these all use the loose form, because they'll be
27354
- // checked against either the strict or loose comparator form
27355
- // later.
27356
- createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
27357
- `\\s+-\\s+` +
27358
- `(${src[t.XRANGEPLAIN]})` +
27359
- `\\s*$`);
27360
-
27361
- createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
27362
- `\\s+-\\s+` +
27363
- `(${src[t.XRANGEPLAINLOOSE]})` +
27364
- `\\s*$`);
27365
-
27366
- // Star ranges basically just allow anything at all.
27367
- createToken('STAR', '(<|>)?=?\\s*\\*');
27368
- // >=0.0.0 is like a star
27369
- createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$');
27370
- createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$');
27371
- } (re$1, re$1.exports));
27324
+ const {
27325
+ MAX_SAFE_COMPONENT_LENGTH,
27326
+ MAX_SAFE_BUILD_LENGTH,
27327
+ MAX_LENGTH
27328
+ } = constants;
27329
+ const debug = debug_1;
27330
+ exports = module.exports = {};
27331
+
27332
+ // The actual regexps go on exports.re
27333
+ const re = exports.re = [];
27334
+ const safeRe = exports.safeRe = [];
27335
+ const src = exports.src = [];
27336
+ const t = exports.t = {};
27337
+ let R = 0;
27338
+ const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
27339
+
27340
+ // Replace some greedy regex tokens to prevent regex dos issues. These regex are
27341
+ // used internally via the safeRe object since all inputs in this library get
27342
+ // normalized first to trim and collapse all extra whitespace. The original
27343
+ // regexes are exported for userland consumption and lower level usage. A
27344
+ // future breaking change could export the safer regex only with a note that
27345
+ // all input should have extra whitespace removed.
27346
+ const safeRegexReplacements = [['\\s', 1], ['\\d', MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]];
27347
+ const makeSafeRegex = value => {
27348
+ for (const [token, max] of safeRegexReplacements) {
27349
+ value = value.split("".concat(token, "*")).join("".concat(token, "{0,").concat(max, "}")).split("".concat(token, "+")).join("".concat(token, "{1,").concat(max, "}"));
27350
+ }
27351
+ return value;
27352
+ };
27353
+ const createToken = (name, value, isGlobal) => {
27354
+ const safe = makeSafeRegex(value);
27355
+ const index = R++;
27356
+ debug(name, index, value);
27357
+ t[name] = index;
27358
+ src[index] = value;
27359
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
27360
+ safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
27361
+ };
27372
27362
 
27363
+ // The following Regular Expressions can be used for tokenizing,
27364
+ // validating, and parsing SemVer version strings.
27365
+
27366
+ // ## Numeric Identifier
27367
+ // A single `0`, or a non-zero digit followed by zero or more digits.
27368
+
27369
+ createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
27370
+ createToken('NUMERICIDENTIFIERLOOSE', '\\d+');
27371
+
27372
+ // ## Non-numeric Identifier
27373
+ // Zero or more digits, followed by a letter or hyphen, and then zero or
27374
+ // more letters, digits, or hyphens.
27375
+
27376
+ createToken('NONNUMERICIDENTIFIER', "\\d*[a-zA-Z-]".concat(LETTERDASHNUMBER, "*"));
27377
+
27378
+ // ## Main Version
27379
+ // Three dot-separated numeric identifiers.
27380
+
27381
+ createToken('MAINVERSION', "(".concat(src[t.NUMERICIDENTIFIER], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIER], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIER], ")"));
27382
+ createToken('MAINVERSIONLOOSE', "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")"));
27383
+
27384
+ // ## Pre-release Version Identifier
27385
+ // A numeric identifier, or a non-numeric identifier.
27386
+
27387
+ createToken('PRERELEASEIDENTIFIER', "(?:".concat(src[t.NUMERICIDENTIFIER], "|").concat(src[t.NONNUMERICIDENTIFIER], ")"));
27388
+ createToken('PRERELEASEIDENTIFIERLOOSE', "(?:".concat(src[t.NUMERICIDENTIFIERLOOSE], "|").concat(src[t.NONNUMERICIDENTIFIER], ")"));
27389
+
27390
+ // ## Pre-release Version
27391
+ // Hyphen, followed by one or more dot-separated pre-release version
27392
+ // identifiers.
27393
+
27394
+ createToken('PRERELEASE', "(?:-(".concat(src[t.PRERELEASEIDENTIFIER], "(?:\\.").concat(src[t.PRERELEASEIDENTIFIER], ")*))"));
27395
+ createToken('PRERELEASELOOSE', "(?:-?(".concat(src[t.PRERELEASEIDENTIFIERLOOSE], "(?:\\.").concat(src[t.PRERELEASEIDENTIFIERLOOSE], ")*))"));
27396
+
27397
+ // ## Build Metadata Identifier
27398
+ // Any combination of digits, letters, or hyphens.
27399
+
27400
+ createToken('BUILDIDENTIFIER', "".concat(LETTERDASHNUMBER, "+"));
27401
+
27402
+ // ## Build Metadata
27403
+ // Plus sign, followed by one or more period-separated build metadata
27404
+ // identifiers.
27405
+
27406
+ createToken('BUILD', "(?:\\+(".concat(src[t.BUILDIDENTIFIER], "(?:\\.").concat(src[t.BUILDIDENTIFIER], ")*))"));
27407
+
27408
+ // ## Full Version String
27409
+ // A main version, followed optionally by a pre-release version and
27410
+ // build metadata.
27411
+
27412
+ // Note that the only major, minor, patch, and pre-release sections of
27413
+ // the version string are capturing groups. The build metadata is not a
27414
+ // capturing group, because it should not ever be used in version
27415
+ // comparison.
27416
+
27417
+ createToken('FULLPLAIN', "v?".concat(src[t.MAINVERSION]).concat(src[t.PRERELEASE], "?").concat(src[t.BUILD], "?"));
27418
+ createToken('FULL', "^".concat(src[t.FULLPLAIN], "$"));
27419
+
27420
+ // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
27421
+ // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
27422
+ // common in the npm registry.
27423
+ createToken('LOOSEPLAIN', "[v=\\s]*".concat(src[t.MAINVERSIONLOOSE]).concat(src[t.PRERELEASELOOSE], "?").concat(src[t.BUILD], "?"));
27424
+ createToken('LOOSE', "^".concat(src[t.LOOSEPLAIN], "$"));
27425
+ createToken('GTLT', '((?:<|>)?=?)');
27426
+
27427
+ // Something like "2.*" or "1.2.x".
27428
+ // Note that "x.x" is a valid xRange identifer, meaning "any version"
27429
+ // Only the first item is strictly required.
27430
+ createToken('XRANGEIDENTIFIERLOOSE', "".concat(src[t.NUMERICIDENTIFIERLOOSE], "|x|X|\\*"));
27431
+ createToken('XRANGEIDENTIFIER', "".concat(src[t.NUMERICIDENTIFIER], "|x|X|\\*"));
27432
+ createToken('XRANGEPLAIN', "[v=\\s]*(".concat(src[t.XRANGEIDENTIFIER], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIER], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIER], ")") + "(?:".concat(src[t.PRERELEASE], ")?").concat(src[t.BUILD], "?") + ")?)?");
27433
+ createToken('XRANGEPLAINLOOSE', "[v=\\s]*(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:".concat(src[t.PRERELEASELOOSE], ")?").concat(src[t.BUILD], "?") + ")?)?");
27434
+ createToken('XRANGE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAIN], "$"));
27435
+ createToken('XRANGELOOSE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAINLOOSE], "$"));
27436
+
27437
+ // Coercion.
27438
+ // Extract anything that could conceivably be a part of a valid semver
27439
+ createToken('COERCEPLAIN', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?"));
27440
+ createToken('COERCE', "".concat(src[t.COERCEPLAIN], "(?:$|[^\\d])"));
27441
+ createToken('COERCEFULL', src[t.COERCEPLAIN] + "(?:".concat(src[t.PRERELEASE], ")?") + "(?:".concat(src[t.BUILD], ")?") + "(?:$|[^\\d])");
27442
+ createToken('COERCERTL', src[t.COERCE], true);
27443
+ createToken('COERCERTLFULL', src[t.COERCEFULL], true);
27444
+
27445
+ // Tilde ranges.
27446
+ // Meaning is "reasonably at or greater than"
27447
+ createToken('LONETILDE', '(?:~>?)');
27448
+ createToken('TILDETRIM', "(\\s*)".concat(src[t.LONETILDE], "\\s+"), true);
27449
+ exports.tildeTrimReplace = '$1~';
27450
+ createToken('TILDE', "^".concat(src[t.LONETILDE]).concat(src[t.XRANGEPLAIN], "$"));
27451
+ createToken('TILDELOOSE', "^".concat(src[t.LONETILDE]).concat(src[t.XRANGEPLAINLOOSE], "$"));
27452
+
27453
+ // Caret ranges.
27454
+ // Meaning is "at least and backwards compatible with"
27455
+ createToken('LONECARET', '(?:\\^)');
27456
+ createToken('CARETTRIM', "(\\s*)".concat(src[t.LONECARET], "\\s+"), true);
27457
+ exports.caretTrimReplace = '$1^';
27458
+ createToken('CARET', "^".concat(src[t.LONECARET]).concat(src[t.XRANGEPLAIN], "$"));
27459
+ createToken('CARETLOOSE', "^".concat(src[t.LONECARET]).concat(src[t.XRANGEPLAINLOOSE], "$"));
27460
+
27461
+ // A simple gt/lt/eq thing, or just "" to indicate "any version"
27462
+ createToken('COMPARATORLOOSE', "^".concat(src[t.GTLT], "\\s*(").concat(src[t.LOOSEPLAIN], ")$|^$"));
27463
+ createToken('COMPARATOR', "^".concat(src[t.GTLT], "\\s*(").concat(src[t.FULLPLAIN], ")$|^$"));
27464
+
27465
+ // An expression to strip any whitespace between the gtlt and the thing
27466
+ // it modifies, so that `> 1.2.3` ==> `>1.2.3`
27467
+ createToken('COMPARATORTRIM', "(\\s*)".concat(src[t.GTLT], "\\s*(").concat(src[t.LOOSEPLAIN], "|").concat(src[t.XRANGEPLAIN], ")"), true);
27468
+ exports.comparatorTrimReplace = '$1$2$3';
27469
+
27470
+ // Something like `1.2.3 - 1.2.4`
27471
+ // Note that these all use the loose form, because they'll be
27472
+ // checked against either the strict or loose comparator form
27473
+ // later.
27474
+ createToken('HYPHENRANGE', "^\\s*(".concat(src[t.XRANGEPLAIN], ")") + "\\s+-\\s+" + "(".concat(src[t.XRANGEPLAIN], ")") + "\\s*$");
27475
+ createToken('HYPHENRANGELOOSE', "^\\s*(".concat(src[t.XRANGEPLAINLOOSE], ")") + "\\s+-\\s+" + "(".concat(src[t.XRANGEPLAINLOOSE], ")") + "\\s*$");
27476
+
27477
+ // Star ranges basically just allow anything at all.
27478
+ createToken('STAR', '(<|>)?=?\\s*\\*');
27479
+ // >=0.0.0 is like a star
27480
+ createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$');
27481
+ createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$');
27482
+ })(re$1, re$1.exports);
27373
27483
  var reExports = re$1.exports;
27374
27484
 
27375
27485
  const numeric = /^[0-9]+$/;
27376
27486
  const compareIdentifiers$1 = (a, b) => {
27377
27487
  const anum = numeric.test(a);
27378
27488
  const bnum = numeric.test(b);
27379
-
27380
27489
  if (anum && bnum) {
27381
27490
  a = +a;
27382
27491
  b = +b;
27383
27492
  }
27384
-
27385
- return a === b ? 0
27386
- : (anum && !bnum) ? -1
27387
- : (bnum && !anum) ? 1
27388
- : a < b ? -1
27389
- : 1
27493
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
27390
27494
  };
27391
-
27392
27495
  const rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);
27393
-
27394
27496
  var identifiers = {
27395
27497
  compareIdentifiers: compareIdentifiers$1,
27396
- rcompareIdentifiers,
27498
+ rcompareIdentifiers
27397
27499
  };
27398
27500
 
27399
27501
  const debug = debug_1;
27400
- const { MAX_LENGTH, MAX_SAFE_INTEGER } = constants;
27401
- const { safeRe: re, t } = reExports;
27402
-
27502
+ const {
27503
+ MAX_LENGTH,
27504
+ MAX_SAFE_INTEGER
27505
+ } = constants;
27506
+ const {
27507
+ safeRe: re,
27508
+ t
27509
+ } = reExports;
27403
27510
  const parseOptions = parseOptions_1;
27404
- const { compareIdentifiers } = identifiers;
27511
+ const {
27512
+ compareIdentifiers
27513
+ } = identifiers;
27405
27514
  let SemVer$1 = class SemVer {
27406
- constructor (version, options) {
27515
+ constructor(version, options) {
27407
27516
  options = parseOptions(options);
27408
-
27409
27517
  if (version instanceof SemVer) {
27410
- if (version.loose === !!options.loose &&
27411
- version.includePrerelease === !!options.includePrerelease) {
27412
- return version
27518
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
27519
+ return version;
27413
27520
  } else {
27414
27521
  version = version.version;
27415
27522
  }
27416
27523
  } else if (typeof version !== 'string') {
27417
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
27524
+ throw new TypeError("Invalid version. Must be a string. Got type \"".concat(typeof version, "\"."));
27418
27525
  }
27419
-
27420
27526
  if (version.length > MAX_LENGTH) {
27421
- throw new TypeError(
27422
- `version is longer than ${MAX_LENGTH} characters`
27423
- )
27527
+ throw new TypeError("version is longer than ".concat(MAX_LENGTH, " characters"));
27424
27528
  }
27425
-
27426
27529
  debug('SemVer', version, options);
27427
27530
  this.options = options;
27428
27531
  this.loose = !!options.loose;
27429
27532
  // this isn't actually relevant for versions, but keep it so that we
27430
27533
  // don't run into trouble passing this.options around.
27431
27534
  this.includePrerelease = !!options.includePrerelease;
27432
-
27433
27535
  const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
27434
-
27435
27536
  if (!m) {
27436
- throw new TypeError(`Invalid Version: ${version}`)
27537
+ throw new TypeError("Invalid Version: ".concat(version));
27437
27538
  }
27438
-
27439
27539
  this.raw = version;
27440
27540
 
27441
27541
  // these are actually numbers
27442
27542
  this.major = +m[1];
27443
27543
  this.minor = +m[2];
27444
27544
  this.patch = +m[3];
27445
-
27446
27545
  if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
27447
- throw new TypeError('Invalid major version')
27546
+ throw new TypeError('Invalid major version');
27448
27547
  }
27449
-
27450
27548
  if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
27451
- throw new TypeError('Invalid minor version')
27549
+ throw new TypeError('Invalid minor version');
27452
27550
  }
27453
-
27454
27551
  if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
27455
- throw new TypeError('Invalid patch version')
27552
+ throw new TypeError('Invalid patch version');
27456
27553
  }
27457
27554
 
27458
27555
  // numberify any prerelease numeric ids
27459
27556
  if (!m[4]) {
27460
27557
  this.prerelease = [];
27461
27558
  } else {
27462
- this.prerelease = m[4].split('.').map((id) => {
27559
+ this.prerelease = m[4].split('.').map(id => {
27463
27560
  if (/^[0-9]+$/.test(id)) {
27464
27561
  const num = +id;
27465
27562
  if (num >= 0 && num < MAX_SAFE_INTEGER) {
27466
- return num
27563
+ return num;
27467
27564
  }
27468
27565
  }
27469
- return id
27566
+ return id;
27470
27567
  });
27471
27568
  }
27472
-
27473
27569
  this.build = m[5] ? m[5].split('.') : [];
27474
27570
  this.format();
27475
27571
  }
27476
-
27477
- format () {
27478
- this.version = `${this.major}.${this.minor}.${this.patch}`;
27572
+ format() {
27573
+ this.version = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
27479
27574
  if (this.prerelease.length) {
27480
- this.version += `-${this.prerelease.join('.')}`;
27575
+ this.version += "-".concat(this.prerelease.join('.'));
27481
27576
  }
27482
- return this.version
27577
+ return this.version;
27483
27578
  }
27484
-
27485
- toString () {
27486
- return this.version
27579
+ toString() {
27580
+ return this.version;
27487
27581
  }
27488
-
27489
- compare (other) {
27582
+ compare(other) {
27490
27583
  debug('SemVer.compare', this.version, this.options, other);
27491
27584
  if (!(other instanceof SemVer)) {
27492
27585
  if (typeof other === 'string' && other === this.version) {
27493
- return 0
27586
+ return 0;
27494
27587
  }
27495
27588
  other = new SemVer(other, this.options);
27496
27589
  }
27497
-
27498
27590
  if (other.version === this.version) {
27499
- return 0
27591
+ return 0;
27500
27592
  }
27501
-
27502
- return this.compareMain(other) || this.comparePre(other)
27593
+ return this.compareMain(other) || this.comparePre(other);
27503
27594
  }
27504
-
27505
- compareMain (other) {
27595
+ compareMain(other) {
27506
27596
  if (!(other instanceof SemVer)) {
27507
27597
  other = new SemVer(other, this.options);
27508
27598
  }
27509
-
27510
- return (
27511
- compareIdentifiers(this.major, other.major) ||
27512
- compareIdentifiers(this.minor, other.minor) ||
27513
- compareIdentifiers(this.patch, other.patch)
27514
- )
27599
+ return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
27515
27600
  }
27516
-
27517
- comparePre (other) {
27601
+ comparePre(other) {
27518
27602
  if (!(other instanceof SemVer)) {
27519
27603
  other = new SemVer(other, this.options);
27520
27604
  }
27521
27605
 
27522
27606
  // NOT having a prerelease is > having one
27523
27607
  if (this.prerelease.length && !other.prerelease.length) {
27524
- return -1
27608
+ return -1;
27525
27609
  } else if (!this.prerelease.length && other.prerelease.length) {
27526
- return 1
27610
+ return 1;
27527
27611
  } else if (!this.prerelease.length && !other.prerelease.length) {
27528
- return 0
27612
+ return 0;
27529
27613
  }
27530
-
27531
27614
  let i = 0;
27532
27615
  do {
27533
27616
  const a = this.prerelease[i];
27534
27617
  const b = other.prerelease[i];
27535
27618
  debug('prerelease compare', i, a, b);
27536
27619
  if (a === undefined && b === undefined) {
27537
- return 0
27620
+ return 0;
27538
27621
  } else if (b === undefined) {
27539
- return 1
27622
+ return 1;
27540
27623
  } else if (a === undefined) {
27541
- return -1
27624
+ return -1;
27542
27625
  } else if (a === b) {
27543
- continue
27626
+ continue;
27544
27627
  } else {
27545
- return compareIdentifiers(a, b)
27628
+ return compareIdentifiers(a, b);
27546
27629
  }
27547
- } while (++i)
27630
+ } while (++i);
27548
27631
  }
27549
-
27550
- compareBuild (other) {
27632
+ compareBuild(other) {
27551
27633
  if (!(other instanceof SemVer)) {
27552
27634
  other = new SemVer(other, this.options);
27553
27635
  }
27554
-
27555
27636
  let i = 0;
27556
27637
  do {
27557
27638
  const a = this.build[i];
27558
27639
  const b = other.build[i];
27559
27640
  debug('build compare', i, a, b);
27560
27641
  if (a === undefined && b === undefined) {
27561
- return 0
27642
+ return 0;
27562
27643
  } else if (b === undefined) {
27563
- return 1
27644
+ return 1;
27564
27645
  } else if (a === undefined) {
27565
- return -1
27646
+ return -1;
27566
27647
  } else if (a === b) {
27567
- continue
27648
+ continue;
27568
27649
  } else {
27569
- return compareIdentifiers(a, b)
27650
+ return compareIdentifiers(a, b);
27570
27651
  }
27571
- } while (++i)
27652
+ } while (++i);
27572
27653
  }
27573
27654
 
27574
27655
  // preminor will bump the version up to the next minor release, and immediately
27575
27656
  // down to pre-release. premajor and prepatch work the same way.
27576
- inc (release, identifier, identifierBase) {
27657
+ inc(release, identifier, identifierBase) {
27577
27658
  switch (release) {
27578
27659
  case 'premajor':
27579
27660
  this.prerelease.length = 0;
@@ -27581,13 +27662,13 @@ let SemVer$1 = class SemVer {
27581
27662
  this.minor = 0;
27582
27663
  this.major++;
27583
27664
  this.inc('pre', identifier, identifierBase);
27584
- break
27665
+ break;
27585
27666
  case 'preminor':
27586
27667
  this.prerelease.length = 0;
27587
27668
  this.patch = 0;
27588
27669
  this.minor++;
27589
27670
  this.inc('pre', identifier, identifierBase);
27590
- break
27671
+ break;
27591
27672
  case 'prepatch':
27592
27673
  // If this is already a prerelease, it will bump to the next version
27593
27674
  // drop any prereleases that might already exist, since they are not
@@ -27595,7 +27676,7 @@ let SemVer$1 = class SemVer {
27595
27676
  this.prerelease.length = 0;
27596
27677
  this.inc('patch', identifier, identifierBase);
27597
27678
  this.inc('pre', identifier, identifierBase);
27598
- break
27679
+ break;
27599
27680
  // If the input is a non-prerelease version, this acts the same as
27600
27681
  // prepatch.
27601
27682
  case 'prerelease':
@@ -27603,24 +27684,19 @@ let SemVer$1 = class SemVer {
27603
27684
  this.inc('patch', identifier, identifierBase);
27604
27685
  }
27605
27686
  this.inc('pre', identifier, identifierBase);
27606
- break
27607
-
27687
+ break;
27608
27688
  case 'major':
27609
27689
  // If this is a pre-major version, bump up to the same major version.
27610
27690
  // Otherwise increment major.
27611
27691
  // 1.0.0-5 bumps to 1.0.0
27612
27692
  // 1.1.0 bumps to 2.0.0
27613
- if (
27614
- this.minor !== 0 ||
27615
- this.patch !== 0 ||
27616
- this.prerelease.length === 0
27617
- ) {
27693
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
27618
27694
  this.major++;
27619
27695
  }
27620
27696
  this.minor = 0;
27621
27697
  this.patch = 0;
27622
27698
  this.prerelease = [];
27623
- break
27699
+ break;
27624
27700
  case 'minor':
27625
27701
  // If this is a pre-minor version, bump up to the same minor version.
27626
27702
  // Otherwise increment minor.
@@ -27631,7 +27707,7 @@ let SemVer$1 = class SemVer {
27631
27707
  }
27632
27708
  this.patch = 0;
27633
27709
  this.prerelease = [];
27634
- break
27710
+ break;
27635
27711
  case 'patch':
27636
27712
  // If this is not a pre-release version, it will increment the patch.
27637
27713
  // If it is a pre-release it will bump up to the same patch version.
@@ -27641,68 +27717,64 @@ let SemVer$1 = class SemVer {
27641
27717
  this.patch++;
27642
27718
  }
27643
27719
  this.prerelease = [];
27644
- break
27720
+ break;
27645
27721
  // This probably shouldn't be used publicly.
27646
27722
  // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
27647
- case 'pre': {
27648
- const base = Number(identifierBase) ? 1 : 0;
27649
-
27650
- if (!identifier && identifierBase === false) {
27651
- throw new Error('invalid increment argument: identifier is empty')
27652
- }
27653
-
27654
- if (this.prerelease.length === 0) {
27655
- this.prerelease = [base];
27656
- } else {
27657
- let i = this.prerelease.length;
27658
- while (--i >= 0) {
27659
- if (typeof this.prerelease[i] === 'number') {
27660
- this.prerelease[i]++;
27661
- i = -2;
27662
- }
27723
+ case 'pre':
27724
+ {
27725
+ const base = Number(identifierBase) ? 1 : 0;
27726
+ if (!identifier && identifierBase === false) {
27727
+ throw new Error('invalid increment argument: identifier is empty');
27663
27728
  }
27664
- if (i === -1) {
27665
- // didn't increment anything
27666
- if (identifier === this.prerelease.join('.') && identifierBase === false) {
27667
- throw new Error('invalid increment argument: identifier already exists')
27729
+ if (this.prerelease.length === 0) {
27730
+ this.prerelease = [base];
27731
+ } else {
27732
+ let i = this.prerelease.length;
27733
+ while (--i >= 0) {
27734
+ if (typeof this.prerelease[i] === 'number') {
27735
+ this.prerelease[i]++;
27736
+ i = -2;
27737
+ }
27738
+ }
27739
+ if (i === -1) {
27740
+ // didn't increment anything
27741
+ if (identifier === this.prerelease.join('.') && identifierBase === false) {
27742
+ throw new Error('invalid increment argument: identifier already exists');
27743
+ }
27744
+ this.prerelease.push(base);
27668
27745
  }
27669
- this.prerelease.push(base);
27670
- }
27671
- }
27672
- if (identifier) {
27673
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
27674
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
27675
- let prerelease = [identifier, base];
27676
- if (identifierBase === false) {
27677
- prerelease = [identifier];
27678
27746
  }
27679
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
27680
- if (isNaN(this.prerelease[1])) {
27747
+ if (identifier) {
27748
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
27749
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
27750
+ let prerelease = [identifier, base];
27751
+ if (identifierBase === false) {
27752
+ prerelease = [identifier];
27753
+ }
27754
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
27755
+ if (isNaN(this.prerelease[1])) {
27756
+ this.prerelease = prerelease;
27757
+ }
27758
+ } else {
27681
27759
  this.prerelease = prerelease;
27682
27760
  }
27683
- } else {
27684
- this.prerelease = prerelease;
27685
27761
  }
27762
+ break;
27686
27763
  }
27687
- break
27688
- }
27689
27764
  default:
27690
- throw new Error(`invalid increment argument: ${release}`)
27765
+ throw new Error("invalid increment argument: ".concat(release));
27691
27766
  }
27692
27767
  this.raw = this.format();
27693
27768
  if (this.build.length) {
27694
- this.raw += `+${this.build.join('.')}`;
27769
+ this.raw += "+".concat(this.build.join('.'));
27695
27770
  }
27696
- return this
27771
+ return this;
27697
27772
  }
27698
27773
  };
27699
-
27700
27774
  var semver = SemVer$1;
27701
27775
 
27702
27776
  const SemVer = semver;
27703
- const compare$6 = (a, b, loose) =>
27704
- new SemVer(a, loose).compare(new SemVer(b, loose));
27705
-
27777
+ const compare$6 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
27706
27778
  var compare_1 = compare$6;
27707
27779
 
27708
27780
  const compare$5 = compare_1;
@@ -27735,7 +27807,6 @@ const gt = gt_1;
27735
27807
  const gte = gte_1;
27736
27808
  const lt = lt_1;
27737
27809
  const lte = lte_1;
27738
-
27739
27810
  const cmp = (a, op, b, loose) => {
27740
27811
  switch (op) {
27741
27812
  case '===':
@@ -27745,8 +27816,7 @@ const cmp = (a, op, b, loose) => {
27745
27816
  if (typeof b === 'object') {
27746
27817
  b = b.version;
27747
27818
  }
27748
- return a === b
27749
-
27819
+ return a === b;
27750
27820
  case '!==':
27751
27821
  if (typeof a === 'object') {
27752
27822
  a = a.version;
@@ -27754,731 +27824,628 @@ const cmp = (a, op, b, loose) => {
27754
27824
  if (typeof b === 'object') {
27755
27825
  b = b.version;
27756
27826
  }
27757
- return a !== b
27758
-
27827
+ return a !== b;
27759
27828
  case '':
27760
27829
  case '=':
27761
27830
  case '==':
27762
- return eq(a, b, loose)
27763
-
27831
+ return eq(a, b, loose);
27764
27832
  case '!=':
27765
- return neq(a, b, loose)
27766
-
27833
+ return neq(a, b, loose);
27767
27834
  case '>':
27768
- return gt(a, b, loose)
27769
-
27835
+ return gt(a, b, loose);
27770
27836
  case '>=':
27771
- return gte(a, b, loose)
27772
-
27837
+ return gte(a, b, loose);
27773
27838
  case '<':
27774
- return lt(a, b, loose)
27775
-
27839
+ return lt(a, b, loose);
27776
27840
  case '<=':
27777
- return lte(a, b, loose)
27778
-
27841
+ return lte(a, b, loose);
27779
27842
  default:
27780
- throw new TypeError(`Invalid operator: ${op}`)
27843
+ throw new TypeError("Invalid operator: ".concat(op));
27781
27844
  }
27782
27845
  };
27783
27846
  var cmp_1 = cmp;
27784
27847
 
27785
27848
  var comparator;
27786
27849
  var hasRequiredComparator;
27850
+ function requireComparator() {
27851
+ if (hasRequiredComparator) return comparator;
27852
+ hasRequiredComparator = 1;
27853
+ const ANY = Symbol('SemVer ANY');
27854
+ // hoisted class for cyclic dependency
27855
+ class Comparator {
27856
+ static get ANY() {
27857
+ return ANY;
27858
+ }
27859
+ constructor(comp, options) {
27860
+ options = parseOptions(options);
27861
+ if (comp instanceof Comparator) {
27862
+ if (comp.loose === !!options.loose) {
27863
+ return comp;
27864
+ } else {
27865
+ comp = comp.value;
27866
+ }
27867
+ }
27868
+ comp = comp.trim().split(/\s+/).join(' ');
27869
+ debug('comparator', comp, options);
27870
+ this.options = options;
27871
+ this.loose = !!options.loose;
27872
+ this.parse(comp);
27873
+ if (this.semver === ANY) {
27874
+ this.value = '';
27875
+ } else {
27876
+ this.value = this.operator + this.semver.version;
27877
+ }
27878
+ debug('comp', this);
27879
+ }
27880
+ parse(comp) {
27881
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
27882
+ const m = comp.match(r);
27883
+ if (!m) {
27884
+ throw new TypeError("Invalid comparator: ".concat(comp));
27885
+ }
27886
+ this.operator = m[1] !== undefined ? m[1] : '';
27887
+ if (this.operator === '=') {
27888
+ this.operator = '';
27889
+ }
27787
27890
 
27788
- function requireComparator () {
27789
- if (hasRequiredComparator) return comparator;
27790
- hasRequiredComparator = 1;
27791
- const ANY = Symbol('SemVer ANY');
27792
- // hoisted class for cyclic dependency
27793
- class Comparator {
27794
- static get ANY () {
27795
- return ANY
27796
- }
27797
-
27798
- constructor (comp, options) {
27799
- options = parseOptions(options);
27800
-
27801
- if (comp instanceof Comparator) {
27802
- if (comp.loose === !!options.loose) {
27803
- return comp
27804
- } else {
27805
- comp = comp.value;
27806
- }
27807
- }
27808
-
27809
- comp = comp.trim().split(/\s+/).join(' ');
27810
- debug('comparator', comp, options);
27811
- this.options = options;
27812
- this.loose = !!options.loose;
27813
- this.parse(comp);
27814
-
27815
- if (this.semver === ANY) {
27816
- this.value = '';
27817
- } else {
27818
- this.value = this.operator + this.semver.version;
27819
- }
27820
-
27821
- debug('comp', this);
27822
- }
27823
-
27824
- parse (comp) {
27825
- const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
27826
- const m = comp.match(r);
27827
-
27828
- if (!m) {
27829
- throw new TypeError(`Invalid comparator: ${comp}`)
27830
- }
27831
-
27832
- this.operator = m[1] !== undefined ? m[1] : '';
27833
- if (this.operator === '=') {
27834
- this.operator = '';
27835
- }
27836
-
27837
- // if it literally is just '>' or '' then allow anything.
27838
- if (!m[2]) {
27839
- this.semver = ANY;
27840
- } else {
27841
- this.semver = new SemVer(m[2], this.options.loose);
27842
- }
27843
- }
27844
-
27845
- toString () {
27846
- return this.value
27847
- }
27848
-
27849
- test (version) {
27850
- debug('Comparator.test', version, this.options.loose);
27851
-
27852
- if (this.semver === ANY || version === ANY) {
27853
- return true
27854
- }
27855
-
27856
- if (typeof version === 'string') {
27857
- try {
27858
- version = new SemVer(version, this.options);
27859
- } catch (er) {
27860
- return false
27861
- }
27862
- }
27863
-
27864
- return cmp(version, this.operator, this.semver, this.options)
27865
- }
27866
-
27867
- intersects (comp, options) {
27868
- if (!(comp instanceof Comparator)) {
27869
- throw new TypeError('a Comparator is required')
27870
- }
27871
-
27872
- if (this.operator === '') {
27873
- if (this.value === '') {
27874
- return true
27875
- }
27876
- return new Range(comp.value, options).test(this.value)
27877
- } else if (comp.operator === '') {
27878
- if (comp.value === '') {
27879
- return true
27880
- }
27881
- return new Range(this.value, options).test(comp.semver)
27882
- }
27883
-
27884
- options = parseOptions(options);
27885
-
27886
- // Special cases where nothing can possibly be lower
27887
- if (options.includePrerelease &&
27888
- (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
27889
- return false
27890
- }
27891
- if (!options.includePrerelease &&
27892
- (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
27893
- return false
27894
- }
27895
-
27896
- // Same direction increasing (> or >=)
27897
- if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
27898
- return true
27899
- }
27900
- // Same direction decreasing (< or <=)
27901
- if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
27902
- return true
27903
- }
27904
- // same SemVer and both sides are inclusive (<= or >=)
27905
- if (
27906
- (this.semver.version === comp.semver.version) &&
27907
- this.operator.includes('=') && comp.operator.includes('=')) {
27908
- return true
27909
- }
27910
- // opposite directions less than
27911
- if (cmp(this.semver, '<', comp.semver, options) &&
27912
- this.operator.startsWith('>') && comp.operator.startsWith('<')) {
27913
- return true
27914
- }
27915
- // opposite directions greater than
27916
- if (cmp(this.semver, '>', comp.semver, options) &&
27917
- this.operator.startsWith('<') && comp.operator.startsWith('>')) {
27918
- return true
27919
- }
27920
- return false
27921
- }
27922
- }
27891
+ // if it literally is just '>' or '' then allow anything.
27892
+ if (!m[2]) {
27893
+ this.semver = ANY;
27894
+ } else {
27895
+ this.semver = new SemVer(m[2], this.options.loose);
27896
+ }
27897
+ }
27898
+ toString() {
27899
+ return this.value;
27900
+ }
27901
+ test(version) {
27902
+ debug('Comparator.test', version, this.options.loose);
27903
+ if (this.semver === ANY || version === ANY) {
27904
+ return true;
27905
+ }
27906
+ if (typeof version === 'string') {
27907
+ try {
27908
+ version = new SemVer(version, this.options);
27909
+ } catch (er) {
27910
+ return false;
27911
+ }
27912
+ }
27913
+ return cmp(version, this.operator, this.semver, this.options);
27914
+ }
27915
+ intersects(comp, options) {
27916
+ if (!(comp instanceof Comparator)) {
27917
+ throw new TypeError('a Comparator is required');
27918
+ }
27919
+ if (this.operator === '') {
27920
+ if (this.value === '') {
27921
+ return true;
27922
+ }
27923
+ return new Range(comp.value, options).test(this.value);
27924
+ } else if (comp.operator === '') {
27925
+ if (comp.value === '') {
27926
+ return true;
27927
+ }
27928
+ return new Range(this.value, options).test(comp.semver);
27929
+ }
27930
+ options = parseOptions(options);
27923
27931
 
27924
- comparator = Comparator;
27932
+ // Special cases where nothing can possibly be lower
27933
+ if (options.includePrerelease && (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
27934
+ return false;
27935
+ }
27936
+ if (!options.includePrerelease && (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
27937
+ return false;
27938
+ }
27925
27939
 
27926
- const parseOptions = parseOptions_1;
27927
- const { safeRe: re, t } = reExports;
27928
- const cmp = cmp_1;
27929
- const debug = debug_1;
27930
- const SemVer = semver;
27931
- const Range = requireRange();
27932
- return comparator;
27940
+ // Same direction increasing (> or >=)
27941
+ if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
27942
+ return true;
27943
+ }
27944
+ // Same direction decreasing (< or <=)
27945
+ if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
27946
+ return true;
27947
+ }
27948
+ // same SemVer and both sides are inclusive (<= or >=)
27949
+ if (this.semver.version === comp.semver.version && this.operator.includes('=') && comp.operator.includes('=')) {
27950
+ return true;
27951
+ }
27952
+ // opposite directions less than
27953
+ if (cmp(this.semver, '<', comp.semver, options) && this.operator.startsWith('>') && comp.operator.startsWith('<')) {
27954
+ return true;
27955
+ }
27956
+ // opposite directions greater than
27957
+ if (cmp(this.semver, '>', comp.semver, options) && this.operator.startsWith('<') && comp.operator.startsWith('>')) {
27958
+ return true;
27959
+ }
27960
+ return false;
27961
+ }
27962
+ }
27963
+ comparator = Comparator;
27964
+ const parseOptions = parseOptions_1;
27965
+ const {
27966
+ safeRe: re,
27967
+ t
27968
+ } = reExports;
27969
+ const cmp = cmp_1;
27970
+ const debug = debug_1;
27971
+ const SemVer = semver;
27972
+ const Range = requireRange();
27973
+ return comparator;
27933
27974
  }
27934
27975
 
27935
27976
  var range;
27936
27977
  var hasRequiredRange;
27978
+ function requireRange() {
27979
+ if (hasRequiredRange) return range;
27980
+ hasRequiredRange = 1;
27981
+ const SPACE_CHARACTERS = /\s+/g;
27982
+
27983
+ // hoisted class for cyclic dependency
27984
+ class Range {
27985
+ constructor(range, options) {
27986
+ options = parseOptions(options);
27987
+ if (range instanceof Range) {
27988
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
27989
+ return range;
27990
+ } else {
27991
+ return new Range(range.raw, options);
27992
+ }
27993
+ }
27994
+ if (range instanceof Comparator) {
27995
+ // just put it in the set and return
27996
+ this.raw = range.value;
27997
+ this.set = [[range]];
27998
+ this.formatted = undefined;
27999
+ return this;
28000
+ }
28001
+ this.options = options;
28002
+ this.loose = !!options.loose;
28003
+ this.includePrerelease = !!options.includePrerelease;
28004
+
28005
+ // First reduce all whitespace as much as possible so we do not have to rely
28006
+ // on potentially slow regexes like \s*. This is then stored and used for
28007
+ // future error messages as well.
28008
+ this.raw = range.trim().replace(SPACE_CHARACTERS, ' ');
28009
+
28010
+ // First, split on ||
28011
+ this.set = this.raw.split('||')
28012
+ // map the range to a 2d array of comparators
28013
+ .map(r => this.parseRange(r.trim()))
28014
+ // throw out any comparator lists that are empty
28015
+ // this generally means that it was not a valid range, which is allowed
28016
+ // in loose mode, but will still throw if the WHOLE range is invalid.
28017
+ .filter(c => c.length);
28018
+ if (!this.set.length) {
28019
+ throw new TypeError("Invalid SemVer Range: ".concat(this.raw));
28020
+ }
28021
+
28022
+ // if we have any that are not the null set, throw out null sets.
28023
+ if (this.set.length > 1) {
28024
+ // keep the first one, in case they're all null sets
28025
+ const first = this.set[0];
28026
+ this.set = this.set.filter(c => !isNullSet(c[0]));
28027
+ if (this.set.length === 0) {
28028
+ this.set = [first];
28029
+ } else if (this.set.length > 1) {
28030
+ // if we have any that are *, then the range is just *
28031
+ for (const c of this.set) {
28032
+ if (c.length === 1 && isAny(c[0])) {
28033
+ this.set = [c];
28034
+ break;
28035
+ }
28036
+ }
28037
+ }
28038
+ }
28039
+ this.formatted = undefined;
28040
+ }
28041
+ get range() {
28042
+ if (this.formatted === undefined) {
28043
+ this.formatted = '';
28044
+ for (let i = 0; i < this.set.length; i++) {
28045
+ if (i > 0) {
28046
+ this.formatted += '||';
28047
+ }
28048
+ const comps = this.set[i];
28049
+ for (let k = 0; k < comps.length; k++) {
28050
+ if (k > 0) {
28051
+ this.formatted += ' ';
28052
+ }
28053
+ this.formatted += comps[k].toString().trim();
28054
+ }
28055
+ }
28056
+ }
28057
+ return this.formatted;
28058
+ }
28059
+ format() {
28060
+ return this.range;
28061
+ }
28062
+ toString() {
28063
+ return this.range;
28064
+ }
28065
+ parseRange(range) {
28066
+ // memoize range parsing for performance.
28067
+ // this is a very hot path, and fully deterministic.
28068
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
28069
+ const memoKey = memoOpts + ':' + range;
28070
+ const cached = cache.get(memoKey);
28071
+ if (cached) {
28072
+ return cached;
28073
+ }
28074
+ const loose = this.options.loose;
28075
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
28076
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
28077
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
28078
+ debug('hyphen replace', range);
28079
+
28080
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
28081
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
28082
+ debug('comparator trim', range);
28083
+
28084
+ // `~ 1.2.3` => `~1.2.3`
28085
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
28086
+ debug('tilde trim', range);
28087
+
28088
+ // `^ 1.2.3` => `^1.2.3`
28089
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
28090
+ debug('caret trim', range);
28091
+
28092
+ // At this point, the range is completely trimmed and
28093
+ // ready to be split into comparators.
28094
+
28095
+ let rangeList = range.split(' ').map(comp => parseComparator(comp, this.options)).join(' ').split(/\s+/)
28096
+ // >=0.0.0 is equivalent to *
28097
+ .map(comp => replaceGTE0(comp, this.options));
28098
+ if (loose) {
28099
+ // in loose mode, throw out any that are not valid comparators
28100
+ rangeList = rangeList.filter(comp => {
28101
+ debug('loose invalid filter', comp, this.options);
28102
+ return !!comp.match(re[t.COMPARATORLOOSE]);
28103
+ });
28104
+ }
28105
+ debug('range list', rangeList);
27937
28106
 
27938
- function requireRange () {
27939
- if (hasRequiredRange) return range;
27940
- hasRequiredRange = 1;
27941
- // hoisted class for cyclic dependency
27942
- class Range {
27943
- constructor (range, options) {
27944
- options = parseOptions(options);
27945
-
27946
- if (range instanceof Range) {
27947
- if (
27948
- range.loose === !!options.loose &&
27949
- range.includePrerelease === !!options.includePrerelease
27950
- ) {
27951
- return range
27952
- } else {
27953
- return new Range(range.raw, options)
27954
- }
27955
- }
27956
-
27957
- if (range instanceof Comparator) {
27958
- // just put it in the set and return
27959
- this.raw = range.value;
27960
- this.set = [[range]];
27961
- this.format();
27962
- return this
27963
- }
27964
-
27965
- this.options = options;
27966
- this.loose = !!options.loose;
27967
- this.includePrerelease = !!options.includePrerelease;
27968
-
27969
- // First reduce all whitespace as much as possible so we do not have to rely
27970
- // on potentially slow regexes like \s*. This is then stored and used for
27971
- // future error messages as well.
27972
- this.raw = range
27973
- .trim()
27974
- .split(/\s+/)
27975
- .join(' ');
27976
-
27977
- // First, split on ||
27978
- this.set = this.raw
27979
- .split('||')
27980
- // map the range to a 2d array of comparators
27981
- .map(r => this.parseRange(r.trim()))
27982
- // throw out any comparator lists that are empty
27983
- // this generally means that it was not a valid range, which is allowed
27984
- // in loose mode, but will still throw if the WHOLE range is invalid.
27985
- .filter(c => c.length);
27986
-
27987
- if (!this.set.length) {
27988
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
27989
- }
27990
-
27991
- // if we have any that are not the null set, throw out null sets.
27992
- if (this.set.length > 1) {
27993
- // keep the first one, in case they're all null sets
27994
- const first = this.set[0];
27995
- this.set = this.set.filter(c => !isNullSet(c[0]));
27996
- if (this.set.length === 0) {
27997
- this.set = [first];
27998
- } else if (this.set.length > 1) {
27999
- // if we have any that are *, then the range is just *
28000
- for (const c of this.set) {
28001
- if (c.length === 1 && isAny(c[0])) {
28002
- this.set = [c];
28003
- break
28004
- }
28005
- }
28006
- }
28007
- }
28008
-
28009
- this.format();
28010
- }
28011
-
28012
- format () {
28013
- this.range = this.set
28014
- .map((comps) => comps.join(' ').trim())
28015
- .join('||')
28016
- .trim();
28017
- return this.range
28018
- }
28019
-
28020
- toString () {
28021
- return this.range
28022
- }
28023
-
28024
- parseRange (range) {
28025
- // memoize range parsing for performance.
28026
- // this is a very hot path, and fully deterministic.
28027
- const memoOpts =
28028
- (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
28029
- (this.options.loose && FLAG_LOOSE);
28030
- const memoKey = memoOpts + ':' + range;
28031
- const cached = cache.get(memoKey);
28032
- if (cached) {
28033
- return cached
28034
- }
28035
-
28036
- const loose = this.options.loose;
28037
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
28038
- const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
28039
- range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
28040
- debug('hyphen replace', range);
28041
-
28042
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
28043
- range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
28044
- debug('comparator trim', range);
28045
-
28046
- // `~ 1.2.3` => `~1.2.3`
28047
- range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
28048
- debug('tilde trim', range);
28049
-
28050
- // `^ 1.2.3` => `^1.2.3`
28051
- range = range.replace(re[t.CARETTRIM], caretTrimReplace);
28052
- debug('caret trim', range);
28053
-
28054
- // At this point, the range is completely trimmed and
28055
- // ready to be split into comparators.
28056
-
28057
- let rangeList = range
28058
- .split(' ')
28059
- .map(comp => parseComparator(comp, this.options))
28060
- .join(' ')
28061
- .split(/\s+/)
28062
- // >=0.0.0 is equivalent to *
28063
- .map(comp => replaceGTE0(comp, this.options));
28064
-
28065
- if (loose) {
28066
- // in loose mode, throw out any that are not valid comparators
28067
- rangeList = rangeList.filter(comp => {
28068
- debug('loose invalid filter', comp, this.options);
28069
- return !!comp.match(re[t.COMPARATORLOOSE])
28070
- });
28071
- }
28072
- debug('range list', rangeList);
28073
-
28074
- // if any comparators are the null set, then replace with JUST null set
28075
- // if more than one comparator, remove any * comparators
28076
- // also, don't include the same comparator more than once
28077
- const rangeMap = new Map();
28078
- const comparators = rangeList.map(comp => new Comparator(comp, this.options));
28079
- for (const comp of comparators) {
28080
- if (isNullSet(comp)) {
28081
- return [comp]
28082
- }
28083
- rangeMap.set(comp.value, comp);
28084
- }
28085
- if (rangeMap.size > 1 && rangeMap.has('')) {
28086
- rangeMap.delete('');
28087
- }
28088
-
28089
- const result = [...rangeMap.values()];
28090
- cache.set(memoKey, result);
28091
- return result
28092
- }
28093
-
28094
- intersects (range, options) {
28095
- if (!(range instanceof Range)) {
28096
- throw new TypeError('a Range is required')
28097
- }
28098
-
28099
- return this.set.some((thisComparators) => {
28100
- return (
28101
- isSatisfiable(thisComparators, options) &&
28102
- range.set.some((rangeComparators) => {
28103
- return (
28104
- isSatisfiable(rangeComparators, options) &&
28105
- thisComparators.every((thisComparator) => {
28106
- return rangeComparators.every((rangeComparator) => {
28107
- return thisComparator.intersects(rangeComparator, options)
28108
- })
28109
- })
28110
- )
28111
- })
28112
- )
28113
- })
28114
- }
28115
-
28116
- // if ANY of the sets match ALL of its comparators, then pass
28117
- test (version) {
28118
- if (!version) {
28119
- return false
28120
- }
28121
-
28122
- if (typeof version === 'string') {
28123
- try {
28124
- version = new SemVer(version, this.options);
28125
- } catch (er) {
28126
- return false
28127
- }
28128
- }
28129
-
28130
- for (let i = 0; i < this.set.length; i++) {
28131
- if (testSet(this.set[i], version, this.options)) {
28132
- return true
28133
- }
28134
- }
28135
- return false
28136
- }
28137
- }
28107
+ // if any comparators are the null set, then replace with JUST null set
28108
+ // if more than one comparator, remove any * comparators
28109
+ // also, don't include the same comparator more than once
28110
+ const rangeMap = new Map();
28111
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options));
28112
+ for (const comp of comparators) {
28113
+ if (isNullSet(comp)) {
28114
+ return [comp];
28115
+ }
28116
+ rangeMap.set(comp.value, comp);
28117
+ }
28118
+ if (rangeMap.size > 1 && rangeMap.has('')) {
28119
+ rangeMap.delete('');
28120
+ }
28121
+ const result = [...rangeMap.values()];
28122
+ cache.set(memoKey, result);
28123
+ return result;
28124
+ }
28125
+ intersects(range, options) {
28126
+ if (!(range instanceof Range)) {
28127
+ throw new TypeError('a Range is required');
28128
+ }
28129
+ return this.set.some(thisComparators => {
28130
+ return isSatisfiable(thisComparators, options) && range.set.some(rangeComparators => {
28131
+ return isSatisfiable(rangeComparators, options) && thisComparators.every(thisComparator => {
28132
+ return rangeComparators.every(rangeComparator => {
28133
+ return thisComparator.intersects(rangeComparator, options);
28134
+ });
28135
+ });
28136
+ });
28137
+ });
28138
+ }
28138
28139
 
28139
- range = Range;
28140
-
28141
- const LRU = lrucache;
28142
- const cache = new LRU();
28143
-
28144
- const parseOptions = parseOptions_1;
28145
- const Comparator = requireComparator();
28146
- const debug = debug_1;
28147
- const SemVer = semver;
28148
- const {
28149
- safeRe: re,
28150
- t,
28151
- comparatorTrimReplace,
28152
- tildeTrimReplace,
28153
- caretTrimReplace,
28154
- } = reExports;
28155
- const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = constants;
28156
-
28157
- const isNullSet = c => c.value === '<0.0.0-0';
28158
- const isAny = c => c.value === '';
28159
-
28160
- // take a set of comparators and determine whether there
28161
- // exists a version which can satisfy it
28162
- const isSatisfiable = (comparators, options) => {
28163
- let result = true;
28164
- const remainingComparators = comparators.slice();
28165
- let testComparator = remainingComparators.pop();
28166
-
28167
- while (result && remainingComparators.length) {
28168
- result = remainingComparators.every((otherComparator) => {
28169
- return testComparator.intersects(otherComparator, options)
28170
- });
28171
-
28172
- testComparator = remainingComparators.pop();
28173
- }
28174
-
28175
- return result
28176
- };
28177
-
28178
- // comprised of xranges, tildes, stars, and gtlt's at this point.
28179
- // already replaced the hyphen ranges
28180
- // turn into a set of JUST comparators.
28181
- const parseComparator = (comp, options) => {
28182
- debug('comp', comp, options);
28183
- comp = replaceCarets(comp, options);
28184
- debug('caret', comp);
28185
- comp = replaceTildes(comp, options);
28186
- debug('tildes', comp);
28187
- comp = replaceXRanges(comp, options);
28188
- debug('xrange', comp);
28189
- comp = replaceStars(comp, options);
28190
- debug('stars', comp);
28191
- return comp
28192
- };
28193
-
28194
- const isX = id => !id || id.toLowerCase() === 'x' || id === '*';
28195
-
28196
- // ~, ~> --> * (any, kinda silly)
28197
- // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
28198
- // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
28199
- // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
28200
- // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
28201
- // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
28202
- // ~0.0.1 --> >=0.0.1 <0.1.0-0
28203
- const replaceTildes = (comp, options) => {
28204
- return comp
28205
- .trim()
28206
- .split(/\s+/)
28207
- .map((c) => replaceTilde(c, options))
28208
- .join(' ')
28209
- };
28210
-
28211
- const replaceTilde = (comp, options) => {
28212
- const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
28213
- return comp.replace(r, (_, M, m, p, pr) => {
28214
- debug('tilde', comp, _, M, m, p, pr);
28215
- let ret;
28216
-
28217
- if (isX(M)) {
28218
- ret = '';
28219
- } else if (isX(m)) {
28220
- ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
28221
- } else if (isX(p)) {
28222
- // ~1.2 == >=1.2.0 <1.3.0-0
28223
- ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
28224
- } else if (pr) {
28225
- debug('replaceTilde pr', pr);
28226
- ret = `>=${M}.${m}.${p}-${pr
28227
- } <${M}.${+m + 1}.0-0`;
28228
- } else {
28229
- // ~1.2.3 == >=1.2.3 <1.3.0-0
28230
- ret = `>=${M}.${m}.${p
28231
- } <${M}.${+m + 1}.0-0`;
28232
- }
28233
-
28234
- debug('tilde return', ret);
28235
- return ret
28236
- })
28237
- };
28238
-
28239
- // ^ --> * (any, kinda silly)
28240
- // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
28241
- // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
28242
- // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
28243
- // ^1.2.3 --> >=1.2.3 <2.0.0-0
28244
- // ^1.2.0 --> >=1.2.0 <2.0.0-0
28245
- // ^0.0.1 --> >=0.0.1 <0.0.2-0
28246
- // ^0.1.0 --> >=0.1.0 <0.2.0-0
28247
- const replaceCarets = (comp, options) => {
28248
- return comp
28249
- .trim()
28250
- .split(/\s+/)
28251
- .map((c) => replaceCaret(c, options))
28252
- .join(' ')
28253
- };
28254
-
28255
- const replaceCaret = (comp, options) => {
28256
- debug('caret', comp, options);
28257
- const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
28258
- const z = options.includePrerelease ? '-0' : '';
28259
- return comp.replace(r, (_, M, m, p, pr) => {
28260
- debug('caret', comp, _, M, m, p, pr);
28261
- let ret;
28262
-
28263
- if (isX(M)) {
28264
- ret = '';
28265
- } else if (isX(m)) {
28266
- ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
28267
- } else if (isX(p)) {
28268
- if (M === '0') {
28269
- ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
28270
- } else {
28271
- ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
28272
- }
28273
- } else if (pr) {
28274
- debug('replaceCaret pr', pr);
28275
- if (M === '0') {
28276
- if (m === '0') {
28277
- ret = `>=${M}.${m}.${p}-${pr
28278
- } <${M}.${m}.${+p + 1}-0`;
28279
- } else {
28280
- ret = `>=${M}.${m}.${p}-${pr
28281
- } <${M}.${+m + 1}.0-0`;
28282
- }
28283
- } else {
28284
- ret = `>=${M}.${m}.${p}-${pr
28285
- } <${+M + 1}.0.0-0`;
28286
- }
28287
- } else {
28288
- debug('no pr');
28289
- if (M === '0') {
28290
- if (m === '0') {
28291
- ret = `>=${M}.${m}.${p
28292
- }${z} <${M}.${m}.${+p + 1}-0`;
28293
- } else {
28294
- ret = `>=${M}.${m}.${p
28295
- }${z} <${M}.${+m + 1}.0-0`;
28296
- }
28297
- } else {
28298
- ret = `>=${M}.${m}.${p
28299
- } <${+M + 1}.0.0-0`;
28300
- }
28301
- }
28302
-
28303
- debug('caret return', ret);
28304
- return ret
28305
- })
28306
- };
28307
-
28308
- const replaceXRanges = (comp, options) => {
28309
- debug('replaceXRanges', comp, options);
28310
- return comp
28311
- .split(/\s+/)
28312
- .map((c) => replaceXRange(c, options))
28313
- .join(' ')
28314
- };
28315
-
28316
- const replaceXRange = (comp, options) => {
28317
- comp = comp.trim();
28318
- const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
28319
- return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
28320
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
28321
- const xM = isX(M);
28322
- const xm = xM || isX(m);
28323
- const xp = xm || isX(p);
28324
- const anyX = xp;
28325
-
28326
- if (gtlt === '=' && anyX) {
28327
- gtlt = '';
28328
- }
28329
-
28330
- // if we're including prereleases in the match, then we need
28331
- // to fix this to -0, the lowest possible prerelease value
28332
- pr = options.includePrerelease ? '-0' : '';
28333
-
28334
- if (xM) {
28335
- if (gtlt === '>' || gtlt === '<') {
28336
- // nothing is allowed
28337
- ret = '<0.0.0-0';
28338
- } else {
28339
- // nothing is forbidden
28340
- ret = '*';
28341
- }
28342
- } else if (gtlt && anyX) {
28343
- // we know patch is an x, because we have any x at all.
28344
- // replace X with 0
28345
- if (xm) {
28346
- m = 0;
28347
- }
28348
- p = 0;
28349
-
28350
- if (gtlt === '>') {
28351
- // >1 => >=2.0.0
28352
- // >1.2 => >=1.3.0
28353
- gtlt = '>=';
28354
- if (xm) {
28355
- M = +M + 1;
28356
- m = 0;
28357
- p = 0;
28358
- } else {
28359
- m = +m + 1;
28360
- p = 0;
28361
- }
28362
- } else if (gtlt === '<=') {
28363
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
28364
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
28365
- gtlt = '<';
28366
- if (xm) {
28367
- M = +M + 1;
28368
- } else {
28369
- m = +m + 1;
28370
- }
28371
- }
28372
-
28373
- if (gtlt === '<') {
28374
- pr = '-0';
28375
- }
28376
-
28377
- ret = `${gtlt + M}.${m}.${p}${pr}`;
28378
- } else if (xm) {
28379
- ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
28380
- } else if (xp) {
28381
- ret = `>=${M}.${m}.0${pr
28382
- } <${M}.${+m + 1}.0-0`;
28383
- }
28384
-
28385
- debug('xRange return', ret);
28386
-
28387
- return ret
28388
- })
28389
- };
28390
-
28391
- // Because * is AND-ed with everything else in the comparator,
28392
- // and '' means "any version", just remove the *s entirely.
28393
- const replaceStars = (comp, options) => {
28394
- debug('replaceStars', comp, options);
28395
- // Looseness is ignored here. star is always as loose as it gets!
28396
- return comp
28397
- .trim()
28398
- .replace(re[t.STAR], '')
28399
- };
28400
-
28401
- const replaceGTE0 = (comp, options) => {
28402
- debug('replaceGTE0', comp, options);
28403
- return comp
28404
- .trim()
28405
- .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
28406
- };
28407
-
28408
- // This function is passed to string.replace(re[t.HYPHENRANGE])
28409
- // M, m, patch, prerelease, build
28410
- // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
28411
- // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
28412
- // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
28413
- // TODO build?
28414
- const hyphenReplace = incPr => ($0,
28415
- from, fM, fm, fp, fpr, fb,
28416
- to, tM, tm, tp, tpr) => {
28417
- if (isX(fM)) {
28418
- from = '';
28419
- } else if (isX(fm)) {
28420
- from = `>=${fM}.0.0${incPr ? '-0' : ''}`;
28421
- } else if (isX(fp)) {
28422
- from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`;
28423
- } else if (fpr) {
28424
- from = `>=${from}`;
28425
- } else {
28426
- from = `>=${from}${incPr ? '-0' : ''}`;
28427
- }
28428
-
28429
- if (isX(tM)) {
28430
- to = '';
28431
- } else if (isX(tm)) {
28432
- to = `<${+tM + 1}.0.0-0`;
28433
- } else if (isX(tp)) {
28434
- to = `<${tM}.${+tm + 1}.0-0`;
28435
- } else if (tpr) {
28436
- to = `<=${tM}.${tm}.${tp}-${tpr}`;
28437
- } else if (incPr) {
28438
- to = `<${tM}.${tm}.${+tp + 1}-0`;
28439
- } else {
28440
- to = `<=${to}`;
28441
- }
28442
-
28443
- return `${from} ${to}`.trim()
28444
- };
28445
-
28446
- const testSet = (set, version, options) => {
28447
- for (let i = 0; i < set.length; i++) {
28448
- if (!set[i].test(version)) {
28449
- return false
28450
- }
28451
- }
28452
-
28453
- if (version.prerelease.length && !options.includePrerelease) {
28454
- // Find the set of versions that are allowed to have prereleases
28455
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
28456
- // That should allow `1.2.3-pr.2` to pass.
28457
- // However, `1.2.4-alpha.notready` should NOT be allowed,
28458
- // even though it's within the range set by the comparators.
28459
- for (let i = 0; i < set.length; i++) {
28460
- debug(set[i].semver);
28461
- if (set[i].semver === Comparator.ANY) {
28462
- continue
28463
- }
28464
-
28465
- if (set[i].semver.prerelease.length > 0) {
28466
- const allowed = set[i].semver;
28467
- if (allowed.major === version.major &&
28468
- allowed.minor === version.minor &&
28469
- allowed.patch === version.patch) {
28470
- return true
28471
- }
28472
- }
28473
- }
28474
-
28475
- // Version has a -pre, but it's not one of the ones we like.
28476
- return false
28477
- }
28478
-
28479
- return true
28480
- };
28481
- return range;
28140
+ // if ANY of the sets match ALL of its comparators, then pass
28141
+ test(version) {
28142
+ if (!version) {
28143
+ return false;
28144
+ }
28145
+ if (typeof version === 'string') {
28146
+ try {
28147
+ version = new SemVer(version, this.options);
28148
+ } catch (er) {
28149
+ return false;
28150
+ }
28151
+ }
28152
+ for (let i = 0; i < this.set.length; i++) {
28153
+ if (testSet(this.set[i], version, this.options)) {
28154
+ return true;
28155
+ }
28156
+ }
28157
+ return false;
28158
+ }
28159
+ }
28160
+ range = Range;
28161
+ const LRU = lrucache;
28162
+ const cache = new LRU();
28163
+ const parseOptions = parseOptions_1;
28164
+ const Comparator = requireComparator();
28165
+ const debug = debug_1;
28166
+ const SemVer = semver;
28167
+ const {
28168
+ safeRe: re,
28169
+ t,
28170
+ comparatorTrimReplace,
28171
+ tildeTrimReplace,
28172
+ caretTrimReplace
28173
+ } = reExports;
28174
+ const {
28175
+ FLAG_INCLUDE_PRERELEASE,
28176
+ FLAG_LOOSE
28177
+ } = constants;
28178
+ const isNullSet = c => c.value === '<0.0.0-0';
28179
+ const isAny = c => c.value === '';
28180
+
28181
+ // take a set of comparators and determine whether there
28182
+ // exists a version which can satisfy it
28183
+ const isSatisfiable = (comparators, options) => {
28184
+ let result = true;
28185
+ const remainingComparators = comparators.slice();
28186
+ let testComparator = remainingComparators.pop();
28187
+ while (result && remainingComparators.length) {
28188
+ result = remainingComparators.every(otherComparator => {
28189
+ return testComparator.intersects(otherComparator, options);
28190
+ });
28191
+ testComparator = remainingComparators.pop();
28192
+ }
28193
+ return result;
28194
+ };
28195
+
28196
+ // comprised of xranges, tildes, stars, and gtlt's at this point.
28197
+ // already replaced the hyphen ranges
28198
+ // turn into a set of JUST comparators.
28199
+ const parseComparator = (comp, options) => {
28200
+ debug('comp', comp, options);
28201
+ comp = replaceCarets(comp, options);
28202
+ debug('caret', comp);
28203
+ comp = replaceTildes(comp, options);
28204
+ debug('tildes', comp);
28205
+ comp = replaceXRanges(comp, options);
28206
+ debug('xrange', comp);
28207
+ comp = replaceStars(comp, options);
28208
+ debug('stars', comp);
28209
+ return comp;
28210
+ };
28211
+ const isX = id => !id || id.toLowerCase() === 'x' || id === '*';
28212
+
28213
+ // ~, ~> --> * (any, kinda silly)
28214
+ // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
28215
+ // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
28216
+ // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
28217
+ // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
28218
+ // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
28219
+ // ~0.0.1 --> >=0.0.1 <0.1.0-0
28220
+ const replaceTildes = (comp, options) => {
28221
+ return comp.trim().split(/\s+/).map(c => replaceTilde(c, options)).join(' ');
28222
+ };
28223
+ const replaceTilde = (comp, options) => {
28224
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
28225
+ return comp.replace(r, (_, M, m, p, pr) => {
28226
+ debug('tilde', comp, _, M, m, p, pr);
28227
+ let ret;
28228
+ if (isX(M)) {
28229
+ ret = '';
28230
+ } else if (isX(m)) {
28231
+ ret = ">=".concat(M, ".0.0 <").concat(+M + 1, ".0.0-0");
28232
+ } else if (isX(p)) {
28233
+ // ~1.2 == >=1.2.0 <1.3.0-0
28234
+ ret = ">=".concat(M, ".").concat(m, ".0 <").concat(M, ".").concat(+m + 1, ".0-0");
28235
+ } else if (pr) {
28236
+ debug('replaceTilde pr', pr);
28237
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, "-").concat(pr, " <").concat(M, ".").concat(+m + 1, ".0-0");
28238
+ } else {
28239
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
28240
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(M, ".").concat(+m + 1, ".0-0");
28241
+ }
28242
+ debug('tilde return', ret);
28243
+ return ret;
28244
+ });
28245
+ };
28246
+
28247
+ // ^ --> * (any, kinda silly)
28248
+ // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
28249
+ // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
28250
+ // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
28251
+ // ^1.2.3 --> >=1.2.3 <2.0.0-0
28252
+ // ^1.2.0 --> >=1.2.0 <2.0.0-0
28253
+ // ^0.0.1 --> >=0.0.1 <0.0.2-0
28254
+ // ^0.1.0 --> >=0.1.0 <0.2.0-0
28255
+ const replaceCarets = (comp, options) => {
28256
+ return comp.trim().split(/\s+/).map(c => replaceCaret(c, options)).join(' ');
28257
+ };
28258
+ const replaceCaret = (comp, options) => {
28259
+ debug('caret', comp, options);
28260
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
28261
+ const z = options.includePrerelease ? '-0' : '';
28262
+ return comp.replace(r, (_, M, m, p, pr) => {
28263
+ debug('caret', comp, _, M, m, p, pr);
28264
+ let ret;
28265
+ if (isX(M)) {
28266
+ ret = '';
28267
+ } else if (isX(m)) {
28268
+ ret = ">=".concat(M, ".0.0").concat(z, " <").concat(+M + 1, ".0.0-0");
28269
+ } else if (isX(p)) {
28270
+ if (M === '0') {
28271
+ ret = ">=".concat(M, ".").concat(m, ".0").concat(z, " <").concat(M, ".").concat(+m + 1, ".0-0");
28272
+ } else {
28273
+ ret = ">=".concat(M, ".").concat(m, ".0").concat(z, " <").concat(+M + 1, ".0.0-0");
28274
+ }
28275
+ } else if (pr) {
28276
+ debug('replaceCaret pr', pr);
28277
+ if (M === '0') {
28278
+ if (m === '0') {
28279
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, "-").concat(pr, " <").concat(M, ".").concat(m, ".").concat(+p + 1, "-0");
28280
+ } else {
28281
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, "-").concat(pr, " <").concat(M, ".").concat(+m + 1, ".0-0");
28282
+ }
28283
+ } else {
28284
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, "-").concat(pr, " <").concat(+M + 1, ".0.0-0");
28285
+ }
28286
+ } else {
28287
+ debug('no pr');
28288
+ if (M === '0') {
28289
+ if (m === '0') {
28290
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p).concat(z, " <").concat(M, ".").concat(m, ".").concat(+p + 1, "-0");
28291
+ } else {
28292
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p).concat(z, " <").concat(M, ".").concat(+m + 1, ".0-0");
28293
+ }
28294
+ } else {
28295
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(+M + 1, ".0.0-0");
28296
+ }
28297
+ }
28298
+ debug('caret return', ret);
28299
+ return ret;
28300
+ });
28301
+ };
28302
+ const replaceXRanges = (comp, options) => {
28303
+ debug('replaceXRanges', comp, options);
28304
+ return comp.split(/\s+/).map(c => replaceXRange(c, options)).join(' ');
28305
+ };
28306
+ const replaceXRange = (comp, options) => {
28307
+ comp = comp.trim();
28308
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
28309
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
28310
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
28311
+ const xM = isX(M);
28312
+ const xm = xM || isX(m);
28313
+ const xp = xm || isX(p);
28314
+ const anyX = xp;
28315
+ if (gtlt === '=' && anyX) {
28316
+ gtlt = '';
28317
+ }
28318
+
28319
+ // if we're including prereleases in the match, then we need
28320
+ // to fix this to -0, the lowest possible prerelease value
28321
+ pr = options.includePrerelease ? '-0' : '';
28322
+ if (xM) {
28323
+ if (gtlt === '>' || gtlt === '<') {
28324
+ // nothing is allowed
28325
+ ret = '<0.0.0-0';
28326
+ } else {
28327
+ // nothing is forbidden
28328
+ ret = '*';
28329
+ }
28330
+ } else if (gtlt && anyX) {
28331
+ // we know patch is an x, because we have any x at all.
28332
+ // replace X with 0
28333
+ if (xm) {
28334
+ m = 0;
28335
+ }
28336
+ p = 0;
28337
+ if (gtlt === '>') {
28338
+ // >1 => >=2.0.0
28339
+ // >1.2 => >=1.3.0
28340
+ gtlt = '>=';
28341
+ if (xm) {
28342
+ M = +M + 1;
28343
+ m = 0;
28344
+ p = 0;
28345
+ } else {
28346
+ m = +m + 1;
28347
+ p = 0;
28348
+ }
28349
+ } else if (gtlt === '<=') {
28350
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
28351
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
28352
+ gtlt = '<';
28353
+ if (xm) {
28354
+ M = +M + 1;
28355
+ } else {
28356
+ m = +m + 1;
28357
+ }
28358
+ }
28359
+ if (gtlt === '<') {
28360
+ pr = '-0';
28361
+ }
28362
+ ret = "".concat(gtlt + M, ".").concat(m, ".").concat(p).concat(pr);
28363
+ } else if (xm) {
28364
+ ret = ">=".concat(M, ".0.0").concat(pr, " <").concat(+M + 1, ".0.0-0");
28365
+ } else if (xp) {
28366
+ ret = ">=".concat(M, ".").concat(m, ".0").concat(pr, " <").concat(M, ".").concat(+m + 1, ".0-0");
28367
+ }
28368
+ debug('xRange return', ret);
28369
+ return ret;
28370
+ });
28371
+ };
28372
+
28373
+ // Because * is AND-ed with everything else in the comparator,
28374
+ // and '' means "any version", just remove the *s entirely.
28375
+ const replaceStars = (comp, options) => {
28376
+ debug('replaceStars', comp, options);
28377
+ // Looseness is ignored here. star is always as loose as it gets!
28378
+ return comp.trim().replace(re[t.STAR], '');
28379
+ };
28380
+ const replaceGTE0 = (comp, options) => {
28381
+ debug('replaceGTE0', comp, options);
28382
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '');
28383
+ };
28384
+
28385
+ // This function is passed to string.replace(re[t.HYPHENRANGE])
28386
+ // M, m, patch, prerelease, build
28387
+ // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
28388
+ // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
28389
+ // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
28390
+ // TODO build?
28391
+ const hyphenReplace = incPr => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
28392
+ if (isX(fM)) {
28393
+ from = '';
28394
+ } else if (isX(fm)) {
28395
+ from = ">=".concat(fM, ".0.0").concat(incPr ? '-0' : '');
28396
+ } else if (isX(fp)) {
28397
+ from = ">=".concat(fM, ".").concat(fm, ".0").concat(incPr ? '-0' : '');
28398
+ } else if (fpr) {
28399
+ from = ">=".concat(from);
28400
+ } else {
28401
+ from = ">=".concat(from).concat(incPr ? '-0' : '');
28402
+ }
28403
+ if (isX(tM)) {
28404
+ to = '';
28405
+ } else if (isX(tm)) {
28406
+ to = "<".concat(+tM + 1, ".0.0-0");
28407
+ } else if (isX(tp)) {
28408
+ to = "<".concat(tM, ".").concat(+tm + 1, ".0-0");
28409
+ } else if (tpr) {
28410
+ to = "<=".concat(tM, ".").concat(tm, ".").concat(tp, "-").concat(tpr);
28411
+ } else if (incPr) {
28412
+ to = "<".concat(tM, ".").concat(tm, ".").concat(+tp + 1, "-0");
28413
+ } else {
28414
+ to = "<=".concat(to);
28415
+ }
28416
+ return "".concat(from, " ").concat(to).trim();
28417
+ };
28418
+ const testSet = (set, version, options) => {
28419
+ for (let i = 0; i < set.length; i++) {
28420
+ if (!set[i].test(version)) {
28421
+ return false;
28422
+ }
28423
+ }
28424
+ if (version.prerelease.length && !options.includePrerelease) {
28425
+ // Find the set of versions that are allowed to have prereleases
28426
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
28427
+ // That should allow `1.2.3-pr.2` to pass.
28428
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
28429
+ // even though it's within the range set by the comparators.
28430
+ for (let i = 0; i < set.length; i++) {
28431
+ debug(set[i].semver);
28432
+ if (set[i].semver === Comparator.ANY) {
28433
+ continue;
28434
+ }
28435
+ if (set[i].semver.prerelease.length > 0) {
28436
+ const allowed = set[i].semver;
28437
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
28438
+ return true;
28439
+ }
28440
+ }
28441
+ }
28442
+
28443
+ // Version has a -pre, but it's not one of the ones we like.
28444
+ return false;
28445
+ }
28446
+ return true;
28447
+ };
28448
+ return range;
28482
28449
  }
28483
28450
 
28484
28451
  const Range = requireRange();
@@ -28486,12 +28453,11 @@ const satisfies = (version, range, options) => {
28486
28453
  try {
28487
28454
  range = new Range(range, options);
28488
28455
  } catch (er) {
28489
- return false
28456
+ return false;
28490
28457
  }
28491
- return range.test(version)
28458
+ return range.test(version);
28492
28459
  };
28493
28460
  var satisfies_1 = satisfies;
28494
-
28495
28461
  var satisfies$1 = /*@__PURE__*/getDefaultExportFromCjs(satisfies_1);
28496
28462
 
28497
28463
  const LOADED = {};