@trafilea/afrodita-components 4.0.1-beta.0 → 4.0.1-beta.1

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.
@@ -56,7 +56,7 @@ function __makeTemplateObject(cooked, raw) {
56
56
 
57
57
  var IconWrapper = function (_a) {
58
58
  var height = _a.height, width = _a.width, title = _a.title, viewBoxX = _a.viewBoxX, viewBoxY = _a.viewBoxY, children = _a.children, testid = _a.testid, fill = _a.fill;
59
- return (jsxs$1("svg", __assign({ width: width ? width + "rem" : '100%', height: height ? height + "rem" : '100%', viewBox: "0 0 " + viewBoxX + " " + viewBoxY, xmlns: "http://www.w3.org/2000/svg", "data-testid": testid ? testid : 'IconWrapper', fill: fill }, { children: [jsxs$1("title", { children: [title, " icon"] }, void 0), children] }), void 0));
59
+ return (jsxs$1("svg", __assign({ width: width ? "".concat(width, "rem") : '100%', height: height ? "".concat(height, "rem") : '100%', viewBox: "0 0 ".concat(viewBoxX, " ").concat(viewBoxY), xmlns: "http://www.w3.org/2000/svg", "data-testid": testid ? testid : 'IconWrapper', fill: fill }, { children: [jsxs$1("title", { children: [title, " icon"] }, void 0), children] }), void 0));
60
60
  };
61
61
 
62
62
  var SixtyDaysGuarantee = function (_a) {
@@ -201,12 +201,12 @@ var FlagUSA = function (_a) {
201
201
 
202
202
  var Minus = function (_a) {
203
203
  var height = _a.height, width = _a.width, fill = _a.fill, title = _a.title;
204
- return (jsxs$1("svg", __assign({ width: width + "rem", height: height + "rem", viewBox: "0 0 36 5", fill: fill, xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx$1("title", { children: title }, void 0), jsx$1("path", { d: "M35.25 0H0.75C0.335625 0 0 0.372917 0 0.833333V4.16667C0 4.62708 0.335625 5 0.75 5H35.25C35.6644 5 36 4.62708 36 4.16667V0.833333C36 0.372917 35.6644 0 35.25 0Z", fill: fill }, void 0)] }), void 0));
204
+ return (jsxs$1("svg", __assign({ width: "".concat(width, "rem"), height: "".concat(height, "rem"), viewBox: "0 0 36 5", fill: fill, xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx$1("title", { children: title }, void 0), jsx$1("path", { d: "M35.25 0H0.75C0.335625 0 0 0.372917 0 0.833333V4.16667C0 4.62708 0.335625 5 0.75 5H35.25C35.6644 5 36 4.62708 36 4.16667V0.833333C36 0.372917 35.6644 0 35.25 0Z", fill: fill }, void 0)] }), void 0));
205
205
  };
206
206
 
207
207
  var Plus = function (_a) {
208
208
  var height = _a.height, width = _a.width, fill = _a.fill, title = _a.title;
209
- return (jsxs$1("svg", __assign({ width: width + "rem", height: height + "rem", viewBox: "0 0 32 32", fill: fill, xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx$1("title", { children: title }, void 0), jsx$1("path", { d: "M31.3333 14H18V0.666667C18 0.298333 17.7017 0 17.3333 0H14.6667C14.2983 0 14 0.298333 14 0.666667V14H0.666667C0.298333 14 0 14.2983 0 14.6667V17.3333C0 17.7017 0.298333 18 0.666667 18H14V31.3333C14 31.7017 14.2983 32 14.6667 32H17.3333C17.7017 32 18 31.7017 18 31.3333V18H31.3333C31.7017 18 32 17.7017 32 17.3333V14.6667C32 14.2983 31.7017 14 31.3333 14Z", fill: fill }, void 0)] }), void 0));
209
+ return (jsxs$1("svg", __assign({ width: "".concat(width, "rem"), height: "".concat(height, "rem"), viewBox: "0 0 32 32", fill: fill, xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx$1("title", { children: title }, void 0), jsx$1("path", { d: "M31.3333 14H18V0.666667C18 0.298333 17.7017 0 17.3333 0H14.6667C14.2983 0 14 0.298333 14 0.666667V14H0.666667C0.298333 14 0 14.2983 0 14.6667V17.3333C0 17.7017 0.298333 18 0.666667 18H14V31.3333C14 31.7017 14.2983 32 14.6667 32H17.3333C17.7017 32 18 31.7017 18 31.3333V18H31.3333C31.7017 18 32 17.7017 32 17.3333V14.6667C32 14.2983 31.7017 14 31.3333 14Z", fill: fill }, void 0)] }), void 0));
210
210
  };
211
211
 
