@nebula.js/stardust 3.1.0-alpha.1 → 3.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/dev.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v3.1.0-alpha.1
2
+ * @nebula.js/stardust v3.1.0-alpha.2
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -316,27 +316,30 @@ var runtime = {exports: {}};
316
316
  // delegate iterator, or by modifying context.method and context.arg,
317
317
  // setting context.delegate to null, and returning the ContinueSentinel.
318
318
  function maybeInvokeDelegate(delegate, context) {
319
- var method = delegate.iterator[context.method];
319
+ var methodName = context.method;
320
+ var method = delegate.iterator[methodName];
320
321
  if (method === undefined$1) {
321
322
  // A .throw or .return when the delegate iterator has no .throw
322
- // method always terminates the yield* loop.
323
+ // method, or a missing .next mehtod, always terminate the
324
+ // yield* loop.
323
325
  context.delegate = null;
324
- if (context.method === "throw") {
325
- // Note: ["return"] must be used for ES3 parsing compatibility.
326
- if (delegate.iterator["return"]) {
327
- // If the delegate iterator has a return method, give it a
328
- // chance to clean up.
329
- context.method = "return";
330
- context.arg = undefined$1;
331
- maybeInvokeDelegate(delegate, context);
332
- if (context.method === "throw") {
333
- // If maybeInvokeDelegate(context) changed context.method from
334
- // "return" to "throw", let that override the TypeError below.
335
- return ContinueSentinel;
336
- }
326
+
327
+ // Note: ["return"] must be used for ES3 parsing compatibility.
328
+ if (methodName === "throw" && delegate.iterator["return"]) {
329
+ // If the delegate iterator has a return method, give it a
330
+ // chance to clean up.
331
+ context.method = "return";
332
+ context.arg = undefined$1;
333
+ maybeInvokeDelegate(delegate, context);
334
+ if (context.method === "throw") {
335
+ // If maybeInvokeDelegate(context) changed context.method from
336
+ // "return" to "throw", let that override the TypeError below.
337
+ return ContinueSentinel;
337
338
  }
339
+ }
340
+ if (methodName !== "return") {
338
341
  context.method = "throw";
339
- context.arg = new TypeError("The iterator does not provide a 'throw' method");
342
+ context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method");
340
343
  }
341
344
  return ContinueSentinel;
342
345
  }
@@ -708,6 +711,7 @@ function _objectSpread2(target) {
708
711
  return target;
709
712
  }
710
713
  function _defineProperty(obj, key, value) {
714
+ key = _toPropertyKey(key);
711
715
  if (key in obj) {
712
716
  Object.defineProperty(obj, key, {
713
717
  value: value,
@@ -761,6 +765,20 @@ function _objectWithoutProperties(source, excluded) {
761
765
  }
762
766
  return target;
763
767
  }
768
+ function _toPrimitive(input, hint) {
769
+ if (typeof input !== "object" || input === null) return input;
770
+ var prim = input[Symbol.toPrimitive];
771
+ if (prim !== undefined) {
772
+ var res = prim.call(input, hint || "default");
773
+ if (typeof res !== "object") return res;
774
+ throw new TypeError("@@toPrimitive must return a primitive value.");
775
+ }
776
+ return (hint === "string" ? String : Number)(input);
777
+ }
778
+ function _toPropertyKey(arg) {
779
+ var key = _toPrimitive(arg, "string");
780
+ return typeof key === "symbol" ? key : String(key);
781
+ }
764
782
 
765
783
  const format = function () {
766
784
  let message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
@@ -1869,15 +1887,15 @@ var darker = 0.7;
1869
1887
  var brighter = 1 / darker;
1870
1888
 
1871
1889
  var reI = "\\s*([+-]?\\d+)\\s*",
1872
- reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
1873
- reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
1890
+ reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
1891
+ reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
1874
1892
  reHex = /^#([0-9a-f]{3,8})$/,
1875
- reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
1876
- reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
1877
- reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
1878
- reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
1879
- reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
1880
- reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
1893
+ reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
1894
+ reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
1895
+ reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
1896
+ reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
1897
+ reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
1898
+ reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
1881
1899
 
1882
1900
  var named = {
1883
1901
  aliceblue: 0xf0f8ff,
@@ -2031,14 +2049,15 @@ var named = {
2031
2049
  };
2032
2050
 
2033
2051
  define(Color, color$3, {
2034
- copy: function(channels) {
2052
+ copy(channels) {
2035
2053
  return Object.assign(new this.constructor, this, channels);
2036
2054
  },
2037
- displayable: function() {
2055
+ displayable() {
2038
2056
  return this.rgb().displayable();
2039
2057
  },
2040
2058
  hex: color_formatHex, // Deprecated! Use color.formatHex.
2041
2059
  formatHex: color_formatHex,
2060
+ formatHex8: color_formatHex8,
2042
2061
  formatHsl: color_formatHsl,
2043
2062
  formatRgb: color_formatRgb,
2044
2063
  toString: color_formatRgb
@@ -2048,6 +2067,10 @@ function color_formatHex() {
2048
2067
  return this.rgb().formatHex();
2049
2068
  }
2050
2069
 
2070
+ function color_formatHex8() {
2071
+ return this.rgb().formatHex8();
2072
+ }
2073
+
2051
2074
  function color_formatHsl() {
2052
2075
  return hslConvert(this).formatHsl();
2053
2076
  }
@@ -2103,18 +2126,21 @@ function Rgb(r, g, b, opacity) {
2103
2126
  }
2104
2127
 
2105
2128
  define(Rgb, rgb, extend$2(Color, {
2106
- brighter: function(k) {
2129
+ brighter(k) {
2107
2130
  k = k == null ? brighter : Math.pow(brighter, k);
2108
2131
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2109
2132
  },
2110
- darker: function(k) {
2133
+ darker(k) {
2111
2134
  k = k == null ? darker : Math.pow(darker, k);
2112
2135
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2113
2136
  },
2114
- rgb: function() {
2137
+ rgb() {
2115
2138
  return this;
2116
2139
  },
2117
- displayable: function() {
2140
+ clamp() {
2141
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
2142
+ },
2143
+ displayable() {
2118
2144
  return (-0.5 <= this.r && this.r < 255.5)
2119
2145
  && (-0.5 <= this.g && this.g < 255.5)
2120
2146
  && (-0.5 <= this.b && this.b < 255.5)
@@ -2122,25 +2148,34 @@ define(Rgb, rgb, extend$2(Color, {
2122
2148
  },
2123
2149
  hex: rgb_formatHex, // Deprecated! Use color.formatHex.
2124
2150
  formatHex: rgb_formatHex,
2151
+ formatHex8: rgb_formatHex8,
2125
2152
  formatRgb: rgb_formatRgb,
2126
2153
  toString: rgb_formatRgb
2127
2154
  }));
2128
2155
 
2129
2156
  function rgb_formatHex() {
2130
- return "#" + hex(this.r) + hex(this.g) + hex(this.b);
2157
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
2158
+ }
2159
+
2160
+ function rgb_formatHex8() {
2161
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
2131
2162
  }
2132
2163
 
2133
2164
  function rgb_formatRgb() {
2134
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2135
- return (a === 1 ? "rgb(" : "rgba(")
2136
- + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
2137
- + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
2138
- + Math.max(0, Math.min(255, Math.round(this.b) || 0))
2139
- + (a === 1 ? ")" : ", " + a + ")");
2165
+ const a = clampa(this.opacity);
2166
+ return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
2167
+ }
2168
+
2169
+ function clampa(opacity) {
2170
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
2171
+ }
2172
+
2173
+ function clampi(value) {
2174
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
2140
2175
  }
2141
2176
 
2142
2177
  function hex(value) {
2143
- value = Math.max(0, Math.min(255, Math.round(value) || 0));
2178
+ value = clampi(value);
2144
2179
  return (value < 16 ? "0" : "") + value.toString(16);
2145
2180
  }
2146
2181
 
@@ -2189,15 +2224,15 @@ function Hsl(h, s, l, opacity) {
2189
2224
  }
2190
2225
 
2191
2226
  define(Hsl, hsl, extend$2(Color, {
2192
- brighter: function(k) {
2227
+ brighter(k) {
2193
2228
  k = k == null ? brighter : Math.pow(brighter, k);
2194
2229
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2195
2230
  },
2196
- darker: function(k) {
2231
+ darker(k) {
2197
2232
  k = k == null ? darker : Math.pow(darker, k);
2198
2233
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2199
2234
  },
2200
- rgb: function() {
2235
+ rgb() {
2201
2236
  var h = this.h % 360 + (this.h < 0) * 360,
2202
2237
  s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
2203
2238
  l = this.l,
@@ -2210,21 +2245,29 @@ define(Hsl, hsl, extend$2(Color, {
2210
2245
  this.opacity
2211
2246
  );
2212
2247
  },
2213
- displayable: function() {
2248
+ clamp() {
2249
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
2250
+ },
2251
+ displayable() {
2214
2252
  return (0 <= this.s && this.s <= 1 || isNaN(this.s))
2215
2253
  && (0 <= this.l && this.l <= 1)
2216
2254
  && (0 <= this.opacity && this.opacity <= 1);
2217
2255
  },
2218
- formatHsl: function() {
2219
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2220
- return (a === 1 ? "hsl(" : "hsla(")
2221
- + (this.h || 0) + ", "
2222
- + (this.s || 0) * 100 + "%, "
2223
- + (this.l || 0) * 100 + "%"
2224
- + (a === 1 ? ")" : ", " + a + ")");
2256
+ formatHsl() {
2257
+ const a = clampa(this.opacity);
2258
+ return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
2225
2259
  }
2226
2260
  }));
2227
2261
 
2262
+ function clamph(value) {
2263
+ value = (value || 0) % 360;
2264
+ return value < 0 ? value + 360 : value;
2265
+ }
2266
+
2267
+ function clampt(value) {
2268
+ return Math.max(0, Math.min(1, value || 0));
2269
+ }
2270
+
2228
2271
  /* From FvD 13.37, CSS Color Module Level 3 */
2229
2272
  function hsl2rgb(h, m1, m2) {
2230
2273
  return (h < 60 ? m1 + (m2 - m1) * h / 60
@@ -3289,14 +3332,12 @@ function _extends$5() {
3289
3332
  _extends$5 = Object.assign ? Object.assign.bind() : function (target) {
3290
3333
  for (var i = 1; i < arguments.length; i++) {
3291
3334
  var source = arguments[i];
3292
-
3293
3335
  for (var key in source) {
3294
3336
  if (Object.prototype.hasOwnProperty.call(source, key)) {
3295
3337
  target[key] = source[key];
3296
3338
  }
3297
3339
  }
3298
3340
  }
3299
-
3300
3341
  return target;
3301
3342
  };
3302
3343
  return _extends$5.apply(this, arguments);
@@ -3307,13 +3348,11 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
3307
3348
  var target = {};
3308
3349
  var sourceKeys = Object.keys(source);
3309
3350
  var key, i;
3310
-
3311
3351
  for (i = 0; i < sourceKeys.length; i++) {
3312
3352
  key = sourceKeys[i];
3313
3353
  if (excluded.indexOf(key) >= 0) continue;
3314
3354
  target[key] = source[key];
3315
3355
  }
3316
-
3317
3356
  return target;
3318
3357
  }
3319
3358
 
@@ -3485,7 +3524,7 @@ var assign = Object.assign;
3485
3524
  * @return {number}
3486
3525
  */
3487
3526
  function hash (value, length) {
3488
- return (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3)
3527
+ return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
3489
3528
  }
3490
3529
 
3491
3530
  /**
@@ -3838,7 +3877,7 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
3838
3877
  switch (previous = character, character = next()) {
3839
3878
  // (
3840
3879
  case 40:
3841
- if (previous != 108 && characters.charCodeAt(length - 1) == 58) {
3880
+ if (previous != 108 && charat(characters, length - 1) == 58) {
3842
3881
  if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1)
3843
3882
  ampersand = -1;
3844
3883
  break
@@ -3888,7 +3927,7 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
3888
3927
  if (offset === 0)
3889
3928
  parse(characters, root, reference, reference, props, rulesets, length, points, children);
3890
3929
  else
3891
- switch (atrule) {
3930
+ switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
3892
3931
  // d m s
3893
3932
  case 100: case 109: case 115:
3894
3933
  parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
@@ -3985,123 +4024,6 @@ function declaration (value, root, parent, length) {
3985
4024
  return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)
3986
4025
  }
3987
4026
 
3988
- /**
3989
- * @param {string} value
3990
- * @param {number} length
3991
- * @return {string}
3992
- */
3993
- function prefix (value, length) {
3994
- switch (hash(value, length)) {
3995
- // color-adjust
3996
- case 5103:
3997
- return WEBKIT + 'print-' + value + value
3998
- // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
3999
- case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:
4000
- // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
4001
- case 5572: case 6356: case 5844: case 3191: case 6645: case 3005:
4002
- // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
4003
- case 6391: case 5879: case 5623: case 6135: case 4599: case 4855:
4004
- // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
4005
- case 4215: case 6389: case 5109: case 5365: case 5621: case 3829:
4006
- return WEBKIT + value + value
4007
- // appearance, user-select, transform, hyphens, text-size-adjust
4008
- case 5349: case 4246: case 4810: case 6968: case 2756:
4009
- return WEBKIT + value + MOZ + value + MS + value + value
4010
- // flex, flex-direction
4011
- case 6828: case 4268:
4012
- return WEBKIT + value + MS + value + value
4013
- // order
4014
- case 6165:
4015
- return WEBKIT + value + MS + 'flex-' + value + value
4016
- // align-items
4017
- case 5187:
4018
- return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value
4019
- // align-self
4020
- case 5443:
4021
- return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value
4022
- // align-content
4023
- case 4675:
4024
- return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value
4025
- // flex-shrink
4026
- case 5548:
4027
- return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value
4028
- // flex-basis
4029
- case 5292:
4030
- return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value
4031
- // flex-grow
4032
- case 6060:
4033
- return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value
4034
- // transition
4035
- case 4554:
4036
- return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value
4037
- // cursor
4038
- case 6187:
4039
- return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value
4040
- // background, background-image
4041
- case 5495: case 3959:
4042
- return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1')
4043
- // justify-content
4044
- case 4968:
4045
- return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value
4046
- // (margin|padding)-inline-(start|end)
4047
- case 4095: case 3583: case 4068: case 2532:
4048
- return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value
4049
- // (min|max)?(width|height|inline-size|block-size)
4050
- case 8116: case 7059: case 5753: case 5535:
4051
- case 5445: case 5701: case 4933: case 4677:
4052
- case 5533: case 5789: case 5021: case 4765:
4053
- // stretch, max-content, min-content, fill-available
4054
- if (strlen(value) - 1 - length > 6)
4055
- switch (charat(value, length + 1)) {
4056
- // (m)ax-content, (m)in-content
4057
- case 109:
4058
- // -
4059
- if (charat(value, length + 4) !== 45)
4060
- break
4061
- // (f)ill-available, (f)it-content
4062
- case 102:
4063
- return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value
4064
- // (s)tretch
4065
- case 115:
4066
- return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value
4067
- }
4068
- break
4069
- // position: sticky
4070
- case 4949:
4071
- // (s)ticky?
4072
- if (charat(value, length + 1) !== 115)
4073
- break
4074
- // display: (flex|inline-flex)
4075
- case 6444:
4076
- switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
4077
- // stic(k)y
4078
- case 107:
4079
- return replace(value, ':', ':' + WEBKIT) + value
4080
- // (inline-)?fl(e)x
4081
- case 101:
4082
- return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value
4083
- }
4084
- break
4085
- // writing-mode
4086
- case 5936:
4087
- switch (charat(value, length + 11)) {
4088
- // vertical-l(r)
4089
- case 114:
4090
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value
4091
- // vertical-r(l)
4092
- case 108:
4093
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value
4094
- // horizontal(-)tb
4095
- case 45:
4096
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value
4097
- }
4098
-
4099
- return WEBKIT + value + MS + value + value
4100
- }
4101
-
4102
- return value
4103
- }
4104
-
4105
4027
  /**
4106
4028
  * @param {object[]} children
4107
4029
  * @param {function} callback
@@ -4164,41 +4086,6 @@ function rulesheet (callback) {
4164
4086
  }
4165
4087
  }
4166
4088
 
4167
- /**
4168
- * @param {object} element
4169
- * @param {number} index
4170
- * @param {object[]} children
4171
- * @param {function} callback
4172
- */
4173
- function prefixer (element, index, children, callback) {
4174
- if (element.length > -1)
4175
- if (!element.return)
4176
- switch (element.type) {
4177
- case DECLARATION: element.return = prefix(element.value, element.length);
4178
- break
4179
- case KEYFRAMES:
4180
- return serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)
4181
- case RULESET:
4182
- if (element.length)
4183
- return combine(element.props, function (value) {
4184
- switch (match(value, /(::plac\w+|:read-\w+)/)) {
4185
- // :read-(only|write)
4186
- case ':read-only': case ':read-write':
4187
- return serialize([copy(element, {props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]})], callback)
4188
- // :placeholder
4189
- case '::placeholder':
4190
- return serialize([
4191
- copy(element, {props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]}),
4192
- copy(element, {props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]}),
4193
- copy(element, {props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]})
4194
- ], callback)
4195
- }
4196
-
4197
- return ''
4198
- })
4199
- }
4200
- }
4201
-
4202
4089
  var weakMemoize = function weakMemoize(func) {
4203
4090
  // $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
4204
4091
  var cache = new WeakMap();
@@ -4347,6 +4234,218 @@ var removeLabel = function removeLabel(element) {
4347
4234
  }
4348
4235
  };
4349
4236
 
4237
+ /* eslint-disable no-fallthrough */
4238
+
4239
+ function prefix(value, length) {
4240
+ switch (hash(value, length)) {
4241
+ // color-adjust
4242
+ case 5103:
4243
+ return WEBKIT + 'print-' + value + value;
4244
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
4245
+
4246
+ case 5737:
4247
+ case 4201:
4248
+ case 3177:
4249
+ case 3433:
4250
+ case 1641:
4251
+ case 4457:
4252
+ case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
4253
+
4254
+ case 5572:
4255
+ case 6356:
4256
+ case 5844:
4257
+ case 3191:
4258
+ case 6645:
4259
+ case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
4260
+
4261
+ case 6391:
4262
+ case 5879:
4263
+ case 5623:
4264
+ case 6135:
4265
+ case 4599:
4266
+ case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
4267
+
4268
+ case 4215:
4269
+ case 6389:
4270
+ case 5109:
4271
+ case 5365:
4272
+ case 5621:
4273
+ case 3829:
4274
+ return WEBKIT + value + value;
4275
+ // appearance, user-select, transform, hyphens, text-size-adjust
4276
+
4277
+ case 5349:
4278
+ case 4246:
4279
+ case 4810:
4280
+ case 6968:
4281
+ case 2756:
4282
+ return WEBKIT + value + MOZ + value + MS + value + value;
4283
+ // flex, flex-direction
4284
+
4285
+ case 6828:
4286
+ case 4268:
4287
+ return WEBKIT + value + MS + value + value;
4288
+ // order
4289
+
4290
+ case 6165:
4291
+ return WEBKIT + value + MS + 'flex-' + value + value;
4292
+ // align-items
4293
+
4294
+ case 5187:
4295
+ return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
4296
+ // align-self
4297
+
4298
+ case 5443:
4299
+ return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
4300
+ // align-content
4301
+
4302
+ case 4675:
4303
+ return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
4304
+ // flex-shrink
4305
+
4306
+ case 5548:
4307
+ return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
4308
+ // flex-basis
4309
+
4310
+ case 5292:
4311
+ return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
4312
+ // flex-grow
4313
+
4314
+ case 6060:
4315
+ return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
4316
+ // transition
4317
+
4318
+ case 4554:
4319
+ return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
4320
+ // cursor
4321
+
4322
+ case 6187:
4323
+ return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
4324
+ // background, background-image
4325
+
4326
+ case 5495:
4327
+ case 3959:
4328
+ return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
4329
+ // justify-content
4330
+
4331
+ case 4968:
4332
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
4333
+ // (margin|padding)-inline-(start|end)
4334
+
4335
+ case 4095:
4336
+ case 3583:
4337
+ case 4068:
4338
+ case 2532:
4339
+ return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
4340
+ // (min|max)?(width|height|inline-size|block-size)
4341
+
4342
+ case 8116:
4343
+ case 7059:
4344
+ case 5753:
4345
+ case 5535:
4346
+ case 5445:
4347
+ case 5701:
4348
+ case 4933:
4349
+ case 4677:
4350
+ case 5533:
4351
+ case 5789:
4352
+ case 5021:
4353
+ case 4765:
4354
+ // stretch, max-content, min-content, fill-available
4355
+ if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
4356
+ // (m)ax-content, (m)in-content
4357
+ case 109:
4358
+ // -
4359
+ if (charat(value, length + 4) !== 45) break;
4360
+ // (f)ill-available, (f)it-content
4361
+
4362
+ case 102:
4363
+ return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
4364
+ // (s)tretch
4365
+
4366
+ case 115:
4367
+ return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
4368
+ }
4369
+ break;
4370
+ // position: sticky
4371
+
4372
+ case 4949:
4373
+ // (s)ticky?
4374
+ if (charat(value, length + 1) !== 115) break;
4375
+ // display: (flex|inline-flex)
4376
+
4377
+ case 6444:
4378
+ switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
4379
+ // stic(k)y
4380
+ case 107:
4381
+ return replace(value, ':', ':' + WEBKIT) + value;
4382
+ // (inline-)?fl(e)x
4383
+
4384
+ case 101:
4385
+ return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
4386
+ }
4387
+
4388
+ break;
4389
+ // writing-mode
4390
+
4391
+ case 5936:
4392
+ switch (charat(value, length + 11)) {
4393
+ // vertical-l(r)
4394
+ case 114:
4395
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
4396
+ // vertical-r(l)
4397
+
4398
+ case 108:
4399
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
4400
+ // horizontal(-)tb
4401
+
4402
+ case 45:
4403
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
4404
+ }
4405
+
4406
+ return WEBKIT + value + MS + value + value;
4407
+ }
4408
+
4409
+ return value;
4410
+ }
4411
+
4412
+ var prefixer = function prefixer(element, index, children, callback) {
4413
+ if (element.length > -1) if (!element["return"]) switch (element.type) {
4414
+ case DECLARATION:
4415
+ element["return"] = prefix(element.value, element.length);
4416
+ break;
4417
+
4418
+ case KEYFRAMES:
4419
+ return serialize([copy(element, {
4420
+ value: replace(element.value, '@', '@' + WEBKIT)
4421
+ })], callback);
4422
+
4423
+ case RULESET:
4424
+ if (element.length) return combine(element.props, function (value) {
4425
+ switch (match(value, /(::plac\w+|:read-\w+)/)) {
4426
+ // :read-(only|write)
4427
+ case ':read-only':
4428
+ case ':read-write':
4429
+ return serialize([copy(element, {
4430
+ props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
4431
+ })], callback);
4432
+ // :placeholder
4433
+
4434
+ case '::placeholder':
4435
+ return serialize([copy(element, {
4436
+ props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
4437
+ }), copy(element, {
4438
+ props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
4439
+ }), copy(element, {
4440
+ props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
4441
+ })], callback);
4442
+ }
4443
+
4444
+ return '';
4445
+ });
4446
+ }
4447
+ };
4448
+
4350
4449
  var isBrowser = typeof document !== 'undefined';
4351
4450
  var getServerStylisCache = isBrowser ? undefined : weakMemoize(function () {
4352
4451
  return memoize$1(function () {
@@ -4540,17 +4639,17 @@ function StyledEngineProvider(props) {
4540
4639
  }) : children;
4541
4640
  }
4542
4641
 
4543
- /** @license MUI v5.10.8
4642
+ /** @license MUI v5.10.16
4544
4643
  *
4545
4644
  * This source code is licensed under the MIT license found in the
4546
4645
  * LICENSE file in the root directory of this source tree.
4547
4646
  */
4548
4647
  function styled$2(tag, options) {
4549
4648
  const stylesFactory = emStyled(tag, options);
4550
-
4551
4649
  return stylesFactory;
4552
- } // eslint-disable-next-line @typescript-eslint/naming-convention
4650
+ }
4553
4651
 
4652
+ // eslint-disable-next-line @typescript-eslint/naming-convention
4554
4653
  const internal_processStyles = (tag, processor) => {
4555
4654
  // Emotion attaches all the styles as `__emotion_styles`.
4556
4655
  // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
@@ -4563,14 +4662,12 @@ function _extends$4() {
4563
4662
  _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
4564
4663
  for (var i = 1; i < arguments.length; i++) {
4565
4664
  var source = arguments[i];
4566
-
4567
4665
  for (var key in source) {
4568
4666
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4569
4667
  target[key] = source[key];
4570
4668
  }
4571
4669
  }
4572
4670
  }
4573
-
4574
4671
  return target;
4575
4672
  };
4576
4673
  return _extends$4.apply(this, arguments);
@@ -4583,14 +4680,12 @@ function deepmerge(target, source, options = {
4583
4680
  clone: true
4584
4681
  }) {
4585
4682
  const output = options.clone ? _extends$4({}, target) : target;
4586
-
4587
4683
  if (isPlainObject(target) && isPlainObject(source)) {
4588
4684
  Object.keys(source).forEach(key => {
4589
4685
  // Avoid prototype pollution
4590
4686
  if (key === '__proto__') {
4591
4687
  return;
4592
4688
  }
4593
-
4594
4689
  if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
4595
4690
  // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
4596
4691
  output[key] = deepmerge(target[key], source[key], options);
@@ -4599,7 +4694,6 @@ function deepmerge(target, source, options = {
4599
4694
  }
4600
4695
  });
4601
4696
  }
4602
-
4603
4697
  return output;
4604
4698
  }
4605
4699
 
@@ -4612,16 +4706,13 @@ function formatMuiErrorMessage(code) {
4612
4706
  // Apply babel-plugin-transform-template-literals in loose mode
4613
4707
  // loose mode is safe iff we're concatenating primitives
4614
4708
  // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose
4615
-
4616
4709
  /* eslint-disable prefer-template */
4617
4710
  let url = 'https://mui.com/production-error/?code=' + code;
4618
-
4619
4711
  for (let i = 1; i < arguments.length; i += 1) {
4620
4712
  // rest params over-transpile for this case
4621
4713
  // eslint-disable-next-line prefer-rest-params
4622
4714
  url += '&args[]=' + encodeURIComponent(arguments[i]);
4623
4715
  }
4624
-
4625
4716
  return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';
4626
4717
  /* eslint-enable prefer-template */
4627
4718
  }
@@ -4634,30 +4725,24 @@ function capitalize(string) {
4634
4725
  if (typeof string !== 'string') {
4635
4726
  throw new Error(formatMuiErrorMessage(7));
4636
4727
  }
4637
-
4638
4728
  return string.charAt(0).toUpperCase() + string.slice(1);
4639
4729
  }
4640
4730
 
4641
4731
  const defaultGenerator = componentName => componentName;
4642
-
4643
4732
  const createClassNameGenerator = () => {
4644
4733
  let generate = defaultGenerator;
4645
4734
  return {
4646
4735
  configure(generator) {
4647
4736
  generate = generator;
4648
4737
  },
4649
-
4650
4738
  generate(componentName) {
4651
4739
  return generate(componentName);
4652
4740
  },
4653
-
4654
4741
  reset() {
4655
4742
  generate = defaultGenerator;
4656
4743
  }
4657
-
4658
4744
  };
4659
4745
  };
4660
-
4661
4746
  const ClassNameGenerator = createClassNameGenerator();
4662
4747
  var ClassNameGenerator$1 = ClassNameGenerator;
4663
4748
 
@@ -4690,14 +4775,12 @@ function _extends$3() {
4690
4775
  _extends$3 = Object.assign ? Object.assign.bind() : function (target) {
4691
4776
  for (var i = 1; i < arguments.length; i++) {
4692
4777
  var source = arguments[i];
4693
-
4694
4778
  for (var key in source) {
4695
4779
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4696
4780
  target[key] = source[key];
4697
4781
  }
4698
4782
  }
4699
4783
  }
4700
-
4701
4784
  return target;
4702
4785
  };
4703
4786
  return _extends$3.apply(this, arguments);
@@ -4707,15 +4790,13 @@ function merge(acc, item) {
4707
4790
  if (!item) {
4708
4791
  return acc;
4709
4792
  }
4710
-
4711
4793
  return deepmerge(acc, item, {
4712
4794
  clone: false // No need to clone deep, it's way faster.
4713
-
4714
4795
  });
4715
4796
  }
4716
4797
 
4798
+ // The breakpoint **start** at this value.
4717
4799
  // For instance with the first breakpoint xs: [xs, sm[.
4718
-
4719
4800
  const values = {
4720
4801
  xs: 0,
4721
4802
  // phone
@@ -4726,8 +4807,8 @@ const values = {
4726
4807
  lg: 1200,
4727
4808
  // desktop
4728
4809
  xl: 1536 // large screen
4729
-
4730
4810
  };
4811
+
4731
4812
  const defaultBreakpoints = {
4732
4813
  // Sorted ASC by size. That's important.
4733
4814
  // It can't be configured as it's used statically for propTypes.
@@ -4736,7 +4817,6 @@ const defaultBreakpoints = {
4736
4817
  };
4737
4818
  function handleBreakpoints(props, propValue, styleFromPropValue) {
4738
4819
  const theme = props.theme || {};
4739
-
4740
4820
  if (Array.isArray(propValue)) {
4741
4821
  const themeBreakpoints = theme.breakpoints || defaultBreakpoints;
4742
4822
  return propValue.reduce((acc, item, index) => {
@@ -4744,7 +4824,6 @@ function handleBreakpoints(props, propValue, styleFromPropValue) {
4744
4824
  return acc;
4745
4825
  }, {});
4746
4826
  }
4747
-
4748
4827
  if (typeof propValue === 'object') {
4749
4828
  const themeBreakpoints = theme.breakpoints || defaultBreakpoints;
4750
4829
  return Object.keys(propValue).reduce((acc, breakpoint) => {
@@ -4756,18 +4835,14 @@ function handleBreakpoints(props, propValue, styleFromPropValue) {
4756
4835
  const cssKey = breakpoint;
4757
4836
  acc[cssKey] = propValue[cssKey];
4758
4837
  }
4759
-
4760
4838
  return acc;
4761
4839
  }, {});
4762
4840
  }
4763
-
4764
4841
  const output = styleFromPropValue(propValue);
4765
4842
  return output;
4766
4843
  }
4767
-
4768
4844
  function createEmptyBreakpointObject(breakpointsInput = {}) {
4769
4845
  var _breakpointsInput$key;
4770
-
4771
4846
  const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {
4772
4847
  const breakpointStyleKey = breakpointsInput.up(key);
4773
4848
  acc[breakpointStyleKey] = {};
@@ -4779,11 +4854,9 @@ function removeUnusedBreakpoints(breakpointKeys, style) {
4779
4854
  return breakpointKeys.reduce((acc, key) => {
4780
4855
  const breakpointOutput = acc[key];
4781
4856
  const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;
4782
-
4783
4857
  if (isBreakpointUnused) {
4784
4858
  delete acc[key];
4785
4859
  }
4786
-
4787
4860
  return acc;
4788
4861
  }, style);
4789
4862
  }
@@ -4791,29 +4864,24 @@ function removeUnusedBreakpoints(breakpointKeys, style) {
4791
4864
  function getPath$1(obj, path, checkVars = true) {
4792
4865
  if (!path || typeof path !== 'string') {
4793
4866
  return null;
4794
- } // Check if CSS variables are used
4795
-
4867
+ }
4796
4868
 
4869
+ // Check if CSS variables are used
4797
4870
  if (obj && obj.vars && checkVars) {
4798
4871
  const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);
4799
-
4800
4872
  if (val != null) {
4801
4873
  return val;
4802
4874
  }
4803
4875
  }
4804
-
4805
4876
  return path.split('.').reduce((acc, item) => {
4806
4877
  if (acc && acc[item] != null) {
4807
4878
  return acc[item];
4808
4879
  }
4809
-
4810
4880
  return null;
4811
4881
  }, obj);
4812
4882
  }
4813
-
4814
- function getValue$3(themeMapping, transform, propValueFinal, userValue = propValueFinal) {
4883
+ function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {
4815
4884
  let value;
4816
-
4817
4885
  if (typeof themeMapping === 'function') {
4818
4886
  value = themeMapping(propValueFinal);
4819
4887
  } else if (Array.isArray(themeMapping)) {
@@ -4821,14 +4889,11 @@ function getValue$3(themeMapping, transform, propValueFinal, userValue = propVal
4821
4889
  } else {
4822
4890
  value = getPath$1(themeMapping, propValueFinal) || userValue;
4823
4891
  }
4824
-
4825
4892
  if (transform) {
4826
4893
  value = transform(value, userValue);
4827
4894
  }
4828
-
4829
4895
  return value;
4830
4896
  }
4831
-
4832
4897
  function style$1(options) {
4833
4898
  const {
4834
4899
  prop,
@@ -4836,36 +4901,28 @@ function style$1(options) {
4836
4901
  themeKey,
4837
4902
  transform
4838
4903
  } = options;
4839
-
4840
4904
  const fn = props => {
4841
4905
  if (props[prop] == null) {
4842
4906
  return null;
4843
4907
  }
4844
-
4845
4908
  const propValue = props[prop];
4846
4909
  const theme = props.theme;
4847
4910
  const themeMapping = getPath$1(theme, themeKey) || {};
4848
-
4849
4911
  const styleFromPropValue = propValueFinal => {
4850
- let value = getValue$3(themeMapping, transform, propValueFinal);
4851
-
4912
+ let value = getStyleValue(themeMapping, transform, propValueFinal);
4852
4913
  if (propValueFinal === value && typeof propValueFinal === 'string') {
4853
4914
  // Haven't found value
4854
- value = getValue$3(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);
4915
+ value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);
4855
4916
  }
4856
-
4857
4917
  if (cssProperty === false) {
4858
4918
  return value;
4859
4919
  }
4860
-
4861
4920
  return {
4862
4921
  [cssProperty]: value
4863
4922
  };
4864
4923
  };
4865
-
4866
4924
  return handleBreakpoints(props, propValue, styleFromPropValue);
4867
4925
  };
4868
-
4869
4926
  fn.propTypes = {};
4870
4927
  fn.filterProps = [prop];
4871
4928
  return fn;
@@ -4878,17 +4935,14 @@ function compose(...styles) {
4878
4935
  });
4879
4936
  return acc;
4880
4937
  }, {});
4881
-
4882
4938
  const fn = props => {
4883
4939
  return Object.keys(props).reduce((acc, prop) => {
4884
4940
  if (handlers[prop]) {
4885
4941
  return merge(acc, handlers[prop](props));
4886
4942
  }
4887
-
4888
4943
  return acc;
4889
4944
  }, {});
4890
4945
  };
4891
-
4892
4946
  fn.propTypes = {};
4893
4947
  fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);
4894
4948
  return fn;
@@ -4900,7 +4954,6 @@ function memoize(fn) {
4900
4954
  if (cache[arg] === undefined) {
4901
4955
  cache[arg] = fn(arg);
4902
4956
  }
4903
-
4904
4957
  return cache[arg];
4905
4958
  };
4906
4959
  }
@@ -4922,10 +4975,11 @@ const aliases = {
4922
4975
  marginY: 'my',
4923
4976
  paddingX: 'px',
4924
4977
  paddingY: 'py'
4925
- }; // memoize() impact:
4978
+ };
4979
+
4980
+ // memoize() impact:
4926
4981
  // From 300,000 ops/sec
4927
4982
  // To 350,000 ops/sec
4928
-
4929
4983
  const getCssProperties = memoize(prop => {
4930
4984
  // It's not a shorthand notation.
4931
4985
  if (prop.length > 2) {
@@ -4935,7 +4989,6 @@ const getCssProperties = memoize(prop => {
4935
4989
  return [prop];
4936
4990
  }
4937
4991
  }
4938
-
4939
4992
  const [a, b] = prop.split('');
4940
4993
  const property = properties[a];
4941
4994
  const direction = directions[b] || '';
@@ -4946,33 +4999,26 @@ const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddin
4946
4999
  const spacingKeys = [...marginKeys, ...paddingKeys];
4947
5000
  function createUnaryUnit(theme, themeKey, defaultValue, propName) {
4948
5001
  var _getPath;
4949
-
4950
5002
  const themeSpacing = (_getPath = getPath$1(theme, themeKey, false)) != null ? _getPath : defaultValue;
4951
-
4952
5003
  if (typeof themeSpacing === 'number') {
4953
5004
  return abs => {
4954
5005
  if (typeof abs === 'string') {
4955
5006
  return abs;
4956
5007
  }
4957
-
4958
5008
  return themeSpacing * abs;
4959
5009
  };
4960
5010
  }
4961
-
4962
5011
  if (Array.isArray(themeSpacing)) {
4963
5012
  return abs => {
4964
5013
  if (typeof abs === 'string') {
4965
5014
  return abs;
4966
5015
  }
4967
-
4968
5016
  return themeSpacing[abs];
4969
5017
  };
4970
5018
  }
4971
-
4972
5019
  if (typeof themeSpacing === 'function') {
4973
5020
  return themeSpacing;
4974
5021
  }
4975
-
4976
5022
  return () => undefined;
4977
5023
  }
4978
5024
  function createUnarySpacing(theme) {
@@ -4982,18 +5028,14 @@ function getValue$2(transformer, propValue) {
4982
5028
  if (typeof propValue === 'string' || propValue == null) {
4983
5029
  return propValue;
4984
5030
  }
4985
-
4986
5031
  const abs = Math.abs(propValue);
4987
5032
  const transformed = transformer(abs);
4988
-
4989
5033
  if (propValue >= 0) {
4990
5034
  return transformed;
4991
5035
  }
4992
-
4993
5036
  if (typeof transformed === 'number') {
4994
5037
  return -transformed;
4995
5038
  }
4996
-
4997
5039
  return `-${transformed}`;
4998
5040
  }
4999
5041
  function getStyleFromPropValue(cssProperties, transformer) {
@@ -5002,29 +5044,24 @@ function getStyleFromPropValue(cssProperties, transformer) {
5002
5044
  return acc;
5003
5045
  }, {});
5004
5046
  }
5005
-
5006
5047
  function resolveCssProperty(props, keys, prop, transformer) {
5007
5048
  // Using a hash computation over an array iteration could be faster, but with only 28 items,
5008
5049
  // it's doesn't worth the bundle size.
5009
5050
  if (keys.indexOf(prop) === -1) {
5010
5051
  return null;
5011
5052
  }
5012
-
5013
5053
  const cssProperties = getCssProperties(prop);
5014
5054
  const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
5015
5055
  const propValue = props[prop];
5016
5056
  return handleBreakpoints(props, propValue, styleFromPropValue);
5017
5057
  }
5018
-
5019
5058
  function style(props, keys) {
5020
5059
  const transformer = createUnarySpacing(props.theme);
5021
5060
  return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});
5022
5061
  }
5023
-
5024
5062
  function spacing(props) {
5025
5063
  return style(props, spacingKeys);
5026
5064
  }
5027
-
5028
5065
  spacing.propTypes = {};
5029
5066
  spacing.filterProps = spacingKeys;
5030
5067
 
@@ -5032,10 +5069,8 @@ function getBorder(value) {
5032
5069
  if (typeof value !== 'number') {
5033
5070
  return value;
5034
5071
  }
5035
-
5036
5072
  return `${value}px solid`;
5037
5073
  }
5038
-
5039
5074
  const border = style$1({
5040
5075
  prop: 'border',
5041
5076
  themeKey: 'borders',
@@ -5084,14 +5119,11 @@ const borderLeftColor = style$1({
5084
5119
  const borderRadius$1 = props => {
5085
5120
  if (props.borderRadius !== undefined && props.borderRadius !== null) {
5086
5121
  const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4);
5087
-
5088
5122
  const styleFromPropValue = propValue => ({
5089
5123
  borderRadius: getValue$2(transformer, propValue)
5090
5124
  });
5091
-
5092
5125
  return handleBreakpoints(props, props.borderRadius, styleFromPropValue);
5093
5126
  }
5094
-
5095
5127
  return null;
5096
5128
  };
5097
5129
  borderRadius$1.propTypes = {};
@@ -5170,14 +5202,11 @@ var flexbox$1 = flexbox;
5170
5202
  const gap = props => {
5171
5203
  if (props.gap !== undefined && props.gap !== null) {
5172
5204
  const transformer = createUnaryUnit(props.theme, 'spacing', 8);
5173
-
5174
5205
  const styleFromPropValue = propValue => ({
5175
5206
  gap: getValue$2(transformer, propValue)
5176
5207
  });
5177
-
5178
5208
  return handleBreakpoints(props, props.gap, styleFromPropValue);
5179
5209
  }
5180
-
5181
5210
  return null;
5182
5211
  };
5183
5212
  gap.propTypes = {};
@@ -5185,14 +5214,11 @@ gap.filterProps = ['gap'];
5185
5214
  const columnGap = props => {
5186
5215
  if (props.columnGap !== undefined && props.columnGap !== null) {
5187
5216
  const transformer = createUnaryUnit(props.theme, 'spacing', 8);
5188
-
5189
5217
  const styleFromPropValue = propValue => ({
5190
5218
  columnGap: getValue$2(transformer, propValue)
5191
5219
  });
5192
-
5193
5220
  return handleBreakpoints(props, props.columnGap, styleFromPropValue);
5194
5221
  }
5195
-
5196
5222
  return null;
5197
5223
  };
5198
5224
  columnGap.propTypes = {};
@@ -5200,14 +5226,11 @@ columnGap.filterProps = ['columnGap'];
5200
5226
  const rowGap = props => {
5201
5227
  if (props.rowGap !== undefined && props.rowGap !== null) {
5202
5228
  const transformer = createUnaryUnit(props.theme, 'spacing', 8);
5203
-
5204
5229
  const styleFromPropValue = propValue => ({
5205
5230
  rowGap: getValue$2(transformer, propValue)
5206
5231
  });
5207
-
5208
5232
  return handleBreakpoints(props, props.rowGap, styleFromPropValue);
5209
5233
  }
5210
-
5211
5234
  return null;
5212
5235
  };
5213
5236
  rowGap.propTypes = {};
@@ -5246,10 +5269,8 @@ function transform$1(value, userValue) {
5246
5269
  if (userValue === 'grey') {
5247
5270
  return userValue;
5248
5271
  }
5249
-
5250
5272
  return value;
5251
5273
  }
5252
-
5253
5274
  const color = style$1({
5254
5275
  prop: 'color',
5255
5276
  themeKey: 'palette',
@@ -5299,7 +5320,6 @@ var shadows$2 = boxShadow;
5299
5320
  function transform(value) {
5300
5321
  return value <= 1 && value !== 0 ? `${value * 100}%` : value;
5301
5322
  }
5302
-
5303
5323
  const width = style$1({
5304
5324
  prop: 'width',
5305
5325
  transform
@@ -5308,16 +5328,13 @@ const maxWidth = props => {
5308
5328
  if (props.maxWidth !== undefined && props.maxWidth !== null) {
5309
5329
  const styleFromPropValue = propValue => {
5310
5330
  var _props$theme, _props$theme$breakpoi, _props$theme$breakpoi2;
5311
-
5312
5331
  const breakpoint = ((_props$theme = props.theme) == null ? void 0 : (_props$theme$breakpoi = _props$theme.breakpoints) == null ? void 0 : (_props$theme$breakpoi2 = _props$theme$breakpoi.values) == null ? void 0 : _props$theme$breakpoi2[propValue]) || values[propValue];
5313
5332
  return {
5314
5333
  maxWidth: breakpoint || transform(propValue)
5315
5334
  };
5316
5335
  };
5317
-
5318
5336
  return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
5319
5337
  }
5320
-
5321
5338
  return null;
5322
5339
  };
5323
5340
  maxWidth.filterProps = ['maxWidth'];
@@ -5425,12 +5442,11 @@ function objectsHaveSameKeys(...objects) {
5425
5442
  const union = new Set(allKeys);
5426
5443
  return objects.every(object => union.size === Object.keys(object).length);
5427
5444
  }
5428
-
5429
5445
  function callIfFn(maybeFn, arg) {
5430
5446
  return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;
5431
- } // eslint-disable-next-line @typescript-eslint/naming-convention
5432
-
5447
+ }
5433
5448
 
5449
+ // eslint-disable-next-line @typescript-eslint/naming-convention
5434
5450
  function unstable_createStyleFunctionSx(styleFunctionMapping$1 = styleFunctionMapping) {
5435
5451
  const propToStyleFunction = Object.keys(styleFunctionMapping$1).reduce((acc, styleFnName) => {
5436
5452
  styleFunctionMapping$1[styleFnName].filterProps.forEach(propName => {
@@ -5438,7 +5454,6 @@ function unstable_createStyleFunctionSx(styleFunctionMapping$1 = styleFunctionMa
5438
5454
  });
5439
5455
  return acc;
5440
5456
  }, {});
5441
-
5442
5457
  function getThemeValue(prop, value, theme) {
5443
5458
  const inputProps = {
5444
5459
  [prop]: value,
@@ -5449,43 +5464,36 @@ function unstable_createStyleFunctionSx(styleFunctionMapping$1 = styleFunctionMa
5449
5464
  [prop]: value
5450
5465
  };
5451
5466
  }
5452
-
5453
5467
  function styleFunctionSx(props) {
5454
5468
  const {
5455
5469
  sx,
5456
5470
  theme = {}
5457
5471
  } = props || {};
5458
-
5459
5472
  if (!sx) {
5460
5473
  return null; // Emotion & styled-components will neglect null
5461
5474
  }
5475
+
5462
5476
  /*
5463
5477
  * Receive `sxInput` as object or callback
5464
5478
  * and then recursively check keys & values to create media query object styles.
5465
5479
  * (the result will be used in `styled`)
5466
5480
  */
5467
-
5468
-
5469
5481
  function traverse(sxInput) {
5470
5482
  let sxObject = sxInput;
5471
-
5472
5483
  if (typeof sxInput === 'function') {
5473
5484
  sxObject = sxInput(theme);
5474
5485
  } else if (typeof sxInput !== 'object') {
5475
5486
  // value
5476
5487
  return sxInput;
5477
5488
  }
5478
-
5479
5489
  if (!sxObject) {
5480
5490
  return null;
5481
5491
  }
5482
-
5483
5492
  const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);
5484
5493
  const breakpointsKeys = Object.keys(emptyBreakpoints);
5485
5494
  let css = emptyBreakpoints;
5486
5495
  Object.keys(sxObject).forEach(styleKey => {
5487
5496
  const value = callIfFn(sxObject[styleKey], theme);
5488
-
5489
5497
  if (value !== null && value !== undefined) {
5490
5498
  if (typeof value === 'object') {
5491
5499
  if (propToStyleFunction[styleKey]) {
@@ -5496,7 +5504,6 @@ function unstable_createStyleFunctionSx(styleFunctionMapping$1 = styleFunctionMa
5496
5504
  }, value, x => ({
5497
5505
  [styleKey]: x
5498
5506
  }));
5499
-
5500
5507
  if (objectsHaveSameKeys(breakpointsValues, value)) {
5501
5508
  css[styleKey] = styleFunctionSx({
5502
5509
  sx: value,
@@ -5513,10 +5520,8 @@ function unstable_createStyleFunctionSx(styleFunctionMapping$1 = styleFunctionMa
5513
5520
  });
5514
5521
  return removeUnusedBreakpoints(breakpointsKeys, css);
5515
5522
  }
5516
-
5517
5523
  return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
5518
5524
  }
5519
-
5520
5525
  return styleFunctionSx;
5521
5526
  }
5522
5527
  const styleFunctionSx = unstable_createStyleFunctionSx();
@@ -5528,95 +5533,81 @@ function _objectWithoutPropertiesLoose(source, excluded) {
5528
5533
  var target = {};
5529
5534
  var sourceKeys = Object.keys(source);
5530
5535
  var key, i;
5531
-
5532
5536
  for (i = 0; i < sourceKeys.length; i++) {
5533
5537
  key = sourceKeys[i];
5534
5538
  if (excluded.indexOf(key) >= 0) continue;
5535
5539
  target[key] = source[key];
5536
5540
  }
5537
-
5538
5541
  return target;
5539
5542
  }
5540
5543
 
5541
5544
  const _excluded$b = ["values", "unit", "step"];
5542
-
5543
5545
  const sortBreakpointsValues = values => {
5544
5546
  const breakpointsAsArray = Object.keys(values).map(key => ({
5545
5547
  key,
5546
5548
  val: values[key]
5547
- })) || []; // Sort in ascending order
5548
-
5549
+ })) || [];
5550
+ // Sort in ascending order
5549
5551
  breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
5550
5552
  return breakpointsAsArray.reduce((acc, obj) => {
5551
5553
  return _extends$3({}, acc, {
5552
5554
  [obj.key]: obj.val
5553
5555
  });
5554
5556
  }, {});
5555
- }; // Keep in mind that @media is inclusive by the CSS specification.
5556
-
5557
+ };
5557
5558
 
5559
+ // Keep in mind that @media is inclusive by the CSS specification.
5558
5560
  function createBreakpoints(breakpoints) {
5559
5561
  const {
5560
- // The breakpoint **start** at this value.
5561
- // For instance with the first breakpoint xs: [xs, sm).
5562
- values = {
5563
- xs: 0,
5564
- // phone
5565
- sm: 600,
5566
- // tablet
5567
- md: 900,
5568
- // small laptop
5569
- lg: 1200,
5570
- // desktop
5571
- xl: 1536 // large screen
5572
-
5573
- },
5574
- unit = 'px',
5575
- step = 5
5576
- } = breakpoints,
5577
- other = _objectWithoutPropertiesLoose(breakpoints, _excluded$b);
5562
+ // The breakpoint **start** at this value.
5563
+ // For instance with the first breakpoint xs: [xs, sm).
5564
+ values = {
5565
+ xs: 0,
5566
+ // phone
5567
+ sm: 600,
5568
+ // tablet
5569
+ md: 900,
5570
+ // small laptop
5571
+ lg: 1200,
5572
+ // desktop
5573
+ xl: 1536 // large screen
5574
+ },
5578
5575
 
5576
+ unit = 'px',
5577
+ step = 5
5578
+ } = breakpoints,
5579
+ other = _objectWithoutPropertiesLoose(breakpoints, _excluded$b);
5579
5580
  const sortedValues = sortBreakpointsValues(values);
5580
5581
  const keys = Object.keys(sortedValues);
5581
-
5582
5582
  function up(key) {
5583
5583
  const value = typeof values[key] === 'number' ? values[key] : key;
5584
5584
  return `@media (min-width:${value}${unit})`;
5585
5585
  }
5586
-
5587
5586
  function down(key) {
5588
5587
  const value = typeof values[key] === 'number' ? values[key] : key;
5589
5588
  return `@media (max-width:${value - step / 100}${unit})`;
5590
5589
  }
5591
-
5592
5590
  function between(start, end) {
5593
5591
  const endIndex = keys.indexOf(end);
5594
5592
  return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
5595
5593
  }
5596
-
5597
5594
  function only(key) {
5598
5595
  if (keys.indexOf(key) + 1 < keys.length) {
5599
5596
  return between(key, keys[keys.indexOf(key) + 1]);
5600
5597
  }
5601
-
5602
5598
  return up(key);
5603
5599
  }
5604
-
5605
5600
  function not(key) {
5606
5601
  // handle first and last key separately, for better readability
5607
5602
  const keyIndex = keys.indexOf(key);
5608
-
5609
5603
  if (keyIndex === 0) {
5610
5604
  return up(keys[1]);
5611
5605
  }
5612
-
5613
5606
  if (keyIndex === keys.length - 1) {
5614
5607
  return down(keys[keyIndex]);
5615
5608
  }
5616
-
5617
5609
  return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
5618
5610
  }
5619
-
5620
5611
  return _extends$3({
5621
5612
  keys,
5622
5613
  values: sortedValues,
@@ -5635,43 +5626,39 @@ const shape = {
5635
5626
  var shape$1 = shape;
5636
5627
 
5637
5628
  /* tslint:enable:unified-signatures */
5629
+
5638
5630
  function createSpacing(spacingInput = 8) {
5639
5631
  // Already transformed.
5640
5632
  if (spacingInput.mui) {
5641
5633
  return spacingInput;
5642
- } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
5634
+ }
5635
+
5636
+ // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
5643
5637
  // Smaller components, such as icons, can align to a 4dp grid.
5644
5638
  // https://m2.material.io/design/layout/understanding-layout.html
5645
-
5646
-
5647
5639
  const transform = createUnarySpacing({
5648
5640
  spacing: spacingInput
5649
5641
  });
5650
-
5651
5642
  const spacing = (...argsInput) => {
5652
-
5653
5643
  const args = argsInput.length === 0 ? [1] : argsInput;
5654
5644
  return args.map(argument => {
5655
5645
  const output = transform(argument);
5656
5646
  return typeof output === 'number' ? `${output}px` : output;
5657
5647
  }).join(' ');
5658
5648
  };
5659
-
5660
5649
  spacing.mui = true;
5661
5650
  return spacing;
5662
5651
  }
5663
5652
 
5664
5653
  const _excluded$a = ["breakpoints", "palette", "spacing", "shape"];
5665
-
5666
5654
  function createTheme$1(options = {}, ...args) {
5667
5655
  const {
5668
- breakpoints: breakpointsInput = {},
5669
- palette: paletteInput = {},
5670
- spacing: spacingInput,
5671
- shape: shapeInput = {}
5672
- } = options,
5673
- other = _objectWithoutPropertiesLoose(options, _excluded$a);
5674
-
5656
+ breakpoints: breakpointsInput = {},
5657
+ palette: paletteInput = {},
5658
+ spacing: spacingInput,
5659
+ shape: shapeInput = {}
5660
+ } = options,
5661
+ other = _objectWithoutPropertiesLoose(options, _excluded$a);
5675
5662
  const breakpoints = createBreakpoints(breakpointsInput);
5676
5663
  const spacing = createSpacing(spacingInput);
5677
5664
  let muiTheme = deepmerge({
@@ -5693,26 +5680,22 @@ function _extends$2() {
5693
5680
  _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
5694
5681
  for (var i = 1; i < arguments.length; i++) {
5695
5682
  var source = arguments[i];
5696
-
5697
5683
  for (var key in source) {
5698
5684
  if (Object.prototype.hasOwnProperty.call(source, key)) {
5699
5685
  target[key] = source[key];
5700
5686
  }
5701
5687
  }
5702
5688
  }
5703
-
5704
5689
  return target;
5705
5690
  };
5706
5691
  return _extends$2.apply(this, arguments);
5707
5692
  }
5708
5693
 
5709
5694
  const ThemeContext = /*#__PURE__*/React.createContext(null);
5710
-
5711
5695
  var ThemeContext$1 = ThemeContext;
5712
5696
 
5713
5697
  function useTheme$4() {
5714
5698
  const theme = React.useContext(ThemeContext$1);
5715
-
5716
5699
  return theme;
5717
5700
  }
5718
5701
 
@@ -5722,33 +5705,27 @@ var nested = hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';
5722
5705
  function mergeOuterLocalTheme(outerTheme, localTheme) {
5723
5706
  if (typeof localTheme === 'function') {
5724
5707
  const mergedTheme = localTheme(outerTheme);
5725
-
5726
5708
  return mergedTheme;
5727
5709
  }
5728
-
5729
5710
  return _extends$2({}, outerTheme, localTheme);
5730
5711
  }
5712
+
5731
5713
  /**
5732
5714
  * This component takes a `theme` prop.
5733
5715
  * It makes the `theme` available down the React tree thanks to React context.
5734
5716
  * This component should preferably be used at **the root of your component tree**.
5735
5717
  */
5736
-
5737
-
5738
5718
  function ThemeProvider$1(props) {
5739
5719
  const {
5740
5720
  children,
5741
5721
  theme: localTheme
5742
5722
  } = props;
5743
5723
  const outerTheme = useTheme$4();
5744
-
5745
5724
  const theme = React.useMemo(() => {
5746
5725
  const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
5747
-
5748
5726
  if (output != null) {
5749
5727
  output[nested] = outerTheme !== null;
5750
5728
  }
5751
-
5752
5729
  return output;
5753
5730
  }, [localTheme, outerTheme]);
5754
5731
  return /*#__PURE__*/jsxRuntime.exports.jsx(ThemeContext$1.Provider, {
@@ -5760,36 +5737,31 @@ function ThemeProvider$1(props) {
5760
5737
  function isObjectEmpty(obj) {
5761
5738
  return Object.keys(obj).length === 0;
5762
5739
  }
5763
-
5764
5740
  function useTheme$3(defaultTheme = null) {
5765
5741
  const contextTheme = useTheme$4();
5766
5742
  return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
5767
5743
  }
5768
5744
 
5769
5745
  const systemDefaultTheme$1 = createTheme$1();
5770
-
5771
5746
  function useTheme$2(defaultTheme = systemDefaultTheme$1) {
5772
5747
  return useTheme$3(defaultTheme);
5773
5748
  }
5774
5749
 
5775
5750
  const _excluded$9 = ["variant"];
5776
-
5777
5751
  function isEmpty$2(string) {
5778
5752
  return string.length === 0;
5779
5753
  }
5754
+
5780
5755
  /**
5781
5756
  * Generates string classKey based on the properties provided. It starts with the
5782
5757
  * variant if defined, and then it appends all other properties in alphabetical order.
5783
5758
  * @param {object} props - the properties for which the classKey should be created.
5784
5759
  */
5785
-
5786
-
5787
5760
  function propsToClassKey(props) {
5788
5761
  const {
5789
- variant
5790
- } = props,
5791
- other = _objectWithoutPropertiesLoose(props, _excluded$9);
5792
-
5762
+ variant
5763
+ } = props,
5764
+ other = _objectWithoutPropertiesLoose(props, _excluded$9);
5793
5765
  let classKey = variant || '';
5794
5766
  Object.keys(other).sort().forEach(key => {
5795
5767
  if (key === 'color') {
@@ -5802,36 +5774,31 @@ function propsToClassKey(props) {
5802
5774
  }
5803
5775
 
5804
5776
  const _excluded$8 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
5805
- _excluded2$2 = ["theme"],
5806
- _excluded3 = ["theme"];
5807
-
5777
+ _excluded2$2 = ["theme"],
5778
+ _excluded3 = ["theme"];
5808
5779
  function isEmpty$1(obj) {
5809
5780
  return Object.keys(obj).length === 0;
5810
- } // https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40
5811
-
5781
+ }
5812
5782
 
5783
+ // https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40
5813
5784
  function isStringTag(tag) {
5814
- return typeof tag === 'string' && // 96 is one less than the char code
5785
+ return typeof tag === 'string' &&
5786
+ // 96 is one less than the char code
5815
5787
  // for "a" so this is checking that
5816
5788
  // it's a lowercase character
5817
5789
  tag.charCodeAt(0) > 96;
5818
5790
  }
5819
-
5820
5791
  const getStyleOverrides = (name, theme) => {
5821
5792
  if (theme.components && theme.components[name] && theme.components[name].styleOverrides) {
5822
5793
  return theme.components[name].styleOverrides;
5823
5794
  }
5824
-
5825
5795
  return null;
5826
5796
  };
5827
-
5828
5797
  const getVariantStyles = (name, theme) => {
5829
5798
  let variants = [];
5830
-
5831
5799
  if (theme && theme.components && theme.components[name] && theme.components[name].variants) {
5832
5800
  variants = theme.components[name].variants;
5833
5801
  }
5834
-
5835
5802
  const variantsStyles = {};
5836
5803
  variants.forEach(definition => {
5837
5804
  const key = propsToClassKey(definition.props);
@@ -5839,16 +5806,13 @@ const getVariantStyles = (name, theme) => {
5839
5806
  });
5840
5807
  return variantsStyles;
5841
5808
  };
5842
-
5843
5809
  const variantsResolver = (props, styles, theme, name) => {
5844
5810
  var _theme$components, _theme$components$nam;
5845
-
5846
5811
  const {
5847
5812
  ownerState = {}
5848
5813
  } = props;
5849
5814
  const variantsStyles = [];
5850
5815
  const themeVariants = theme == null ? void 0 : (_theme$components = theme.components) == null ? void 0 : (_theme$components$nam = _theme$components[name]) == null ? void 0 : _theme$components$nam.variants;
5851
-
5852
5816
  if (themeVariants) {
5853
5817
  themeVariants.forEach(themeVariant => {
5854
5818
  let isMatch = true;
@@ -5857,22 +5821,19 @@ const variantsResolver = (props, styles, theme, name) => {
5857
5821
  isMatch = false;
5858
5822
  }
5859
5823
  });
5860
-
5861
5824
  if (isMatch) {
5862
5825
  variantsStyles.push(styles[propsToClassKey(themeVariant.props)]);
5863
5826
  }
5864
5827
  });
5865
5828
  }
5866
-
5867
5829
  return variantsStyles;
5868
- }; // Update /system/styled/#api in case if this changes
5869
-
5830
+ };
5870
5831
 
5832
+ // Update /system/styled/#api in case if this changes
5871
5833
  function shouldForwardProp(prop) {
5872
5834
  return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
5873
5835
  }
5874
5836
  const systemDefaultTheme = createTheme$1();
5875
-
5876
5837
  function createStyled(input = {}) {
5877
5838
  const {
5878
5839
  defaultTheme = systemDefaultTheme,
@@ -5880,35 +5841,30 @@ function createStyled(input = {}) {
5880
5841
  slotShouldForwardProp = shouldForwardProp,
5881
5842
  styleFunctionSx = defaultStyleFunctionSx
5882
5843
  } = input;
5883
-
5884
5844
  const systemSx = props => {
5885
5845
  const theme = isEmpty$1(props.theme) ? defaultTheme : props.theme;
5886
5846
  return styleFunctionSx(_extends$3({}, props, {
5887
5847
  theme
5888
5848
  }));
5889
5849
  };
5890
-
5891
5850
  systemSx.__mui_systemSx = true;
5892
5851
  return (tag, inputOptions = {}) => {
5893
5852
  // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.
5894
5853
  internal_processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));
5895
-
5896
5854
  const {
5897
- name: componentName,
5898
- slot: componentSlot,
5899
- skipVariantsResolver: inputSkipVariantsResolver,
5900
- skipSx: inputSkipSx,
5901
- overridesResolver
5902
- } = inputOptions,
5903
- options = _objectWithoutPropertiesLoose(inputOptions, _excluded$8); // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
5904
-
5905
-
5855
+ name: componentName,
5856
+ slot: componentSlot,
5857
+ skipVariantsResolver: inputSkipVariantsResolver,
5858
+ skipSx: inputSkipSx,
5859
+ overridesResolver
5860
+ } = inputOptions,
5861
+ options = _objectWithoutPropertiesLoose(inputOptions, _excluded$8);
5862
+
5863
+ // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
5906
5864
  const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
5907
5865
  const skipSx = inputSkipSx || false;
5908
5866
  let label;
5909
-
5910
5867
  let shouldForwardPropOption = shouldForwardProp;
5911
-
5912
5868
  if (componentSlot === 'Root') {
5913
5869
  shouldForwardPropOption = rootShouldForwardProp;
5914
5870
  } else if (componentSlot) {
@@ -5918,12 +5874,10 @@ function createStyled(input = {}) {
5918
5874
  // for string (html) tag, preserve the behavior in emotion & styled-components.
5919
5875
  shouldForwardPropOption = undefined;
5920
5876
  }
5921
-
5922
5877
  const defaultStyledResolver = styled$2(tag, _extends$3({
5923
5878
  shouldForwardProp: shouldForwardPropOption,
5924
5879
  label
5925
5880
  }, options));
5926
-
5927
5881
  const muiStyledResolver = (styleArg, ...expressions) => {
5928
5882
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
5929
5883
  // On the server Emotion doesn't use React.forwardRef for creating components, so the created
@@ -5931,22 +5885,19 @@ function createStyled(input = {}) {
5931
5885
  // which are basically components used as a selectors.
5932
5886
  return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? _ref => {
5933
5887
  let {
5934
- theme: themeInput
5935
- } = _ref,
5936
- other = _objectWithoutPropertiesLoose(_ref, _excluded2$2);
5937
-
5888
+ theme: themeInput
5889
+ } = _ref,
5890
+ other = _objectWithoutPropertiesLoose(_ref, _excluded2$2);
5938
5891
  return stylesArg(_extends$3({
5939
5892
  theme: isEmpty$1(themeInput) ? defaultTheme : themeInput
5940
5893
  }, other));
5941
5894
  } : stylesArg;
5942
5895
  }) : [];
5943
5896
  let transformedStyleArg = styleArg;
5944
-
5945
5897
  if (componentName && overridesResolver) {
5946
5898
  expressionsWithDefaultTheme.push(props => {
5947
5899
  const theme = isEmpty$1(props.theme) ? defaultTheme : props.theme;
5948
5900
  const styleOverrides = getStyleOverrides(componentName, theme);
5949
-
5950
5901
  if (styleOverrides) {
5951
5902
  const resolvedStyleOverrides = {};
5952
5903
  Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
@@ -5956,55 +5907,46 @@ function createStyled(input = {}) {
5956
5907
  });
5957
5908
  return overridesResolver(props, resolvedStyleOverrides);
5958
5909
  }
5959
-
5960
5910
  return null;
5961
5911
  });
5962
5912
  }
5963
-
5964
5913
  if (componentName && !skipVariantsResolver) {
5965
5914
  expressionsWithDefaultTheme.push(props => {
5966
5915
  const theme = isEmpty$1(props.theme) ? defaultTheme : props.theme;
5967
5916
  return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
5968
5917
  });
5969
5918
  }
5970
-
5971
5919
  if (!skipSx) {
5972
5920
  expressionsWithDefaultTheme.push(systemSx);
5973
5921
  }
5974
-
5975
5922
  const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
5976
-
5977
5923
  if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {
5978
- const placeholders = new Array(numOfCustomFnsApplied).fill(''); // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.
5979
-
5924
+ const placeholders = new Array(numOfCustomFnsApplied).fill('');
5925
+ // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.
5980
5926
  transformedStyleArg = [...styleArg, ...placeholders];
5981
5927
  transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
5982
- } else if (typeof styleArg === 'function' && // On the server Emotion doesn't use React.forwardRef for creating components, so the created
5928
+ } else if (typeof styleArg === 'function' &&
5929
+ // On the server Emotion doesn't use React.forwardRef for creating components, so the created
5983
5930
  // component stays as a function. This condition makes sure that we do not interpolate functions
5984
5931
  // which are basically components used as a selectors.
5985
5932
  styleArg.__emotion_real !== styleArg) {
5986
5933
  // If the type is function, we need to define the default theme.
5987
5934
  transformedStyleArg = _ref2 => {
5988
5935
  let {
5989
- theme: themeInput
5990
- } = _ref2,
5991
- other = _objectWithoutPropertiesLoose(_ref2, _excluded3);
5992
-
5936
+ theme: themeInput
5937
+ } = _ref2,
5938
+ other = _objectWithoutPropertiesLoose(_ref2, _excluded3);
5993
5939
  return styleArg(_extends$3({
5994
5940
  theme: isEmpty$1(themeInput) ? defaultTheme : themeInput
5995
5941
  }, other));
5996
5942
  };
5997
5943
  }
5998
-
5999
5944
  const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
6000
-
6001
5945
  return Component;
6002
5946
  };
6003
-
6004
5947
  if (defaultStyledResolver.withConfig) {
6005
5948
  muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
6006
5949
  }
6007
-
6008
5950
  return muiStyledResolver;
6009
5951
  };
6010
5952
  }
@@ -6017,29 +5959,26 @@ function createStyled(input = {}) {
6017
5959
  * @returns {number} A number in the range [min, max]
6018
5960
  */
6019
5961
  function clamp(value, min = 0, max = 1) {
6020
-
6021
5962
  return Math.min(Math.max(min, value), max);
6022
5963
  }
5964
+
6023
5965
  /**
6024
5966
  * Converts a color from CSS hex format to CSS rgb format.
6025
5967
  * @param {string} color - Hex color, i.e. #nnn or #nnnnnn
6026
5968
  * @returns {string} A CSS rgb color string
6027
5969
  */
6028
-
6029
-
6030
5970
  function hexToRgb(color) {
6031
5971
  color = color.slice(1);
6032
5972
  const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');
6033
5973
  let colors = color.match(re);
6034
-
6035
5974
  if (colors && colors[0].length === 1) {
6036
5975
  colors = colors.map(n => n + n);
6037
5976
  }
6038
-
6039
5977
  return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {
6040
5978
  return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;
6041
5979
  }).join(', ')})` : '';
6042
5980
  }
5981
+
6043
5982
  /**
6044
5983
  * Returns an object with the type and values of a color.
6045
5984
  *
@@ -6047,43 +5986,33 @@ function hexToRgb(color) {
6047
5986
  * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
6048
5987
  * @returns {object} - A MUI color object: {type: string, values: number[]}
6049
5988
  */
6050
-
6051
-
6052
5989
  function decomposeColor(color) {
6053
5990
  // Idempotent
6054
5991
  if (color.type) {
6055
5992
  return color;
6056
5993
  }
6057
-
6058
5994
  if (color.charAt(0) === '#') {
6059
5995
  return decomposeColor(hexToRgb(color));
6060
5996
  }
6061
-
6062
5997
  const marker = color.indexOf('(');
6063
5998
  const type = color.substring(0, marker);
6064
-
6065
5999
  if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {
6066
6000
  throw new Error(formatMuiErrorMessage(9, color));
6067
6001
  }
6068
-
6069
6002
  let values = color.substring(marker + 1, color.length - 1);
6070
6003
  let colorSpace;
6071
-
6072
6004
  if (type === 'color') {
6073
6005
  values = values.split(' ');
6074
6006
  colorSpace = values.shift();
6075
-
6076
6007
  if (values.length === 4 && values[3].charAt(0) === '/') {
6077
6008
  values[3] = values[3].slice(1);
6078
6009
  }
6079
-
6080
6010
  if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {
6081
6011
  throw new Error(formatMuiErrorMessage(10, colorSpace));
6082
6012
  }
6083
6013
  } else {
6084
6014
  values = values.split(',');
6085
6015
  }
6086
-
6087
6016
  values = values.map(value => parseFloat(value));
6088
6017
  return {
6089
6018
  type,
@@ -6091,6 +6020,7 @@ function decomposeColor(color) {
6091
6020
  colorSpace
6092
6021
  };
6093
6022
  }
6023
+
6094
6024
  /**
6095
6025
  * Converts a color object with type and values to a string.
6096
6026
  * @param {object} color - Decomposed color
@@ -6098,7 +6028,6 @@ function decomposeColor(color) {
6098
6028
  * @param {array} color.values - [n,n,n] or [n,n,n,n]
6099
6029
  * @returns {string} A CSS color string
6100
6030
  */
6101
-
6102
6031
  function recomposeColor(color) {
6103
6032
  const {
6104
6033
  type,
@@ -6107,7 +6036,6 @@ function recomposeColor(color) {
6107
6036
  let {
6108
6037
  values
6109
6038
  } = color;
6110
-
6111
6039
  if (type.indexOf('rgb') !== -1) {
6112
6040
  // Only convert the first 3 values to int (i.e. not alpha)
6113
6041
  values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);
@@ -6115,21 +6043,19 @@ function recomposeColor(color) {
6115
6043
  values[1] = `${values[1]}%`;
6116
6044
  values[2] = `${values[2]}%`;
6117
6045
  }
6118
-
6119
6046
  if (type.indexOf('color') !== -1) {
6120
6047
  values = `${colorSpace} ${values.join(' ')}`;
6121
6048
  } else {
6122
6049
  values = `${values.join(', ')}`;
6123
6050
  }
6124
-
6125
6051
  return `${type}(${values})`;
6126
6052
  }
6053
+
6127
6054
  /**
6128
6055
  * Converts a color from hsl format to rgb format.
6129
6056
  * @param {string} color - HSL color values
6130
6057
  * @returns {string} rgb color values
6131
6058
  */
6132
-
6133
6059
  function hslToRgb(color) {
6134
6060
  color = decomposeColor(color);
6135
6061
  const {
@@ -6139,17 +6065,13 @@ function hslToRgb(color) {
6139
6065
  const s = values[1] / 100;
6140
6066
  const l = values[2] / 100;
6141
6067
  const a = s * Math.min(l, 1 - l);
6142
-
6143
6068
  const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
6144
-
6145
6069
  let type = 'rgb';
6146
6070
  const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
6147
-
6148
6071
  if (color.type === 'hsla') {
6149
6072
  type += 'a';
6150
6073
  rgb.push(values[3]);
6151
6074
  }
6152
-
6153
6075
  return recomposeColor({
6154
6076
  type,
6155
6077
  values: rgb
@@ -6163,7 +6085,6 @@ function hslToRgb(color) {
6163
6085
  * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
6164
6086
  * @returns {number} The relative brightness of the color in the range 0 - 1
6165
6087
  */
6166
-
6167
6088
  function getLuminance(color) {
6168
6089
  color = decomposeColor(color);
6169
6090
  let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;
@@ -6173,10 +6094,12 @@ function getLuminance(color) {
6173
6094
  }
6174
6095
 
6175
6096
  return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;
6176
- }); // Truncate at 3 digits
6097
+ });
6177
6098
 
6099
+ // Truncate at 3 digits
6178
6100
  return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
6179
6101
  }
6102
+
6180
6103
  /**
6181
6104
  * Calculates the contrast ratio between two colors.
6182
6105
  *
@@ -6185,23 +6108,21 @@ function getLuminance(color) {
6185
6108
  * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
6186
6109
  * @returns {number} A contrast ratio value in the range 0 - 21.
6187
6110
  */
6188
-
6189
6111
  function getContrastRatio(foreground, background) {
6190
6112
  const lumA = getLuminance(foreground);
6191
6113
  const lumB = getLuminance(background);
6192
6114
  return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
6193
6115
  }
6116
+
6194
6117
  /**
6195
6118
  * Darkens a color.
6196
6119
  * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
6197
6120
  * @param {number} coefficient - multiplier in the range 0 - 1
6198
6121
  * @returns {string} A CSS color string. Hex input values are returned as rgb
6199
6122
  */
6200
-
6201
6123
  function darken(color, coefficient) {
6202
6124
  color = decomposeColor(color);
6203
6125
  coefficient = clamp(coefficient);
6204
-
6205
6126
  if (color.type.indexOf('hsl') !== -1) {
6206
6127
  color.values[2] *= 1 - coefficient;
6207
6128
  } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {
@@ -6209,20 +6130,18 @@ function darken(color, coefficient) {
6209
6130
  color.values[i] *= 1 - coefficient;
6210
6131
  }
6211
6132
  }
6212
-
6213
6133
  return recomposeColor(color);
6214
6134
  }
6135
+
6215
6136
  /**
6216
6137
  * Lightens a color.
6217
6138
  * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
6218
6139
  * @param {number} coefficient - multiplier in the range 0 - 1
6219
6140
  * @returns {string} A CSS color string. Hex input values are returned as rgb
6220
6141
  */
6221
-
6222
6142
  function lighten(color, coefficient) {
6223
6143
  color = decomposeColor(color);
6224
6144
  coefficient = clamp(coefficient);
6225
-
6226
6145
  if (color.type.indexOf('hsl') !== -1) {
6227
6146
  color.values[2] += (100 - color.values[2]) * coefficient;
6228
6147
  } else if (color.type.indexOf('rgb') !== -1) {
@@ -6234,12 +6153,10 @@ function lighten(color, coefficient) {
6234
6153
  color.values[i] += (1 - color.values[i]) * coefficient;
6235
6154
  }
6236
6155
  }
6237
-
6238
6156
  return recomposeColor(color);
6239
6157
  }
6240
6158
 
6241
6159
  const EMPTY_THEME = {};
6242
-
6243
6160
  function InnerThemeProvider(props) {
6244
6161
  const theme = useTheme$2();
6245
6162
  return /*#__PURE__*/jsxRuntime.exports.jsx(ThemeContext$2.Provider, {
@@ -6247,11 +6164,11 @@ function InnerThemeProvider(props) {
6247
6164
  children: props.children
6248
6165
  });
6249
6166
  }
6167
+
6250
6168
  /**
6251
6169
  * This component makes the `theme` available down the React tree.
6252
6170
  * It should preferably be used at **the root of your component tree**.
6253
6171
  */
6254
-
6255
6172
  function ThemeProvider(props) {
6256
6173
  const {
6257
6174
  children,
@@ -6266,24 +6183,22 @@ function ThemeProvider(props) {
6266
6183
  }
6267
6184
 
6268
6185
  const _excluded$7 = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
6269
- _excluded2$1 = ["type", "mode"];
6186
+ _excluded2$1 = ["type", "mode"];
6270
6187
  function adaptV4Theme(inputTheme) {
6271
-
6272
6188
  const {
6273
- defaultProps = {},
6274
- mixins = {},
6275
- overrides = {},
6276
- palette = {},
6277
- props = {},
6278
- styleOverrides = {}
6279
- } = inputTheme,
6280
- other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$7);
6281
-
6189
+ defaultProps = {},
6190
+ mixins = {},
6191
+ overrides = {},
6192
+ palette = {},
6193
+ props = {},
6194
+ styleOverrides = {}
6195
+ } = inputTheme,
6196
+ other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$7);
6282
6197
  const theme = _extends$5({}, other, {
6283
6198
  components: {}
6284
- }); // default props
6285
-
6199
+ });
6286
6200
 
6201
+ // default props
6287
6202
  Object.keys(defaultProps).forEach(component => {
6288
6203
  const componentValue = theme.components[component] || {};
6289
6204
  componentValue.defaultProps = defaultProps[component];
@@ -6293,8 +6208,9 @@ function adaptV4Theme(inputTheme) {
6293
6208
  const componentValue = theme.components[component] || {};
6294
6209
  componentValue.defaultProps = props[component];
6295
6210
  theme.components[component] = componentValue;
6296
- }); // CSS overrides
6211
+ });
6297
6212
 
6213
+ // CSS overrides
6298
6214
  Object.keys(styleOverrides).forEach(component => {
6299
6215
  const componentValue = theme.components[component] || {};
6300
6216
  componentValue.styleOverrides = styleOverrides[component];
@@ -6304,10 +6220,12 @@ function adaptV4Theme(inputTheme) {
6304
6220
  const componentValue = theme.components[component] || {};
6305
6221
  componentValue.styleOverrides = overrides[component];
6306
6222
  theme.components[component] = componentValue;
6307
- }); // theme.spacing
6223
+ });
6308
6224
 
6309
- theme.spacing = createSpacing(inputTheme.spacing); // theme.mixins.gutters
6225
+ // theme.spacing
6226
+ theme.spacing = createSpacing(inputTheme.spacing);
6310
6227
 
6228
+ // theme.mixins.gutters
6311
6229
  const breakpoints = createBreakpoints(inputTheme.breakpoints || {});
6312
6230
  const spacing = theme.spacing;
6313
6231
  theme.mixins = _extends$5({
@@ -6323,13 +6241,11 @@ function adaptV4Theme(inputTheme) {
6323
6241
  });
6324
6242
  }
6325
6243
  }, mixins);
6326
-
6327
6244
  const {
6328
- type: typeInput,
6329
- mode: modeInput
6330
- } = palette,
6331
- paletteRest = _objectWithoutPropertiesLoose$1(palette, _excluded2$1);
6332
-
6245
+ type: typeInput,
6246
+ mode: modeInput
6247
+ } = palette,
6248
+ paletteRest = _objectWithoutPropertiesLoose$1(palette, _excluded2$1);
6333
6249
  const finalMode = modeInput || typeInput || 'light';
6334
6250
  theme.palette = _extends$5({
6335
6251
  // theme.palette.text.hint
@@ -6555,11 +6471,9 @@ const dark$1 = {
6555
6471
  activatedOpacity: 0.24
6556
6472
  }
6557
6473
  };
6558
-
6559
6474
  function addLightOrDark(intent, direction, shade, tonalOffset) {
6560
6475
  const tonalOffsetLight = tonalOffset.light || tonalOffset;
6561
6476
  const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;
6562
-
6563
6477
  if (!intent[direction]) {
6564
6478
  if (intent.hasOwnProperty(shade)) {
6565
6479
  intent[direction] = intent[shade];
@@ -6570,7 +6484,6 @@ function addLightOrDark(intent, direction, shade, tonalOffset) {
6570
6484
  }
6571
6485
  }
6572
6486
  }
6573
-
6574
6487
  function getDefaultPrimary(mode = 'light') {
6575
6488
  if (mode === 'dark') {
6576
6489
  return {
@@ -6579,14 +6492,12 @@ function getDefaultPrimary(mode = 'light') {
6579
6492
  dark: blue$1[400]
6580
6493
  };
6581
6494
  }
6582
-
6583
6495
  return {
6584
6496
  main: blue$1[700],
6585
6497
  light: blue$1[400],
6586
6498
  dark: blue$1[800]
6587
6499
  };
6588
6500
  }
6589
-
6590
6501
  function getDefaultSecondary(mode = 'light') {
6591
6502
  if (mode === 'dark') {
6592
6503
  return {
@@ -6595,14 +6506,12 @@ function getDefaultSecondary(mode = 'light') {
6595
6506
  dark: purple$1[400]
6596
6507
  };
6597
6508
  }
6598
-
6599
6509
  return {
6600
6510
  main: purple$1[500],
6601
6511
  light: purple$1[300],
6602
6512
  dark: purple$1[700]
6603
6513
  };
6604
6514
  }
6605
-
6606
6515
  function getDefaultError(mode = 'light') {
6607
6516
  if (mode === 'dark') {
6608
6517
  return {
@@ -6611,14 +6520,12 @@ function getDefaultError(mode = 'light') {
6611
6520
  dark: red$1[700]
6612
6521
  };
6613
6522
  }
6614
-
6615
6523
  return {
6616
6524
  main: red$1[700],
6617
6525
  light: red$1[400],
6618
6526
  dark: red$1[800]
6619
6527
  };
6620
6528
  }
6621
-
6622
6529
  function getDefaultInfo(mode = 'light') {
6623
6530
  if (mode === 'dark') {
6624
6531
  return {
@@ -6627,14 +6534,12 @@ function getDefaultInfo(mode = 'light') {
6627
6534
  dark: lightBlue$1[700]
6628
6535
  };
6629
6536
  }
6630
-
6631
6537
  return {
6632
6538
  main: lightBlue$1[700],
6633
6539
  light: lightBlue$1[500],
6634
6540
  dark: lightBlue$1[900]
6635
6541
  };
6636
6542
  }
6637
-
6638
6543
  function getDefaultSuccess(mode = 'light') {
6639
6544
  if (mode === 'dark') {
6640
6545
  return {
@@ -6643,14 +6548,12 @@ function getDefaultSuccess(mode = 'light') {
6643
6548
  dark: green$1[700]
6644
6549
  };
6645
6550
  }
6646
-
6647
6551
  return {
6648
6552
  main: green$1[800],
6649
6553
  light: green$1[500],
6650
6554
  dark: green$1[900]
6651
6555
  };
6652
6556
  }
6653
-
6654
6557
  function getDefaultWarning(mode = 'light') {
6655
6558
  if (mode === 'dark') {
6656
6559
  return {
@@ -6659,7 +6562,6 @@ function getDefaultWarning(mode = 'light') {
6659
6562
  dark: orange$1[700]
6660
6563
  };
6661
6564
  }
6662
-
6663
6565
  return {
6664
6566
  main: '#ed6c02',
6665
6567
  // closest to orange[800] that pass 3:1.
@@ -6667,30 +6569,27 @@ function getDefaultWarning(mode = 'light') {
6667
6569
  dark: orange$1[900]
6668
6570
  };
6669
6571
  }
6670
-
6671
6572
  function createPalette(palette) {
6672
6573
  const {
6673
- mode = 'light',
6674
- contrastThreshold = 3,
6675
- tonalOffset = 0.2
6676
- } = palette,
6677
- other = _objectWithoutPropertiesLoose$1(palette, _excluded$6);
6678
-
6574
+ mode = 'light',
6575
+ contrastThreshold = 3,
6576
+ tonalOffset = 0.2
6577
+ } = palette,
6578
+ other = _objectWithoutPropertiesLoose$1(palette, _excluded$6);
6679
6579
  const primary = palette.primary || getDefaultPrimary(mode);
6680
6580
  const secondary = palette.secondary || getDefaultSecondary(mode);
6681
6581
  const error = palette.error || getDefaultError(mode);
6682
6582
  const info = palette.info || getDefaultInfo(mode);
6683
6583
  const success = palette.success || getDefaultSuccess(mode);
6684
- const warning = palette.warning || getDefaultWarning(mode); // Use the same logic as
6584
+ const warning = palette.warning || getDefaultWarning(mode);
6585
+
6586
+ // Use the same logic as
6685
6587
  // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59
6686
6588
  // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54
6687
-
6688
6589
  function getContrastText(background) {
6689
6590
  const contrastText = getContrastRatio(background, dark$1.text.primary) >= contrastThreshold ? dark$1.text.primary : light$1.text.primary;
6690
-
6691
6591
  return contrastText;
6692
6592
  }
6693
-
6694
6593
  const augmentColor = ({
6695
6594
  color,
6696
6595
  name,
@@ -6699,34 +6598,26 @@ function createPalette(palette) {
6699
6598
  darkShade = 700
6700
6599
  }) => {
6701
6600
  color = _extends$5({}, color);
6702
-
6703
6601
  if (!color.main && color[mainShade]) {
6704
6602
  color.main = color[mainShade];
6705
6603
  }
6706
-
6707
6604
  if (!color.hasOwnProperty('main')) {
6708
6605
  throw new Error(formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));
6709
6606
  }
6710
-
6711
6607
  if (typeof color.main !== 'string') {
6712
6608
  throw new Error(formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));
6713
6609
  }
6714
-
6715
6610
  addLightOrDark(color, 'light', lightShade, tonalOffset);
6716
6611
  addLightOrDark(color, 'dark', darkShade, tonalOffset);
6717
-
6718
6612
  if (!color.contrastText) {
6719
6613
  color.contrastText = getContrastText(color.main);
6720
6614
  }
6721
-
6722
6615
  return color;
6723
6616
  };
6724
-
6725
6617
  const modes = {
6726
6618
  dark: dark$1,
6727
6619
  light: light$1
6728
6620
  };
6729
-
6730
6621
  const paletteOutput = deepmerge(_extends$5({
6731
6622
  // A collection of common colors.
6732
6623
  common: _extends$5({}, common$1),
@@ -6784,44 +6675,39 @@ function createPalette(palette) {
6784
6675
  }
6785
6676
 
6786
6677
  const _excluded$5 = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
6787
-
6788
6678
  function round(value) {
6789
6679
  return Math.round(value * 1e5) / 1e5;
6790
6680
  }
6791
-
6792
6681
  const caseAllCaps = {
6793
6682
  textTransform: 'uppercase'
6794
6683
  };
6795
6684
  const defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif';
6685
+
6796
6686
  /**
6797
6687
  * @see @link{https://m2.material.io/design/typography/the-type-system.html}
6798
6688
  * @see @link{https://m2.material.io/design/typography/understanding-typography.html}
6799
6689
  */
6800
-
6801
6690
  function createTypography(palette, typography) {
6802
6691
  const _ref = typeof typography === 'function' ? typography(palette) : typography,
6803
- {
6804
- fontFamily = defaultFontFamily,
6805
- // The default font size of the Material Specification.
6806
- fontSize = 14,
6807
- // px
6808
- fontWeightLight = 300,
6809
- fontWeightRegular = 400,
6810
- fontWeightMedium = 500,
6811
- fontWeightBold = 700,
6812
- // Tell MUI what's the font-size on the html element.
6813
- // 16px is the default font-size used by browsers.
6814
- htmlFontSize = 16,
6815
- // Apply the CSS properties to all the variants.
6816
- allVariants,
6817
- pxToRem: pxToRem2
6818
- } = _ref,
6819
- other = _objectWithoutPropertiesLoose$1(_ref, _excluded$5);
6820
-
6692
+ {
6693
+ fontFamily = defaultFontFamily,
6694
+ // The default font size of the Material Specification.
6695
+ fontSize = 14,
6696
+ // px
6697
+ fontWeightLight = 300,
6698
+ fontWeightRegular = 400,
6699
+ fontWeightMedium = 500,
6700
+ fontWeightBold = 700,
6701
+ // Tell MUI what's the font-size on the html element.
6702
+ // 16px is the default font-size used by browsers.
6703
+ htmlFontSize = 16,
6704
+ // Apply the CSS properties to all the variants.
6705
+ allVariants,
6706
+ pxToRem: pxToRem2
6707
+ } = _ref,
6708
+ other = _objectWithoutPropertiesLoose$1(_ref, _excluded$5);
6821
6709
  const coef = fontSize / 14;
6822
-
6823
6710
  const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
6824
-
6825
6711
  const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$5({
6826
6712
  fontFamily,
6827
6713
  fontWeight,
@@ -6831,7 +6717,6 @@ function createTypography(palette, typography) {
6831
6717
  }, fontFamily === defaultFontFamily ? {
6832
6718
  letterSpacing: `${round(letterSpacing / size)}em`
6833
6719
  } : {}, casing, allVariants);
6834
-
6835
6720
  const variants = {
6836
6721
  h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),
6837
6722
  h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),
@@ -6858,19 +6743,17 @@ function createTypography(palette, typography) {
6858
6743
  fontWeightBold
6859
6744
  }, variants), other, {
6860
6745
  clone: false // No need to clone deep
6861
-
6862
6746
  });
6863
6747
  }
6864
6748
 
6865
6749
  const shadowKeyUmbraOpacity = 0.2;
6866
6750
  const shadowKeyPenumbraOpacity = 0.14;
6867
6751
  const shadowAmbientShadowOpacity = 0.12;
6868
-
6869
6752
  function createShadow(...px) {
6870
6753
  return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');
6871
- } // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss
6872
-
6754
+ }
6873
6755
 
6756
+ // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss
6874
6757
  const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
6875
6758
  var shadows$1 = shadows;
6876
6759
 
@@ -6887,9 +6770,10 @@ const easing = {
6887
6770
  easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
6888
6771
  // The sharp curve is used by objects that may return to the screen at any time.
6889
6772
  sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'
6890
- }; // Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations
6891
- // to learn when use what timing
6773
+ };
6892
6774
 
6775
+ // Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations
6776
+ // to learn when use what timing
6893
6777
  const duration = {
6894
6778
  shortest: 150,
6895
6779
  shorter: 200,
@@ -6903,37 +6787,30 @@ const duration = {
6903
6787
  // recommended when something is leaving screen
6904
6788
  leavingScreen: 195
6905
6789
  };
6906
-
6907
6790
  function formatMs(milliseconds) {
6908
6791
  return `${Math.round(milliseconds)}ms`;
6909
6792
  }
6910
-
6911
6793
  function getAutoHeightDuration(height) {
6912
6794
  if (!height) {
6913
6795
  return 0;
6914
6796
  }
6797
+ const constant = height / 36;
6915
6798
 
6916
- const constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10
6917
-
6799
+ // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10
6918
6800
  return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
6919
6801
  }
6920
-
6921
6802
  function createTransitions(inputTransitions) {
6922
6803
  const mergedEasing = _extends$5({}, easing, inputTransitions.easing);
6923
-
6924
6804
  const mergedDuration = _extends$5({}, duration, inputTransitions.duration);
6925
-
6926
6805
  const create = (props = ['all'], options = {}) => {
6927
6806
  const {
6928
- duration: durationOption = mergedDuration.standard,
6929
- easing: easingOption = mergedEasing.easeInOut,
6930
- delay = 0
6931
- } = options;
6932
- _objectWithoutPropertiesLoose$1(options, _excluded$4);
6933
-
6807
+ duration: durationOption = mergedDuration.standard,
6808
+ easing: easingOption = mergedEasing.easeInOut,
6809
+ delay = 0
6810
+ } = options;
6811
+ _objectWithoutPropertiesLoose$1(options, _excluded$4);
6934
6812
  return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
6935
6813
  };
6936
-
6937
6814
  return _extends$5({
6938
6815
  getAutoHeightDuration,
6939
6816
  create
@@ -6958,20 +6835,17 @@ const zIndex = {
6958
6835
  var zIndex$1 = zIndex;
6959
6836
 
6960
6837
  const _excluded$3 = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
6961
-
6962
6838
  function createTheme(options = {}, ...args) {
6963
6839
  const {
6964
- mixins: mixinsInput = {},
6965
- palette: paletteInput = {},
6966
- transitions: transitionsInput = {},
6967
- typography: typographyInput = {}
6968
- } = options,
6969
- other = _objectWithoutPropertiesLoose$1(options, _excluded$3);
6970
-
6840
+ mixins: mixinsInput = {},
6841
+ palette: paletteInput = {},
6842
+ transitions: transitionsInput = {},
6843
+ typography: typographyInput = {}
6844
+ } = options,
6845
+ other = _objectWithoutPropertiesLoose$1(options, _excluded$3);
6971
6846
  if (options.vars) {
6972
6847
  throw new Error(formatMuiErrorMessage(18));
6973
6848
  }
6974
-
6975
6849
  const palette = createPalette(paletteInput);
6976
6850
  const systemTheme = createTheme$1(options);
6977
6851
  let muiTheme = deepmerge(systemTheme, {
@@ -6985,7 +6859,6 @@ function createTheme(options = {}, ...args) {
6985
6859
  });
6986
6860
  muiTheme = deepmerge(muiTheme, other);
6987
6861
  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
6988
-
6989
6862
  return muiTheme;
6990
6863
  }
6991
6864
 
@@ -6994,7 +6867,6 @@ var defaultTheme$1 = defaultTheme;
6994
6867
 
6995
6868
  function useTheme$1() {
6996
6869
  const theme = useTheme$2(defaultTheme$1);
6997
-
6998
6870
  return theme;
6999
6871
  }
7000
6872
 
@@ -7354,7 +7226,7 @@ function create$3(definition) {
7354
7226
  return cache[key];
7355
7227
  }
7356
7228
 
7357
- const NEBULA_VERSION_HASH = "8857" ;
7229
+ const NEBULA_VERSION_HASH = "de86" ;
7358
7230
  ClassNameGenerator$1.configure(componentName => {
7359
7231
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
7360
7232
  });
@@ -7872,7 +7744,7 @@ function boot(_ref2) {
7872
7744
  const appRef = React__default.createRef();
7873
7745
  const element = document.createElement('div');
7874
7746
  element.style.display = 'none';
7875
- element.setAttribute('data-nebulajs-version', "3.1.0-alpha.1" );
7747
+ element.setAttribute('data-nebulajs-version', "3.1.0-alpha.2" );
7876
7748
  element.setAttribute('data-app-id', app.id);
7877
7749
  document.body.appendChild(element);
7878
7750
  ReactDOM.render( /*#__PURE__*/React__default.createElement(NebulaApp, {
@@ -20051,7 +19923,7 @@ var enigmaMocker = {exports: {}};
20051
19923
  var enigmaMocker_dev = {exports: {}};
20052
19924
 
20053
19925
  /*
20054
- * @nebula.js/enigma-mocker v3.1.0-alpha.0
19926
+ * @nebula.js/enigma-mocker v3.1.0-alpha.1
20055
19927
  * Copyright (c) 2022 QlikTech International AB
20056
19928
  * Released under the MIT license.
20057
19929
  */
@@ -20091,6 +19963,7 @@ var enigmaMocker_dev = {exports: {}};
20091
19963
  return target;
20092
19964
  }
20093
19965
  function _defineProperty(obj, key, value) {
19966
+ key = _toPropertyKey(key);
20094
19967
  if (key in obj) {
20095
19968
  Object.defineProperty(obj, key, {
20096
19969
  value: value,
@@ -20130,6 +20003,20 @@ var enigmaMocker_dev = {exports: {}};
20130
20003
  }
20131
20004
  return target;
20132
20005
  }
20006
+ function _toPrimitive(input, hint) {
20007
+ if (typeof input !== "object" || input === null) return input;
20008
+ var prim = input[Symbol.toPrimitive];
20009
+ if (prim !== undefined) {
20010
+ var res = prim.call(input, hint || "default");
20011
+ if (typeof res !== "object") return res;
20012
+ throw new TypeError("@@toPrimitive must return a primitive value.");
20013
+ }
20014
+ return (hint === "string" ? String : Number)(input);
20015
+ }
20016
+ function _toPropertyKey(arg) {
20017
+ var key = _toPrimitive(arg, "string");
20018
+ return typeof key === "symbol" ? key : String(key);
20019
+ }
20133
20020
  var hasOwn = Object.prototype.hasOwnProperty;
20134
20021
  var toStr = Object.prototype.toString;
20135
20022
  var defineProperty = Object.defineProperty;