react-govuk-autocomplete
Version:
A React GOV.UK auto complete component for government platforms and services.
1,392 lines (1,390 loc) • 206 kB
JavaScript
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(".gds-autocomplete .gds-autocomplete__input-container{visibility:visible!important}.gds-autocomplete .gds-autocomplete__input-container input{opacity:1!important}.gds-autocomplete .gds-autocomplete__no-options{font-size:19px;text-align:left;background-color:#fafafa;color:#646b6f;cursor:not-allowed}.gds-autocomplete .gds-autocomplete__control{font-size:19px;border:2px solid #0b0c0c;border-radius:0;outline-offset:0}.gds-autocomplete .gds-autocomplete__control.gds-autocomplete__control--is-focused{outline:3px solid #ffdd00!important;box-shadow:inset 0 0 0 2px}.gds-autocomplete .gds-autocomplete__control:hover{border:2px solid #0b0c0c}.gds-autocomplete .gds-autocomplete__control .gds-autocomplete__indicator-separator{display:none}.gds-autocomplete .gds-autocomplete__menu{font-size:19px;max-height:20em;color:#000;top:1.7em;border-radius:0;padding-top:0!important;padding-bottom:0!important;max-height:inherit;border:2px solid #0b0c0c;border-top:0}.gds-autocomplete .gds-autocomplete__menu .gds-autocomplete__even{background-color:#fafafa;color:#0b0c0c}.gds-autocomplete .gds-autocomplete__menu .gds-autocomplete__option{font-size:19px;color:#0b0c0c;box-sizing:border-box;height:100%}.gds-autocomplete .gds-autocomplete__menu .gds-autocomplete__option.gds-autocomplete__option--is-focused{background-color:#fd0}.gds-autocomplete .gds-autocomplete__menu .gds-autocomplete__option.gds-autocomplete__option--is-selected{background-color:#1d70b8;color:#fff}.gds-autocomplete .gds-autocomplete__menu .gds-autocomplete__option.gds-autocomplete__option--is-selected:hover{background-color:#1d70b8}.gds-autocomplete .gds-autocomplete__menu .gds-autocomplete__option:hover:not(.gds-autocomplete__option--is-selected){background-color:#deebff}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
import { jsx as z, Fragment as Qt, jsxs as $t } from "react/jsx-runtime";
import * as G from "react";
import { useState as pe, useCallback as j, forwardRef as rt, useContext as Zn, useLayoutEffect as Or, useRef as ne, useMemo as se, createContext as Xr, Component as Pr, Fragment as At, useEffect as he, useImperativeHandle as Zr } from "react";
import { createPortal as Dr, flushSync as Mr } from "react-dom";
function ve(t) {
"@babel/helpers - typeof";
return ve = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
return typeof e;
} : function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, ve(t);
}
function Lr(t, e) {
if (ve(t) != "object" || !t)
return t;
var r = t[Symbol.toPrimitive];
if (r !== void 0) {
var i = r.call(t, e || "default");
if (ve(i) != "object")
return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (e === "string" ? String : Number)(t);
}
function Dn(t) {
var e = Lr(t, "string");
return ve(e) == "symbol" ? e : e + "";
}
function Ve(t, e, r) {
return e = Dn(e), e in t ? Object.defineProperty(t, e, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[e] = r, t;
}
function Kt(t, e) {
var r = Object.keys(t);
if (Object.getOwnPropertySymbols) {
var i = Object.getOwnPropertySymbols(t);
e && (i = i.filter(function(n) {
return Object.getOwnPropertyDescriptor(t, n).enumerable;
})), r.push.apply(r, i);
}
return r;
}
function S(t) {
for (var e = 1; e < arguments.length; e++) {
var r = arguments[e] != null ? arguments[e] : {};
e % 2 ? Kt(Object(r), !0).forEach(function(i) {
Ve(t, i, r[i]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Kt(Object(r)).forEach(function(i) {
Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(r, i));
});
}
return t;
}
function Hr(t) {
if (Array.isArray(t))
return t;
}
function kr(t, e) {
var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
if (r != null) {
var i, n, o, s, u = [], a = !0, c = !1;
try {
if (o = (r = r.call(t)).next, e === 0) {
if (Object(r) !== r)
return;
a = !1;
} else
for (; !(a = (i = o.call(r)).done) && (u.push(i.value), u.length !== e); a = !0)
;
} catch (l) {
c = !0, n = l;
} finally {
try {
if (!a && r.return != null && (s = r.return(), Object(s) !== s))
return;
} finally {
if (c)
throw n;
}
}
return u;
}
}
function yt(t, e) {
(e == null || e > t.length) && (e = t.length);
for (var r = 0, i = new Array(e); r < e; r++)
i[r] = t[r];
return i;
}
function Mn(t, e) {
if (t) {
if (typeof t == "string")
return yt(t, e);
var r = Object.prototype.toString.call(t).slice(8, -1);
if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set")
return Array.from(t);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
return yt(t, e);
}
}
function zr() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function be(t, e) {
return Hr(t) || kr(t, e) || Mn(t, e) || zr();
}
function Yr(t, e) {
if (t == null)
return {};
var r = {}, i = Object.keys(t), n, o;
for (o = 0; o < i.length; o++)
n = i[o], !(e.indexOf(n) >= 0) && (r[n] = t[n]);
return r;
}
function fe(t, e) {
if (t == null)
return {};
var r = Yr(t, e), i, n;
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(t);
for (n = 0; n < o.length; n++)
i = o[n], !(e.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(t, i) && (r[i] = t[i]);
}
return r;
}
var jr = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
function Ln(t) {
var e = t.defaultInputValue, r = e === void 0 ? "" : e, i = t.defaultMenuIsOpen, n = i === void 0 ? !1 : i, o = t.defaultValue, s = o === void 0 ? null : o, u = t.inputValue, a = t.menuIsOpen, c = t.onChange, l = t.onInputChange, d = t.onMenuClose, v = t.onMenuOpen, m = t.value, h = fe(t, jr), g = pe(u !== void 0 ? u : r), f = be(g, 2), p = f[0], A = f[1], I = pe(a !== void 0 ? a : n), C = be(I, 2), b = C[0], E = C[1], y = pe(m !== void 0 ? m : s), V = be(y, 2), B = V[0], M = V[1], k = j(function(X, $) {
typeof c == "function" && c(X, $), M(X);
}, [c]), P = j(function(X, $) {
var q;
typeof l == "function" && (q = l(X, $)), A(q !== void 0 ? q : X);
}, [l]), J = j(function() {
typeof v == "function" && v(), E(!0);
}, [v]), U = j(function() {
typeof d == "function" && d(), E(!1);
}, [d]), Z = u !== void 0 ? u : p, D = a !== void 0 ? a : b, w = m !== void 0 ? m : B;
return S(S({}, h), {}, {
inputValue: Z,
menuIsOpen: D,
onChange: k,
onInputChange: P,
onMenuClose: U,
onMenuOpen: J,
value: w
});
}
function N() {
return N = Object.assign ? Object.assign.bind() : function(t) {
for (var e = 1; e < arguments.length; e++) {
var r = arguments[e];
for (var i in r)
Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
}
return t;
}, N.apply(this, arguments);
}
function Jr(t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
}
function qt(t, e) {
for (var r = 0; r < e.length; r++) {
var i = e[r];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, Dn(i.key), i);
}
}
function _r(t, e, r) {
return e && qt(t.prototype, e), r && qt(t, r), Object.defineProperty(t, "prototype", {
writable: !1
}), t;
}
function Et(t, e) {
return Et = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, n) {
return i.__proto__ = n, i;
}, Et(t, e);
}
function Ur(t, e) {
if (typeof e != "function" && e !== null)
throw new TypeError("Super expression must either be null or a function");
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
writable: !0,
configurable: !0
}
}), Object.defineProperty(t, "prototype", {
writable: !1
}), e && Et(t, e);
}
function Je(t) {
return Je = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r);
}, Je(t);
}
function Hn() {
try {
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
}));
} catch {
}
return (Hn = function() {
return !!t;
})();
}
function Qr(t) {
if (t === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return t;
}
function $r(t, e) {
if (e && (ve(e) === "object" || typeof e == "function"))
return e;
if (e !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return Qr(t);
}
function Kr(t) {
var e = Hn();
return function() {
var i = Je(t), n;
if (e) {
var o = Je(this).constructor;
n = Reflect.construct(i, arguments, o);
} else
n = i.apply(this, arguments);
return $r(this, n);
};
}
function qr(t) {
if (Array.isArray(t))
return yt(t);
}
function ei(t) {
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null)
return Array.from(t);
}
function ti() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function ye(t) {
return qr(t) || ei(t) || Mn(t) || ti();
}
function ni(t) {
if (t.sheet)
return t.sheet;
for (var e = 0; e < document.styleSheets.length; e++)
if (document.styleSheets[e].ownerNode === t)
return document.styleSheets[e];
}
function ri(t) {
var e = document.createElement("style");
return e.setAttribute("data-emotion", t.key), t.nonce !== void 0 && e.setAttribute("nonce", t.nonce), e.appendChild(document.createTextNode("")), e.setAttribute("data-s", ""), e;
}
var ii = /* @__PURE__ */ function() {
function t(r) {
var i = this;
this._insertTag = function(n) {
var o;
i.tags.length === 0 ? i.insertionPoint ? o = i.insertionPoint.nextSibling : i.prepend ? o = i.container.firstChild : o = i.before : o = i.tags[i.tags.length - 1].nextSibling, i.container.insertBefore(n, o), i.tags.push(n);
}, this.isSpeedy = r.speedy === void 0 ? process.env.NODE_ENV === "production" : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
}
var e = t.prototype;
return e.hydrate = function(i) {
i.forEach(this._insertTag);
}, e.insert = function(i) {
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(ri(this));
var n = this.tags[this.tags.length - 1];
if (process.env.NODE_ENV !== "production") {
var o = i.charCodeAt(0) === 64 && i.charCodeAt(1) === 105;
o && this._alreadyInsertedOrderInsensitiveRule && console.error(`You're attempting to insert the following rule:
` + i + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."), this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !o;
}
if (this.isSpeedy) {
var s = ni(n);
try {
s.insertRule(i, s.cssRules.length);
} catch (u) {
process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(i) && console.error('There was a problem inserting the following rule: "' + i + '"', u);
}
} else
n.appendChild(document.createTextNode(i));
this.ctr++;
}, e.flush = function() {
this.tags.forEach(function(i) {
return i.parentNode && i.parentNode.removeChild(i);
}), this.tags = [], this.ctr = 0, process.env.NODE_ENV !== "production" && (this._alreadyInsertedOrderInsensitiveRule = !1);
}, t;
}(), Q = "-ms-", _e = "-moz-", R = "-webkit-", Tt = "comm", Wt = "rule", Ot = "decl", oi = "@import", kn = "@keyframes", ai = "@layer", si = Math.abs, it = String.fromCharCode, ui = Object.assign;
function ci(t, e) {
return _(t, 0) ^ 45 ? (((e << 2 ^ _(t, 0)) << 2 ^ _(t, 1)) << 2 ^ _(t, 2)) << 2 ^ _(t, 3) : 0;
}
function zn(t) {
return t.trim();
}
function li(t, e) {
return (t = e.exec(t)) ? t[0] : t;
}
function T(t, e, r) {
return t.replace(e, r);
}
function xt(t, e) {
return t.indexOf(e);
}
function _(t, e) {
return t.charCodeAt(e) | 0;
}
function Re(t, e, r) {
return t.slice(e, r);
}
function de(t) {
return t.length;
}
function Xt(t) {
return t.length;
}
function De(t, e) {
return e.push(t), t;
}
function di(t, e) {
return t.map(e).join("");
}
var ot = 1, xe = 1, Yn = 0, ee = 0, Y = 0, Ge = "";
function at(t, e, r, i, n, o, s) {
return { value: t, root: e, parent: r, type: i, props: n, children: o, line: ot, column: xe, length: s, return: "" };
}
function we(t, e) {
return ui(at("", null, null, "", null, null, 0), t, { length: -t.length }, e);
}
function gi() {
return Y;
}
function fi() {
return Y = ee > 0 ? _(Ge, --ee) : 0, xe--, Y === 10 && (xe = 1, ot--), Y;
}
function re() {
return Y = ee < Yn ? _(Ge, ee++) : 0, xe++, Y === 10 && (xe = 1, ot++), Y;
}
function ge() {
return _(Ge, ee);
}
function ke() {
return ee;
}
function Xe(t, e) {
return Re(Ge, t, e);
}
function Te(t) {
switch (t) {
case 0:
case 9:
case 10:
case 13:
case 32:
return 5;
case 33:
case 43:
case 44:
case 47:
case 62:
case 64:
case 126:
case 59:
case 123:
case 125:
return 4;
case 58:
return 3;
case 34:
case 39:
case 40:
case 91:
return 2;
case 41:
case 93:
return 1;
}
return 0;
}
function jn(t) {
return ot = xe = 1, Yn = de(Ge = t), ee = 0, [];
}
function Jn(t) {
return Ge = "", t;
}
function ze(t) {
return zn(Xe(ee - 1, Gt(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
}
function pi(t) {
for (; (Y = ge()) && Y < 33; )
re();
return Te(t) > 2 || Te(Y) > 3 ? "" : " ";
}
function bi(t, e) {
for (; --e && re() && !(Y < 48 || Y > 102 || Y > 57 && Y < 65 || Y > 70 && Y < 97); )
;
return Xe(t, ke() + (e < 6 && ge() == 32 && re() == 32));
}
function Gt(t) {
for (; re(); )
switch (Y) {
case t:
return ee;
case 34:
case 39:
t !== 34 && t !== 39 && Gt(Y);
break;
case 40:
t === 41 && Gt(t);
break;
case 92:
re();
break;
}
return ee;
}
function mi(t, e) {
for (; re() && t + Y !== 57; )
if (t + Y === 84 && ge() === 47)
break;
return "/*" + Xe(e, ee - 1) + "*" + it(t === 47 ? t : re());
}
function hi(t) {
for (; !Te(ge()); )
re();
return Xe(t, ee);
}
function Ii(t) {
return Jn(Ye("", null, null, null, [""], t = jn(t), 0, [0], t));
}
function Ye(t, e, r, i, n, o, s, u, a) {
for (var c = 0, l = 0, d = s, v = 0, m = 0, h = 0, g = 1, f = 1, p = 1, A = 0, I = "", C = n, b = o, E = i, y = I; f; )
switch (h = A, A = re()) {
case 40:
if (h != 108 && _(y, d - 1) == 58) {
xt(y += T(ze(A), "&", "&\f"), "&\f") != -1 && (p = -1);
break;
}
case 34:
case 39:
case 91:
y += ze(A);
break;
case 9:
case 10:
case 13:
case 32:
y += pi(h);
break;
case 92:
y += bi(ke() - 1, 7);
continue;
case 47:
switch (ge()) {
case 42:
case 47:
De(Ci(mi(re(), ke()), e, r), a);
break;
default:
y += "/";
}
break;
case 123 * g:
u[c++] = de(y) * p;
case 125 * g:
case 59:
case 0:
switch (A) {
case 0:
case 125:
f = 0;
case 59 + l:
p == -1 && (y = T(y, /\f/g, "")), m > 0 && de(y) - d && De(m > 32 ? tn(y + ";", i, r, d - 1) : tn(T(y, " ", "") + ";", i, r, d - 2), a);
break;
case 59:
y += ";";
default:
if (De(E = en(y, e, r, c, l, n, u, I, C = [], b = [], d), o), A === 123)
if (l === 0)
Ye(y, e, E, E, C, o, d, u, b);
else
switch (v === 99 && _(y, 3) === 110 ? 100 : v) {
case 100:
case 108:
case 109:
case 115:
Ye(t, E, E, i && De(en(t, E, E, 0, 0, n, u, I, n, C = [], d), b), n, b, d, u, i ? C : b);
break;
default:
Ye(y, E, E, E, [""], b, 0, u, b);
}
}
c = l = m = 0, g = p = 1, I = y = "", d = s;
break;
case 58:
d = 1 + de(y), m = h;
default:
if (g < 1) {
if (A == 123)
--g;
else if (A == 125 && g++ == 0 && fi() == 125)
continue;
}
switch (y += it(A), A * g) {
case 38:
p = l > 0 ? 1 : (y += "\f", -1);
break;
case 44:
u[c++] = (de(y) - 1) * p, p = 1;
break;
case 64:
ge() === 45 && (y += ze(re())), v = ge(), l = d = de(I = y += hi(ke())), A++;
break;
case 45:
h === 45 && de(y) == 2 && (g = 0);
}
}
return o;
}
function en(t, e, r, i, n, o, s, u, a, c, l) {
for (var d = n - 1, v = n === 0 ? o : [""], m = Xt(v), h = 0, g = 0, f = 0; h < i; ++h)
for (var p = 0, A = Re(t, d + 1, d = si(g = s[h])), I = t; p < m; ++p)
(I = zn(g > 0 ? v[p] + " " + A : T(A, /&\f/g, v[p]))) && (a[f++] = I);
return at(t, e, r, n === 0 ? Wt : u, a, c, l);
}
function Ci(t, e, r) {
return at(t, e, r, Tt, it(gi()), Re(t, 2, -2), 0);
}
function tn(t, e, r, i) {
return at(t, e, r, Ot, Re(t, 0, i), Re(t, i + 1, -1), i);
}
function Ee(t, e) {
for (var r = "", i = Xt(t), n = 0; n < i; n++)
r += e(t[n], n, t, e) || "";
return r;
}
function Ai(t, e, r, i) {
switch (t.type) {
case ai:
if (t.children.length)
break;
case oi:
case Ot:
return t.return = t.return || t.value;
case Tt:
return "";
case kn:
return t.return = t.value + "{" + Ee(t.children, i) + "}";
case Wt:
t.value = t.props.join(",");
}
return de(r = Ee(t.children, i)) ? t.return = t.value + "{" + r + "}" : "";
}
function yi(t) {
var e = Xt(t);
return function(r, i, n, o) {
for (var s = "", u = 0; u < e; u++)
s += t[u](r, i, n, o) || "";
return s;
};
}
function Ei(t) {
return function(e) {
e.root || (e = e.return) && t(e);
};
}
function xi(t) {
var e = /* @__PURE__ */ Object.create(null);
return function(r) {
return e[r] === void 0 && (e[r] = t(r)), e[r];
};
}
var Gi = function(e, r, i) {
for (var n = 0, o = 0; n = o, o = ge(), n === 38 && o === 12 && (r[i] = 1), !Te(o); )
re();
return Xe(e, ee);
}, Si = function(e, r) {
var i = -1, n = 44;
do
switch (Te(n)) {
case 0:
n === 38 && ge() === 12 && (r[i] = 1), e[i] += Gi(ee - 1, r, i);
break;
case 2:
e[i] += ze(n);
break;
case 4:
if (n === 44) {
e[++i] = ge() === 58 ? "&\f" : "", r[i] = e[i].length;
break;
}
default:
e[i] += it(n);
}
while (n = re());
return e;
}, wi = function(e, r) {
return Jn(Si(jn(e), r));
}, nn = /* @__PURE__ */ new WeakMap(), Fi = function(e) {
if (!(e.type !== "rule" || !e.parent || // positive .length indicates that this rule contains pseudo
// negative .length indicates that this rule has been already prefixed
e.length < 1)) {
for (var r = e.value, i = e.parent, n = e.column === i.column && e.line === i.line; i.type !== "rule"; )
if (i = i.parent, !i)
return;
if (!(e.props.length === 1 && r.charCodeAt(0) !== 58 && !nn.get(i)) && !n) {
nn.set(e, !0);
for (var o = [], s = wi(r, o), u = i.props, a = 0, c = 0; a < s.length; a++)
for (var l = 0; l < u.length; l++, c++)
e.props[c] = o[a] ? s[a].replace(/&\f/g, u[l]) : u[l] + " " + s[a];
}
}
}, Ni = function(e) {
if (e.type === "decl") {
var r = e.value;
// charcode for l
r.charCodeAt(0) === 108 && // charcode for b
r.charCodeAt(2) === 98 && (e.return = "", e.value = "");
}
}, Vi = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason", Bi = function(e) {
return e.type === "comm" && e.children.indexOf(Vi) > -1;
}, Ri = function(e) {
return function(r, i, n) {
if (!(r.type !== "rule" || e.compat)) {
var o = r.value.match(/(:first|:nth|:nth-last)-child/g);
if (o) {
for (var s = !!r.parent, u = s ? r.parent.children : (
// global rule at the root level
n
), a = u.length - 1; a >= 0; a--) {
var c = u[a];
if (c.line < r.line)
break;
if (c.column < r.column) {
if (Bi(c))
return;
break;
}
}
o.forEach(function(l) {
console.error('The pseudo class "' + l + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + l.split("-child")[0] + '-of-type".');
});
}
}
};
}, _n = function(e) {
return e.type.charCodeAt(1) === 105 && e.type.charCodeAt(0) === 64;
}, Ti = function(e, r) {
for (var i = e - 1; i >= 0; i--)
if (!_n(r[i]))
return !0;
return !1;
}, rn = function(e) {
e.type = "", e.value = "", e.return = "", e.children = "", e.props = "";
}, Wi = function(e, r, i) {
_n(e) && (e.parent ? (console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."), rn(e)) : Ti(r, i) && (console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."), rn(e)));
};
function Un(t, e) {
switch (ci(t, e)) {
case 5103:
return R + "print-" + t + t;
case 5737:
case 4201:
case 3177:
case 3433:
case 1641:
case 4457:
case 2921:
case 5572:
case 6356:
case 5844:
case 3191:
case 6645:
case 3005:
case 6391:
case 5879:
case 5623:
case 6135:
case 4599:
case 4855:
case 4215:
case 6389:
case 5109:
case 5365:
case 5621:
case 3829:
return R + t + t;
case 5349:
case 4246:
case 4810:
case 6968:
case 2756:
return R + t + _e + t + Q + t + t;
case 6828:
case 4268:
return R + t + Q + t + t;
case 6165:
return R + t + Q + "flex-" + t + t;
case 5187:
return R + t + T(t, /(\w+).+(:[^]+)/, R + "box-$1$2" + Q + "flex-$1$2") + t;
case 5443:
return R + t + Q + "flex-item-" + T(t, /flex-|-self/, "") + t;
case 4675:
return R + t + Q + "flex-line-pack" + T(t, /align-content|flex-|-self/, "") + t;
case 5548:
return R + t + Q + T(t, "shrink", "negative") + t;
case 5292:
return R + t + Q + T(t, "basis", "preferred-size") + t;
case 6060:
return R + "box-" + T(t, "-grow", "") + R + t + Q + T(t, "grow", "positive") + t;
case 4554:
return R + T(t, /([^-])(transform)/g, "$1" + R + "$2") + t;
case 6187:
return T(T(T(t, /(zoom-|grab)/, R + "$1"), /(image-set)/, R + "$1"), t, "") + t;
case 5495:
case 3959:
return T(t, /(image-set\([^]*)/, R + "$1$`$1");
case 4968:
return T(T(t, /(.+:)(flex-)?(.*)/, R + "box-pack:$3" + Q + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + R + t + t;
case 4095:
case 3583:
case 4068:
case 2532:
return T(t, /(.+)-inline(.+)/, R + "$1$2") + t;
case 8116:
case 7059:
case 5753:
case 5535:
case 5445:
case 5701:
case 4933:
case 4677:
case 5533:
case 5789:
case 5021:
case 4765:
if (de(t) - 1 - e > 6)
switch (_(t, e + 1)) {
case 109:
if (_(t, e + 4) !== 45)
break;
case 102:
return T(t, /(.+:)(.+)-([^]+)/, "$1" + R + "$2-$3$1" + _e + (_(t, e + 3) == 108 ? "$3" : "$2-$3")) + t;
case 115:
return ~xt(t, "stretch") ? Un(T(t, "stretch", "fill-available"), e) + t : t;
}
break;
case 4949:
if (_(t, e + 1) !== 115)
break;
case 6444:
switch (_(t, de(t) - 3 - (~xt(t, "!important") && 10))) {
case 107:
return T(t, ":", ":" + R) + t;
case 101:
return T(t, /(.+:)([^;!]+)(;|!.+)?/, "$1" + R + (_(t, 14) === 45 ? "inline-" : "") + "box$3$1" + R + "$2$3$1" + Q + "$2box$3") + t;
}
break;
case 5936:
switch (_(t, e + 11)) {
case 114:
return R + t + Q + T(t, /[svh]\w+-[tblr]{2}/, "tb") + t;
case 108:
return R + t + Q + T(t, /[svh]\w+-[tblr]{2}/, "tb-rl") + t;
case 45:
return R + t + Q + T(t, /[svh]\w+-[tblr]{2}/, "lr") + t;
}
return R + t + Q + t + t;
}
return t;
}
var Oi = function(e, r, i, n) {
if (e.length > -1 && !e.return)
switch (e.type) {
case Ot:
e.return = Un(e.value, e.length);
break;
case kn:
return Ee([we(e, {
value: T(e.value, "@", "@" + R)
})], n);
case Wt:
if (e.length)
return di(e.props, function(o) {
switch (li(o, /(::plac\w+|:read-\w+)/)) {
case ":read-only":
case ":read-write":
return Ee([we(e, {
props: [T(o, /:(read-\w+)/, ":" + _e + "$1")]
})], n);
case "::placeholder":
return Ee([we(e, {
props: [T(o, /:(plac\w+)/, ":" + R + "input-$1")]
}), we(e, {
props: [T(o, /:(plac\w+)/, ":" + _e + "$1")]
}), we(e, {
props: [T(o, /:(plac\w+)/, Q + "input-$1")]
})], n);
}
return "";
});
}
}, Xi = [Oi], Pi = function(e) {
var r = e.key;
if (process.env.NODE_ENV !== "production" && !r)
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.
If multiple caches share the same key they might "fight" for each other's style elements.`);
if (r === "css") {
var i = document.querySelectorAll("style[data-emotion]:not([data-s])");
Array.prototype.forEach.call(i, function(g) {
var f = g.getAttribute("data-emotion");
f.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
});
}
var n = e.stylisPlugins || Xi;
if (process.env.NODE_ENV !== "production" && /[^a-z-]/.test(r))
throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + r + '" was passed');
var o = {}, s, u = [];
s = e.container || document.head, Array.prototype.forEach.call(
// this means we will ignore elements which don't have a space in them which
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
function(g) {
for (var f = g.getAttribute("data-emotion").split(" "), p = 1; p < f.length; p++)
o[f[p]] = !0;
u.push(g);
}
);
var a, c = [Fi, Ni];
process.env.NODE_ENV !== "production" && c.push(Ri({
get compat() {
return h.compat;
}
}), Wi);
{
var l, d = [Ai, process.env.NODE_ENV !== "production" ? function(g) {
g.root || (g.return ? l.insert(g.return) : g.value && g.type !== Tt && l.insert(g.value + "{}"));
} : Ei(function(g) {
l.insert(g);
})], v = yi(c.concat(n, d)), m = function(f) {
return Ee(Ii(f), v);
};
a = function(f, p, A, I) {
l = A, process.env.NODE_ENV !== "production" && p.map !== void 0 && (l = {
insert: function(b) {
A.insert(b + p.map);
}
}), m(f ? f + "{" + p.styles + "}" : p.styles), I && (h.inserted[p.name] = !0);
};
}
var h = {
key: r,
sheet: new ii({
key: r,
container: s,
nonce: e.nonce,
speedy: e.speedy,
prepend: e.prepend,
insertionPoint: e.insertionPoint
}),
nonce: e.nonce,
inserted: o,
registered: {},
insert: a
};
return h.sheet.hydrate(u), h;
}, St = { exports: {} }, W = {};
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var on;
function Zi() {
if (on)
return W;
on = 1;
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, n = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, u = t ? Symbol.for("react.context") : 60110, a = t ? Symbol.for("react.async_mode") : 60111, c = t ? Symbol.for("react.concurrent_mode") : 60111, l = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, v = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, f = t ? Symbol.for("react.fundamental") : 60117, p = t ? Symbol.for("react.responder") : 60118, A = t ? Symbol.for("react.scope") : 60119;
function I(b) {
if (typeof b == "object" && b !== null) {
var E = b.$$typeof;
switch (E) {
case e:
switch (b = b.type, b) {
case a:
case c:
case i:
case o:
case n:
case d:
return b;
default:
switch (b = b && b.$$typeof, b) {
case u:
case l:
case h:
case m:
case s:
return b;
default:
return E;
}
}
case r:
return E;
}
}
}
function C(b) {
return I(b) === c;
}
return W.AsyncMode = a, W.ConcurrentMode = c, W.ContextConsumer = u, W.ContextProvider = s, W.Element = e, W.ForwardRef = l, W.Fragment = i, W.Lazy = h, W.Memo = m, W.Portal = r, W.Profiler = o, W.StrictMode = n, W.Suspense = d, W.isAsyncMode = function(b) {
return C(b) || I(b) === a;
}, W.isConcurrentMode = C, W.isContextConsumer = function(b) {
return I(b) === u;
}, W.isContextProvider = function(b) {
return I(b) === s;
}, W.isElement = function(b) {
return typeof b == "object" && b !== null && b.$$typeof === e;
}, W.isForwardRef = function(b) {
return I(b) === l;
}, W.isFragment = function(b) {
return I(b) === i;
}, W.isLazy = function(b) {
return I(b) === h;
}, W.isMemo = function(b) {
return I(b) === m;
}, W.isPortal = function(b) {
return I(b) === r;
}, W.isProfiler = function(b) {
return I(b) === o;
}, W.isStrictMode = function(b) {
return I(b) === n;
}, W.isSuspense = function(b) {
return I(b) === d;
}, W.isValidElementType = function(b) {
return typeof b == "string" || typeof b == "function" || b === i || b === c || b === o || b === n || b === d || b === v || typeof b == "object" && b !== null && (b.$$typeof === h || b.$$typeof === m || b.$$typeof === s || b.$$typeof === u || b.$$typeof === l || b.$$typeof === f || b.$$typeof === p || b.$$typeof === A || b.$$typeof === g);
}, W.typeOf = I, W;
}
var O = {};
/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var an;
function Di() {
return an || (an = 1, process.env.NODE_ENV !== "production" && function() {
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, n = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, u = t ? Symbol.for("react.context") : 60110, a = t ? Symbol.for("react.async_mode") : 60111, c = t ? Symbol.for("react.concurrent_mode") : 60111, l = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, v = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, f = t ? Symbol.for("react.fundamental") : 60117, p = t ? Symbol.for("react.responder") : 60118, A = t ? Symbol.for("react.scope") : 60119;
function I(x) {
return typeof x == "string" || typeof x == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
x === i || x === c || x === o || x === n || x === d || x === v || typeof x == "object" && x !== null && (x.$$typeof === h || x.$$typeof === m || x.$$typeof === s || x.$$typeof === u || x.$$typeof === l || x.$$typeof === f || x.$$typeof === p || x.$$typeof === A || x.$$typeof === g);
}
function C(x) {
if (typeof x == "object" && x !== null) {
var Se = x.$$typeof;
switch (Se) {
case e:
var me = x.type;
switch (me) {
case a:
case c:
case i:
case o:
case n:
case d:
return me;
default:
var Ze = me && me.$$typeof;
switch (Ze) {
case u:
case l:
case h:
case m:
case s:
return Ze;
default:
return Se;
}
}
case r:
return Se;
}
}
}
var b = a, E = c, y = u, V = s, B = e, M = l, k = i, P = h, J = m, U = r, Z = o, D = n, w = d, X = !1;
function $(x) {
return X || (X = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), q(x) || C(x) === a;
}
function q(x) {
return C(x) === c;
}
function Ie(x) {
return C(x) === u;
}
function H(x) {
return C(x) === s;
}
function K(x) {
return typeof x == "object" && x !== null && x.$$typeof === e;
}
function ie(x) {
return C(x) === l;
}
function ce(x) {
return C(x) === i;
}
function te(x) {
return C(x) === h;
}
function le(x) {
return C(x) === m;
}
function oe(x) {
return C(x) === r;
}
function Ce(x) {
return C(x) === o;
}
function lt(x) {
return C(x) === n;
}
function Pe(x) {
return C(x) === d;
}
O.AsyncMode = b, O.ConcurrentMode = E, O.ContextConsumer = y, O.ContextProvider = V, O.Element = B, O.ForwardRef = M, O.Fragment = k, O.Lazy = P, O.Memo = J, O.Portal = U, O.Profiler = Z, O.StrictMode = D, O.Suspense = w, O.isAsyncMode = $, O.isConcurrentMode = q, O.isContextConsumer = Ie, O.isContextProvider = H, O.isElement = K, O.isForwardRef = ie, O.isFragment = ce, O.isLazy = te, O.isMemo = le, O.isPortal = oe, O.isProfiler = Ce, O.isStrictMode = lt, O.isSuspense = Pe, O.isValidElementType = I, O.typeOf = C;
}()), O;
}
process.env.NODE_ENV === "production" ? St.exports = Zi() : St.exports = Di();
var Mi = St.exports, Qn = Mi, Li = {
$$typeof: !0,
render: !0,
defaultProps: !0,
displayName: !0,
propTypes: !0
}, Hi = {
$$typeof: !0,
compare: !0,
defaultProps: !0,
displayName: !0,
propTypes: !0,
type: !0
}, $n = {};
$n[Qn.ForwardRef] = Li;
$n[Qn.Memo] = Hi;
var ki = !0;
function Kn(t, e, r) {
var i = "";
return r.split(" ").forEach(function(n) {
t[n] !== void 0 ? e.push(t[n] + ";") : i += n + " ";
}), i;
}
var Pt = function(e, r, i) {
var n = e.key + "-" + r.name;
// we only need to add the styles to the registered cache if the
// class name could be used further down
// the tree but if it's a string tag, we know it won't
// so we don't have to add it to registered cache.
// this improves memory usage since we can avoid storing the whole style string
(i === !1 || // we need to always store it if we're in compat mode and
// in node since emotion-server relies on whether a style is in
// the registered cache to know whether a style is global or not
// also, note that this check will be dead code eliminated in the browser
ki === !1) && e.registered[n] === void 0 && (e.registered[n] = r.styles);
}, Zt = function(e, r, i) {
Pt(e, r, i);
var n = e.key + "-" + r.name;
if (e.inserted[r.name] === void 0) {
var o = r;
do
e.insert(r === o ? "." + n : "", o, e.sheet, !0), o = o.next;
while (o !== void 0);
}
};
function zi(t) {
for (var e = 0, r, i = 0, n = t.length; n >= 4; ++i, n -= 4)
r = t.charCodeAt(i) & 255 | (t.charCodeAt(++i) & 255) << 8 | (t.charCodeAt(++i) & 255) << 16 | (t.charCodeAt(++i) & 255) << 24, r = /* Math.imul(k, m): */
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
r >>> 24, e = /* Math.imul(k, m): */
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
(e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
switch (n) {
case 3:
e ^= (t.charCodeAt(i + 2) & 255) << 16;
case 2:
e ^= (t.charCodeAt(i + 1) & 255) << 8;
case 1:
e ^= t.charCodeAt(i) & 255, e = /* Math.imul(h, m): */
(e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
}
return e ^= e >>> 13, e = /* Math.imul(h, m): */
(e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
}
var Yi = {
animationIterationCount: 1,
aspectRatio: 1,
borderImageOutset: 1,
borderImageSlice: 1,
borderImageWidth: 1,
boxFlex: 1,
boxFlexGroup: 1,
boxOrdinalGroup: 1,
columnCount: 1,
columns: 1,
flex: 1,
flexGrow: 1,
flexPositive: 1,
flexShrink: 1,
flexNegative: 1,
flexOrder: 1,
gridRow: 1,
gridRowEnd: 1,
gridRowSpan: 1,
gridRowStart: 1,
gridColumn: 1,
gridColumnEnd: 1,
gridColumnSpan: 1,
gridColumnStart: 1,
msGridRow: 1,
msGridRowSpan: 1,
msGridColumn: 1,
msGridColumnSpan: 1,
fontWeight: 1,
lineHeight: 1,
opacity: 1,
order: 1,
orphans: 1,
tabSize: 1,
widows: 1,
zIndex: 1,
zoom: 1,
WebkitLineClamp: 1,
// SVG-related properties
fillOpacity: 1,
floodOpacity: 1,
stopOpacity: 1,
strokeDasharray: 1,
strokeDashoffset: 1,
strokeMiterlimit: 1,
strokeOpacity: 1,
strokeWidth: 1
}, sn = `You have illegal escape sequence in your template literal, most likely inside content's property value.
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`, ji = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).", Ji = /[A-Z]|^ms/g, qn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Dt = function(e) {
return e.charCodeAt(1) === 45;
}, un = function(e) {
return e != null && typeof e != "boolean";
}, dt = /* @__PURE__ */ xi(function(t) {
return Dt(t) ? t : t.replace(Ji, "-$&").toLowerCase();
}), Ue = function(e, r) {
switch (e) {
case "animation":
case "animationName":
if (typeof r == "string")
return r.replace(qn, function(i, n, o) {
return ae = {
name: n,
styles: o,
next: ae
}, n;
});
}
return Yi[e] !== 1 && !Dt(e) && typeof r == "number" && r !== 0 ? r + "px" : r;
};
if (process.env.NODE_ENV !== "production") {
var _i = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/, Ui = ["normal", "none", "initial", "inherit", "unset"], Qi = Ue, $i = /^-ms-/, Ki = /-(.)/g, cn = {};
Ue = function(e, r) {
if (e === "content" && (typeof r != "string" || Ui.indexOf(r) === -1 && !_i.test(r) && (r.charAt(0) !== r.charAt(r.length - 1) || r.charAt(0) !== '"' && r.charAt(0) !== "'")))
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + r + "\"'`");
var i = Qi(e, r);
return i !== "" && !Dt(e) && e.indexOf("-") !== -1 && cn[e] === void 0 && (cn[e] = !0, console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + e.replace($i, "ms-").replace(Ki, function(n, o) {
return o.toUpperCase();
}) + "?")), i;
};
}
var er = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
function We(t, e, r) {
if (r == null)
return "";
if (r.__emotion_styles !== void 0) {
if (process.env.NODE_ENV !== "production" && r.toString() === "NO_COMPONENT_SELECTOR")
throw new Error(er);
return r;
}
switch (typeof r) {
case "boolean":
return "";
case "object": {
if (r.anim === 1)
return ae = {
name: r.name,
styles: r.styles,
next: ae
}, r.name;
if (r.styles !== void 0) {
var i = r.next;
if (i !== void 0)
for (; i !== void 0; )
ae = {
name: i.name,
styles: i.styles,
next: ae
}, i = i.next;
var n = r.styles + ";";
return process.env.NODE_ENV !== "production" && r.map !== void 0 && (n += r.map), n;
}
return qi(t, e, r);
}
case "function": {
if (t !== void 0) {
var o = ae, s = r(t);
return ae = o, We(t, e, s);
} else
process.env.NODE_ENV !== "production" && console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");
break;
}
case "string":
if (process.env.NODE_ENV !== "production") {
var u = [], a = r.replace(qn, function(l, d, v) {
var m = "animation" + u.length;
return u.push("const " + m + " = keyframes`" + v.replace(/^@keyframes animation-\w+/, "") + "`"), "${" + m + "}";
});
u.length && console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n" + [].concat(u, ["`" + a + "`"]).join(`
`) + `
You should wrap it with \`css\` like this:
` + ("css`" + a + "`"));
}
break;
}
if (e == null)
return r;
var c = e[r];
return c !== void 0 ? c : r;
}
function qi(t, e, r) {
var i = "";
if (Array.isArray(r))
for (var n = 0; n < r.length; n++)
i += We(t, e, r[n]) + ";";
else
for (var o in r) {
var s = r[o];
if (typeof s != "object")
e != null && e[s] !== void 0 ? i += o + "{" + e[s] + "}" : un(s) && (i += dt(o) + ":" + Ue(o, s) + ";");
else {
if (o === "NO_COMPONENT_SELECTOR" && process.env.NODE_ENV !== "production")
throw new Error(er);
if (Array.isArray(s) && typeof s[0] == "string" && (e == null || e[s[0]] === void 0))
for (var u = 0; u < s.length; u++)
un(s[u]) && (i += dt(o) + ":" + Ue(o, s[u]) + ";");
else {
var a = We(t, e, s);
switch (o) {
case "animation":
case "animationName": {
i += dt(o) + ":" + a + ";";
break;
}
default:
process.env.NODE_ENV !== "production" && o === "undefined" && console.error(ji), i += o + "{" + a + "}";
}
}
}
}
return i;
}
var ln = /label:\s*([^\s;\n{]+)\s*(;|$)/g, tr;
process.env.NODE_ENV !== "production" && (tr = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);
var ae, Oe = function(e, r, i) {
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
return e[0];
var n = !0, o = "";
ae = void 0;
var s = e[0];
s == null || s.raw === void 0 ? (n = !1, o += We(i, r, s)) : (process.env.NODE_ENV !== "production" && s[0] === void 0 && console.error(sn), o += s[0]);
for (var u = 1; u < e.length; u++)
o += We(i, r, e[u]), n && (process.env.NODE_ENV !== "production" && s[u] === void 0 && console.error(sn), o += s[u]);
var a;
process.env.NODE_ENV !== "production" && (o = o.replace(tr, function(v) {
return a = v, "";
})), ln.lastIndex = 0;
for (var c = "", l; (l = ln.exec(o)) !== null; )
c += "-" + // $FlowFixMe we know it's not null
l[1];
var d = zi(o) + c;
return process.env.NODE_ENV !== "production" ? {
name: d,
styles: o,
map: a,
next: ae,
toString: function() {
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).";
}
} : {
name: d,
styles: o,
next: ae
};
}, eo = function(e) {
return e();
}, nr = G.useInsertionEffect ? G.useInsertionEffect : !1, rr = nr || eo, dn = nr || G.useLayoutEffect, Mt = {}.hasOwnProperty, Lt = /* @__PURE__ */ G.createContext(
// we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement < "u" ? /* @__PURE__ */ Pi({
key: "css"
}) : null
);
process.env.NODE_ENV !== "production" && (Lt.displayName = "EmotionCacheContext");
Lt.Provider;
var Ht = function(e) {
return /* @__PURE__ */ rt(function(r, i) {
var n = Zn(Lt);
return e(r, n, i);
});
}, st = /* @__PURE__ */ G.createContext({});
process.env.NODE_ENV !== "production" && (st.displayName = "EmotionThemeContext");
var gn = function(e) {
var r = e.split(".");
return r[r.length - 1];
}, to = function(e) {
var r = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(e);
if (r || (r = /^([A-Za-z0-9$.]+)@/.exec(e), r))
return gn(r[1]);
}, no = /* @__PURE__ */ new Set(["renderWithHooks", "processChild", "finishClassComponent", "renderToString"]), ro = function(e) {
return e.replace(/\$/g, "-");
}, io = function(e) {
if (e)
for (var r = e.split(`
`), i = 0; i < r.length; i++) {
var n = to(r[i]);
if (n) {
if (no.has(n))
break;
if (/^[A-Z]/.test(n))
return ro(n);
}
}
}, wt = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Ft = "__EMOTION_LABEL_PLEASE_DO_NOT_USE__", oo = function(e, r) {
if (process.env.NODE_ENV !== "production" && typeof r.css == "string" && // check if there is a css declaration
r.css.indexOf(":") !== -1)
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + r.css + "`");
var i = {};
for (var n in r)
Mt.call(r, n) && (i[n] = r[n]);
if (i[wt] = e, process.env.NODE_ENV !== "production" && r.css && (typeof r.css != "object" || typeof r.css.name != "string" || r.css.name.indexOf("-") === -1)) {
var o = io(new Error().stack);
o && (i[Ft] = o);
}
return i;
}, ao = function(e) {
var r = e.cache, i = e.serialized, n = e.isStringTag;
return Pt(r, i, n), rr(function() {
return Zt(r, i, n);
}), null;
}, ir = /* @__PURE__ */ Ht(function(t, e, r) {
var i = t.css;
typeof i == "string" && e.registered[i] !== void 0 && (i = e.registered[i]);
var n = t[wt], o = [i], s = "";
typeof t.className == "string" ? s = Kn(e.registered, o, t.className) : t.className != null && (s = t.className + " ");
var u = Oe(o, void 0, G.useContext(st));
if (process.env.NODE_ENV !== "production" && u.name.indexOf("-") === -1) {
var a = t[Ft];
a && (u = Oe([u, "label:" + a + ";"]));
}
s += e.key + "-" + u.name;
var c = {};
for (var l in t)
Mt.call(t, l) && l !== "css" && l !== wt && (process.env.NODE_ENV === "production" || l !== Ft) && (c[l] = t[l]);
return c.ref = r, c.className = s, /* @__PURE__ */ G.createElement(G.Fragment, null, /* @__PURE__ */ G.createElement(ao, {
cache: e,
serialized: u,
isStringTag: ty