212
212
  var Rule = function (_a) {
@@ -454,14 +454,14 @@ function _extends$1() {
454
454
  }
455
455
 
456
456
  function memoize(fn) {
457
- var cache = {};
457
+ var cache = Object.create(null);
458
458
  return function (arg) {
459
459
  if (cache[arg] === undefined) cache[arg] = fn(arg);
460
460
  return cache[arg];
461
461
  };
462
462
  }
463
463
 
464
- var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
464
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
465
465
 
466
466
  var isPropValid = /* #__PURE__ */memoize(function (prop) {
467
467
  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
@@ -534,7 +534,13 @@ var StyleSheet = /*#__PURE__*/function () {
534
534
  var before;
535
535
 
536
536
  if (_this.tags.length === 0) {
537
- before = _this.prepend ? _this.container.firstChild : _this.before;
537
+ if (_this.insertionPoint) {
538
+ before = _this.insertionPoint.nextSibling;
539
+ } else if (_this.prepend) {
540
+ before = _this.container.firstChild;
541
+ } else {
542
+ before = _this.before;
543
+ }
538
544
  } else {
539
545
  before = _this.tags[_this.tags.length - 1].nextSibling;
540
546
  }
@@ -552,6 +558,7 @@ var StyleSheet = /*#__PURE__*/function () {
552
558
  this.key = options.key;
553
559
  this.container = options.container;
554
560
  this.prepend = options.prepend;
561
+ this.insertionPoint = options.insertionPoint;
555
562
  this.before = null;
556
563
  }
557
564
 
@@ -591,7 +598,7 @@ var StyleSheet = /*#__PURE__*/function () {
591
598
  // the big drawback is that the css won't be editable in devtools
592
599
  sheet.insertRule(rule, sheet.cssRules.length);
593
600
  } catch (e) {
594
- if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-ms-input-placeholder|-moz-read-write|-moz-read-only){/.test(rule)) {
601
+ if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear){/.test(rule)) {
595
602
  console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
596
603
  }
597
604
  }
@@ -605,7 +612,7 @@ var StyleSheet = /*#__PURE__*/function () {
605
612
  _proto.flush = function flush() {
606
613
  // $FlowFixMe
607
614
  this.tags.forEach(function (tag) {
608
- return tag.parentNode.removeChild(tag);
615
+ return tag.parentNode && tag.parentNode.removeChild(tag);
609
616
  });
610
617
  this.tags = [];
611
618
  this.ctr = 0;
@@ -640,6 +647,12 @@ var abs = Math.abs;
640
647
  */
641
648
  var from = String.fromCharCode;
642
649
 
650
+ /**
651
+ * @param {object}
652
+ * @return {object}
653
+ */
654
+ var assign = Object.assign;
655
+
643
656
  /**
644
657
  * @param {string} value
645
658
  * @param {number} length
@@ -678,7 +691,7 @@ function replace (value, pattern, replacement) {
678
691
 
679
692
  /**
680
693
  * @param {string} value
681
- * @param {string} value
694
+ * @param {string} search
682
695
  * @return {number}
683
696
  */
684
697
  function indexof (value, search) {
@@ -747,11 +760,11 @@ var characters = '';
747
760
 
748
761
  /**
749
762
  * @param {string} value
750
- * @param {object} root
751
- * @param {object?} parent
763
+ * @param {object | null} root
764
+ * @param {object | null} parent
752
765
  * @param {string} type
753
- * @param {string[]} props
754
- * @param {object[]} children
766
+ * @param {string[] | string} props
767
+ * @param {object[] | string} children
755
768
  * @param {number} length
756
769
  */
757
770
  function node (value, root, parent, type, props, children, length) {
@@ -759,12 +772,12 @@ function node (value, root, parent, type, props, children, length) {
759
772
  }
760
773
 
761
774
  /**
762
- * @param {string} value
763
775
  * @param {object} root
764
- * @param {string} type
776
+ * @param {object} props
777
+ * @return {object}
765
778
  */
766
- function copy (value, root, type) {
767
- return node(value, root.root, root.parent, type, root.props, root.children, 0)
779
+ function copy (root, props) {
780
+ return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
768
781
  }
769
782
 
770
783
  /**
@@ -913,7 +926,9 @@ function delimiter (type) {
913
926
  return position
914
927
  // " '
915
928
  case 34: case 39:
916
- return delimiter(type === 34 || type === 39 ? type : character)
929
+ if (type !== 34 && type !== 39)
930
+ delimiter(character);
931
+ break
917
932
  // (
918
933
  case 40:
919
934
  if (type === 41)
@@ -995,8 +1010,15 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
995
1010
 
996
1011
  while (scanning)
997
1012
  switch (previous = character, character = next()) {
998
- // " ' [ (
999
- case 34: case 39: case 91: case 40:
1013
+ // (
1014
+ case 40:
1015
+ if (previous != 108 && characters.charCodeAt(length - 1) == 58) {
1016
+ if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1)
1017
+ ampersand = -1;
1018
+ break
1019
+ }
1020
+ // " ' [
1021
+ case 34: case 39: case 91:
1000
1022
  characters += delimit(character);
1001
1023
  break
1002
1024
  // \t \n \r \s
@@ -1046,7 +1068,7 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
1046
1068
  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);
1047
1069
  break
1048
1070
  default:
1049
- parse(characters, reference, reference, reference, [''], children, length, points, children);
1071
+ parse(characters, reference, reference, reference, [''], children, 0, points, children);
1050
1072
  }
1051
1073
  }
1052
1074
 
@@ -1077,7 +1099,7 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
1077
1099
  if (peek() === 45)
1078
1100
  characters += delimit(next());
1079
1101
 
1080
- atrule = peek(), offset = strlen(type = characters += identifier(caret())), character++;
1102
+ atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
1081
1103
  break
1082
1104
  // -
1083
1105
  case 45:
@@ -1280,6 +1302,7 @@ function stringify$1 (element, index, children, callback) {
1280
1302
  switch (element.type) {
1281
1303
  case IMPORT: case DECLARATION: return element.return = element.return || element.value
1282
1304
  case COMMENT: return ''
1305
+ case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
1283
1306
  case RULESET: element.value = element.props.join(',');
1284
1307
  }
1285
1308
 
@@ -1322,31 +1345,32 @@ function rulesheet (callback) {
1322
1345
  * @param {function} callback
1323
1346
  */
1324
1347
  function prefixer (element, index, children, callback) {
1325
- if (!element.return)
1326
- switch (element.type) {
1327
- case DECLARATION: element.return = prefix(element.value, element.length);
1328
- break
1329
- case KEYFRAMES:
1330
- return serialize([copy(replace(element.value, '@', '@' + WEBKIT), element, '')], callback)
1331
- case RULESET:
1332
- if (element.length)
1333
- return combine(element.props, function (value) {
1334
- switch (match$1(value, /(::plac\w+|:read-\w+)/)) {
1335
- // :read-(only|write)
1336
- case ':read-only': case ':read-write':
1337
- return serialize([copy(replace(value, /:(read-\w+)/, ':' + MOZ + '$1'), element, '')], callback)
1338
- // :placeholder
1339
- case '::placeholder':
1340
- return serialize([
1341
- copy(replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1'), element, ''),
1342
- copy(replace(value, /:(plac\w+)/, ':' + MOZ + '$1'), element, ''),
1343
- copy(replace(value, /:(plac\w+)/, MS + 'input-$1'), element, '')
1344
- ], callback)
1345
- }
1346
-
1347
- return ''
1348
- })
1349
- }
1348
+ if (element.length > -1)
1349
+ if (!element.return)
1350
+ switch (element.type) {
1351
+ case DECLARATION: element.return = prefix(element.value, element.length);
1352
+ break
1353
+ case KEYFRAMES:
1354
+ return serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)
1355
+ case RULESET:
1356
+ if (element.length)
1357
+ return combine(element.props, function (value) {
1358
+ switch (match$1(value, /(::plac\w+|:read-\w+)/)) {
1359
+ // :read-(only|write)
1360
+ case ':read-only': case ':read-write':
1361
+ return serialize([copy(element, {props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]})], callback)
1362
+ // :placeholder
1363
+ case '::placeholder':
1364
+ return serialize([
1365
+ copy(element, {props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]}),
1366
+ copy(element, {props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]}),
1367
+ copy(element, {props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]})
1368
+ ], callback)
1369
+ }
1370
+
1371
+ return ''
1372
+ })
1373
+ }
1350
1374
  }
1351
1375
 
1352
1376
  var weakMemoize = function weakMemoize(func) {
@@ -1366,6 +1390,29 @@ var weakMemoize = function weakMemoize(func) {
1366
1390
 
1367
1391
  var last = function last(arr) {
1368
1392
  return arr.length ? arr[arr.length - 1] : null;
1393
+ }; // based on https://github.com/thysultan/stylis.js/blob/e6843c373ebcbbfade25ebcc23f540ed8508da0a/src/Tokenizer.js#L239-L244
1394
+
1395
+
1396
+ var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
1397
+ var previous = 0;
1398
+ var character = 0;
1399
+
1400
+ while (true) {
1401
+ previous = character;
1402
+ character = peek(); // &\f
1403
+
1404
+ if (previous === 38 && character === 12) {
1405
+ points[index] = 1;
1406
+ }
1407
+
1408
+ if (token(character)) {
1409
+ break;
1410
+ }
1411
+
1412
+ next();
1413
+ }
1414
+
1415
+ return slice(begin, position);
1369
1416
  };
1370
1417
 
1371
1418
  var toRules = function toRules(parsed, points) {
@@ -1385,7 +1432,7 @@ var toRules = function toRules(parsed, points) {
1385
1432
  points[index] = 1;
1386
1433
  }
1387
1434
 
1388
- parsed[index] += identifier(position - 1);
1435
+ parsed[index] += identifierWithPointTracking(position - 1, points, index);
1389
1436
  break;
1390
1437
 
1391
1438
  case 2:
@@ -1418,8 +1465,9 @@ var getRules = function getRules(value, points) {
1418
1465
 
1419
1466
  var fixedElements = /* #__PURE__ */new WeakMap();
1420
1467
  var compat = function compat(element) {
1421
- if (element.type !== 'rule' || !element.parent || // .length indicates if this rule contains pseudo or not
1422
- !element.length) {
1468
+ if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
1469
+ // negative .length indicates that this rule has been already prefixed
1470
+ element.length < 1) {
1423
1471
  return;
1424
1472
  }
1425
1473
 
@@ -1533,8 +1581,8 @@ var incorrectImportAlarm = function incorrectImportAlarm(element, index, childre
1533
1581
  }
1534
1582
  };
1535
1583
 
1536
- var isBrowser$6 = typeof document !== 'undefined';
1537
- var getServerStylisCache = isBrowser$6 ? undefined : weakMemoize(function () {
1584
+ var isBrowser$5 = typeof document !== 'undefined';
1585
+ var getServerStylisCache = isBrowser$5 ? undefined : weakMemoize(function () {
1538
1586
  return memoize(function () {
1539
1587
  var cache = {};
1540
1588
  return function (name) {
@@ -1551,7 +1599,7 @@ var createCache = function createCache(options) {
1551
1599
  throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
1552
1600
  }
1553
1601
 
1554
- if (isBrowser$6 && key === 'css') {
1602
+ if (isBrowser$5 && key === 'css') {
1555
1603
  var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
1556
1604
  // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
1557
1605
  // note this very very intentionally targets all style elements regardless of the key to ensure
@@ -1588,7 +1636,7 @@ var createCache = function createCache(options) {
1588
1636
  var container;
1589
1637
  var nodesToHydrate = [];
1590
1638
 
1591
- if (isBrowser$6) {
1639
+ if (isBrowser$5) {
1592
1640
  container = options.container || document.head;
1593
1641
  Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
1594
1642
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
@@ -1616,7 +1664,7 @@ var createCache = function createCache(options) {
1616
1664
  }), incorrectImportAlarm);
1617
1665
  }
1618
1666
 
1619
- if (isBrowser$6) {
1667
+ if (isBrowser$5) {
1620
1668
  var currentSheet;
1621
1669
  var finalizingPlugins = [stringify$1, process.env.NODE_ENV !== 'production' ? function (element) {
1622
1670
  if (!element.root) {
@@ -1719,7 +1767,8 @@ var createCache = function createCache(options) {
1719
1767
  container: container,
1720
1768
  nonce: options.nonce,
1721
1769
  speedy: options.speedy,
1722
- prepend: options.prepend
1770
+ prepend: options.prepend,
1771
+ insertionPoint: options.insertionPoint
1723
1772
  }),
1724
1773
  nonce: options.nonce,
1725
1774
  inserted: inserted,
@@ -1958,8 +2007,8 @@ var TYPE_STATICS = {};
1958
2007
  TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
1959
2008
  TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
1960
2009
 
1961
- var isBrowser$5 = typeof document !== 'undefined';
1962
- function getRegisteredStyles$1(registered, registeredStyles, classNames) {
2010
+ var isBrowser$4 = typeof document !== 'undefined';
2011
+ function getRegisteredStyles(registered, registeredStyles, classNames) {
1963
2012
  var rawClassName = '';
1964
2013
  classNames.split(' ').forEach(function (className) {
1965
2014
  if (registered[className] !== undefined) {
@@ -1970,7 +2019,7 @@ function getRegisteredStyles$1(registered, registeredStyles, classNames) {
1970
2019
  });
1971
2020
  return rawClassName;
1972
2021
  }
1973
- var insertStyles$1 = function insertStyles(cache, serialized, isStringTag) {
2022
+ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
1974
2023
  var className = cache.key + "-" + serialized.name;
1975
2024
 
1976
2025
  if ( // we only need to add the styles to the registered cache if the
@@ -1982,7 +2031,7 @@ var insertStyles$1 = function insertStyles(cache, serialized, isStringTag) {
1982
2031
  // in node since emotion-server relies on whether a style is in
1983
2032
  // the registered cache to know whether a style is global or not
1984
2033
  // also, note that this check will be dead code eliminated in the browser
1985
- isBrowser$5 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
2034
+ isBrowser$4 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
1986
2035
  cache.registered[className] = serialized.styles;
1987
2036
  }
1988
2037
 
@@ -1993,14 +2042,14 @@ var insertStyles$1 = function insertStyles(cache, serialized, isStringTag) {
1993
2042
  do {
1994
2043
  var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
1995
2044
 
1996
- if (!isBrowser$5 && maybeStyles !== undefined) {
2045
+ if (!isBrowser$4 && maybeStyles !== undefined) {
1997
2046
  stylesForSSR += maybeStyles;
1998
2047
  }
1999
2048
 
2000
2049
  current = current.next;
2001
2050
  } while (current !== undefined);
2002
2051
 
2003
- if (!isBrowser$5 && stylesForSSR.length !== 0) {
2052
+ if (!isBrowser$4 && stylesForSSR.length !== 0) {
2004
2053
  return stylesForSSR;
2005
2054
  }
2006
2055
  }
@@ -2109,34 +2158,34 @@ var unitlessKeys = {
2109
2158
  strokeWidth: 1
2110
2159
  };
2111
2160
 
2112
- var ILLEGAL_ESCAPE_SEQUENCE_ERROR$2 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
2113
- var UNDEFINED_AS_OBJECT_KEY_ERROR$1 = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
2114
- var hyphenateRegex$1 = /[A-Z]|^ms/g;
2115
- var animationRegex$1 = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
2161
+ var ILLEGAL_ESCAPE_SEQUENCE_ERROR$1 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
2162
+ var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
2163
+ var hyphenateRegex = /[A-Z]|^ms/g;
2164
+ var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
2116
2165
 
2117
- var isCustomProperty$1 = function isCustomProperty(property) {
2166
+ var isCustomProperty = function isCustomProperty(property) {
2118
2167
  return property.charCodeAt(1) === 45;
2119
2168
  };
2120
2169
 
2121
- var isProcessableValue$1 = function isProcessableValue(value) {
2170
+ var isProcessableValue = function isProcessableValue(value) {
2122
2171
  return value != null && typeof value !== 'boolean';
2123
2172
  };
2124
2173
 
2125
- var processStyleName$1 = /* #__PURE__ */memoize(function (styleName) {
2126
- return isCustomProperty$1(styleName) ? styleName : styleName.replace(hyphenateRegex$1, '-$&').toLowerCase();
2174
+ var processStyleName = /* #__PURE__ */memoize(function (styleName) {
2175
+ return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
2127
2176
  });
2128
2177
 
2129
- var processStyleValue$1 = function processStyleValue(key, value) {
2178
+ var processStyleValue = function processStyleValue(key, value) {
2130
2179
  switch (key) {
2131
2180
  case 'animation':
2132
2181
  case 'animationName':
2133
2182
  {
2134
2183
  if (typeof value === 'string') {
2135
- return value.replace(animationRegex$1, function (match, p1, p2) {
2136
- cursor$1 = {
2184
+ return value.replace(animationRegex, function (match, p1, p2) {
2185
+ cursor = {
2137
2186
  name: p1,
2138
2187
  styles: p2,
2139
- next: cursor$1
2188
+ next: cursor
2140
2189
  };
2141
2190
  return p1;
2142
2191
  });
@@ -2144,7 +2193,7 @@ var processStyleValue$1 = function processStyleValue(key, value) {
2144
2193
  }
2145
2194
  }
2146
2195
 
2147
- if (unitlessKeys[key] !== 1 && !isCustomProperty$1(key) && typeof value === 'number' && value !== 0) {
2196
+ if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
2148
2197
  return value + 'px';
2149
2198
  }
2150
2199
 
@@ -2152,25 +2201,25 @@ var processStyleValue$1 = function processStyleValue(key, value) {
2152
2201
  };
2153
2202
 
2154
2203
  if (process.env.NODE_ENV !== 'production') {
2155
- var contentValuePattern$1 = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
2156
- var contentValues$1 = ['normal', 'none', 'initial', 'inherit', 'unset'];
2157
- var oldProcessStyleValue$1 = processStyleValue$1;
2158
- var msPattern$1 = /^-ms-/;
2159
- var hyphenPattern$1 = /-(.)/g;
2160
- var hyphenatedCache$1 = {};
2161
-
2162
- processStyleValue$1 = function processStyleValue(key, value) {
2204
+ var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
2205
+ var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
2206
+ var oldProcessStyleValue = processStyleValue;
2207
+ var msPattern = /^-ms-/;
2208
+ var hyphenPattern = /-(.)/g;
2209
+ var hyphenatedCache = {};
2210
+
2211
+ processStyleValue = function processStyleValue(key, value) {
2163
2212
  if (key === 'content') {
2164
- if (typeof value !== 'string' || contentValues$1.indexOf(value) === -1 && !contentValuePattern$1.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
2213
+ if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
2165
2214
  throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
2166
2215
  }
2167
2216
  }
2168
2217
 
2169
- var processed = oldProcessStyleValue$1(key, value);
2218
+ var processed = oldProcessStyleValue(key, value);
2170
2219
 
2171
- if (processed !== '' && !isCustomProperty$1(key) && key.indexOf('-') !== -1 && hyphenatedCache$1[key] === undefined) {
2172
- hyphenatedCache$1[key] = true;
2173
- console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern$1, 'ms-').replace(hyphenPattern$1, function (str, _char) {
2220
+ if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
2221
+ hyphenatedCache[key] = true;
2222
+ console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
2174
2223
  return _char.toUpperCase();
2175
2224
  }) + "?");
2176
2225
  }
@@ -2179,7 +2228,7 @@ if (process.env.NODE_ENV !== 'production') {
2179
2228
  };
2180
2229
  }
2181
2230
 
2182
- function handleInterpolation$1(mergedProps, registered, interpolation) {
2231
+ function handleInterpolation(mergedProps, registered, interpolation) {
2183
2232
  if (interpolation == null) {
2184
2233
  return '';
2185
2234
  }
@@ -2201,10 +2250,10 @@ function handleInterpolation$1(mergedProps, registered, interpolation) {
2201
2250
  case 'object':
2202
2251
  {
2203
2252
  if (interpolation.anim === 1) {
2204
- cursor$1 = {
2253
+ cursor = {
2205
2254
  name: interpolation.name,
2206
2255
  styles: interpolation.styles,
2207
- next: cursor$1
2256
+ next: cursor
2208
2257
  };
2209
2258
  return interpolation.name;
2210
2259
  }
@@ -2216,10 +2265,10 @@ function handleInterpolation$1(mergedProps, registered, interpolation) {
2216
2265
  // not the most efficient thing ever but this is a pretty rare case
2217
2266
  // and there will be very few iterations of this generally
2218
2267
  while (next !== undefined) {
2219
- cursor$1 = {
2268
+ cursor = {
2220
2269
  name: next.name,
2221
2270
  styles: next.styles,
2222
- next: cursor$1
2271
+ next: cursor
2223
2272
  };
2224
2273
  next = next.next;
2225
2274
  }
@@ -2234,16 +2283,16 @@ function handleInterpolation$1(mergedProps, registered, interpolation) {
2234
2283
  return styles;
2235
2284
  }
2236
2285
 
2237
- return createStringFromObject$1(mergedProps, registered, interpolation);
2286
+ return createStringFromObject(mergedProps, registered, interpolation);
2238
2287
  }
2239
2288
 
2240
2289
  case 'function':
2241
2290
  {
2242
2291
  if (mergedProps !== undefined) {
2243
- var previousCursor = cursor$1;
2292
+ var previousCursor = cursor;
2244
2293
  var result = interpolation(mergedProps);
2245
- cursor$1 = previousCursor;
2246
- return handleInterpolation$1(mergedProps, registered, result);
2294
+ cursor = previousCursor;
2295
+ return handleInterpolation(mergedProps, registered, result);
2247
2296
  } else if (process.env.NODE_ENV !== 'production') {
2248
2297
  console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
2249
2298
  }
@@ -2254,7 +2303,7 @@ function handleInterpolation$1(mergedProps, registered, interpolation) {
2254
2303
  case 'string':
2255
2304
  if (process.env.NODE_ENV !== 'production') {
2256
2305
  var matched = [];
2257
- var replaced = interpolation.replace(animationRegex$1, function (match, p1, p2) {
2306
+ var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
2258
2307
  var fakeVarName = "animation" + matched.length;
2259
2308
  matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
2260
2309
  return "${" + fakeVarName + "}";
@@ -2277,12 +2326,12 @@ function handleInterpolation$1(mergedProps, registered, interpolation) {
2277
2326
  return cached !== undefined ? cached : interpolation;
2278
2327
  }
2279
2328
 
2280
- function createStringFromObject$1(mergedProps, registered, obj) {
2329
+ function createStringFromObject(mergedProps, registered, obj) {
2281
2330
  var string = '';
2282
2331
 
2283
2332
  if (Array.isArray(obj)) {
2284
2333
  for (var i = 0; i < obj.length; i++) {
2285
- string += handleInterpolation$1(mergedProps, registered, obj[i]) + ";";
2334
+ string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
2286
2335
  }
2287
2336
  } else {
2288
2337
  for (var _key in obj) {
@@ -2291,8 +2340,8 @@ function createStringFromObject$1(mergedProps, registered, obj) {
2291
2340
  if (typeof value !== 'object') {
2292
2341
  if (registered != null && registered[value] !== undefined) {
2293
2342
  string += _key + "{" + registered[value] + "}";
2294
- } else if (isProcessableValue$1(value)) {
2295
- string += processStyleName$1(_key) + ":" + processStyleValue$1(_key, value) + ";";
2343
+ } else if (isProcessableValue(value)) {
2344
+ string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
2296
2345
  }
2297
2346
  } else {
2298
2347
  if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
@@ -2301,25 +2350,25 @@ function createStringFromObject$1(mergedProps, registered, obj) {
2301
2350
 
2302
2351
  if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
2303
2352
  for (var _i = 0; _i < value.length; _i++) {
2304
- if (isProcessableValue$1(value[_i])) {
2305
- string += processStyleName$1(_key) + ":" + processStyleValue$1(_key, value[_i]) + ";";
2353
+ if (isProcessableValue(value[_i])) {
2354
+ string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
2306
2355
  }
2307
2356
  }
2308
2357
  } else {
2309
- var interpolated = handleInterpolation$1(mergedProps, registered, value);
2358
+ var interpolated = handleInterpolation(mergedProps, registered, value);
2310
2359
 
2311
2360
  switch (_key) {
2312
2361
  case 'animation':
2313
2362
  case 'animationName':
2314
2363
  {
2315
- string += processStyleName$1(_key) + ":" + interpolated + ";";
2364
+ string += processStyleName(_key) + ":" + interpolated + ";";
2316
2365
  break;
2317
2366
  }
2318
2367
 
2319
2368
  default:
2320
2369
  {
2321
2370
  if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {
2322
- console.error(UNDEFINED_AS_OBJECT_KEY_ERROR$1);
2371
+ console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
2323
2372
  }
2324
2373
 
2325
2374
  string += _key + "{" + interpolated + "}";
@@ -2333,32 +2382,32 @@ function createStringFromObject$1(mergedProps, registered, obj) {
2333
2382
  return string;
2334
2383
  }
2335
2384
 
2336
- var labelPattern$1 = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
2337
- var sourceMapPattern$1;
2385
+ var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
2386
+ var sourceMapPattern;
2338
2387
 
2339
2388
  if (process.env.NODE_ENV !== 'production') {
2340
- sourceMapPattern$1 = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
2389
+ sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
2341
2390
  } // this is the cursor for keyframes
2342
2391
  // keyframes are stored on the SerializedStyles object as a linked list
2343
2392
 
2344
2393
 
2345
- var cursor$1;
2346
- var serializeStyles$1 = function serializeStyles(args, registered, mergedProps) {
2394
+ var cursor;
2395
+ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
2347
2396
  if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
2348
2397
  return args[0];
2349
2398
  }
2350
2399
 
2351
2400
  var stringMode = true;
2352
2401
  var styles = '';
2353
- cursor$1 = undefined;
2402
+ cursor = undefined;
2354
2403
  var strings = args[0];
2355
2404
 
2356
2405
  if (strings == null || strings.raw === undefined) {
2357
2406
  stringMode = false;
2358
- styles += handleInterpolation$1(mergedProps, registered, strings);
2407
+ styles += handleInterpolation(mergedProps, registered, strings);
2359
2408
  } else {
2360
2409
  if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {
2361
- console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$2);
2410
+ console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
2362
2411
  }
2363
2412
 
2364
2413
  styles += strings[0];
@@ -2366,11 +2415,11 @@ var serializeStyles$1 = function serializeStyles(args, registered, mergedProps)
2366
2415
 
2367
2416
 
2368
2417
  for (var i = 1; i < args.length; i++) {
2369
- styles += handleInterpolation$1(mergedProps, registered, args[i]);
2418
+ styles += handleInterpolation(mergedProps, registered, args[i]);
2370
2419
 
2371
2420
  if (stringMode) {
2372
2421
  if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {
2373
- console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$2);
2422
+ console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
2374
2423
  }
2375
2424
 
2376
2425
  styles += strings[i];
@@ -2380,18 +2429,18 @@ var serializeStyles$1 = function serializeStyles(args, registered, mergedProps)
2380
2429
  var sourceMap;
2381
2430
 
2382
2431
  if (process.env.NODE_ENV !== 'production') {
2383
- styles = styles.replace(sourceMapPattern$1, function (match) {
2432
+ styles = styles.replace(sourceMapPattern, function (match) {
2384
2433
  sourceMap = match;
2385
2434
  return '';
2386
2435
  });
2387
2436
  } // using a global regex with .exec is stateful so lastIndex has to be reset each time
2388
2437
 
2389
2438
 
2390
- labelPattern$1.lastIndex = 0;
2439
+ labelPattern.lastIndex = 0;
2391
2440
  var identifierName = '';
2392
2441
  var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
2393
2442
 
2394
- while ((match = labelPattern$1.exec(styles)) !== null) {
2443
+ while ((match = labelPattern.exec(styles)) !== null) {
2395
2444
  identifierName += '-' + // $FlowFixMe we know it's not null
2396
2445
  match[1];
2397
2446
  }
@@ -2404,7 +2453,7 @@ var serializeStyles$1 = function serializeStyles(args, registered, mergedProps)
2404
2453
  name: name,
2405
2454
  styles: styles,
2406
2455
  map: sourceMap,
2407
- next: cursor$1,
2456
+ next: cursor,
2408
2457
  toString: function toString() {
2409
2458
  return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
2410
2459
  }
@@ -2414,12 +2463,12 @@ var serializeStyles$1 = function serializeStyles(args, registered, mergedProps)
2414
2463
  return {
2415
2464
  name: name,
2416
2465
  styles: styles,
2417
- next: cursor$1
2466
+ next: cursor
2418
2467
  };
2419
2468
  };
2420
2469
 
2421
- var isBrowser$4 = typeof document !== 'undefined';
2422
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
2470
+ var isBrowser$3 = typeof document !== 'undefined';
2471
+ var hasOwnProperty$1 = {}.hasOwnProperty;
2423
2472
 
2424
2473
  var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
2425
2474
  // because this module is primarily intended for the browser and node
@@ -2430,6 +2479,11 @@ var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to a
2430
2479
  typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
2431
2480
  key: 'css'
2432
2481
  }) : null);
2482
+
2483
+ if (process.env.NODE_ENV !== 'production') {
2484
+ EmotionCacheContext.displayName = 'EmotionCacheContext';
2485
+ }
2486
+
2433
2487
  EmotionCacheContext.Provider;
2434
2488
 
2435
2489
  var withEmotionCache = function withEmotionCache(func) {
@@ -2441,7 +2495,7 @@ var withEmotionCache = function withEmotionCache(func) {
2441
2495
  });
2442
2496
  };
2443
2497
 
2444
- if (!isBrowser$4) {
2498
+ if (!isBrowser$3) {
2445
2499
  withEmotionCache = function withEmotionCache(func) {
2446
2500
  return function (props) {
2447
2501
  var cache = useContext(EmotionCacheContext);
@@ -2466,6 +2520,11 @@ if (!isBrowser$4) {
2466
2520
  }
2467
2521
 
2468
2522
  var ThemeContext = /* #__PURE__ */createContext({});
2523
+
2524
+ if (process.env.NODE_ENV !== 'production') {
2525
+ ThemeContext.displayName = 'EmotionThemeContext';
2526
+ }
2527
+
2469
2528
  var useTheme$1 = function useTheme() {
2470
2529
  return useContext(ThemeContext);
2471
2530
  };
@@ -2505,12 +2564,48 @@ var ThemeProvider$1 = function ThemeProvider(props) {
2505
2564
  }, props.children);
2506
2565
  };
2507
2566
 
2508
- // thus we only need to replace what is a valid character for JS, but not for CSS
2567
+ var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
2568
+ // V8
2569
+ var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
2570
+
2571
+ if (match) {
2572
+ // The match may be something like 'Object.createEmotionProps'
2573
+ var parts = match[1].split('.');
2574
+ return parts[parts.length - 1];
2575
+ } // Safari / Firefox
2576
+
2577
+
2578
+ match = /^([A-Za-z0-9$.]+)@/.exec(line);
2579
+ if (match) return match[1];
2580
+ return undefined;
2581
+ };
2582
+
2583
+ var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
2584
+ // identifiers, thus we only need to replace what is a valid character for JS,
2585
+ // but not for CSS.
2509
2586
 
2510
2587
  var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
2511
2588
  return identifier.replace(/\$/g, '-');
2512
2589
  };
2513
2590
 
2591
+ var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
2592
+ if (!stackTrace) return undefined;
2593
+ var lines = stackTrace.split('\n');
2594
+
2595
+ for (var i = 0; i < lines.length; i++) {
2596
+ var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
2597
+
2598
+ if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
2599
+
2600
+ if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
2601
+ // uppercase letter
2602
+
2603
+ if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
2604
+ }
2605
+
2606
+ return undefined;
2607
+ };
2608
+
2514
2609
  var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
2515
2610
  var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
2516
2611
  var createEmotionProps = function createEmotionProps(type, props) {
@@ -2527,28 +2622,21 @@ var createEmotionProps = function createEmotionProps(type, props) {
2527
2622
  }
2528
2623
  }
2529
2624
 
2530
- newProps[typePropName] = type;
2531
-
2532
- if (process.env.NODE_ENV !== 'production') {
2533
- var error = new Error();
2534
-
2535
- if (error.stack) {
2536
- // chrome
2537
- var match = error.stack.match(/at (?:Object\.|Module\.|)(?:jsx|createEmotionProps).*\n\s+at (?:Object\.|)([A-Z][A-Za-z0-9$]+) /);
2625
+ newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
2626
+ // the label hasn't already been computed
2538
2627
 
2539
- if (!match) {
2540
- // safari and firefox
2541
- match = error.stack.match(/.*\n([A-Z][A-Za-z0-9$]+)@/);
2542
- }
2543
-
2544
- if (match) {
2545
- newProps[labelPropName] = sanitizeIdentifier(match[1]);
2546
- }
2547
- }
2628
+ if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
2629
+ var label = getLabelFromStackTrace(new Error().stack);
2630
+ if (label) newProps[labelPropName] = label;
2548
2631
  }
2549
2632
 
2550
2633
  return newProps;
2551
2634
  };
2635
+
2636
+ var Noop$2 = function Noop() {
2637
+ return null;
2638
+ };
2639
+
2552
2640
  var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
2553
2641
  var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
2554
2642
  // not passing the registered cache to serializeStyles because it would
@@ -2563,22 +2651,22 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
2563
2651
  var className = '';
2564
2652
 
2565
2653
  if (typeof props.className === 'string') {
2566
- className = getRegisteredStyles$1(cache.registered, registeredStyles, props.className);
2654
+ className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
2567
2655
  } else if (props.className != null) {
2568
2656
  className = props.className + " ";
2569
2657
  }
2570
2658
 
2571
- var serialized = serializeStyles$1(registeredStyles, undefined, typeof cssProp === 'function' || Array.isArray(cssProp) ? useContext(ThemeContext) : undefined);
2659
+ var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));
2572
2660
 
2573
2661
  if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
2574
2662
  var labelFromStack = props[labelPropName];
2575
2663
 
2576
2664
  if (labelFromStack) {
2577
- serialized = serializeStyles$1([serialized, 'label:' + labelFromStack + ';']);
2665
+ serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
2578
2666
  }
2579
2667
  }
2580
2668
 
2581
- var rules = insertStyles$1(cache, serialized, typeof type === 'string');
2669
+ var rules = insertStyles(cache, serialized, typeof type === 'string');
2582
2670
  className += cache.key + "-" + serialized.name;
2583
2671
  var newProps = {};
2584
2672
 
@@ -2591,8 +2679,9 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
2591
2679
  newProps.ref = ref;
2592
2680
  newProps.className = className;
2593
2681
  var ele = /*#__PURE__*/createElement(type, newProps);
2682
+ var possiblyStyleElement = /*#__PURE__*/createElement(Noop$2, null);
2594
2683
 
2595
- if (!isBrowser$4 && rules !== undefined) {
2684
+ if (!isBrowser$3 && rules !== undefined) {
2596
2685
  var _ref;
2597
2686
 
2598
2687
  var serializedNames = serialized.name;
@@ -2603,12 +2692,13 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
2603
2692
  next = next.next;
2604
2693
  }
2605
2694
 
2606
- return /*#__PURE__*/createElement(Fragment$2, null, /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedNames, _ref.dangerouslySetInnerHTML = {
2695
+ possiblyStyleElement = /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedNames, _ref.dangerouslySetInnerHTML = {
2607
2696
  __html: rules
2608
- }, _ref.nonce = cache.sheet.nonce, _ref)), ele);
2609
- }
2697
+ }, _ref.nonce = cache.sheet.nonce, _ref));
2698
+ } // Need to return the same number of siblings or else `React.useId` will cause hydration mismatches.
2610
2699
 
2611
- return ele;
2700
+
2701
+ return /*#__PURE__*/createElement(Fragment$2, null, possiblyStyleElement, ele);
2612
2702
  });
2613
2703
 
2614
2704
  if (process.env.NODE_ENV !== 'production') {
@@ -2617,7 +2707,7 @@ if (process.env.NODE_ENV !== 'production') {
2617
2707
 
2618
2708
  var pkg = {
2619
2709
  name: "@emotion/react",
2620
- version: "11.4.0",
2710
+ version: "11.7.1",
2621
2711
  main: "dist/emotion-react.cjs.js",
2622
2712
  module: "dist/emotion-react.esm.js",
2623
2713
  browser: {
@@ -2630,7 +2720,7 @@ var pkg = {
2630
2720
  "dist",
2631
2721
  "jsx-runtime",
2632
2722
  "jsx-dev-runtime",
2633
- "isolated-hoist-non-react-statics-do-not-use-this-in-your-code",
2723
+ "_isolated-hnrs",
2634
2724
  "types/*.d.ts",
2635
2725
  "macro.js",
2636
2726
  "macro.d.ts",
@@ -2644,9 +2734,9 @@ var pkg = {
2644
2734
  },
2645
2735
  dependencies: {
2646
2736
  "@babel/runtime": "^7.13.10",
2647
- "@emotion/cache": "^11.4.0",
2737
+ "@emotion/cache": "^11.7.1",
2648
2738
  "@emotion/serialize": "^1.0.2",
2649
- "@emotion/sheet": "^1.0.1",
2739
+ "@emotion/sheet": "^1.1.0",
2650
2740
  "@emotion/utils": "^1.0.0",
2651
2741
  "@emotion/weak-memoize": "^0.2.5",
2652
2742
  "hoist-non-react-statics": "^3.3.1"
@@ -2665,10 +2755,10 @@ var pkg = {
2665
2755
  },
2666
2756
  devDependencies: {
2667
2757
  "@babel/core": "^7.13.10",
2668
- "@emotion/css": "11.1.3",
2669
- "@emotion/css-prettifier": "1.0.0",
2758
+ "@emotion/css": "11.7.1",
2759
+ "@emotion/css-prettifier": "1.0.1",
2670
2760
  "@emotion/server": "11.4.0",
2671
- "@emotion/styled": "11.3.0",
2761
+ "@emotion/styled": "11.6.0",
2672
2762
  "@types/react": "^16.9.11",
2673
2763
  dtslint: "^0.3.0",
2674
2764
  "html-tag-names": "^1.1.2",
@@ -2685,7 +2775,7 @@ var pkg = {
2685
2775
  "./index.js",
2686
2776
  "./jsx-runtime.js",
2687
2777
  "./jsx-dev-runtime.js",
2688
- "./isolated-hoist-non-react-statics-do-not-use-this-in-your-code.js"
2778
+ "./_isolated-hnrs.js"
2689
2779
  ],
2690
2780
  umdName: "emotionReact"
2691
2781
  }
@@ -2706,9 +2796,9 @@ var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
2706
2796
  }
2707
2797
 
2708
2798
  var styles = props.styles;
2709
- var serialized = serializeStyles$1([styles], undefined, typeof styles === 'function' || Array.isArray(styles) ? useContext(ThemeContext) : undefined);
2799
+ var serialized = serializeStyles([styles], undefined, useContext(ThemeContext));
2710
2800
 
2711
- if (!isBrowser$4) {
2801
+ if (!isBrowser$3) {
2712
2802
  var _ref;
2713
2803
 
2714
2804
  var serializedNames = serialized.name;
@@ -2781,7 +2871,7 @@ var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
2781
2871
 
2782
2872
  if (serialized.next !== undefined) {
2783
2873
  // insert keyframes
2784
- insertStyles$1(cache, serialized.next, true);
2874
+ insertStyles(cache, serialized.next, true);
2785
2875
  }
2786
2876
 
2787
2877
  if (sheet.tags.length) {
@@ -2794,523 +2884,175 @@ var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
2794
2884
  cache.insert("", serialized, sheet, false);
2795
2885
  }, [cache, serialized.name]);
2796
2886
  return null;
2797
- });
2798
-
2799
- if (process.env.NODE_ENV !== 'production') {
2800
- Global.displayName = 'EmotionGlobal';
2801
- }
2802
-
2803
- function css() {
2804
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2805
- args[_key] = arguments[_key];
2806
- }
2807
-
2808
- return serializeStyles$1(args);
2809
- }
2810
-
2811
- var classnames$2 = function classnames(args) {
2812
- var len = args.length;
2813
- var i = 0;
2814
- var cls = '';
2815
-
2816
- for (; i < len; i++) {
2817
- var arg = args[i];
2818
- if (arg == null) continue;
2819
- var toAdd = void 0;
2820
-
2821
- switch (typeof arg) {
2822
- case 'boolean':
2823
- break;
2824
-
2825
- case 'object':
2826
- {
2827
- if (Array.isArray(arg)) {
2828
- toAdd = classnames(arg);
2829
- } else {
2830
- if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {
2831
- console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');
2832
- }
2833
-
2834
- toAdd = '';
2835
-
2836
- for (var k in arg) {
2837
- if (arg[k] && k) {
2838
- toAdd && (toAdd += ' ');
2839
- toAdd += k;
2840
- }
2841
- }
2842
- }
2843
-
2844
- break;
2845
- }
2846
-
2847
- default:
2848
- {
2849
- toAdd = arg;
2850
- }
2851
- }
2852
-
2853
- if (toAdd) {
2854
- cls && (cls += ' ');
2855
- cls += toAdd;
2856
- }
2857
- }
2858
-
2859
- return cls;
2860
- };
2861
-
2862
- function merge(registered, css, className) {
2863
- var registeredStyles = [];
2864
- var rawClassName = getRegisteredStyles$1(registered, registeredStyles, className);
2865
-
2866
- if (registeredStyles.length < 2) {
2867
- return className;
2868
- }
2869
-
2870
- return rawClassName + css(registeredStyles);
2871
- }
2872
-
2873
- var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
2874
- var rules = '';
2875
- var serializedHashes = '';
2876
- var hasRendered = false;
2877
-
2878
- var css = function css() {
2879
- if (hasRendered && process.env.NODE_ENV !== 'production') {
2880
- throw new Error('css can only be used during render');
2881
- }
2882
-
2883
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2884
- args[_key] = arguments[_key];
2885
- }
2886
-
2887
- var serialized = serializeStyles$1(args, cache.registered);
2888
-
2889
- if (isBrowser$4) {
2890
- insertStyles$1(cache, serialized, false);
2891
- } else {
2892
- var res = insertStyles$1(cache, serialized, false);
2893
-
2894
- if (res !== undefined) {
2895
- rules += res;
2896
- }
2897
- }
2898
-
2899
- if (!isBrowser$4) {
2900
- serializedHashes += " " + serialized.name;
2901
- }
2902
-
2903
- return cache.key + "-" + serialized.name;
2904
- };
2905
-
2906
- var cx = function cx() {
2907
- if (hasRendered && process.env.NODE_ENV !== 'production') {
2908
- throw new Error('cx can only be used during render');
2909
- }
2910
-
2911
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2912
- args[_key2] = arguments[_key2];
2913
- }
2914
-
2915
- return merge(cache.registered, css, classnames$2(args));
2916
- };
2917
-
2918
- var content = {
2919
- css: css,
2920
- cx: cx,
2921
- theme: useContext(ThemeContext)
2922
- };
2923
- var ele = props.children(content);
2924
- hasRendered = true;
2925
-
2926
- if (!isBrowser$4 && rules.length !== 0) {
2927
- var _ref;
2928
-
2929
- return /*#__PURE__*/createElement(Fragment$2, null, /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedHashes.substring(1), _ref.dangerouslySetInnerHTML = {
2930
- __html: rules
2931
- }, _ref.nonce = cache.sheet.nonce, _ref)), ele);
2932
- }
2933
-
2934
- return ele;
2935
- });
2936
-
2937
- if (process.env.NODE_ENV !== 'production') {
2938
- ClassNames.displayName = 'EmotionClassNames';
2939
- }
2940
-
2941
- if (process.env.NODE_ENV !== 'production') {
2942
- var isBrowser$3 = typeof document !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock
2943
-
2944
- var isJest = typeof jest !== 'undefined';
2945
-
2946
- if (isBrowser$3 && !isJest) {
2947
- var globalContext = isBrowser$3 ? window : global;
2948
- var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
2949
-
2950
- if (globalContext[globalKey]) {
2951
- console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');
2952
- }
2953
-
2954
- globalContext[globalKey] = true;
2955
- }
2956
- }
2957
-
2958
- var isBrowser$2 = typeof document !== 'undefined';
2959
- function getRegisteredStyles(registered, registeredStyles, classNames) {
2960
- var rawClassName = '';
2961
- classNames.split(' ').forEach(function (className) {
2962
- if (registered[className] !== undefined) {
2963
- registeredStyles.push(registered[className] + ";");
2964
- } else {
2965
- rawClassName += className + " ";
2966
- }
2967
- });
2968
- return rawClassName;
2969
- }
2970
- var insertStyles = function insertStyles(cache, serialized, isStringTag) {
2971
- var className = cache.key + "-" + serialized.name;
2972
-
2973
- if ( // we only need to add the styles to the registered cache if the
2974
- // class name could be used further down
2975
- // the tree but if it's a string tag, we know it won't
2976
- // so we don't have to add it to registered cache.
2977
- // this improves memory usage since we can avoid storing the whole style string
2978
- (isStringTag === false || // we need to always store it if we're in compat mode and
2979
- // in node since emotion-server relies on whether a style is in
2980
- // the registered cache to know whether a style is global or not
2981
- // also, note that this check will be dead code eliminated in the browser
2982
- isBrowser$2 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
2983
- cache.registered[className] = serialized.styles;
2984
- }
2985
-
2986
- if (cache.inserted[serialized.name] === undefined) {
2987
- var stylesForSSR = '';
2988
- var current = serialized;
2989
-
2990
- do {
2991
- var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
2992
-
2993
- if (!isBrowser$2 && maybeStyles !== undefined) {
2994
- stylesForSSR += maybeStyles;
2995
- }
2996
-
2997
- current = current.next;
2998
- } while (current !== undefined);
2999
-
3000
- if (!isBrowser$2 && stylesForSSR.length !== 0) {
3001
- return stylesForSSR;
3002
- }
3003
- }
3004
- };
3005
-
3006
- var ILLEGAL_ESCAPE_SEQUENCE_ERROR$1 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
3007
- var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
3008
- var hyphenateRegex = /[A-Z]|^ms/g;
3009
- var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
3010
-
3011
- var isCustomProperty = function isCustomProperty(property) {
3012
- return property.charCodeAt(1) === 45;
3013
- };
3014
-
3015
- var isProcessableValue = function isProcessableValue(value) {
3016
- return value != null && typeof value !== 'boolean';
3017
- };
3018
-
3019
- var processStyleName = /* #__PURE__ */memoize(function (styleName) {
3020
- return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
3021
- });
3022
-
3023
- var processStyleValue = function processStyleValue(key, value) {
3024
- switch (key) {
3025
- case 'animation':
3026
- case 'animationName':
3027
- {
3028
- if (typeof value === 'string') {
3029
- return value.replace(animationRegex, function (match, p1, p2) {
3030
- cursor = {
3031
- name: p1,
3032
- styles: p2,
3033
- next: cursor
3034
- };
3035
- return p1;
3036
- });
3037
- }
3038
- }
3039
- }
3040
-
3041
- if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
3042
- return value + 'px';
3043
- }
3044
-
3045
- return value;
3046
- };
3047
-
3048
- if (process.env.NODE_ENV !== 'production') {
3049
- var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
3050
- var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
3051
- var oldProcessStyleValue = processStyleValue;
3052
- var msPattern = /^-ms-/;
3053
- var hyphenPattern = /-(.)/g;
3054
- var hyphenatedCache = {};
3055
-
3056
- processStyleValue = function processStyleValue(key, value) {
3057
- if (key === 'content') {
3058
- if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
3059
- throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
3060
- }
3061
- }
3062
-
3063
- var processed = oldProcessStyleValue(key, value);
3064
-
3065
- if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
3066
- hyphenatedCache[key] = true;
3067
- console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
3068
- return _char.toUpperCase();
3069
- }) + "?");
3070
- }
3071
-
3072
- return processed;
3073
- };
3074
- }
3075
-
3076
- function handleInterpolation(mergedProps, registered, interpolation) {
3077
- if (interpolation == null) {
3078
- return '';
3079
- }
3080
-
3081
- if (interpolation.__emotion_styles !== undefined) {
3082
- if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
3083
- throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
3084
- }
3085
-
3086
- return interpolation;
3087
- }
3088
-
3089
- switch (typeof interpolation) {
3090
- case 'boolean':
3091
- {
3092
- return '';
3093
- }
3094
-
3095
- case 'object':
3096
- {
3097
- if (interpolation.anim === 1) {
3098
- cursor = {
3099
- name: interpolation.name,
3100
- styles: interpolation.styles,
3101
- next: cursor
3102
- };
3103
- return interpolation.name;
3104
- }
3105
-
3106
- if (interpolation.styles !== undefined) {
3107
- var next = interpolation.next;
3108
-
3109
- if (next !== undefined) {
3110
- // not the most efficient thing ever but this is a pretty rare case
3111
- // and there will be very few iterations of this generally
3112
- while (next !== undefined) {
3113
- cursor = {
3114
- name: next.name,
3115
- styles: next.styles,
3116
- next: cursor
3117
- };
3118
- next = next.next;
3119
- }
3120
- }
3121
-
3122
- var styles = interpolation.styles + ";";
3123
-
3124
- if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {
3125
- styles += interpolation.map;
3126
- }
3127
-
3128
- return styles;
3129
- }
3130
-
3131
- return createStringFromObject(mergedProps, registered, interpolation);
3132
- }
3133
-
3134
- case 'function':
3135
- {
3136
- if (mergedProps !== undefined) {
3137
- var previousCursor = cursor;
3138
- var result = interpolation(mergedProps);
3139
- cursor = previousCursor;
3140
- return handleInterpolation(mergedProps, registered, result);
3141
- } else if (process.env.NODE_ENV !== 'production') {
3142
- console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
3143
- }
3144
-
3145
- break;
3146
- }
3147
-
3148
- case 'string':
3149
- if (process.env.NODE_ENV !== 'production') {
3150
- var matched = [];
3151
- var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
3152
- var fakeVarName = "animation" + matched.length;
3153
- matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
3154
- return "${" + fakeVarName + "}";
3155
- });
3156
-
3157
- if (matched.length) {
3158
- console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
3159
- }
3160
- }
3161
-
3162
- break;
3163
- } // finalize string values (regular strings and functions interpolated into css calls)
2887
+ });
3164
2888
 
2889
+ if (process.env.NODE_ENV !== 'production') {
2890
+ Global.displayName = 'EmotionGlobal';
2891
+ }
3165
2892
 
3166
- if (registered == null) {
3167
- return interpolation;
2893
+ function css() {
2894
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2895
+ args[_key] = arguments[_key];
3168
2896
  }
3169
2897
 
3170
- var cached = registered[interpolation];
3171
- return cached !== undefined ? cached : interpolation;
2898
+ return serializeStyles(args);
3172
2899
  }
3173
2900
 
3174
- function createStringFromObject(mergedProps, registered, obj) {
3175
- var string = '';
2901
+ var classnames$2 = function classnames(args) {
2902
+ var len = args.length;
2903
+ var i = 0;
2904
+ var cls = '';
3176
2905
 
3177
- if (Array.isArray(obj)) {
3178
- for (var i = 0; i < obj.length; i++) {
3179
- string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
3180
- }
3181
- } else {
3182
- for (var _key in obj) {
3183
- var value = obj[_key];
2906
+ for (; i < len; i++) {
2907
+ var arg = args[i];
2908
+ if (arg == null) continue;
2909
+ var toAdd = void 0;
3184
2910
 
3185
- if (typeof value !== 'object') {
3186
- if (registered != null && registered[value] !== undefined) {
3187
- string += _key + "{" + registered[value] + "}";
3188
- } else if (isProcessableValue(value)) {
3189
- string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
3190
- }
3191
- } else {
3192
- if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
3193
- throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
3194
- }
2911
+ switch (typeof arg) {
2912
+ case 'boolean':
2913
+ break;
3195
2914
 
3196
- if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
3197
- for (var _i = 0; _i < value.length; _i++) {
3198
- if (isProcessableValue(value[_i])) {
3199
- string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
2915
+ case 'object':
2916
+ {
2917
+ if (Array.isArray(arg)) {
2918
+ toAdd = classnames(arg);
2919
+ } else {
2920
+ if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {
2921
+ console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');
3200
2922
  }
3201
- }
3202
- } else {
3203
- var interpolated = handleInterpolation(mergedProps, registered, value);
3204
-
3205
- switch (_key) {
3206
- case 'animation':
3207
- case 'animationName':
3208
- {
3209
- string += processStyleName(_key) + ":" + interpolated + ";";
3210
- break;
3211
- }
3212
2923
 
3213
- default:
3214
- {
3215
- if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {
3216
- console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
3217
- }
2924
+ toAdd = '';
3218
2925
 
3219
- string += _key + "{" + interpolated + "}";
2926
+ for (var k in arg) {
2927
+ if (arg[k] && k) {
2928
+ toAdd && (toAdd += ' ');
2929
+ toAdd += k;
3220
2930
  }
2931
+ }
3221
2932
  }
2933
+
2934
+ break;
3222
2935
  }
3223
- }
2936
+
2937
+ default:
2938
+ {
2939
+ toAdd = arg;
2940
+ }
2941
+ }
2942
+
2943
+ if (toAdd) {
2944
+ cls && (cls += ' ');
2945
+ cls += toAdd;
3224
2946
  }
3225
2947
  }
3226
2948
 
3227
- return string;
3228
- }
2949
+ return cls;
2950
+ };
3229
2951
 
3230
- var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
3231
- var sourceMapPattern;
2952
+ function merge(registered, css, className) {
2953
+ var registeredStyles = [];
2954
+ var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
3232
2955
 
3233
- if (process.env.NODE_ENV !== 'production') {
3234
- sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
3235
- } // this is the cursor for keyframes
3236
- // keyframes are stored on the SerializedStyles object as a linked list
2956
+ if (registeredStyles.length < 2) {
2957
+ return className;
2958
+ }
3237
2959
 
2960
+ return rawClassName + css(registeredStyles);
2961
+ }
3238
2962
 
3239
- var cursor;
3240
- var serializeStyles = function serializeStyles(args, registered, mergedProps) {
3241
- if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
3242
- return args[0];
3243
- }
2963
+ var Noop$1 = function Noop() {
2964
+ return null;
2965
+ };
3244
2966
 
3245
- var stringMode = true;
3246
- var styles = '';
3247
- cursor = undefined;
3248
- var strings = args[0];
2967
+ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
2968
+ var rules = '';
2969
+ var serializedHashes = '';
2970
+ var hasRendered = false;
3249
2971
 
3250
- if (strings == null || strings.raw === undefined) {
3251
- stringMode = false;
3252
- styles += handleInterpolation(mergedProps, registered, strings);
3253
- } else {
3254
- if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {
3255
- console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
2972
+ var css = function css() {
2973
+ if (hasRendered && process.env.NODE_ENV !== 'production') {
2974
+ throw new Error('css can only be used during render');
3256
2975
  }
3257
2976
 
3258
- styles += strings[0];
3259
- } // we start at 1 since we've already handled the first arg
2977
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2978
+ args[_key] = arguments[_key];
2979
+ }
3260
2980
 
2981
+ var serialized = serializeStyles(args, cache.registered);
3261
2982
 
3262
- for (var i = 1; i < args.length; i++) {
3263
- styles += handleInterpolation(mergedProps, registered, args[i]);
2983
+ if (isBrowser$3) {
2984
+ insertStyles(cache, serialized, false);
2985
+ } else {
2986
+ var res = insertStyles(cache, serialized, false);
3264
2987
 
3265
- if (stringMode) {
3266
- if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {
3267
- console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
2988
+ if (res !== undefined) {
2989
+ rules += res;
3268
2990
  }
2991
+ }
3269
2992
 
3270
- styles += strings[i];
2993
+ if (!isBrowser$3) {
2994
+ serializedHashes += " " + serialized.name;
3271
2995
  }
3272
- }
3273
2996
 
3274
- var sourceMap;
2997
+ return cache.key + "-" + serialized.name;
2998
+ };
3275
2999
 
3276
- if (process.env.NODE_ENV !== 'production') {
3277
- styles = styles.replace(sourceMapPattern, function (match) {
3278
- sourceMap = match;
3279
- return '';
3280
- });
3281
- } // using a global regex with .exec is stateful so lastIndex has to be reset each time
3000
+ var cx = function cx() {
3001
+ if (hasRendered && process.env.NODE_ENV !== 'production') {
3002
+ throw new Error('cx can only be used during render');
3003
+ }
3282
3004
 
3005
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
3006
+ args[_key2] = arguments[_key2];
3007
+ }
3283
3008
 
3284
- labelPattern.lastIndex = 0;
3285
- var identifierName = '';
3286
- var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
3009
+ return merge(cache.registered, css, classnames$2(args));
3010
+ };
3287
3011
 
3288
- while ((match = labelPattern.exec(styles)) !== null) {
3289
- identifierName += '-' + // $FlowFixMe we know it's not null
3290
- match[1];
3291
- }
3012
+ var content = {
3013
+ css: css,
3014
+ cx: cx,
3015
+ theme: useContext(ThemeContext)
3016
+ };
3017
+ var ele = props.children(content);
3018
+ hasRendered = true;
3019
+ var possiblyStyleElement = /*#__PURE__*/createElement(Noop$1, null);
3292
3020
 
3293
- var name = murmur2(styles) + identifierName;
3021
+ if (!isBrowser$3 && rules.length !== 0) {
3022
+ var _ref;
3294
3023
 
3295
- if (process.env.NODE_ENV !== 'production') {
3296
- // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
3297
- return {
3298
- name: name,
3299
- styles: styles,
3300
- map: sourceMap,
3301
- next: cursor,
3302
- toString: function toString() {
3303
- return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
3304
- }
3305
- };
3306
- }
3024
+ possiblyStyleElement = /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedHashes.substring(1), _ref.dangerouslySetInnerHTML = {
3025
+ __html: rules
3026
+ }, _ref.nonce = cache.sheet.nonce, _ref));
3027
+ } // Need to return the same number of siblings or else `React.useId` will cause hydration mismatches.
3307
3028
 
3308
- return {
3309
- name: name,
3310
- styles: styles,
3311
- next: cursor
3312
- };
3313
- };
3029
+
3030
+ return /*#__PURE__*/createElement(Fragment$2, null, possiblyStyleElement, ele);
3031
+ });
3032
+
3033
+ if (process.env.NODE_ENV !== 'production') {
3034
+ ClassNames.displayName = 'EmotionClassNames';
3035
+ }
3036
+
3037
+ if (process.env.NODE_ENV !== 'production') {
3038
+ var isBrowser$2 = typeof document !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock
3039
+
3040
+ var isJest = typeof jest !== 'undefined';
3041
+
3042
+ if (isBrowser$2 && !isJest) {
3043
+ // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
3044
+ var globalContext = // $FlowIgnore
3045
+ typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef
3046
+ : isBrowser$2 ? window : global;
3047
+ var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
3048
+
3049
+ if (globalContext[globalKey]) {
3050
+ console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');
3051
+ }
3052
+
3053
+ globalContext[globalKey] = true;
3054
+ }
3055
+ }
3314
3056
 
3315
3057
  var testOmitPropsOnStringTag = isPropValid;
3316
3058
 
@@ -3344,6 +3086,10 @@ var composeShouldForwardProps = function composeShouldForwardProps(tag, options,
3344
3086
  var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
3345
3087
  var isBrowser$1 = typeof document !== 'undefined';
3346
3088
 
3089
+ var Noop = function Noop() {
3090
+ return null;
3091
+ };
3092
+
3347
3093
  var createStyled = function createStyled(tag, options) {
3348
3094
  if (process.env.NODE_ENV !== 'production') {
3349
3095
  if (tag === undefined) {
@@ -3438,6 +3184,7 @@ var createStyled = function createStyled(tag, options) {
3438
3184
  newProps.className = className;
3439
3185
  newProps.ref = ref;
3440
3186
  var ele = /*#__PURE__*/createElement(finalTag, newProps);
3187
+ var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);
3441
3188
 
3442
3189
  if (!isBrowser$1 && rules !== undefined) {
3443
3190
  var _ref;
@@ -3450,12 +3197,13 @@ var createStyled = function createStyled(tag, options) {
3450
3197
  next = next.next;
3451
3198
  }
3452
3199
 
3453
- return /*#__PURE__*/createElement(Fragment$2, null, /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedNames, _ref.dangerouslySetInnerHTML = {
3200
+ possiblyStyleElement = /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedNames, _ref.dangerouslySetInnerHTML = {
3454
3201
  __html: rules
3455
- }, _ref.nonce = cache.sheet.nonce, _ref)), ele);
3456
- }
3202
+ }, _ref.nonce = cache.sheet.nonce, _ref));
3203
+ } // Need to return the same number of siblings or else `React.useId` will cause hydration mismatches.
3457
3204
 
3458
- return ele;
3205
+
3206
+ return /*#__PURE__*/createElement(Fragment$2, null, possiblyStyleElement, ele);
3459
3207
  });
3460
3208
  Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")";
3461
3209
  Styled.defaultProps = tag.defaultProps;
@@ -3560,7 +3308,7 @@ var variablesToObject = function (variables, theme) {
3560
3308
  for (var i = 0; i < path.length; i++) {
3561
3309
  var segment = path[i];
3562
3310
  var isLast = i === path.length - 1;
3563
- var isArray = new RegExp(segment + "-0$").test(key);
3311
+ var isArray = new RegExp("".concat(segment, "-0$")).test(key);
3564
3312
  var segmentValue = isLast ? variables[key] : isArray ? [] : {};
3565
3313
  if (segment in target === false) {
3566
3314
  // @ts-ignore
@@ -3576,7 +3324,7 @@ var variablesToObject = function (variables, theme) {
3576
3324
  var transformToVariables = function (prefix, variables, theme, pending) {
3577
3325
  for (var key in theme) {
3578
3326
  /* istanbul ignore next */
3579
- var fullKey = key === '$root' ? prefix : prefix + "-" + key;
3327
+ var fullKey = key === '$root' ? prefix : "".concat(prefix, "-").concat(key);
3580
3328
  var value = theme[key];
3581
3329
  if (value == null) {
3582
3330
  continue;
@@ -3593,12 +3341,12 @@ var transformToVariables = function (prefix, variables, theme, pending) {
3593
3341
  }
3594
3342
  };
3595
3343
  var stringify = function (variables) {
3596
- return inline("\n :root {\n " + Object.entries(variables)
3344
+ return inline("\n :root {\n ".concat(Object.entries(variables)
3597
3345
  .map(function (_a) {
3598
3346
  var key = _a[0], value = _a[1];
3599
- return key + ": " + value + ";";
3347
+ return "".concat(key, ": ").concat(value, ";");
3600
3348
  })
3601
- .join('\n') + "\n }\n ");
3349
+ .join('\n'), "\n }\n "));
3602
3350
  };
3603
3351
  var transformThemeIntoVariables = function (_a) {
3604
3352
  // eslint-disable-next-line
@@ -3612,7 +3360,7 @@ var transformThemeIntoVariables = function (_a) {
3612
3360
  delete variables[key];
3613
3361
  continue;
3614
3362
  }
3615
- variables[key] = "var(" + valueKey + ")";
3363
+ variables[key] = "var(".concat(valueKey, ")");
3616
3364
  }
3617
3365
  return stringify(variables) + transformFonts(fonts);
3618
3366
  };
@@ -3623,22 +3371,22 @@ var transformFonts = function (fonts) {
3623
3371
  var css = fonts.config
3624
3372
  .map(function (font) {
3625
3373
  var css = [
3626
- "font-family: \"" + font.family + "\"",
3627
- "src: url(\"" + fonts.url + "/" + font.src + "\") format(\"opentype\")",
3374
+ "font-family: \"".concat(font.family, "\""),
3375
+ "src: url(\"".concat(fonts.url, "/").concat(font.src, "\") format(\"opentype\")"),
3628
3376
  ];
3629
3377
  if (font.weight) {
3630
- css.push("font-weight: " + font.weight);
3378
+ css.push("font-weight: ".concat(font.weight));
3631
3379
  }
3632
3380
  if (font.stretch) {
3633
- css.push("font-stretch: " + font.stretch);
3381
+ css.push("font-stretch: ".concat(font.stretch));
3634
3382
  }
3635
3383
  if (font.style) {
3636
- css.push("font-style: " + font.style);
3384
+ css.push("font-style: ".concat(font.style));
3637
3385
  }
3638
- return inline("@font-face { " + css.join(';\n') + "; }");
3386
+ return inline("@font-face { ".concat(css.join(';\n'), "; }"));
3639
3387
  })
3640
3388
  .join('\n');
3641
- return inline("\n " + css + "\n body {\n font-family: \"" + fonts.config[0].family + "\";\n }\n ");
3389
+ return inline("\n ".concat(css, "\n body {\n font-family: \"").concat(fonts.config[0].family, "\";\n }\n "));
3642
3390
  };
3643
3391
  var inline = function (text) {
3644
3392
  return text.trim().replace(/\s+/g, ' ').replace(/\n/g, '');
@@ -3681,7 +3429,7 @@ var Container$C = newStyled.div(templateObject_1$Z || (templateObject_1$Z = __ma
3681
3429
  var widthAuto = _a.widthAuto;
3682
3430
  return (widthAuto ? 'auto' : 'fit-content');
3683
3431
  }, function (props) { return props.backgroundColor; }, function (props) { return props.theme.component.card.borderRadius; }, function (props) {
3684
- return props.border ? props.border.borderWidth + " solid " + props.border.borderColor : 'none';
3432
+ return props.border ? "".concat(props.border.borderWidth, " solid ").concat(props.border.borderColor) : 'none';
3685
3433
  });
3686
3434
  var Card = function (_a) {
3687
3435
  var children = _a.children, backgroundColor = _a.backgroundColor, _b = _a.widthAuto, widthAuto = _b === void 0 ? true : _b, border = _a.border, _c = _a.flex, flex = _c === void 0 ? true : _c;
@@ -3752,7 +3500,7 @@ var BaseCTA = function (_a) {
3752
3500
  var text = _a.text, onClick = _a.onClick, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.wide, wide = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? ComponentSize.Medium : _d, type = _a.type, className = _a.className;
3753
3501
  var theme = useTheme();
3754
3502
  var stylesBySize = getStylesBySize$9(size, theme);
3755
- return (jsx(BaseButton, __assign({ onClick: onClick, disabled: disabled, className: className, type: type, css: __assign(__assign({ width: wide ? '100%' : '' }, stylesBySize), { fontWeight: theme.component.button.fontWeight, borderRadius: "" + theme.component.button.borderRadius, cursor: 'pointer', '&:disabled': {
3503
+ return (jsx(BaseButton, __assign({ onClick: onClick, disabled: disabled, className: className, type: type, css: __assign(__assign({ width: wide ? '100%' : '' }, stylesBySize), { fontWeight: theme.component.button.fontWeight, borderRadius: "".concat(theme.component.button.borderRadius), cursor: 'pointer', '&:disabled': {
3756
3504
  backgroundColor: theme.colors.background.disabled,
3757
3505
  color: theme.colors.text.disabled,
3758
3506
  cursor: 'not-allowed',
@@ -3800,7 +3548,7 @@ var ButtonSecondaryOutline = function (_a) {
3800
3548
  return (jsx(BaseCTA, { onClick: onClick, disabled: disabled, wide: wide, size: size, className: className, css: {
3801
3549
  backgroundColor: theme.component.button.secondary.active.color,
3802
3550
  color: theme.component.button.secondary.active.backgroundColor,
3803
- border: "1px solid " + theme.component.button.secondary.active.backgroundColor,
3551
+ border: "1px solid ".concat(theme.component.button.secondary.active.backgroundColor),
3804
3552
  '&:hover': {
3805
3553
  backgroundColor: theme.component.button.secondary.active.backgroundColor,
3806
3554
  color: theme.component.button.secondary.active.color,
@@ -4323,7 +4071,12 @@ function isFocusableElement(element, mode) {
4323
4071
  }, _match));
4324
4072
  }
4325
4073
  function focusIn(container, focus) {
4326
- var elements = Array.isArray(container) ? container : getFocusableElements(container);
4074
+ var elements = Array.isArray(container) ? container.slice().sort(function (a, b) {
4075
+ var position = a.compareDocumentPosition(b);
4076
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
4077
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
4078
+ return 0;
4079
+ }) : getFocusableElements(container);
4327
4080
  var active = document.activeElement;
4328
4081
 
4329
4082
  var direction = function () {
@@ -4471,6 +4224,36 @@ function OpenClosedProvider(_ref) {
4471
4224
  }, children);
4472
4225
  }
4473
4226
 
4227
+ function resolveType(props) {
4228
+ var _props$as;
4229
+
4230
+ if (props.type) return props.type;
4231
+ var tag = (_props$as = props.as) != null ? _props$as : 'button';
4232
+ if (typeof tag === 'string' && tag.toLowerCase() === 'button') return 'button';
4233
+ return undefined;
4234
+ }
4235
+
4236
+ function useResolveButtonType(props, ref) {
4237
+ var _useState = useState(function () {
4238
+ return resolveType(props);
4239
+ }),
4240
+ type = _useState[0],
4241
+ setType = _useState[1];
4242
+
4243
+ useIsoMorphicEffect(function () {
4244
+ setType(resolveType(props));
4245
+ }, [props.type, props.as]);
4246
+ useIsoMorphicEffect(function () {
4247
+ if (type) return;
4248
+ if (!ref.current) return;
4249
+
4250
+ if (ref.current instanceof HTMLButtonElement && !ref.current.hasAttribute('type')) {
4251
+ setType('button');
4252
+ }
4253
+ }, [type, ref]);
4254
+ return type;
4255
+ }
4256
+
4474
4257
  var _reducers$2;
4475
4258
  var DisclosureStates;
4476
4259
 
@@ -4639,7 +4422,8 @@ var Button$6 = /*#__PURE__*/forwardRefWithAs(function Button(props, ref) {
4639
4422
  state = _useDisclosureContext[0],
4640
4423
  dispatch = _useDisclosureContext[1];
4641
4424
 
4642
- var buttonRef = useSyncRefs(ref);
4425
+ var internalButtonRef = useRef(null);
4426
+ var buttonRef = useSyncRefs(internalButtonRef, ref);
4643
4427
  var panelContext = useDisclosurePanelContext();
4644
4428
  var isWithinPanel = panelContext === null ? false : panelContext === state.panelId;
4645
4429
  var handleKeyDown = useCallback(function (event) {
@@ -4704,15 +4488,17 @@ var Button$6 = /*#__PURE__*/forwardRefWithAs(function Button(props, ref) {
4704
4488
  open: state.disclosureState === DisclosureStates.Open
4705
4489
  };
4706
4490
  }, [state]);
4491
+ var type = useResolveButtonType(props, internalButtonRef);
4707
4492
  var passthroughProps = props;
4708
4493
  var propsWeControl = isWithinPanel ? {
4709
- type: 'button',
4494
+ ref: buttonRef,
4495
+ type: type,
4710
4496
  onKeyDown: handleKeyDown,
4711
4497
  onClick: handleClick
4712
4498
  } : {
4713
4499
  ref: buttonRef,
4714
4500
  id: state.buttonId,
4715
- type: 'button',
4501
+ type: type,
4716
4502
  'aria-expanded': props.disabled ? undefined : state.disclosureState === DisclosureStates.Open,
4717
4503
  'aria-controls': state.linkedPanel ? state.panelId : undefined,
4718
4504
  onKeyDown: handleKeyDown,
@@ -5277,7 +5063,7 @@ var Button$5 = /*#__PURE__*/forwardRefWithAs(function Button(props, ref) {
5277
5063
  var propsWeControl = {
5278
5064
  ref: buttonRef,
5279
5065
  id: id,
5280
- type: 'button',
5066
+ type: useResolveButtonType(props, state.buttonRef),
5281
5067
  'aria-haspopup': true,
5282
5068
  'aria-controls': (_state$optionsRef$cur = state.optionsRef.current) == null ? void 0 : _state$optionsRef$cur.id,
5283
5069
  'aria-expanded': state.disabled ? undefined : state.listboxState === ListboxStates.Open,
@@ -6149,7 +5935,7 @@ var templateObject_1$Y;
6149
5935
  var CustomButton = newStyled.button(function (_a) {
6150
5936
  var theme = _a.theme, wide = _a.wide, isSortOrFilter = _a.isSortOrFilter;
6151
5937
  return ({
6152
- border: "0.063rem solid " + (isSortOrFilter ? theme.colors.shades['100'].color : theme.colors.shades['200'].color),
5938
+ border: "0.063rem solid ".concat(isSortOrFilter ? theme.colors.shades['100'].color : theme.colors.shades['200'].color),
6153
5939
  boxSizing: 'border-box',
6154
5940
  borderRadius: theme.component.dropdown.borderRadius,
6155
5941
  display: 'flex',
@@ -6205,7 +5991,7 @@ var DropdownOptions = newStyled(BaseSelect$1.Options)(function (_a) {
6205
5991
  display: 'flex',
6206
5992
  flexDirection: 'column',
6207
5993
  alignItems: 'flex-start',
6208
- border: "0.063rem solid " + theme.component.dropdown.options.borderColor,
5994
+ border: "0.063rem solid ".concat(theme.component.dropdown.options.borderColor),
6209
5995
  boxSizing: 'border-box',
6210
5996
  borderRadius: theme.component.dropdown.borderRadius,
6211
5997
  background: theme.colors.shades.white.color,
@@ -6214,6 +6000,7 @@ var DropdownOptions = newStyled(BaseSelect$1.Options)(function (_a) {
6214
6000
  position: 'absolute',
6215
6001
  width: '100%',
6216
6002
  color: theme.colors.shades['700'].color,
6003
+ zIndex: 10,
6217
6004
  });
6218
6005
  });
6219
6006
  var BaseDropdownOptions = function (_a) {
@@ -6776,7 +6563,7 @@ var renderOptions$1 = function (options) {
6776
6563
  if (options.length)
6777
6564
  return options.map(function (option) { return (jsx$1(ColorRadioGroup$1.Option, __assign({ value: option }, { children: function (_a) {
6778
6565
  var checked = _a.checked;
6779
- return option.color ? (jsx$1(ColorSelector, __assign({}, option.color, { selected: checked, dataTestId: option.label + "-selector" }), void 0)) : (option.pattern && jsx$1(PatternSelector, { url: option.pattern.url, selected: checked }, void 0));
6566
+ return option.color ? (jsx$1(ColorSelector, __assign({}, option.color, { selected: checked, dataTestId: "".concat(option.label, "-selector") }), void 0)) : (option.pattern && jsx$1(PatternSelector, { url: option.pattern.url, selected: checked }, void 0));
6780
6567
  } }), option.label)); });
6781
6568
  else
6782
6569
  return jsx$1(OutOfStock, { title: "out of stock color" }, void 0);
@@ -6802,7 +6589,7 @@ var SingleColorPicker = function (_a) {
6802
6589
 
6803
6590
  var renderOptions = function (selectedColor, options) {
6804
6591
  if (options && options.length)
6805
- return options.map(function (option) { return (jsx$1(ColorRadioGroup$1.Option, __assign({ value: option }, { children: option.color ? (jsx$1(ColorSelector, __assign({}, option.color, { selected: selectedColor.has(option), dataTestId: option.label + "-selector" }), void 0)) : (option.pattern && (jsx$1(PatternSelector, { url: option.pattern.url, selected: selectedColor.has(option) }, void 0))) }), option.label)); });
6592
+ return options.map(function (option) { return (jsx$1(ColorRadioGroup$1.Option, __assign({ value: option }, { children: option.color ? (jsx$1(ColorSelector, __assign({}, option.color, { selected: selectedColor.has(option), dataTestId: "".concat(option.label, "-selector") }), void 0)) : (option.pattern && (jsx$1(PatternSelector, { url: option.pattern.url, selected: selectedColor.has(option) }, void 0))) }), option.label)); });
6806
6593
  else
6807
6594
  return jsx$1(OutOfStock, { title: "out of stock color" }, void 0);
6808
6595
  };
@@ -6838,7 +6625,7 @@ var MultiColorPicker = function (_a) {
6838
6625
 
6839
6626
  var Image$3 = newStyled.img(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n width: 4.063rem;\n height: 5.375rem;\n box-sizing: border-box;\n cursor: pointer;\n border: ", ";\n"], ["\n width: 4.063rem;\n height: 5.375rem;\n box-sizing: border-box;\n cursor: pointer;\n border: ", ";\n"])), function (_a) {
6840
6627
  var selected = _a.selected, theme = _a.theme;
6841
- return selected ? "0.063rem solid " + theme.colors.shades['700'].color : 'inherit';
6628
+ return selected ? "0.063rem solid ".concat(theme.colors.shades['700'].color) : 'inherit';
6842
6629
  });
6843
6630
  var ImageSmallPreview = function (_a) {
6844
6631
  var imageUrl = _a.imageUrl, alt = _a.alt, _b = _a.selected, selected = _b === void 0 ? false : _b, className = _a.className;
@@ -6929,7 +6716,7 @@ var StarContainer = newStyled.div(function (_a) {
6929
6716
  });
6930
6717
  var StarList = function (_a) {
6931
6718
  var rating = _a.rating, starsNumber = _a.starsNumber, fill = _a.fill, _b = _a.size, size = _b === void 0 ? ComponentSize.Medium : _b;
6932
- return (jsx$1(Container$t, { children: __spreadArray([], new Array(starsNumber)).map(function (_, index) {
6719
+ return (jsx$1(Container$t, { children: __spreadArray([], new Array(starsNumber), true).map(function (_, index) {
6933
6720
  return (jsx$1(StarContainer, __assign({ "data-testid": "star-container", size: size }, { children: index < Math.floor(rating) ? (jsx$1(Icon.PDP.Star, { fill: fill }, void 0)) : index === Math.floor(rating) && rating % 1 != 0 ? (jsx$1(Icon.PDP.StarHalf, { fill: fill }, void 0)) : (jsx$1(Icon.PDP.StarEmpty, { fill: fill }, void 0)) }), index));
6934
6721
  }) }, void 0));
6935
6722
  };
@@ -7052,7 +6839,7 @@ var Container$q = newStyled.div(function (_a) {
7052
6839
  });
7053
6840
  });
7054
6841
  var getBarWithBasedOnPercent = function (percent) {
7055
- return percent <= 100 && percent >= 0 ? percent + "%" : '0%';
6842
+ return percent <= 100 && percent >= 0 ? "".concat(percent, "%") : '0%';
7056
6843
  };
7057
6844
  var ProgressBar = function (_a) {
7058
6845
  var description = _a.description, fillColor = _a.fillColor, _b = _a.widthAuto, widthAuto = _b === void 0 ? true : _b, percent = _a.percent;
@@ -7114,7 +6901,7 @@ var templateObject_1$H;
7114
6901
 
7115
6902
  var TooltipArrow = function (_a) {
7116
6903
  var height = _a.height, width = _a.width, fill = _a.fill, stroke = _a.stroke;
7117
- return (jsxs$1("svg", __assign({ width: width + "rem", height: height + "rem", viewBox: "0 0 20 12", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx$1("title", { children: "Tooltip Arrow" }, void 0), jsx$1("path", { d: "M11.1523 8.83618L18.9325 -0.500001L1.06752 -0.500001L8.84767 8.83618C9.44736 9.55581 10.5526 9.55581 11.1523 8.83618Z", fill: fill, stroke: stroke }, void 0)] }), void 0));
6904
+ return (jsxs$1("svg", __assign({ width: "".concat(width, "rem"), height: "".concat(height, "rem"), viewBox: "0 0 20 12", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx$1("title", { children: "Tooltip Arrow" }, void 0), jsx$1("path", { d: "M11.1523 8.83618L18.9325 -0.500001L1.06752 -0.500001L8.84767 8.83618C9.44736 9.55581 10.5526 9.55581 11.1523 8.83618Z", fill: fill, stroke: stroke }, void 0)] }), void 0));
7118
6905
  };
7119
6906
 
7120
6907
  var getWrapperFlexDirection = function (position) {
@@ -7201,10 +6988,10 @@ var TooltipContainer = newStyled.div(function (_a) {
7201
6988
  display: 'flex',
7202
6989
  flexDirection: getContainerFlexDirection(position),
7203
6990
  alignItems: getTooltipAlignItems(position, align),
7204
- marginLeft: getTooltipMargin(position, ComponentPosition.Right, childrenWidth + "px"),
7205
- marginRight: getTooltipMargin(position, ComponentPosition.Left, childrenWidth + "px"),
7206
- marginTop: getTooltipMargin(position, ComponentPosition.Top, "-" + tooltipHeight + "px"),
7207
- marginBottom: getTooltipMargin(position, ComponentPosition.Bottom, "-" + tooltipHeight + "px"),
6991
+ marginLeft: getTooltipMargin(position, ComponentPosition.Right, "".concat(childrenWidth, "px")),
6992
+ marginRight: getTooltipMargin(position, ComponentPosition.Left, "".concat(childrenWidth, "px")),
6993
+ marginTop: getTooltipMargin(position, ComponentPosition.Top, "-".concat(tooltipHeight, "px")),
6994
+ marginBottom: getTooltipMargin(position, ComponentPosition.Bottom, "-".concat(tooltipHeight, "px")),
7208
6995
  transition: 'opacity 0.2s ease',
7209
6996
  userSelect: 'none',
7210
6997
  opacity: 0,
@@ -7406,7 +7193,7 @@ var RadioInput = function (_a) {
7406
7193
  var value = event.currentTarget.value;
7407
7194
  onChange({ value: value, label: label });
7408
7195
  };
7409
- return (jsxs$1(Wrapper$4, { children: [jsxs$1(Container$o, __assign({ theme: theme, size: size, "data-testid": "container" }, { children: [jsx$1(Input$2, { id: name + "-" + id, type: "radio", name: name, value: value, checked: checked, onChange: function (e) { return (disabled ? null : handleChange(e, label)); }, disabled: disabled }, void 0), jsx$1(CustomRadio, { size: size, isChecked: checked, disabled: disabled, theme: theme, "data-testid": "custom-radio" }, void 0)] }), void 0), jsx$1(Label$2, __assign({ htmlFor: name + "-" + id, "data-testid": "label", variant: "regular", size: size, disabled: disabled }, { children: label }), void 0)] }, void 0));
7196
+ return (jsxs$1(Wrapper$4, { children: [jsxs$1(Container$o, __assign({ theme: theme, size: size, "data-testid": "container" }, { children: [jsx$1(Input$2, { id: "".concat(name, "-").concat(id), type: "radio", name: name, value: value, checked: checked, onChange: function (e) { return (disabled ? null : handleChange(e, label)); }, disabled: disabled }, void 0), jsx$1(CustomRadio, { size: size, isChecked: checked, disabled: disabled, theme: theme, "data-testid": "custom-radio" }, void 0)] }), void 0), jsx$1(Label$2, __assign({ htmlFor: "".concat(name, "-").concat(id), "data-testid": "label", variant: "regular", size: size, disabled: disabled }, { children: label }), void 0)] }, void 0));
7410
7197
  };
7411
7198
  var templateObject_1$F, templateObject_2$s;
7412
7199
 
@@ -7418,7 +7205,7 @@ var RadioGroupInput = function (_a) {
7418
7205
  onChange(selected);
7419
7206
  };
7420
7207
  return (jsx$1("div", __assign({ "data-testid": "group-container" }, { children: options.map(function (option, index) {
7421
- return (jsx$1(RadioInput, { id: "" + index, name: name, value: option.value, label: option.label, onChange: function (option) { return handleChange(option); }, checked: option.value === (selectedInput === null || selectedInput === void 0 ? void 0 : selectedInput.value), size: size, disabled: disabled, "data-testid": "input" }, index));
7208
+ return (jsx$1(RadioInput, { id: "".concat(index), name: name, value: option.value, label: option.label, onChange: function (option) { return handleChange(option); }, checked: option.value === (selectedInput === null || selectedInput === void 0 ? void 0 : selectedInput.value), size: size, disabled: disabled, "data-testid": "input" }, index));
7422
7209
  }) }), void 0));
7423
7210
  };
7424
7211
 
@@ -7583,7 +7370,7 @@ var isEmpty = function (value) {
7583
7370
  };
7584
7371
 
7585
7372
  var sliceString = function (str, maxLength) {
7586
- return str.length > maxLength ? str.slice(0, maxLength) + "..." : str;
7373
+ return str.length > maxLength ? "".concat(str.slice(0, maxLength), "...") : str;
7587
7374
  };
7588
7375
 
7589
7376
  var ErrorText = newStyled.h3(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n color: ", " !important;\n font-size: 0.75rem;\n font-weight: 600;\n margin: 0;\n font-height: 1rem;\n margin-left: 0.313rem;\n"], ["\n color: ", " !important;\n font-size: 0.75rem;\n font-weight: 600;\n margin: 0;\n font-height: 1rem;\n margin-left: 0.313rem;\n"])), function (props) { return props.color; });
@@ -7595,7 +7382,7 @@ var Error$1 = function (_a) {
7595
7382
  };
7596
7383
  var templateObject_1$A, templateObject_2$o;
7597
7384
 
7598
- var Container$k = newStyled.div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n height: 3rem;\n input {\n border-color: ", ";\n }\n"], ["\n height: 3rem;\n input {\n border-color: ", ";\n }\n"])), function (_a) {
7385
+ var Container$k = newStyled.div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n input {\n border-color: ", ";\n }\n"], ["\n input {\n border-color: ", ";\n }\n"])), function (_a) {
7599
7386
  var color = _a.color;
7600
7387
  return color;
7601
7388
  });
@@ -7921,8 +7708,8 @@ var index$2 = function (breakpoints) {
7921
7708
  var mediaQueries = function (_a) {
7922
7709
  var theme = _a.theme;
7923
7710
  return index$2([
7924
- "@media(min-width: " + theme.mediaQueries.mobile + "px)",
7925
- "@media(min-width: " + theme.mediaQueries.desktop + "px)",
7711
+ "@media(min-width: ".concat(theme.mediaQueries.mobile, "px)"),
7712
+ "@media(min-width: ".concat(theme.mediaQueries.desktop, "px)"),
7926
7713
  ], { literal: true });
7927
7714
  };
7928
7715
 
@@ -8048,7 +7835,7 @@ function formatDate(date) {
8048
7835
  var day = date.getDate();
8049
7836
  var month = date.getMonth() + 1;
8050
7837
  var year = date.getFullYear();
8051
- return month < 10 ? day + "/0" + month + "/" + year : day + "/" + month + "/" + year;
7838
+ return month < 10 ? "".concat(day, "/0").concat(month, "/").concat(year) : "".concat(day, "/").concat(month, "/").concat(year);
8052
7839
  }
8053
7840
 
8054
7841
  var Container$b = newStyled.div(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"], ["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"])));
@@ -8105,7 +7892,7 @@ var Direction;
8105
7892
  })(Direction || (Direction = {}));
8106
7893
  var ArrowButton$1 = function (_a) {
8107
7894
  var direction = _a.direction, onClick = _a.onClick, width = _a.width, height = _a.height, className = _a.className;
8108
- return (jsx$1(Button$3, __assign({ className: className, type: "button", onClick: onClick, "data-testid": "arrow-button-" + direction }, { children: direction === 'left' ? (jsx$1(Icon.Arrows.ChevronLeft, { width: width, height: height, opacity: 0.5 }, void 0)) : (jsx$1(Icon.Arrows.ChevronRight, { width: width, height: height, opacity: 0.5 }, void 0)) }), void 0));
7895
+ return (jsx$1(Button$3, __assign({ className: className, type: "button", onClick: onClick, "data-testid": "arrow-button-".concat(direction) }, { children: direction === 'left' ? (jsx$1(Icon.Arrows.ChevronLeft, { width: width, height: height, opacity: 0.5 }, void 0)) : (jsx$1(Icon.Arrows.ChevronRight, { width: width, height: height, opacity: 0.5 }, void 0)) }), void 0));
8109
7896
  };
8110
7897
 
8111
7898
  function _defineProperty(obj, key, value) {
@@ -8128,14 +7915,9 @@ function ownKeys(object, enumerableOnly) {
8128
7915
 
8129
7916
  if (Object.getOwnPropertySymbols) {
8130
7917
  var symbols = Object.getOwnPropertySymbols(object);
8131
-
8132
- if (enumerableOnly) {
8133
- symbols = symbols.filter(function (sym) {
8134
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
8135
- });
8136
- }
8137
-
8138
- keys.push.apply(keys, symbols);
7918
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
7919
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7920
+ })), keys.push.apply(keys, symbols);
8139
7921
  }
8140
7922
 
8141
7923
  return keys;
@@ -8143,19 +7925,12 @@ function ownKeys(object, enumerableOnly) {
8143
7925
 
8144
7926
  function _objectSpread2(target) {
8145
7927
  for (var i = 1; i < arguments.length; i++) {
8146
- var source = arguments[i] != null ? arguments[i] : {};
8147
-
8148
- if (i % 2) {
8149
- ownKeys(Object(source), true).forEach(function (key) {
8150
- _defineProperty(target, key, source[key]);
8151
- });
8152
- } else if (Object.getOwnPropertyDescriptors) {
8153
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8154
- } else {
8155
- ownKeys(Object(source)).forEach(function (key) {
8156
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8157
- });
8158
- }
7928
+ var source = null != arguments[i] ? arguments[i] : {};
7929
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
7930
+ _defineProperty(target, key, source[key]);
7931
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
7932
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
7933
+ });
8159
7934
  }
8160
7935
 
8161
7936
  return target;
@@ -8180,6 +7955,9 @@ function _defineProperties(target, props) {
8180
7955
  function _createClass(Constructor, protoProps, staticProps) {
8181
7956
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
8182
7957
  if (staticProps) _defineProperties(Constructor, staticProps);
7958
+ Object.defineProperty(Constructor, "prototype", {
7959
+ writable: false
7960
+ });
8183
7961
  return Constructor;
8184
7962
  }
8185
7963
 
@@ -8212,6 +7990,9 @@ function _inherits(subClass, superClass) {
8212
7990
  configurable: true
8213
7991
  }
8214
7992
  });
7993
+ Object.defineProperty(subClass, "prototype", {
7994
+ writable: false
7995
+ });
8215
7996
  if (superClass) _setPrototypeOf(subClass, superClass);
8216
7997
  }
8217
7998
 
@@ -8238,22 +8019,18 @@ function _isNativeReflectConstruct() {
8238
8019
  function _typeof(obj) {
8239
8020
  "@babel/helpers - typeof";
8240
8021
 
8241
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
8242
- _typeof = function _typeof(obj) {
8243
- return typeof obj;
8244
- };
8245
- } else {
8246
- _typeof = function _typeof(obj) {
8247
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8248
- };
8249
- }
8250
-
8251
- return _typeof(obj);
8022
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
8023
+ return typeof obj;
8024
+ } : function (obj) {
8025
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8026
+ }, _typeof(obj);
8252
8027
  }
8253
8028
 
8254
8029
  function _possibleConstructorReturn(self, call) {
8255
8030
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
8256
8031
  return call;
8032
+ } else if (call !== void 0) {
8033
+ throw new TypeError("Derived constructors may only return object or undefined");
8257
8034
  }
8258
8035
 
8259
8036
  return _assertThisInitialized(self);
@@ -12344,12 +12121,12 @@ var Slider = /*#__PURE__*/function (_React$Component) {
12344
12121
  return Slider;
12345
12122
  }(React.Component);
12346
12123
 
12347
- var StyledSlider = newStyled(Slider)(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n .slick-dots {\n position: static;\n display: flex !important;\n justify-content: center;\n column-gap: ", ";\n margin-top: ", ";\n }\n .slick-prev {\n left: ", ";\n }\n .slick-next {\n right: ", ";\n }\n .slick-prev,\n .slick-next {\n width: fit-content;\n height: fit-content;\n }\n .slick-prev:before,\n .slick-next:before {\n content: none;\n }\n .slick-dots li {\n margin: 0;\n width: auto;\n line-height: 0;\n height: auto;\n }\n"], ["\n .slick-dots {\n position: static;\n display: flex !important;\n justify-content: center;\n column-gap: ", ";\n margin-top: ", ";\n }\n .slick-prev {\n left: ", ";\n }\n .slick-next {\n right: ", ";\n }\n .slick-prev,\n .slick-next {\n width: fit-content;\n height: fit-content;\n }\n .slick-prev:before,\n .slick-next:before {\n content: none;\n }\n .slick-dots li {\n margin: 0;\n width: auto;\n line-height: 0;\n height: auto;\n }\n"])), function (props) { return props.dotsSpacing + "rem"; }, function (props) { return props.dotListMarginTop + "rem"; }, function (_a) {
12124
+ var StyledSlider = newStyled(Slider)(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n .slick-dots {\n position: static;\n display: flex !important;\n justify-content: center;\n column-gap: ", ";\n margin-top: ", ";\n }\n .slick-prev {\n left: ", ";\n }\n .slick-next {\n right: ", ";\n }\n .slick-prev,\n .slick-next {\n width: fit-content;\n height: fit-content;\n }\n .slick-prev:before,\n .slick-next:before {\n content: none;\n }\n .slick-dots li {\n margin: 0;\n width: auto;\n line-height: 0;\n height: auto;\n }\n"], ["\n .slick-dots {\n position: static;\n display: flex !important;\n justify-content: center;\n column-gap: ", ";\n margin-top: ", ";\n }\n .slick-prev {\n left: ", ";\n }\n .slick-next {\n right: ", ";\n }\n .slick-prev,\n .slick-next {\n width: fit-content;\n height: fit-content;\n }\n .slick-prev:before,\n .slick-next:before {\n content: none;\n }\n .slick-dots li {\n margin: 0;\n width: auto;\n line-height: 0;\n height: auto;\n }\n"])), function (props) { return "".concat(props.dotsSpacing, "rem"); }, function (props) { return "".concat(props.dotListMarginTop, "rem"); }, function (_a) {
12348
12125
  var arrowPaddingOffset = _a.arrowPaddingOffset, _b = _a.arrowPadding, arrowPadding = _b === void 0 ? 0 : _b;
12349
- return "-" + (arrowPaddingOffset + arrowPadding) + "rem";
12126
+ return "-".concat(arrowPaddingOffset + arrowPadding, "rem");
12350
12127
  }, function (_a) {
12351
12128
  var arrowPaddingOffset = _a.arrowPaddingOffset, _b = _a.arrowPadding, arrowPadding = _b === void 0 ? 0 : _b;
12352
- return "-" + (arrowPaddingOffset + arrowPadding) + "rem";
12129
+ return "-".concat(arrowPaddingOffset + arrowPadding, "rem");
12353
12130
  });
12354
12131
  var templateObject_1$i;
12355
12132
 
@@ -12405,7 +12182,7 @@ var SliderNavigation = function (_a) {
12405
12182
  afterChange: setActiveIndex,
12406
12183
  };
12407
12184
  return (jsx("div", __assign({ css: {
12408
- padding: arrows ? "0 " + (arrows.arrowWidth + arrows.arrowPadding) + "rem" : 0,
12185
+ padding: arrows ? "0 ".concat(arrows.arrowWidth + arrows.arrowPadding, "rem") : 0,
12409
12186
  maxWidth: '100%',
12410
12187
  } }, { children: jsx(StyledSlider, __assign({}, settings, { arrowPadding: arrows && arrows.arrowPadding, dotListMarginTop: dotListMarginTop, arrowPaddingOffset: arrows ? arrows.arrowWidth : 0, dotsSpacing: styles.dotsSpacing }, { children: children }), void 0) }), void 0));
12411
12188
  };
@@ -12506,7 +12283,7 @@ function withProductGrid(ProductItemComponent, data) {
12506
12283
  }
12507
12284
  /* istanbul ignore next */
12508
12285
  var wrappedComponentName = ProductItemComponent.displayName || ProductItemComponent.name || 'Component';
12509
- WithProductGrid.displayName = "withGrid(" + wrappedComponentName + ")";
12286
+ WithProductGrid.displayName = "withGrid(".concat(wrappedComponentName, ")");
12510
12287
  return WithProductGrid;
12511
12288
  }
12512
12289
  var templateObject_1$d;
@@ -12518,7 +12295,7 @@ var Collection = {
12518
12295
 
12519
12296
  var Backdrop = newStyled.div(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n position: fixed;\n z-index: 2;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: auto;\n transition: background-color 0.3s ease-out;\n\n ", "\n"], ["\n position: fixed;\n z-index: 2;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: auto;\n transition: background-color 0.3s ease-out;\n\n ", "\n"])), function (_a) {
12520
12297
  var isOpen = _a.isOpen, backgroundColor = _a.backgroundColor;
12521
- return isOpen ? "background-color: " + backgroundColor + ";" : 'transparent';
12298
+ return isOpen ? "background-color: ".concat(backgroundColor, ";") : 'transparent';
12522
12299
  });
12523
12300
  var Sidebar = newStyled.div(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n height: 100%;\n width: ", ";\n position: fixed;\n z-index: 3;\n ", ": 0;\n top: 0;\n background-color: ", ";\n overflow-x: hidden;\n transition: transform 0.3s ease-in-out;\n\n ", "\n"], ["\n height: 100%;\n width: ", ";\n position: fixed;\n z-index: 3;\n ", ": 0;\n top: 0;\n background-color: ", ";\n overflow-x: hidden;\n transition: transform 0.3s ease-in-out;\n\n ", "\n"])), function (_a) {
12524
12301
  var width = _a.width;
@@ -12533,7 +12310,7 @@ var Sidebar = newStyled.div(templateObject_2$7 || (templateObject_2$7 = __makeTe
12533
12310
  var isOpen = _a.isOpen, position = _a.position;
12534
12311
  return isOpen
12535
12312
  ? 'transform: translateX(0);'
12536
- : "transform: translateX(" + (position === 'left' ? '-100%' : '100%') + ");";
12313
+ : "transform: translateX(".concat(position === 'left' ? '-100%' : '100%', ");");
12537
12314
  });
12538
12315
  var Drawer = function (_a) {
12539
12316
  var children = _a.children, isOpen = _a.isOpen, onClose = _a.onClose, onOpen = _a.onOpen, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#fff' : _b, _c = _a.backdropColor, backdropColor = _c === void 0 ? 'rgba(0, 0, 0, 0.5)' : _c, _d = _a.position, position = _d === void 0 ? 'left' : _d, _e = _a.width, width = _e === void 0 ? '33%' : _e, onClickOutside = _a.onClickOutside;
@@ -12598,10 +12375,10 @@ function FilteringDropdown(_a) {
12598
12375
  var getFilterLabel = function () {
12599
12376
  return selectedValues.length === 0
12600
12377
  ? placeHolder
12601
- : "(" + selectedValues.length + ") " + selectedValues.map(function (_a) {
12378
+ : "(".concat(selectedValues.length, ") ").concat(selectedValues.map(function (_a) {
12602
12379
  var label = _a.label;
12603
12380
  return label;
12604
- }).join(', ');
12381
+ }).join(', '));
12605
12382
  };
12606
12383
  var onChangeHandler = function (value) {
12607
12384
  setSelectedValues(function (prevState) {
@@ -12610,7 +12387,7 @@ function FilteringDropdown(_a) {
12610
12387
  newState = prevState.filter(function (item) { return item.key !== value.key; });
12611
12388
  }
12612
12389
  else {
12613
- newState = __spreadArray(__spreadArray([], prevState), [value]);
12390
+ newState = __spreadArray(__spreadArray([], prevState, true), [value], false);
12614
12391
  }
12615
12392
  onChange(newState);
12616
12393
  return newState;
@@ -12639,7 +12416,7 @@ var PageNumber = newStyled.span(templateObject_4$2 || (templateObject_4$2 = __ma
12639
12416
  return color;
12640
12417
  }, function (_a) {
12641
12418
  var underline = _a.underline, borderColor = _a.borderColor;
12642
- return underline ? "0.063rem solid " + borderColor : 'none';
12419
+ return underline ? "0.063rem solid ".concat(borderColor) : 'none';
12643
12420
  }, function (_a) {
12644
12421
  var theme = _a.theme;
12645
12422
  return mediaQueries({ theme: theme })({
@@ -12761,7 +12538,7 @@ var templateObject_1$8, templateObject_2$3, templateObject_3$3, templateObject_4
12761
12538
 
12762
12539
  var Container$6 = newStyled.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 0.688rem 0rem;\n ", ",\n"], ["\n display: flex;\n flex-direction: row;\n width: auto;\n padding: 0.688rem 0rem;\n ", ",\n"])), function (props) {
12763
12540
  return mediaQueries(props)({
12764
- borderTop: ["0.063rem solid " + props.theme.colors.shades['100'].color, 'none'],
12541
+ borderTop: ["0.063rem solid ".concat(props.theme.colors.shades['100'].color), 'none'],
12765
12542
  });
12766
12543
  });
12767
12544
  var Description = newStyled.div({
@@ -12811,7 +12588,7 @@ var Button$2 = newStyled.button({
12811
12588
  });
12812
12589
  var Container$4 = newStyled.div(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin: 0rem;\n padding: 0rem;\n position: absolute;\n width: 100%;\n background-color: white;\n box-sizing: border-box;\n border-radius: 0.5rem;\n ", ",\n"], ["\n display: flex;\n flex-direction: column;\n margin: 0rem;\n padding: 0rem;\n position: absolute;\n width: 100%;\n background-color: white;\n box-sizing: border-box;\n border-radius: 0.5rem;\n ", ",\n"])), function (props) {
12813
12590
  return mediaQueries(props)({
12814
- border: ['none', "0.063rem solid " + props.theme.colors.pallete.secondary.color],
12591
+ border: ['none', "0.063rem solid ".concat(props.theme.colors.pallete.secondary.color)],
12815
12592
  marginTop: ['1.25rem', '0.125rem'],
12816
12593
  });
12817
12594
  });
@@ -12848,7 +12625,7 @@ var Input = newStyled.input(function (props) { return ({
12848
12625
  },
12849
12626
  '&:disabled': {
12850
12627
  backgroundColor: props.theme.colors.background.disabled,
12851
- border: "0.063rem solid " + props.theme.colors.border.disabled,
12628
+ border: "0.063rem solid ".concat(props.theme.colors.border.disabled),
12852
12629
  color: props.theme.colors.text.disabled,
12853
12630
  placeholder: {
12854
12631
  color: props.theme.colors.text.disabled,
@@ -12971,7 +12748,7 @@ var SearchBar = function (_a) {
12971
12748
  return function () { return clearTimeout(id); };
12972
12749
  }, [onChange, state.term]);
12973
12750
  var options = resultOptions && resultOptions.length > 0 ? resultOptions : suggestions;
12974
- return (jsxs$1("form", __assign({ role: "search", onSubmit: function (e) { return e.preventDefault(); }, ref: ref, style: { position: 'relative' } }, { children: [jsxs$1(Container$3, __assign({ theme: theme }, { children: [jsx$1(Input, { value: state.term, placeholder: "Search for products", onChange: function (e) { return dispatch({ type: 'UPDATE_TERM', payload: { term: e.target.value } }); }, onFocus: function () { return dispatch({ type: 'TOGGLE_PANEL', payload: { open: true } }); }, id: "search", autoComplete: "off", theme: theme, "aria-label": "Search for products" }, void 0), jsx$1(SearchControl, { open: state.open, onClear: function () { return dispatch({ type: 'CLEAR', payload: {} }); }, onSearch: function () { return onSearch(state.term); } }, void 0)] }), void 0), state.open && (jsx$1(ResultsPanel, { dataTestId: resultsPanelDataTestId, options: options, header: resultOptions.length === 0 ? 'Most popular products' : undefined, footer: resultOptions.length > 0 ? "View all results (" + resultOptions.length + ")" : undefined, onClick: function (value) {
12751
+ return (jsxs$1("form", __assign({ role: "search", onSubmit: function (e) { return e.preventDefault(); }, ref: ref, style: { position: 'relative' } }, { children: [jsxs$1(Container$3, __assign({ theme: theme }, { children: [jsx$1(Input, { value: state.term, placeholder: "Search for products", onChange: function (e) { return dispatch({ type: 'UPDATE_TERM', payload: { term: e.target.value } }); }, onFocus: function () { return dispatch({ type: 'TOGGLE_PANEL', payload: { open: true } }); }, id: "search", autoComplete: "off", theme: theme, "aria-label": "Search for products" }, void 0), jsx$1(SearchControl, { open: state.open, onClear: function () { return dispatch({ type: 'CLEAR', payload: {} }); }, onSearch: function () { return onSearch(state.term); } }, void 0)] }), void 0), state.open && (jsx$1(ResultsPanel, { dataTestId: resultsPanelDataTestId, options: options, header: resultOptions.length === 0 ? 'Most popular products' : undefined, footer: resultOptions.length > 0 ? "View all results (".concat(resultOptions.length, ")") : undefined, onClick: function (value) {
12975
12752
  onSearch(value.title);
12976
12753
  dispatch({ type: 'UPDATE_OPTION', payload: { selectedOption: value } });
12977
12754
  }, onViewAll: function () { return onSearch(state.term); } }, void 0))] }), void 0));
@@ -12995,13 +12772,13 @@ var ArrowButton = function (_a) {
12995
12772
  var templateObject_1$3;
12996
12773
 
12997
12774
  var Container$1 = newStyled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n position: absolute;\n bottom: 15px;\n display: flex;\n justify-content: center;\n width: 100%;\n svg {\n padding: 0.125rem;\n margin-left: 0.25rem;\n }\n"], ["\n position: absolute;\n bottom: 15px;\n display: flex;\n justify-content: center;\n width: 100%;\n svg {\n padding: 0.125rem;\n margin-left: 0.25rem;\n }\n"])));
12998
- var range = function (limit) { return __spreadArray([], new Array(limit)).map(function (_, index) { return index; }); };
12775
+ var range = function (limit) { return __spreadArray([], new Array(limit), true).map(function (_, index) { return index; }); };
12999
12776
  var SlideDots = function (_a) {
13000
12777
  var quantity = _a.quantity, selectedIndex = _a.selectedIndex, containerDataTestId = _a.containerDataTestId;
13001
12778
  var theme = useTheme();
13002
12779
  return (jsx$1(Container$1, __assign({ "data-testid": containerDataTestId }, { children: range(quantity).map(function (index) { return (jsx$1(Icon.SlideDots.SlideDot, { height: 0.75, width: 0.75, fill: index === selectedIndex
13003
12780
  ? theme.colors.shades.white.color
13004
- : theme.colors.shades['700'].color, opacity: 0.6, dataTestId: "slide-dot-" + index }, index)); }) }), void 0));
12781
+ : theme.colors.shades['700'].color, opacity: 0.6, dataTestId: "slide-dot-".concat(index) }, index)); }) }), void 0));
13005
12782
  };
13006
12783
  var templateObject_1$2;
13007
12784