UNPKG

@blockscout/app-sdk

Version:

A React SDK for Blockscout integration

1,177 lines (1,160 loc) 222 kB
import { jsx as V, jsxs as ee, Fragment as Nr } from "react/jsx-runtime"; import * as ue from "react"; import ae, { createContext as fr, useContext as vn, useDebugValue as Mr, createElement as bo, useRef as ce, useMemo as zi, useLayoutEffect as Ui, useEffect as ze, useState as Ee, memo as ji, forwardRef as yt, Children as Wi, isValidElement as Zi, cloneElement as Yi, useCallback as ut, useId as Gi } from "react"; import { flushSync as dr, createPortal as qi } from "react-dom"; const So = fr(null), Xi = () => { const e = vn(So); if (!e) throw new Error("useToast must be used within NotificationProvider"); return e; }, Ke = { CHAINS_API: { BASE_URL: "https://chains.blockscout.com/api", ENDPOINTS: { CHAIN: (e) => `/chains/${e}` } }, EXPLORER_API: { ENDPOINTS: { TRANSACTION: (e) => `/api/v2/transactions/${e}`, TRANSACTION_SUMMARY: (e) => `/api/v2/transactions/${e}/summary`, ADDRESS_TRANSACTIONS: (e) => `/api/v2/addresses/${e}/transactions`, ALL_TRANSACTIONS: () => "/api/v2/transactions" } } }, qe = { URLS: { TRANSACTION: (e) => `/tx/${e}`, ADDRESS: (e) => `/address/${e}`, TOKEN: (e) => `/token/${e}`, ADDRESS_TRANSACTIONS: (e) => `/address/${e}?tab=txs`, ALL_TRANSACTIONS: () => "/txs" } }; function Ki(e) { const t = [], n = e.startsWith("0x") ? 2 : 0; for (let r = n; r < e.length; r += 2) t.push(parseInt(e.substring(r, r + 2), 16)); return new Uint8Array(t); } function Ji(e) { const t = new TextDecoder(), n = Ki(e); return t.decode(n); } var de = function() { return de = Object.assign || function(t) { for (var n, r = 1, o = arguments.length; r < o; r++) { n = arguments[r]; for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]); } return t; }, de.apply(this, arguments); }; function et(e, t, n) { if (n || arguments.length === 2) for (var r = 0, o = t.length, s; r < o; r++) (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]); return e.concat(s || Array.prototype.slice.call(t)); } function Qi(e) { var t = /* @__PURE__ */ Object.create(null); return function(n) { return t[n] === void 0 && (t[n] = e(n)), t[n]; }; } var es = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|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|disableRemotePlayback|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)-.*))$/, ts = /* @__PURE__ */ Qi( function(e) { return es.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91; } /* Z+1 */ ); function yn(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var q = "-ms-", kt = "-moz-", Y = "-webkit-", Eo = "comm", wn = "rule", pr = "decl", ns = "@import", Co = "@keyframes", rs = "@layer", Oo = Math.abs, hr = String.fromCharCode, Wn = Object.assign; function os(e, t) { return oe(e, 0) ^ 45 ? (((t << 2 ^ oe(e, 0)) << 2 ^ oe(e, 1)) << 2 ^ oe(e, 2)) << 2 ^ oe(e, 3) : 0; } function Ao(e) { return e.trim(); } function $e(e, t) { return (e = t.exec(e)) ? e[0] : e; } function Z(e, t, n) { return e.replace(t, n); } function Wt(e, t, n) { return e.indexOf(t, n); } function oe(e, t) { return e.charCodeAt(t) | 0; } function dt(e, t, n) { return e.slice(t, n); } function Le(e) { return e.length; } function Lo(e) { return e.length; } function Lt(e, t) { return t.push(e), e; } function is(e, t) { return e.map(t).join(""); } function Pr(e, t) { return e.filter(function(n) { return !$e(n, t); }); } var xn = 1, pt = 1, To = 0, xe = 0, ne = 0, wt = ""; function bn(e, t, n, r, o, s, a, d) { return { value: e, root: t, parent: n, type: r, props: o, children: s, line: xn, column: pt, length: a, return: "", siblings: d }; } function Be(e, t) { return Wn(bn("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t); } function st(e) { for (; e.root; ) e = Be(e.root, { children: [e] }); Lt(e, e.siblings); } function ss() { return ne; } function as() { return ne = xe > 0 ? oe(wt, --xe) : 0, pt--, ne === 10 && (pt = 1, xn--), ne; } function Ce() { return ne = xe < To ? oe(wt, xe++) : 0, pt++, ne === 10 && (pt = 1, xn++), ne; } function Je() { return oe(wt, xe); } function Zt() { return xe; } function Sn(e, t) { return dt(wt, e, t); } function Zn(e) { switch (e) { // \0 \t \n \r \s whitespace token case 0: case 9: case 10: case 13: case 32: return 5; // ! + , / > @ ~ isolate token case 33: case 43: case 44: case 47: case 62: case 64: case 126: // ; { } breakpoint token case 59: case 123: case 125: return 4; // : accompanied token case 58: return 3; // " ' ( [ opening delimit token case 34: case 39: case 40: case 91: return 2; // ) ] closing delimit token case 41: case 93: return 1; } return 0; } function cs(e) { return xn = pt = 1, To = Le(wt = e), xe = 0, []; } function ls(e) { return wt = "", e; } function Pn(e) { return Ao(Sn(xe - 1, Yn(e === 91 ? e + 2 : e === 40 ? e + 1 : e))); } function us(e) { for (; (ne = Je()) && ne < 33; ) Ce(); return Zn(e) > 2 || Zn(ne) > 3 ? "" : " "; } function fs(e, t) { for (; --t && Ce() && !(ne < 48 || ne > 102 || ne > 57 && ne < 65 || ne > 70 && ne < 97); ) ; return Sn(e, Zt() + (t < 6 && Je() == 32 && Ce() == 32)); } function Yn(e) { for (; Ce(); ) switch (ne) { // ] ) " ' case e: return xe; // " ' case 34: case 39: e !== 34 && e !== 39 && Yn(ne); break; // ( case 40: e === 41 && Yn(e); break; // \ case 92: Ce(); break; } return xe; } function ds(e, t) { for (; Ce() && e + ne !== 57; ) if (e + ne === 84 && Je() === 47) break; return "/*" + Sn(t, xe - 1) + "*" + hr(e === 47 ? e : Ce()); } function ps(e) { for (; !Zn(Je()); ) Ce(); return Sn(e, xe); } function hs(e) { return ls(Yt("", null, null, null, [""], e = cs(e), 0, [0], e)); } function Yt(e, t, n, r, o, s, a, d, g) { for (var h = 0, b = 0, x = a, L = 0, O = 0, k = 0, A = 1, _ = 1, R = 1, C = 0, I = "", $ = o, D = s, M = r, N = I; _; ) switch (k = C, C = Ce()) { // ( case 40: if (k != 108 && oe(N, x - 1) == 58) { Wt(N += Z(Pn(C), "&", "&\f"), "&\f", Oo(h ? d[h - 1] : 0)) != -1 && (R = -1); break; } // " ' [ case 34: case 39: case 91: N += Pn(C); break; // \t \n \r \s case 9: case 10: case 13: case 32: N += us(k); break; // \ case 92: N += fs(Zt() - 1, 7); continue; // / case 47: switch (Je()) { case 42: case 47: Lt(ms(ds(Ce(), Zt()), t, n, g), g); break; default: N += "/"; } break; // { case 123 * A: d[h++] = Le(N) * R; // } ; \0 case 125 * A: case 59: case 0: switch (C) { // \0 } case 0: case 125: _ = 0; // ; case 59 + b: R == -1 && (N = Z(N, /\f/g, "")), O > 0 && Le(N) - x && Lt(O > 32 ? $r(N + ";", r, n, x - 1, g) : $r(Z(N, " ", "") + ";", r, n, x - 2, g), g); break; // @ ; case 59: N += ";"; // { rule/at-rule default: if (Lt(M = Rr(N, t, n, h, b, o, d, I, $ = [], D = [], x, s), s), C === 123) if (b === 0) Yt(N, t, M, M, $, s, x, d, D); else switch (L === 99 && oe(N, 3) === 110 ? 100 : L) { // d l m s case 100: case 108: case 109: case 115: Yt(e, M, M, r && Lt(Rr(e, M, M, 0, 0, o, d, I, o, $ = [], x, D), D), o, D, x, d, r ? $ : D); break; default: Yt(N, M, M, M, [""], D, 0, d, D); } } h = b = O = 0, A = R = 1, I = N = "", x = a; break; // : case 58: x = 1 + Le(N), O = k; default: if (A < 1) { if (C == 123) --A; else if (C == 125 && A++ == 0 && as() == 125) continue; } switch (N += hr(C), C * A) { // & case 38: R = b > 0 ? 1 : (N += "\f", -1); break; // , case 44: d[h++] = (Le(N) - 1) * R, R = 1; break; // @ case 64: Je() === 45 && (N += Pn(Ce())), L = Je(), b = x = Le(I = N += ps(Zt())), C++; break; // - case 45: k === 45 && Le(N) == 2 && (A = 0); } } return s; } function Rr(e, t, n, r, o, s, a, d, g, h, b, x) { for (var L = o - 1, O = o === 0 ? s : [""], k = Lo(O), A = 0, _ = 0, R = 0; A < r; ++A) for (var C = 0, I = dt(e, L + 1, L = Oo(_ = a[A])), $ = e; C < k; ++C) ($ = Ao(_ > 0 ? O[C] + " " + I : Z(I, /&\f/g, O[C]))) && (g[R++] = $); return bn(e, t, n, o === 0 ? wn : d, g, h, b, x); } function ms(e, t, n, r) { return bn(e, t, n, Eo, hr(ss()), dt(e, 2, -2), 0, r); } function $r(e, t, n, r, o) { return bn(e, t, n, pr, dt(e, 0, r), dt(e, r + 1, -1), r, o); } function ko(e, t, n) { switch (os(e, t)) { // color-adjust case 5103: return Y + "print-" + e + e; // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: return Y + e + e; // tab-size case 4789: return kt + e + e; // appearance, user-select, transform, hyphens, text-size-adjust case 5349: case 4246: case 4810: case 6968: case 2756: return Y + e + kt + e + q + e + e; // writing-mode case 5936: switch (oe(e, t + 11)) { // vertical-l(r) case 114: return Y + e + q + Z(e, /[svh]\w+-[tblr]{2}/, "tb") + e; // vertical-r(l) case 108: return Y + e + q + Z(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e; // horizontal(-)tb case 45: return Y + e + q + Z(e, /[svh]\w+-[tblr]{2}/, "lr") + e; } // flex, flex-direction, scroll-snap-type, writing-mode case 6828: case 4268: case 2903: return Y + e + q + e + e; // order case 6165: return Y + e + q + "flex-" + e + e; // align-items case 5187: return Y + e + Z(e, /(\w+).+(:[^]+)/, Y + "box-$1$2" + q + "flex-$1$2") + e; // align-self case 5443: return Y + e + q + "flex-item-" + Z(e, /flex-|-self/g, "") + ($e(e, /flex-|baseline/) ? "" : q + "grid-row-" + Z(e, /flex-|-self/g, "")) + e; // align-content case 4675: return Y + e + q + "flex-line-pack" + Z(e, /align-content|flex-|-self/g, "") + e; // flex-shrink case 5548: return Y + e + q + Z(e, "shrink", "negative") + e; // flex-basis case 5292: return Y + e + q + Z(e, "basis", "preferred-size") + e; // flex-grow case 6060: return Y + "box-" + Z(e, "-grow", "") + Y + e + q + Z(e, "grow", "positive") + e; // transition case 4554: return Y + Z(e, /([^-])(transform)/g, "$1" + Y + "$2") + e; // cursor case 6187: return Z(Z(Z(e, /(zoom-|grab)/, Y + "$1"), /(image-set)/, Y + "$1"), e, "") + e; // background, background-image case 5495: case 3959: return Z(e, /(image-set\([^]*)/, Y + "$1$`$1"); // justify-content case 4968: return Z(Z(e, /(.+:)(flex-)?(.*)/, Y + "box-pack:$3" + q + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + Y + e + e; // justify-self case 4200: if (!$e(e, /flex-|baseline/)) return q + "grid-column-align" + dt(e, t) + e; break; // grid-template-(columns|rows) case 2592: case 3360: return q + Z(e, "template-", "") + e; // grid-(row|column)-start case 4384: case 3616: return n && n.some(function(r, o) { return t = o, $e(r.props, /grid-\w+-end/); }) ? ~Wt(e + (n = n[t].value), "span", 0) ? e : q + Z(e, "-start", "") + e + q + "grid-row-span:" + (~Wt(n, "span", 0) ? $e(n, /\d+/) : +$e(n, /\d+/) - +$e(e, /\d+/)) + ";" : q + Z(e, "-start", "") + e; // grid-(row|column)-end case 4896: case 4128: return n && n.some(function(r) { return $e(r.props, /grid-\w+-start/); }) ? e : q + Z(Z(e, "-end", "-span"), "span ", "") + e; // (margin|padding)-inline-(start|end) case 4095: case 3583: case 4068: case 2532: return Z(e, /(.+)-inline(.+)/, Y + "$1$2") + e; // (min|max)?(width|height|inline-size|block-size) 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 (Le(e) - 1 - t > 6) switch (oe(e, t + 1)) { // (m)ax-content, (m)in-content case 109: if (oe(e, t + 4) !== 45) break; // (f)ill-available, (f)it-content case 102: return Z(e, /(.+:)(.+)-([^]+)/, "$1" + Y + "$2-$3$1" + kt + (oe(e, t + 3) == 108 ? "$3" : "$2-$3")) + e; // (s)tretch case 115: return ~Wt(e, "stretch", 0) ? ko(Z(e, "stretch", "fill-available"), t, n) + e : e; } break; // grid-(column|row) case 5152: case 5920: return Z(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(r, o, s, a, d, g, h) { return q + o + ":" + s + h + (a ? q + o + "-span:" + (d ? g : +g - +s) + h : "") + e; }); // position: sticky case 4949: if (oe(e, t + 6) === 121) return Z(e, ":", ":" + Y) + e; break; // display: (flex|inline-flex|grid|inline-grid) case 6444: switch (oe(e, oe(e, 14) === 45 ? 18 : 11)) { // (inline-)?fle(x) case 120: return Z(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + Y + (oe(e, 14) === 45 ? "inline-" : "") + "box$3$1" + Y + "$2$3$1" + q + "$2box$3") + e; // (inline-)?gri(d) case 100: return Z(e, ":", ":" + q) + e; } break; // scroll-margin, scroll-margin-(top|right|bottom|left) case 5719: case 2647: case 2135: case 3927: case 2391: return Z(e, "scroll-", "scroll-snap-") + e; } return e; } function an(e, t) { for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || ""; return n; } function gs(e, t, n, r) { switch (e.type) { case rs: if (e.children.length) break; case ns: case pr: return e.return = e.return || e.value; case Eo: return ""; case Co: return e.return = e.value + "{" + an(e.children, r) + "}"; case wn: if (!Le(e.value = e.props.join(","))) return ""; } return Le(n = an(e.children, r)) ? e.return = e.value + "{" + n + "}" : ""; } function vs(e) { var t = Lo(e); return function(n, r, o, s) { for (var a = "", d = 0; d < t; d++) a += e[d](n, r, o, s) || ""; return a; }; } function ys(e) { return function(t) { t.root || (t = t.return) && e(t); }; } function ws(e, t, n, r) { if (e.length > -1 && !e.return) switch (e.type) { case pr: e.return = ko(e.value, e.length, n); return; case Co: return an([Be(e, { value: Z(e.value, "@", "@" + Y) })], r); case wn: if (e.length) return is(n = e.props, function(o) { switch ($e(o, r = /(::plac\w+|:read-\w+)/)) { // :read-(only|write) case ":read-only": case ":read-write": st(Be(e, { props: [Z(o, /:(read-\w+)/, ":" + kt + "$1")] })), st(Be(e, { props: [o] })), Wn(e, { props: Pr(n, r) }); break; // :placeholder case "::placeholder": st(Be(e, { props: [Z(o, /:(plac\w+)/, ":" + Y + "input-$1")] })), st(Be(e, { props: [Z(o, /:(plac\w+)/, ":" + kt + "$1")] })), st(Be(e, { props: [Z(o, /:(plac\w+)/, q + "input-$1")] })), st(Be(e, { props: [o] })), Wn(e, { props: Pr(n, r) }); break; } return ""; }); } } var xs = { 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 }, tt = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", No = "active", Mo = "data-styled-version", En = "6.1.18", mr = `/*!sc*/ `, cn = typeof window < "u" && typeof document < "u", bs = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), Dr = /invalid hook call/i, It = /* @__PURE__ */ new Set(), Ss = function(e, t) { if (process.env.NODE_ENV !== "production") { var n = t ? ' with the id of "'.concat(t, '"') : "", r = "The component ".concat(e).concat(n, ` has been created dynamically. `) + `You may see this warning because you've called styled inside another component. To resolve this only create new StyledComponents outside of any render method and function component. See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info. `, o = console.error; try { var s = !0; console.error = function(a) { for (var d = [], g = 1; g < arguments.length; g++) d[g - 1] = arguments[g]; Dr.test(a) ? (s = !1, It.delete(r)) : o.apply(void 0, et([a], d, !1)); }, ce(), s && !It.has(r) && (console.warn(r), It.add(r)); } catch (a) { Dr.test(a.message) && It.delete(r); } finally { console.error = o; } } }, Cn = Object.freeze([]), ht = Object.freeze({}); function Es(e, t, n) { return n === void 0 && (n = ht), e.theme !== n.theme && e.theme || t || n.theme; } var Gn = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), Cs = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Os = /(^-|-$)/g; function _r(e) { return e.replace(Cs, "-").replace(Os, ""); } var As = /(a)(d)/gi, Vt = 52, Ir = function(e) { return String.fromCharCode(e + (e > 25 ? 39 : 97)); }; function qn(e) { var t, n = ""; for (t = Math.abs(e); t > Vt; t = t / Vt | 0) n = Ir(t % Vt) + n; return (Ir(t % Vt) + n).replace(As, "$1-$2"); } var Rn, Po = 5381, Ye = function(e, t) { for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n); return e; }, Ro = function(e) { return Ye(Po, e); }; function $o(e) { return qn(Ro(e) >>> 0); } function Do(e) { return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component"; } function $n(e) { return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase()); } var _o = typeof Symbol == "function" && Symbol.for, Io = _o ? Symbol.for("react.memo") : 60115, Ls = _o ? Symbol.for("react.forward_ref") : 60112, Ts = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, ks = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Vo = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Ns = ((Rn = {})[Ls] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, Rn[Io] = Vo, Rn); function Vr(e) { return ("type" in (t = e) && t.type.$$typeof) === Io ? Vo : "$$typeof" in e ? Ns[e.$$typeof] : Ts; var t; } var Ms = Object.defineProperty, Ps = Object.getOwnPropertyNames, Hr = Object.getOwnPropertySymbols, Rs = Object.getOwnPropertyDescriptor, $s = Object.getPrototypeOf, Fr = Object.prototype; function Ho(e, t, n) { if (typeof t != "string") { if (Fr) { var r = $s(t); r && r !== Fr && Ho(e, r, n); } var o = Ps(t); Hr && (o = o.concat(Hr(t))); for (var s = Vr(e), a = Vr(t), d = 0; d < o.length; ++d) { var g = o[d]; if (!(g in ks || n && n[g] || a && g in a || s && g in s)) { var h = Rs(t, g); try { Ms(e, g, h); } catch { } } } } return e; } function mt(e) { return typeof e == "function"; } function gr(e) { return typeof e == "object" && "styledComponentId" in e; } function Xe(e, t) { return e && t ? "".concat(e, " ").concat(t) : e || t || ""; } function Xn(e, t) { if (e.length === 0) return ""; for (var n = e[0], r = 1; r < e.length; r++) n += e[r]; return n; } function gt(e) { return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof); } function Kn(e, t, n) { if (n === void 0 && (n = !1), !n && !gt(e) && !Array.isArray(e)) return t; if (Array.isArray(t)) for (var r = 0; r < t.length; r++) e[r] = Kn(e[r], t[r]); else if (gt(t)) for (var r in t) e[r] = Kn(e[r], t[r]); return e; } function vr(e, t) { Object.defineProperty(e, "toString", { value: t }); } var Ds = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s. `, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle. - Are you trying to reuse it across renders? - Are you accidentally calling collectStyles twice? `, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser. `, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop! - Does this error occur on the client and is your target falsy? - Does this error occur on the server and is the sheet falsy? `, 5: `The clone method cannot be used on the client! - Are you running in a client-like environment on the server? - Are you trying to run SSR on the client? `, 6: `Trying to insert a new style tag, but the given Node is unmounted! - Are you using a custom target that isn't mounted? - Does your document not have a valid head element? - Have you accidentally removed a style tag manually? `, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object. `, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021 `, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements. `, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details. `, 14: `ThemeProvider: "theme" prop is required. `, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s. You may only create up to 1,073,741,824 components. If you're creating components dynamically, as for instance in your render method then you may be running into this limitation. `, 17: `CSSStyleSheet could not be found on HTMLStyleElement. Has styled-components' style tag been unmounted or altered by another script? `, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {}; function _s() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; for (var n = e[0], r = [], o = 1, s = e.length; o < s; o += 1) r.push(e[o]); return r.forEach(function(a) { n = n.replace(/%[a-z]/, a); }), n; } function xt(e) { for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : "")) : new Error(_s.apply(void 0, et([Ds[e]], t, !1)).trim()); } var Is = function() { function e(t) { this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t; } return e.prototype.indexOfGroup = function(t) { for (var n = 0, r = 0; r < t; r++) n += this.groupSizes[r]; return n; }, e.prototype.insertRules = function(t, n) { if (t >= this.groupSizes.length) { for (var r = this.groupSizes, o = r.length, s = o; t >= s; ) if ((s <<= 1) < 0) throw xt(16, "".concat(t)); this.groupSizes = new Uint32Array(s), this.groupSizes.set(r), this.length = s; for (var a = o; a < s; a++) this.groupSizes[a] = 0; } for (var d = this.indexOfGroup(t + 1), g = (a = 0, n.length); a < g; a++) this.tag.insertRule(d, n[a]) && (this.groupSizes[t]++, d++); }, e.prototype.clearGroup = function(t) { if (t < this.length) { var n = this.groupSizes[t], r = this.indexOfGroup(t), o = r + n; this.groupSizes[t] = 0; for (var s = r; s < o; s++) this.tag.deleteRule(r); } }, e.prototype.getGroup = function(t) { var n = ""; if (t >= this.length || this.groupSizes[t] === 0) return n; for (var r = this.groupSizes[t], o = this.indexOfGroup(t), s = o + r, a = o; a < s; a++) n += "".concat(this.tag.getRule(a)).concat(mr); return n; }, e; }(), Vs = 1 << 30, Gt = /* @__PURE__ */ new Map(), ln = /* @__PURE__ */ new Map(), qt = 1, Ht = function(e) { if (Gt.has(e)) return Gt.get(e); for (; ln.has(qt); ) qt++; var t = qt++; if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > Vs)) throw xt(16, "".concat(t)); return Gt.set(e, t), ln.set(t, e), t; }, Hs = function(e, t) { qt = t + 1, Gt.set(e, t), ln.set(t, e); }, Fs = "style[".concat(tt, "][").concat(Mo, '="').concat(En, '"]'), Bs = new RegExp("^".concat(tt, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), zs = function(e, t, n) { for (var r, o = n.split(","), s = 0, a = o.length; s < a; s++) (r = o[s]) && e.registerName(t, r); }, Us = function(e, t) { for (var n, r = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(mr), o = [], s = 0, a = r.length; s < a; s++) { var d = r[s].trim(); if (d) { var g = d.match(Bs); if (g) { var h = 0 | parseInt(g[1], 10), b = g[2]; h !== 0 && (Hs(b, h), zs(e, b, g[3]), e.getTag().insertRules(h, o)), o.length = 0; } else o.push(d); } } }, Br = function(e) { for (var t = document.querySelectorAll(Fs), n = 0, r = t.length; n < r; n++) { var o = t[n]; o && o.getAttribute(tt) !== No && (Us(e, o), o.parentNode && o.parentNode.removeChild(o)); } }; function js() { return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null; } var Fo = function(e) { var t = document.head, n = e || t, r = document.createElement("style"), o = function(d) { var g = Array.from(d.querySelectorAll("style[".concat(tt, "]"))); return g[g.length - 1]; }(n), s = o !== void 0 ? o.nextSibling : null; r.setAttribute(tt, No), r.setAttribute(Mo, En); var a = js(); return a && r.setAttribute("nonce", a), n.insertBefore(r, s), r; }, Ws = function() { function e(t) { this.element = Fo(t), this.element.appendChild(document.createTextNode("")), this.sheet = function(n) { if (n.sheet) return n.sheet; for (var r = document.styleSheets, o = 0, s = r.length; o < s; o++) { var a = r[o]; if (a.ownerNode === n) return a; } throw xt(17); }(this.element), this.length = 0; } return e.prototype.insertRule = function(t, n) { try { return this.sheet.insertRule(n, t), this.length++, !0; } catch { return !1; } }, e.prototype.deleteRule = function(t) { this.sheet.deleteRule(t), this.length--; }, e.prototype.getRule = function(t) { var n = this.sheet.cssRules[t]; return n && n.cssText ? n.cssText : ""; }, e; }(), Zs = function() { function e(t) { this.element = Fo(t), this.nodes = this.element.childNodes, this.length = 0; } return e.prototype.insertRule = function(t, n) { if (t <= this.length && t >= 0) { var r = document.createTextNode(n); return this.element.insertBefore(r, this.nodes[t] || null), this.length++, !0; } return !1; }, e.prototype.deleteRule = function(t) { this.element.removeChild(this.nodes[t]), this.length--; }, e.prototype.getRule = function(t) { return t < this.length ? this.nodes[t].textContent : ""; }, e; }(), Ys = function() { function e(t) { this.rules = [], this.length = 0; } return e.prototype.insertRule = function(t, n) { return t <= this.length && (this.rules.splice(t, 0, n), this.length++, !0); }, e.prototype.deleteRule = function(t) { this.rules.splice(t, 1), this.length--; }, e.prototype.getRule = function(t) { return t < this.length ? this.rules[t] : ""; }, e; }(), zr = cn, Gs = { isServer: !cn, useCSSOMInjection: !bs }, Bo = function() { function e(t, n, r) { t === void 0 && (t = ht), n === void 0 && (n = {}); var o = this; this.options = de(de({}, Gs), t), this.gs = n, this.names = new Map(r), this.server = !!t.isServer, !this.server && cn && zr && (zr = !1, Br(this)), vr(this, function() { return function(s) { for (var a = s.getTag(), d = a.length, g = "", h = function(x) { var L = function(R) { return ln.get(R); }(x); if (L === void 0) return "continue"; var O = s.names.get(L), k = a.getGroup(x); if (O === void 0 || !O.size || k.length === 0) return "continue"; var A = "".concat(tt, ".g").concat(x, '[id="').concat(L, '"]'), _ = ""; O !== void 0 && O.forEach(function(R) { R.length > 0 && (_ += "".concat(R, ",")); }), g += "".concat(k).concat(A, '{content:"').concat(_, '"}').concat(mr); }, b = 0; b < d; b++) h(b); return g; }(o); }); } return e.registerId = function(t) { return Ht(t); }, e.prototype.rehydrate = function() { !this.server && cn && Br(this); }, e.prototype.reconstructWithOptions = function(t, n) { return n === void 0 && (n = !0), new e(de(de({}, this.options), t), this.gs, n && this.names || void 0); }, e.prototype.allocateGSInstance = function(t) { return this.gs[t] = (this.gs[t] || 0) + 1; }, e.prototype.getTag = function() { return this.tag || (this.tag = (t = function(n) { var r = n.useCSSOMInjection, o = n.target; return n.isServer ? new Ys(o) : r ? new Ws(o) : new Zs(o); }(this.options), new Is(t))); var t; }, e.prototype.hasNameForId = function(t, n) { return this.names.has(t) && this.names.get(t).has(n); }, e.prototype.registerName = function(t, n) { if (Ht(t), this.names.has(t)) this.names.get(t).add(n); else { var r = /* @__PURE__ */ new Set(); r.add(n), this.names.set(t, r); } }, e.prototype.insertRules = function(t, n, r) { this.registerName(t, n), this.getTag().insertRules(Ht(t), r); }, e.prototype.clearNames = function(t) { this.names.has(t) && this.names.get(t).clear(); }, e.prototype.clearRules = function(t) { this.getTag().clearGroup(Ht(t)), this.clearNames(t); }, e.prototype.clearTag = function() { this.tag = void 0; }, e; }(), qs = /&/g, Xs = /^\s*\/\/.*$/gm; function zo(e, t) { return e.map(function(n) { return n.type === "rule" && (n.value = "".concat(t, " ").concat(n.value), n.value = n.value.replaceAll(",", ",".concat(t, " ")), n.props = n.props.map(function(r) { return "".concat(t, " ").concat(r); })), Array.isArray(n.children) && n.type !== "@keyframes" && (n.children = zo(n.children, t)), n; }); } function Ks(e) { var t, n, r, o = ht, s = o.options, a = s === void 0 ? ht : s, d = o.plugins, g = d === void 0 ? Cn : d, h = function(L, O, k) { return k.startsWith(n) && k.endsWith(n) && k.replaceAll(n, "").length > 0 ? ".".concat(t) : L; }, b = g.slice(); b.push(function(L) { L.type === wn && L.value.includes("&") && (L.props[0] = L.props[0].replace(qs, n).replace(r, h)); }), a.prefix && b.push(ws), b.push(gs); var x = function(L, O, k, A) { O === void 0 && (O = ""), k === void 0 && (k = ""), A === void 0 && (A = "&"), t = A, n = O, r = new RegExp("\\".concat(n, "\\b"), "g"); var _ = L.replace(Xs, ""), R = hs(k || O ? "".concat(k, " ").concat(O, " { ").concat(_, " }") : _); a.namespace && (R = zo(R, a.namespace)); var C = []; return an(R, vs(b.concat(ys(function(I) { return C.push(I); })))), C; }; return x.hash = g.length ? g.reduce(function(L, O) { return O.name || xt(15), Ye(L, O.name); }, Po).toString() : "", x; } var Js = new Bo(), Jn = Ks(), Uo = ae.createContext({ shouldForwardProp: void 0, styleSheet: Js, stylis: Jn }); Uo.Consumer; ae.createContext(void 0); function Ur() { return vn(Uo); } var Qn = function() { function e(t, n) { var r = this; this.inject = function(o, s) { s === void 0 && (s = Jn); var a = r.name + s.hash; o.hasNameForId(r.id, a) || o.insertRules(r.id, a, s(r.rules, a, "@keyframes")); }, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = n, vr(this, function() { throw xt(12, String(r.name)); }); } return e.prototype.getName = function(t) { return t === void 0 && (t = Jn), this.name + t.hash; }, e; }(), Qs = function(e) { return e >= "A" && e <= "Z"; }; function jr(e) { for (var t = "", n = 0; n < e.length; n++) { var r = e[n]; if (n === 1 && r === "-" && e[0] === "-") return e; Qs(r) ? t += "-" + r.toLowerCase() : t += r; } return t.startsWith("ms-") ? "-" + t : t; } var jo = function(e) { return e == null || e === !1 || e === ""; }, Wo = function(e) { var t, n, r = []; for (var o in e) { var s = e[o]; e.hasOwnProperty(o) && !jo(s) && (Array.isArray(s) && s.isCss || mt(s) ? r.push("".concat(jr(o), ":"), s, ";") : gt(s) ? r.push.apply(r, et(et(["".concat(o, " {")], Wo(s), !1), ["}"], !1)) : r.push("".concat(jr(o), ": ").concat((t = o, (n = s) == null || typeof n == "boolean" || n === "" ? "" : typeof n != "number" || n === 0 || t in xs || t.startsWith("--") ? String(n).trim() : "".concat(n, "px")), ";"))); } return r; }; function Qe(e, t, n, r) { if (jo(e)) return []; if (gr(e)) return [".".concat(e.styledComponentId)]; if (mt(e)) { if (!mt(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e]; var o = e(t); return process.env.NODE_ENV === "production" || typeof o != "object" || Array.isArray(o) || o instanceof Qn || gt(o) || o === null || console.error("".concat(Do(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Qe(o, t, n, r); } var s; return e instanceof Qn ? n ? (e.inject(n, r), [e.getName(r)]) : [e] : gt(e) ? Wo(e) : Array.isArray(e) ? Array.prototype.concat.apply(Cn, e.map(function(a) { return Qe(a, t, n, r); })) : [e.toString()]; } function ea(e) { for (var t = 0; t < e.length; t += 1) { var n = e[t]; if (mt(n) && !gr(n)) return !1; } return !0; } var ta = Ro(En), na = function() { function e(t, n, r) { this.rules = t, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (r === void 0 || r.isStatic) && ea(t), this.componentId = n, this.baseHash = Ye(ta, n), this.baseStyle = r, Bo.registerId(n); } return e.prototype.generateAndInjectStyles = function(t, n, r) { var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, n, r) : ""; if (this.isStatic && !r.hash) if (this.staticRulesId && n.hasNameForId(this.componentId, this.staticRulesId)) o = Xe(o, this.staticRulesId); else { var s = Xn(Qe(this.rules, t, n, r)), a = qn(Ye(this.baseHash, s) >>> 0); if (!n.hasNameForId(this.componentId, a)) { var d = r(s, ".".concat(a), void 0, this.componentId); n.insertRules(this.componentId, a, d); } o = Xe(o, a), this.staticRulesId = a; } else { for (var g = Ye(this.baseHash, r.hash), h = "", b = 0; b < this.rules.length; b++) { var x = this.rules[b]; if (typeof x == "string") h += x, process.env.NODE_ENV !== "production" && (g = Ye(g, x)); else if (x) { var L = Xn(Qe(x, t, n, r)); g = Ye(g, L + b), h += L; } } if (h) { var O = qn(g >>> 0); n.hasNameForId(this.componentId, O) || n.insertRules(this.componentId, O, r(h, ".".concat(O), void 0, this.componentId)), o = Xe(o, O); } } return o; }, e; }(), Zo = ae.createContext(void 0); Zo.Consumer; var Dn = {}, Wr = /* @__PURE__ */ new Set(); function ra(e, t, n) { var r = gr(e), o = e, s = !$n(e), a = t.attrs, d = a === void 0 ? Cn : a, g = t.componentId, h = g === void 0 ? function($, D) { var M = typeof $ != "string" ? "sc" : _r($); Dn[M] = (Dn[M] || 0) + 1; var N = "".concat(M, "-").concat($o(En + M + Dn[M])); return D ? "".concat(D, "-").concat(N) : N; }(t.displayName, t.parentComponentId) : g, b = t.displayName, x = b === void 0 ? function($) { return $n($) ? "styled.".concat($) : "Styled(".concat(Do($), ")"); }(e) : b, L = t.displayName && t.componentId ? "".concat(_r(t.displayName), "-").concat(t.componentId) : t.componentId || h, O = r && o.attrs ? o.attrs.concat(d).filter(Boolean) : d, k = t.shouldForwardProp; if (r && o.shouldForwardProp) { var A = o.shouldForwardProp; if (t.shouldForwardProp) { var _ = t.shouldForwardProp; k = function($, D) { return A($, D) && _($, D); }; } else k = A; } var R = new na(n, L, r ? o.componentStyle : void 0); function C($, D) { return function(M, N, i) { var c = M.attrs, f = M.componentStyle, w = M.defaultProps, y = M.foldedComponentIds, E = M.styledComponentId, v = M.target, l = ae.useContext(Zo), u = Ur(), m = M.shouldForwardProp || u.shouldForwardProp; process.env.NODE_ENV !== "production" && Mr(E); var p = Es(N, l, w) || ht, S = function(F, j, G) { for (var ie, re = de(de({}, j), { className: void 0, theme: G }), J = 0; J < F.length; J += 1) { var X = mt(ie = F[J]) ? ie(re) : ie; for (var te in X) re[te] = te === "className" ? Xe(re[te], X[te]) : te === "style" ? de(de({}, re[te]), X[te]) : X[te]; } return j.className && (re.className = Xe(re.className, j.className)), re; }(c, N, p), T = S.as || v, P = {}; for (var H in S) S[H] === void 0 || H[0] === "$" || H === "as" || H === "theme" && S.theme === p || (H === "forwardedAs" ? P.as = S.forwardedAs : m && !m(H, T) || (P[H] = S[H], m || process.env.NODE_ENV !== "development" || ts(H) || Wr.has(H) || !Gn.has(T) || (Wr.add(H), console.warn('styled-components: it looks like an unknown prop "'.concat(H, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)'))))); var z = function(F, j) { var G = Ur(), ie = F.generateAndInjectStyles(j, G.styleSheet, G.stylis); return process.env.NODE_ENV !== "production" && Mr(ie), ie; }(f, S); process.env.NODE_ENV !== "production" && M.warnTooManyClasses && M.warnTooManyClasses(z); var W = Xe(y, E); return z && (W += " " + z), S.className && (W += " " + S.className), P[$n(T) && !Gn.has(T) ? "class" : "className"] = W, i && (P.ref = i), bo(T, P); }(I, $, D); } C.displayName = x; var I = ae.forwardRef(C); return I.attrs = O, I.componentStyle = R, I.displayName = x, I.shouldForwardProp = k, I.foldedComponentIds = r ? Xe(o.foldedComponentIds, o.styledComponentId) : "", I.styledComponentId = L, I.target = r ? o.target : e, Object.defineProperty(I, "defaultProps", { get: function() { return this._foldedDefaultProps; }, set: function($) { this._foldedDefaultProps = r ? function(D) { for (var M = [], N = 1; N < arguments.length; N++) M[N - 1] = arguments[N]; for (var i = 0, c = M; i < c.length; i++) Kn(D, c[i], !0); return D; }({}, o.defaultProps, $) : $; } }), process.env.NODE_ENV !== "production" && (Ss(x, L), I.warnTooManyClasses = /* @__PURE__ */ function($, D) { var M = {}, N = !1; return function(i) { if (!N && (M[i] = !0, Object.keys(M).length >= 200)) { var c = D ? ' with the id of "'.concat(D, '"') : ""; console.warn("Over ".concat(200, " classes were generated for component ").concat($).concat(c, `. `) + `Consider using the attrs method, together with a style object for frequently changed styles. Example: const Component = styled.div.attrs(props => ({ style: { background: props.background, }, }))\`width: 100%;\` <Component />`), N = !0, M = {}; } }; }(x, L)), vr(I, function() { return ".".concat(I.styledComponentId); }), s && Ho(I, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), I; } function Zr(e, t) { for (var n = [e[0]], r = 0, o = t.length; r < o; r += 1) n.push(t[r], e[r + 1]); return n; } var Yr = function(e) { return Object.assign(e, { isCss: !0 }); }; function Se(e) { for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; if (mt(e) || gt(e)) return Yr(Qe(Zr(Cn, et([e], t, !0)))); var r = e; return t.length === 0 && r.length === 1 && typeof r[0] == "string" ? Qe(r) : Yr(Qe(Zr(r, t))); } function er(e, t, n) { if (n === void 0 && (n = ht), !t) throw xt(1, t); var r = function(o) { for (var s = [], a = 1; a < arguments.length; a++) s[a - 1] = arguments[a]; r