@leancodepl/styled-tools 9.7.4 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,1263 +1,24 @@
1
- import I, { createElement as Jt } from "react";
2
- var R = function() {
3
- return R = Object.assign || function(t) {
4
- for (var r, n = 1, o = arguments.length; n < o; n++) {
5
- r = arguments[n];
6
- for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
7
- }
8
- return t;
9
- }, R.apply(this, arguments);
10
- };
11
- function oe(e, t, r) {
12
- if (r || arguments.length === 2) for (var n = 0, o = t.length, s; n < o; n++)
13
- (s || !(n in t)) && (s || (s = Array.prototype.slice.call(t, 0, n)), s[n] = t[n]);
14
- return e.concat(s || Array.prototype.slice.call(t));
15
- }
16
- function Qt(e) {
17
- var t = /* @__PURE__ */ Object.create(null);
18
- return function(r) {
19
- return t[r] === void 0 && (t[r] = e(r)), t[r];
20
- };
21
- }
22
- var er = /^((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|fetchpriority|fetchPriority|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|popover|popoverTarget|popoverTargetAction|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)-.*))$/, tr = /* @__PURE__ */ Qt(
23
- function(e) {
24
- return er.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
25
- }
26
- /* Z+1 */
27
- ), A = "-ms-", he = "-moz-", y = "-webkit-", Pt = "comm", Te = "rule", Je = "decl", rr = "@import", nr = "@namespace", Nt = "@keyframes", or = "@layer", Ot = Math.abs, Qe = String.fromCharCode, He = Object.assign;
28
- function sr(e, t) {
29
- return O(e, 0) ^ 45 ? (((t << 2 ^ O(e, 0)) << 2 ^ O(e, 1)) << 2 ^ O(e, 2)) << 2 ^ O(e, 3) : 0;
30
- }
31
- function It(e) {
32
- return e.trim();
33
- }
34
- function B(e, t) {
35
- return (e = t.exec(e)) ? e[0] : e;
36
- }
37
- function f(e, t, r) {
38
- return e.replace(t, r);
39
- }
40
- function Ae(e, t, r) {
41
- return e.indexOf(t, r);
42
- }
43
- function O(e, t) {
44
- return e.charCodeAt(t) | 0;
45
- }
46
- function X(e, t, r) {
47
- return e.slice(t, r);
48
- }
49
- function M(e) {
50
- return e.length;
51
- }
52
- function Tt(e) {
53
- return e.length;
54
- }
55
- function fe(e, t) {
56
- return t.push(e), e;
57
- }
58
- function ir(e, t) {
59
- return e.map(t).join("");
60
- }
61
- function ct(e, t) {
62
- return e.filter(function(r) {
63
- return !B(r, t);
64
- });
65
- }
66
- var Re = 1, se = 1, Rt = 0, $ = 0, N = 0, ue = "";
67
- function _e(e, t, r, n, o, s, i, p) {
68
- return { value: e, root: t, parent: r, type: n, props: o, children: s, line: Re, column: se, length: i, return: "", siblings: p };
69
- }
70
- function G(e, t) {
71
- return He(_e("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
72
- }
73
- function re(e) {
74
- for (; e.root; )
75
- e = G(e.root, { children: [e] });
76
- fe(e, e.siblings);
77
- }
78
- function ar() {
79
- return N;
80
- }
81
- function cr() {
82
- return N = $ > 0 ? O(ue, --$) : 0, se--, N === 10 && (se = 1, Re--), N;
83
- }
84
- function z() {
85
- return N = $ < Rt ? O(ue, $++) : 0, se++, N === 10 && (se = 1, Re++), N;
86
- }
87
- function H() {
88
- return O(ue, $);
89
- }
90
- function Ce() {
91
- return $;
92
- }
93
- function De(e, t) {
94
- return X(ue, e, t);
95
- }
96
- function me(e) {
97
- switch (e) {
98
- // \0 \t \n \r \s whitespace token
99
- case 0:
100
- case 9:
101
- case 10:
102
- case 13:
103
- case 32:
104
- return 5;
105
- // ! + , / > @ ~ isolate token
106
- case 33:
107
- case 43:
108
- case 44:
109
- case 47:
110
- case 62:
111
- case 64:
112
- case 126:
113
- // ; { } breakpoint token
114
- case 59:
115
- case 123:
116
- case 125:
117
- return 4;
118
- // : accompanied token
119
- case 58:
120
- return 3;
121
- // " ' ( [ opening delimit token
122
- case 34:
123
- case 39:
124
- case 40:
125
- case 91:
126
- return 2;
127
- // ) ] closing delimit token
128
- case 41:
129
- case 93:
130
- return 1;
131
- }
132
- return 0;
133
- }
134
- function ur(e) {
135
- return Re = se = 1, Rt = M(ue = e), $ = 0, [];
136
- }
137
- function lr(e) {
138
- return ue = "", e;
139
- }
140
- function Fe(e) {
141
- return It(De($ - 1, Ye(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
142
- }
143
- function pr(e) {
144
- for (; (N = H()) && N < 33; )
145
- z();
146
- return me(e) > 2 || me(N) > 3 ? "" : " ";
147
- }
148
- function fr(e, t) {
149
- for (; --t && z() && !(N < 48 || N > 102 || N > 57 && N < 65 || N > 70 && N < 97); )
150
- ;
151
- return De(e, Ce() + (t < 6 && H() == 32 && z() == 32));
152
- }
153
- function Ye(e) {
154
- for (; z(); )
155
- switch (N) {
156
- // ] ) " '
157
- case e:
158
- return $;
159
- // " '
160
- case 34:
161
- case 39:
162
- e !== 34 && e !== 39 && Ye(N);
163
- break;
164
- // (
165
- case 40:
166
- e === 41 && Ye(e);
167
- break;
168
- // \
169
- case 92:
170
- z();
171
- break;
172
- }
173
- return $;
174
- }
175
- function dr(e, t) {
176
- for (; z() && e + N !== 57; )
177
- if (e + N === 84 && H() === 47)
178
- break;
179
- return "/*" + De(t, $ - 1) + "*" + Qe(e === 47 ? e : z());
180
- }
181
- function hr(e) {
182
- for (; !me(H()); )
183
- z();
184
- return De(e, $);
185
- }
186
- function mr(e) {
187
- return lr(xe("", null, null, null, [""], e = ur(e), 0, [0], e));
188
- }
189
- function xe(e, t, r, n, o, s, i, p, u) {
190
- for (var b = 0, h = 0, m = i, w = 0, v = 0, S = 0, C = 1, _ = 1, P = 1, x = 0, c = "", d = o, g = s, l = n, a = c; _; )
191
- switch (S = x, x = z()) {
192
- // (
193
- case 40:
194
- if (S != 108 && O(a, m - 1) == 58) {
195
- Ae(a += f(Fe(x), "&", "&\f"), "&\f", Ot(b ? p[b - 1] : 0)) != -1 && (P = -1);
196
- break;
197
- }
198
- // " ' [
199
- case 34:
200
- case 39:
201
- case 91:
202
- a += Fe(x);
203
- break;
204
- // \t \n \r \s
205
- case 9:
206
- case 10:
207
- case 13:
208
- case 32:
209
- a += pr(S);
210
- break;
211
- // \
212
- case 92:
213
- a += fr(Ce() - 1, 7);
214
- continue;
215
- // /
216
- case 47:
217
- switch (H()) {
218
- case 42:
219
- case 47:
220
- fe(gr(dr(z(), Ce()), t, r, u), u), (me(S || 1) == 5 || me(H() || 1) == 5) && M(a) && X(a, -1, void 0) !== " " && (a += " ");
221
- break;
222
- default:
223
- a += "/";
224
- }
225
- break;
226
- // {
227
- case 123 * C:
228
- p[b++] = M(a) * P;
229
- // } ; \0
230
- case 125 * C:
231
- case 59:
232
- case 0:
233
- switch (x) {
234
- // \0 }
235
- case 0:
236
- case 125:
237
- _ = 0;
238
- // ;
239
- case 59 + h:
240
- P == -1 && (a = f(a, /\f/g, "")), v > 0 && (M(a) - m || C === 0 && S === 47) && fe(v > 32 ? lt(a + ";", n, r, m - 1, u) : lt(f(a, " ", "") + ";", n, r, m - 2, u), u);
241
- break;
242
- // @ ;
243
- case 59:
244
- a += ";";
245
- // { rule/at-rule
246
- default:
247
- if (fe(l = ut(a, t, r, b, h, o, p, c, d = [], g = [], m, s), s), x === 123)
248
- if (h === 0)
249
- xe(a, t, l, l, d, s, m, p, g);
250
- else {
251
- switch (w) {
252
- // c(ontainer)
253
- case 99:
254
- if (O(a, 3) === 110) break;
255
- // l(ayer)
256
- case 108:
257
- if (O(a, 2) === 97) break;
258
- default:
259
- h = 0;
260
- // d(ocument) m(edia) s(upports)
261
- case 100:
262
- case 109:
263
- case 115:
264
- }
265
- h ? xe(e, l, l, n && fe(ut(e, l, l, 0, 0, o, p, c, o, d = [], m, g), g), o, g, m, p, n ? d : g) : xe(a, l, l, l, [""], g, 0, p, g);
266
- }
267
- }
268
- b = h = v = 0, C = P = 1, c = a = "", m = i;
269
- break;
270
- // :
271
- case 58:
272
- m = 1 + M(a), v = S;
273
- default:
274
- if (C < 1) {
275
- if (x == 123)
276
- --C;
277
- else if (x == 125 && C++ == 0 && cr() == 125)
278
- continue;
279
- }
280
- switch (a += Qe(x), x * C) {
281
- // &
282
- case 38:
283
- P = h > 0 ? 1 : (a += "\f", -1);
284
- break;
285
- // ,
286
- case 44:
287
- p[b++] = (M(a) - 1) * P, P = 1;
288
- break;
289
- // @
290
- case 64:
291
- H() === 45 && (a += Fe(z())), w = H(), h = m = M(c = a += hr(Ce())), x++;
292
- break;
293
- // -
294
- case 45:
295
- S === 45 && M(a) == 2 && (C = 0);
296
- }
297
- }
298
- return s;
299
- }
300
- function ut(e, t, r, n, o, s, i, p, u, b, h, m) {
301
- for (var w = o - 1, v = o === 0 ? s : [""], S = Tt(v), C = 0, _ = 0, P = 0; C < n; ++C)
302
- for (var x = 0, c = X(e, w + 1, w = Ot(_ = i[C])), d = e; x < S; ++x)
303
- (d = It(_ > 0 ? v[x] + " " + c : f(c, /&\f/g, v[x]))) && (u[P++] = d);
304
- return _e(e, t, r, o === 0 ? Te : p, u, b, h, m);
305
- }
306
- function gr(e, t, r, n) {
307
- return _e(e, t, r, Pt, Qe(ar()), X(e, 2, -2), 0, n);
308
- }
309
- function lt(e, t, r, n, o) {
310
- return _e(e, t, r, Je, X(e, 0, n), X(e, n + 1, -1), n, o);
311
- }
312
- function _t(e, t, r) {
313
- switch (sr(e, t)) {
314
- // color-adjust
315
- case 5103:
316
- return y + "print-" + e + e;
317
- // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
318
- case 5737:
319
- case 4201:
320
- case 3177:
321
- case 3433:
322
- case 1641:
323
- case 4457:
324
- case 2921:
325
- // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
326
- case 5572:
327
- case 6356:
328
- case 5844:
329
- case 3191:
330
- case 6645:
331
- case 3005:
332
- // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
333
- case 4215:
334
- case 6389:
335
- case 5109:
336
- case 5365:
337
- case 5621:
338
- case 3829:
339
- // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position
340
- case 6391:
341
- case 5879:
342
- case 5623:
343
- case 6135:
344
- case 4599:
345
- return y + e + e;
346
- // mask-composite
347
- case 4855:
348
- return y + e.replace("add", "source-over").replace("substract", "source-out").replace("intersect", "source-in").replace("exclude", "xor") + e;
349
- // tab-size
350
- case 4789:
351
- return he + e + e;
352
- // appearance, user-select, transform, hyphens, text-size-adjust
353
- case 5349:
354
- case 4246:
355
- case 4810:
356
- case 6968:
357
- case 2756:
358
- return y + e + he + e + A + e + e;
359
- // writing-mode
360
- case 5936:
361
- switch (O(e, t + 11)) {
362
- // vertical-l(r)
363
- case 114:
364
- return y + e + A + f(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
365
- // vertical-r(l)
366
- case 108:
367
- return y + e + A + f(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
368
- // horizontal(-)tb
369
- case 45:
370
- return y + e + A + f(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
371
- }
372
- // flex, flex-direction, scroll-snap-type, writing-mode
373
- case 6828:
374
- case 4268:
375
- case 2903:
376
- return y + e + A + e + e;
377
- // order
378
- case 6165:
379
- return y + e + A + "flex-" + e + e;
380
- // align-items
381
- case 5187:
382
- return y + e + f(e, /(\w+).+(:[^]+)/, y + "box-$1$2" + A + "flex-$1$2") + e;
383
- // align-self
384
- case 5443:
385
- return y + e + A + "flex-item-" + f(e, /flex-|-self/g, "") + (B(e, /flex-|baseline/) ? "" : A + "grid-row-" + f(e, /flex-|-self/g, "")) + e;
386
- // align-content
387
- case 4675:
388
- return y + e + A + "flex-line-pack" + f(e, /align-content|flex-|-self/g, "") + e;
389
- // flex-shrink
390
- case 5548:
391
- return y + e + A + f(e, "shrink", "negative") + e;
392
- // flex-basis
393
- case 5292:
394
- return y + e + A + f(e, "basis", "preferred-size") + e;
395
- // flex-grow
396
- case 6060:
397
- return y + "box-" + f(e, "-grow", "") + y + e + A + f(e, "grow", "positive") + e;
398
- // transition
399
- case 4554:
400
- return y + f(e, /([^-])(transform)/g, "$1" + y + "$2") + e;
401
- // cursor
402
- case 6187:
403
- return f(f(f(e, /(zoom-|grab)/, y + "$1"), /(image-set)/, y + "$1"), e, "") + e;
404
- // background, background-image
405
- case 5495:
406
- case 3959:
407
- return f(e, /(image-set\([^]*)/, y + "$1$`$1");
408
- // justify-content
409
- case 4968:
410
- return f(f(e, /(.+:)(flex-)?(.*)/, y + "box-pack:$3" + A + "flex-pack:$3"), /space-between/, "justify") + y + e + e;
411
- // justify-self
412
- case 4200:
413
- if (!B(e, /flex-|baseline/)) return A + "grid-column-align" + X(e, t) + e;
414
- break;
415
- // grid-template-(columns|rows)
416
- case 2592:
417
- case 3360:
418
- return A + f(e, "template-", "") + e;
419
- // grid-(row|column)-start
420
- case 4384:
421
- case 3616:
422
- return r && r.some(function(n, o) {
423
- return t = o, B(n.props, /grid-\w+-end/);
424
- }) ? ~Ae(e + (r = r[t].value), "span", 0) ? e : A + f(e, "-start", "") + e + A + "grid-row-span:" + (~Ae(r, "span", 0) ? B(r, /\d+/) : +B(r, /\d+/) - +B(e, /\d+/)) + ";" : A + f(e, "-start", "") + e;
425
- // grid-(row|column)-end
426
- case 4896:
427
- case 4128:
428
- return r && r.some(function(n) {
429
- return B(n.props, /grid-\w+-start/);
430
- }) ? e : A + f(f(e, "-end", "-span"), "span ", "") + e;
431
- // (margin|padding)-inline-(start|end)
432
- case 4095:
433
- case 3583:
434
- case 4068:
435
- case 2532:
436
- return f(e, /(.+)-inline(.+)/, y + "$1$2") + e;
437
- // (min|max)?(width|height|inline-size|block-size)
438
- case 8116:
439
- case 7059:
440
- case 5753:
441
- case 5535:
442
- case 5445:
443
- case 5701:
444
- case 4933:
445
- case 4677:
446
- case 5533:
447
- case 5789:
448
- case 5021:
449
- case 4765:
450
- if (M(e) - 1 - t > 6)
451
- switch (O(e, t + 1)) {
452
- // (m)ax-content, (m)in-content
453
- case 109:
454
- if (O(e, t + 4) !== 45)
455
- break;
456
- // (f)ill-available, (f)it-content
457
- case 102:
458
- return f(e, /(.+:)(.+)-([^]+)/, "$1" + y + "$2-$3$1" + he + (O(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
459
- // (s)tretch
460
- case 115:
461
- return ~Ae(e, "stretch", 0) ? _t(f(e, "stretch", "fill-available"), t, r) + e : e;
462
- }
463
- break;
464
- // grid-(column|row)
465
- case 5152:
466
- case 5920:
467
- return f(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, o, s, i, p, u, b) {
468
- return A + o + ":" + s + b + (i ? A + o + "-span:" + (p ? u : +u - +s) + b : "") + e;
469
- });
470
- // position: sticky
471
- case 4949:
472
- if (O(e, t + 6) === 121)
473
- return f(e, ":", ":" + y) + e;
474
- break;
475
- // display: (flex|inline-flex|grid|inline-grid)
476
- case 6444:
477
- switch (O(e, O(e, 14) === 45 ? 18 : 11)) {
478
- // (inline-)?fle(x)
479
- case 120:
480
- return f(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + y + (O(e, 14) === 45 ? "inline-" : "") + "box$3$1" + y + "$2$3$1" + A + "$2box$3") + e;
481
- // (inline-)?gri(d)
482
- case 100:
483
- return f(e, ":", ":" + A) + e;
484
- }
485
- break;
486
- // scroll-margin, scroll-margin-(top|right|bottom|left)
487
- case 5719:
488
- case 2647:
489
- case 2135:
490
- case 3927:
491
- case 2391:
492
- return f(e, "scroll-", "scroll-snap-") + e;
493
- }
494
- return e;
495
- }
496
- function Ne(e, t) {
497
- for (var r = "", n = 0; n < e.length; n++)
498
- r += t(e[n], n, e, t) || "";
499
- return r;
500
- }
501
- function yr(e, t, r, n) {
502
- switch (e.type) {
503
- case or:
504
- if (e.children.length) break;
505
- case rr:
506
- case nr:
507
- case Je:
508
- return e.return = e.return || e.value;
509
- case Pt:
510
- return "";
511
- case Nt:
512
- return e.return = e.value + "{" + Ne(e.children, n) + "}";
513
- case Te:
514
- if (!M(e.value = e.props.join(","))) return "";
515
- }
516
- return M(r = Ne(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
517
- }
518
- function vr(e) {
519
- var t = Tt(e);
520
- return function(r, n, o, s) {
521
- for (var i = "", p = 0; p < t; p++)
522
- i += e[p](r, n, o, s) || "";
523
- return i;
524
- };
525
- }
526
- function br(e) {
527
- return function(t) {
528
- t.root || (t = t.return) && e(t);
529
- };
530
- }
531
- function wr(e, t, r, n) {
532
- if (e.length > -1 && !e.return)
533
- switch (e.type) {
534
- case Je:
535
- e.return = _t(e.value, e.length, r);
536
- return;
537
- case Nt:
538
- return Ne([G(e, { value: f(e.value, "@", "@" + y) })], n);
539
- case Te:
540
- if (e.length)
541
- return ir(r = e.props, function(o) {
542
- switch (B(o, n = /(::plac\w+|:read-\w+)/)) {
543
- // :read-(only|write)
544
- case ":read-only":
545
- case ":read-write":
546
- re(G(e, { props: [f(o, /:(read-\w+)/, ":" + he + "$1")] })), re(G(e, { props: [o] })), He(e, { props: ct(r, n) });
547
- break;
548
- // :placeholder
549
- case "::placeholder":
550
- re(G(e, { props: [f(o, /:(plac\w+)/, ":" + y + "input-$1")] })), re(G(e, { props: [f(o, /:(plac\w+)/, ":" + he + "$1")] })), re(G(e, { props: [f(o, /:(plac\w+)/, A + "input-$1")] })), re(G(e, { props: [o] })), He(e, { props: ct(r, n) });
551
- break;
552
- }
553
- return "";
554
- });
555
- }
556
- }
557
- var Sr = {
558
- animationIterationCount: 1,
559
- aspectRatio: 1,
560
- borderImageOutset: 1,
561
- borderImageSlice: 1,
562
- borderImageWidth: 1,
563
- boxFlex: 1,
564
- boxFlexGroup: 1,
565
- boxOrdinalGroup: 1,
566
- columnCount: 1,
567
- columns: 1,
568
- flex: 1,
569
- flexGrow: 1,
570
- flexPositive: 1,
571
- flexShrink: 1,
572
- flexNegative: 1,
573
- flexOrder: 1,
574
- gridRow: 1,
575
- gridRowEnd: 1,
576
- gridRowSpan: 1,
577
- gridRowStart: 1,
578
- gridColumn: 1,
579
- gridColumnEnd: 1,
580
- gridColumnSpan: 1,
581
- gridColumnStart: 1,
582
- msGridRow: 1,
583
- msGridRowSpan: 1,
584
- msGridColumn: 1,
585
- msGridColumnSpan: 1,
586
- fontWeight: 1,
587
- lineHeight: 1,
588
- opacity: 1,
589
- order: 1,
590
- orphans: 1,
591
- scale: 1,
592
- tabSize: 1,
593
- widows: 1,
594
- zIndex: 1,
595
- zoom: 1,
596
- WebkitLineClamp: 1,
597
- // SVG-related properties
598
- fillOpacity: 1,
599
- floodOpacity: 1,
600
- stopOpacity: 1,
601
- strokeDasharray: 1,
602
- strokeDashoffset: 1,
603
- strokeMiterlimit: 1,
604
- strokeOpacity: 1,
605
- strokeWidth: 1
606
- }, K = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", Dt = "active", $t = "data-styled-version", $e = "6.3.8", et = `/*!sc*/
607
- `, Oe = typeof window < "u" && typeof document < "u", Y = I.createContext === void 0, kr = !!(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"), pt = /invalid hook call/i, Se = /* @__PURE__ */ new Set(), Ar = function(e, t) {
608
- if (process.env.NODE_ENV !== "production") {
609
- if (Y) return;
610
- var r = t ? ' with the id of "'.concat(t, '"') : "", n = "The component ".concat(e).concat(r, ` has been created dynamically.
611
- `) + `You may see this warning because you've called styled inside another component.
612
- To resolve this only create new StyledComponents outside of any render method and function component.
613
- See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
614
- `, o = console.error;
615
- try {
616
- var s = !0;
617
- console.error = function(i) {
618
- for (var p = [], u = 1; u < arguments.length; u++) p[u - 1] = arguments[u];
619
- pt.test(i) ? (s = !1, Se.delete(n)) : o.apply(void 0, oe([i], p, !1));
620
- }, typeof I.useState == "function" && I.useState(null), s && !Se.has(n) && (console.warn(n), Se.add(n));
621
- } catch (i) {
622
- pt.test(i.message) && Se.delete(n);
623
- } finally {
624
- console.error = o;
625
- }
626
- }
627
- }, je = Object.freeze([]), ie = Object.freeze({});
628
- function Cr(e, t, r) {
629
- return r === void 0 && (r = ie), e.theme !== r.theme && e.theme || t || r.theme;
630
- }
631
- var We = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "blockquote", "body", "button", "br", "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", "label", "legend", "li", "main", "map", "mark", "menu", "meter", "nav", "object", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "slot", "small", "span", "strong", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "u", "ul", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "switch", "symbol", "text", "textPath", "tspan", "use"]), xr = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Er = /(^-|-$)/g;
632
- function ft(e) {
633
- return e.replace(xr, "-").replace(Er, "");
634
- }
635
- var Pr = /(a)(d)/gi, dt = function(e) {
636
- return String.fromCharCode(e + (e > 25 ? 39 : 97));
637
- };
638
- function qe(e) {
639
- var t, r = "";
640
- for (t = Math.abs(e); t > 52; t = t / 52 | 0) r = dt(t % 52) + r;
641
- return (dt(t % 52) + r).replace(Pr, "$1-$2");
642
- }
643
- var Ve, W = function(e, t) {
644
- for (var r = t.length; r; ) e = 33 * e ^ t.charCodeAt(--r);
645
- return e;
646
- }, jt = function(e) {
647
- return W(5381, e);
648
- };
649
- function Nr(e) {
650
- return qe(jt(e) >>> 0);
651
- }
652
- function Mt(e) {
653
- return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
654
- }
655
- function Be(e) {
656
- return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
657
- }
658
- var zt = typeof Symbol == "function" && Symbol.for, Lt = zt ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, Or = zt ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, Ir = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Tr = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Ft = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Rr = ((Ve = {})[Or] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, Ve[Lt] = Ft, Ve);
659
- function ht(e) {
660
- return ("type" in (t = e) && t.type.$$typeof) === Lt ? Ft : "$$typeof" in e ? Rr[e.$$typeof] : Ir;
661
- var t;
662
- }
663
- var _r = Object.defineProperty, Dr = Object.getOwnPropertyNames, mt = Object.getOwnPropertySymbols, $r = Object.getOwnPropertyDescriptor, jr = Object.getPrototypeOf, gt = Object.prototype;
664
- function Vt(e, t, r) {
665
- if (typeof t != "string") {
666
- if (gt) {
667
- var n = jr(t);
668
- n && n !== gt && Vt(e, n, r);
669
- }
670
- var o = Dr(t);
671
- mt && (o = o.concat(mt(t)));
672
- for (var s = ht(e), i = ht(t), p = 0; p < o.length; ++p) {
673
- var u = o[p];
674
- if (!(u in Tr || r && r[u] || i && u in i || s && u in s)) {
675
- var b = $r(t, u);
676
- try {
677
- _r(e, u, b);
678
- } catch {
679
- }
680
- }
681
- }
682
- }
683
- return e;
684
- }
685
- function ae(e) {
686
- return typeof e == "function";
687
- }
688
- function tt(e) {
689
- return typeof e == "object" && "styledComponentId" in e;
690
- }
691
- function q(e, t) {
692
- return e && t ? "".concat(e, " ").concat(t) : e || t || "";
693
- }
694
- function yt(e, t) {
695
- if (e.length === 0) return "";
696
- for (var r = e[0], n = 1; n < e.length; n++) r += e[n];
697
- return r;
698
- }
699
- function ce(e) {
700
- return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
701
- }
702
- function Ue(e, t, r) {
703
- if (r === void 0 && (r = !1), !r && !ce(e) && !Array.isArray(e)) return t;
704
- if (Array.isArray(t)) for (var n = 0; n < t.length; n++) e[n] = Ue(e[n], t[n]);
705
- else if (ce(t)) for (var n in t) e[n] = Ue(e[n], t[n]);
706
- return e;
707
- }
708
- function rt(e, t) {
709
- Object.defineProperty(e, "toString", { value: t });
710
- }
711
- var Mr = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
712
-
713
- `, 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.
714
-
715
- - Are you trying to reuse it across renders?
716
- - Are you accidentally calling collectStyles twice?
717
-
718
- `, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
719
-
720
- `, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
721
-
722
- - Does this error occur on the client and is your target falsy?
723
- - Does this error occur on the server and is the sheet falsy?
724
-
725
- `, 5: `The clone method cannot be used on the client!
726
-
727
- - Are you running in a client-like environment on the server?
728
- - Are you trying to run SSR on the client?
729
-
730
- `, 6: `Trying to insert a new style tag, but the given Node is unmounted!
731
-
732
- - Are you using a custom target that isn't mounted?
733
- - Does your document not have a valid head element?
734
- - Have you accidentally removed a style tag manually?
735
-
736
- `, 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.
737
-
738
- `, 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
739
-
740
- `, 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.
741
-
742
- `, 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.
743
-
744
- `, 14: `ThemeProvider: "theme" prop is required.
745
-
746
- `, 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.
747
- You may only create up to 1,073,741,824 components. If you're creating components dynamically,
748
- as for instance in your render method then you may be running into this limitation.
749
-
750
- `, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
751
- Has styled-components' style tag been unmounted or altered by another script?
752
- `, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
753
- function zr() {
754
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
755
- for (var r = e[0], n = [], o = 1, s = e.length; o < s; o += 1) n.push(e[o]);
756
- return n.forEach(function(i) {
757
- r = r.replace(/%[a-z]/, i);
758
- }), r;
759
- }
760
- function Z(e) {
761
- for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
762
- 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(zr.apply(void 0, oe([Mr[e]], t, !1)).trim());
763
- }
764
- var Lr = (function() {
765
- function e(t) {
766
- this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
767
- }
768
- return e.prototype.indexOfGroup = function(t) {
769
- for (var r = 0, n = 0; n < t; n++) r += this.groupSizes[n];
770
- return r;
771
- }, e.prototype.insertRules = function(t, r) {
772
- if (t >= this.groupSizes.length) {
773
- for (var n = this.groupSizes, o = n.length, s = o; t >= s; ) if ((s <<= 1) < 0) throw Z(16, "".concat(t));
774
- this.groupSizes = new Uint32Array(s), this.groupSizes.set(n), this.length = s;
775
- for (var i = o; i < s; i++) this.groupSizes[i] = 0;
776
- }
777
- for (var p = this.indexOfGroup(t + 1), u = (i = 0, r.length); i < u; i++) this.tag.insertRule(p, r[i]) && (this.groupSizes[t]++, p++);
778
- }, e.prototype.clearGroup = function(t) {
779
- if (t < this.length) {
780
- var r = this.groupSizes[t], n = this.indexOfGroup(t), o = n + r;
781
- this.groupSizes[t] = 0;
782
- for (var s = n; s < o; s++) this.tag.deleteRule(n);
783
- }
784
- }, e.prototype.getGroup = function(t) {
785
- var r = "";
786
- if (t >= this.length || this.groupSizes[t] === 0) return r;
787
- for (var n = this.groupSizes[t], o = this.indexOfGroup(t), s = o + n, i = o; i < s; i++) r += "".concat(this.tag.getRule(i)).concat(et);
788
- return r;
789
- }, e;
790
- })(), Fr = 1 << 30, Ee = /* @__PURE__ */ new Map(), Ie = /* @__PURE__ */ new Map(), Pe = 1, de = function(e) {
791
- if (Ee.has(e)) return Ee.get(e);
792
- for (; Ie.has(Pe); ) Pe++;
793
- var t = Pe++;
794
- if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > Fr)) throw Z(16, "".concat(t));
795
- return Ee.set(e, t), Ie.set(t, e), t;
796
- }, Vr = function(e, t) {
797
- Pe = t + 1, Ee.set(e, t), Ie.set(t, e);
798
- }, Br = "style[".concat(K, "][").concat($t, '="').concat($e, '"]'), Gr = new RegExp("^".concat(K, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Hr = function(e, t, r) {
799
- for (var n, o = r.split(","), s = 0, i = o.length; s < i; s++) (n = o[s]) && e.registerName(t, n);
800
- }, Yr = function(e, t) {
801
- for (var r, n = ((r = t.textContent) !== null && r !== void 0 ? r : "").split(et), o = [], s = 0, i = n.length; s < i; s++) {
802
- var p = n[s].trim();
803
- if (p) {
804
- var u = p.match(Gr);
805
- if (u) {
806
- var b = 0 | parseInt(u[1], 10), h = u[2];
807
- b !== 0 && (Vr(h, b), Hr(e, h, u[3]), e.getTag().insertRules(b, o)), o.length = 0;
808
- } else o.push(p);
809
- }
810
- }
811
- }, vt = function(e) {
812
- for (var t = document.querySelectorAll(Br), r = 0, n = t.length; r < n; r++) {
813
- var o = t[r];
814
- o && o.getAttribute(K) !== Dt && (Yr(e, o), o.parentNode && o.parentNode.removeChild(o));
815
- }
816
- };
817
- function Wr() {
818
- return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
819
- }
820
- var Bt = function(e) {
821
- var t = document.head, r = e || t, n = document.createElement("style"), o = (function(p) {
822
- var u = Array.from(p.querySelectorAll("style[".concat(K, "]")));
823
- return u[u.length - 1];
824
- })(r), s = o !== void 0 ? o.nextSibling : null;
825
- n.setAttribute(K, Dt), n.setAttribute($t, $e);
826
- var i = Wr();
827
- return i && n.setAttribute("nonce", i), r.insertBefore(n, s), n;
828
- }, qr = (function() {
829
- function e(t) {
830
- this.element = Bt(t), this.element.appendChild(document.createTextNode("")), this.sheet = (function(r) {
831
- if (r.sheet) return r.sheet;
832
- for (var n = document.styleSheets, o = 0, s = n.length; o < s; o++) {
833
- var i = n[o];
834
- if (i.ownerNode === r) return i;
835
- }
836
- throw Z(17);
837
- })(this.element), this.length = 0;
838
- }
839
- return e.prototype.insertRule = function(t, r) {
840
- try {
841
- return this.sheet.insertRule(r, t), this.length++, !0;
842
- } catch {
843
- return !1;
844
- }
845
- }, e.prototype.deleteRule = function(t) {
846
- this.sheet.deleteRule(t), this.length--;
847
- }, e.prototype.getRule = function(t) {
848
- var r = this.sheet.cssRules[t];
849
- return r && r.cssText ? r.cssText : "";
850
- }, e;
851
- })(), Ur = (function() {
852
- function e(t) {
853
- this.element = Bt(t), this.nodes = this.element.childNodes, this.length = 0;
854
- }
855
- return e.prototype.insertRule = function(t, r) {
856
- if (t <= this.length && t >= 0) {
857
- var n = document.createTextNode(r);
858
- return this.element.insertBefore(n, this.nodes[t] || null), this.length++, !0;
859
- }
860
- return !1;
861
- }, e.prototype.deleteRule = function(t) {
862
- this.element.removeChild(this.nodes[t]), this.length--;
863
- }, e.prototype.getRule = function(t) {
864
- return t < this.length ? this.nodes[t].textContent : "";
865
- }, e;
866
- })(), Xr = (function() {
867
- function e(t) {
868
- this.rules = [], this.length = 0;
869
- }
870
- return e.prototype.insertRule = function(t, r) {
871
- return t <= this.length && (this.rules.splice(t, 0, r), this.length++, !0);
872
- }, e.prototype.deleteRule = function(t) {
873
- this.rules.splice(t, 1), this.length--;
874
- }, e.prototype.getRule = function(t) {
875
- return t < this.length ? this.rules[t] : "";
876
- }, e;
877
- })(), bt = Oe, Kr = { isServer: !Oe, useCSSOMInjection: !kr }, Gt = (function() {
878
- function e(t, r, n) {
879
- t === void 0 && (t = ie), r === void 0 && (r = {});
880
- var o = this;
881
- this.options = R(R({}, Kr), t), this.gs = r, this.names = new Map(n), this.server = !!t.isServer, !this.server && Oe && bt && (bt = !1, vt(this)), rt(this, function() {
882
- return (function(s) {
883
- for (var i = s.getTag(), p = i.length, u = "", b = function(m) {
884
- var w = (function(P) {
885
- return Ie.get(P);
886
- })(m);
887
- if (w === void 0) return "continue";
888
- var v = s.names.get(w), S = i.getGroup(m);
889
- if (v === void 0 || !v.size || S.length === 0) return "continue";
890
- var C = "".concat(K, ".g").concat(m, '[id="').concat(w, '"]'), _ = "";
891
- v !== void 0 && v.forEach(function(P) {
892
- P.length > 0 && (_ += "".concat(P, ","));
893
- }), u += "".concat(S).concat(C, '{content:"').concat(_, '"}').concat(et);
894
- }, h = 0; h < p; h++) b(h);
895
- return u;
896
- })(o);
897
- });
898
- }
899
- return e.registerId = function(t) {
900
- return de(t);
901
- }, e.prototype.rehydrate = function() {
902
- !this.server && Oe && vt(this);
903
- }, e.prototype.reconstructWithOptions = function(t, r) {
904
- return r === void 0 && (r = !0), new e(R(R({}, this.options), t), this.gs, r && this.names || void 0);
905
- }, e.prototype.allocateGSInstance = function(t) {
906
- return this.gs[t] = (this.gs[t] || 0) + 1;
907
- }, e.prototype.getTag = function() {
908
- return this.tag || (this.tag = (t = (function(r) {
909
- var n = r.useCSSOMInjection, o = r.target;
910
- return r.isServer ? new Xr(o) : n ? new qr(o) : new Ur(o);
911
- })(this.options), new Lr(t)));
912
- var t;
913
- }, e.prototype.hasNameForId = function(t, r) {
914
- return this.names.has(t) && this.names.get(t).has(r);
915
- }, e.prototype.registerName = function(t, r) {
916
- if (de(t), this.names.has(t)) this.names.get(t).add(r);
917
- else {
918
- var n = /* @__PURE__ */ new Set();
919
- n.add(r), this.names.set(t, n);
920
- }
921
- }, e.prototype.insertRules = function(t, r, n) {
922
- this.registerName(t, r), this.getTag().insertRules(de(t), n);
923
- }, e.prototype.clearNames = function(t) {
924
- this.names.has(t) && this.names.get(t).clear();
925
- }, e.prototype.clearRules = function(t) {
926
- this.getTag().clearGroup(de(t)), this.clearNames(t);
927
- }, e.prototype.clearTag = function() {
928
- this.tag = void 0;
929
- }, e;
930
- })(), Zr = /&/g, ne = 47;
931
- function wt(e) {
932
- if (e.indexOf("}") === -1) return !1;
933
- for (var t = e.length, r = 0, n = 0, o = !1, s = 0; s < t; s++) {
934
- var i = e.charCodeAt(s);
935
- if (n !== 0 || o || i !== ne || e.charCodeAt(s + 1) !== 42) if (o) i === 42 && e.charCodeAt(s + 1) === ne && (o = !1, s++);
936
- else if (i !== 34 && i !== 39 || s !== 0 && e.charCodeAt(s - 1) === 92) {
937
- if (n === 0) {
938
- if (i === 123) r++;
939
- else if (i === 125 && --r < 0) return !0;
940
- }
941
- } else n === 0 ? n = i : n === i && (n = 0);
942
- else o = !0, s++;
943
- }
944
- return r !== 0 || n !== 0;
945
- }
946
- function Ht(e, t) {
947
- return e.map(function(r) {
948
- return r.type === "rule" && (r.value = "".concat(t, " ").concat(r.value), r.value = r.value.replaceAll(",", ",".concat(t, " ")), r.props = r.props.map(function(n) {
949
- return "".concat(t, " ").concat(n);
950
- })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = Ht(r.children, t)), r;
951
- });
952
- }
953
- function Jr(e) {
954
- var t, r, n, o = ie, s = o.options, i = s === void 0 ? ie : s, p = o.plugins, u = p === void 0 ? je : p, b = function(w, v, S) {
955
- return S.startsWith(r) && S.endsWith(r) && S.replaceAll(r, "").length > 0 ? ".".concat(t) : w;
956
- }, h = u.slice();
957
- h.push(function(w) {
958
- w.type === Te && w.value.includes("&") && (w.props[0] = w.props[0].replace(Zr, r).replace(n, b));
959
- }), i.prefix && h.push(wr), h.push(yr);
960
- var m = function(w, v, S, C) {
961
- v === void 0 && (v = ""), S === void 0 && (S = ""), C === void 0 && (C = "&"), t = C, r = v, n = new RegExp("\\".concat(r, "\\b"), "g");
962
- var _ = (function(c) {
963
- if (!wt(c)) return c;
964
- for (var d = c.length, g = "", l = 0, a = 0, E = 0, T = !1, k = 0; k < d; k++) {
965
- var j = c.charCodeAt(k);
966
- if (E !== 0 || T || j !== ne || c.charCodeAt(k + 1) !== 42) if (T) j === 42 && c.charCodeAt(k + 1) === ne && (T = !1, k++);
967
- else if (j !== 34 && j !== 39 || k !== 0 && c.charCodeAt(k - 1) === 92) {
968
- if (E === 0) if (j === 123) a++;
969
- else if (j === 125) {
970
- if (--a < 0) {
971
- for (var L = k + 1; L < d; ) {
972
- var J = c.charCodeAt(L);
973
- if (J === 59 || J === 10) break;
974
- L++;
975
- }
976
- L < d && c.charCodeAt(L) === 59 && L++, a = 0, k = L - 1, l = L;
977
- continue;
978
- }
979
- a === 0 && (g += c.substring(l, k + 1), l = k + 1);
980
- } else j === 59 && a === 0 && (g += c.substring(l, k + 1), l = k + 1);
981
- } else E === 0 ? E = j : E === j && (E = 0);
982
- else T = !0, k++;
983
- }
984
- if (l < d) {
985
- var ge = c.substring(l);
986
- wt(ge) || (g += ge);
987
- }
988
- return g;
989
- })((function(c) {
990
- if (c.indexOf("//") === -1) return c;
991
- for (var d = c.length, g = [], l = 0, a = 0, E = 0, T = 0; a < d; ) {
992
- var k = c.charCodeAt(a);
993
- if (k !== 34 && k !== 39 || a !== 0 && c.charCodeAt(a - 1) === 92) if (E === 0) if (k === 40 && a >= 3 && (32 | c.charCodeAt(a - 1)) == 108 && (32 | c.charCodeAt(a - 2)) == 114 && (32 | c.charCodeAt(a - 3)) == 117) T = 1, a++;
994
- else if (T > 0) k === 41 ? T-- : k === 40 && T++, a++;
995
- else if (k === ne && a + 1 < d && c.charCodeAt(a + 1) === ne) {
996
- for (a > l && g.push(c.substring(l, a)); a < d && c.charCodeAt(a) !== 10; ) a++;
997
- l = a;
998
- } else a++;
999
- else a++;
1000
- else E === 0 ? E = k : E === k && (E = 0), a++;
1001
- }
1002
- return l === 0 ? c : (l < d && g.push(c.substring(l)), g.join(""));
1003
- })(w)), P = mr(S || v ? "".concat(S, " ").concat(v, " { ").concat(_, " }") : _);
1004
- i.namespace && (P = Ht(P, i.namespace));
1005
- var x = [];
1006
- return Ne(P, vr(h.concat(br(function(c) {
1007
- return x.push(c);
1008
- })))), x;
1009
- };
1010
- return m.hash = u.length ? u.reduce(function(w, v) {
1011
- return v.name || Z(15), W(w, v.name);
1012
- }, 5381).toString() : "", m;
1013
- }
1014
- var Qr = new Gt(), Xe = Jr(), Ke = { shouldForwardProp: void 0, styleSheet: Qr, stylis: Xe }, Yt = Y ? { Provider: function(e) {
1015
- return e.children;
1016
- }, Consumer: function(e) {
1017
- return (0, e.children)(Ke);
1018
- } } : I.createContext(Ke);
1019
- Yt.Consumer;
1020
- Y || I.createContext(void 0);
1021
- function St() {
1022
- return Y ? Ke : I.useContext(Yt);
1023
- }
1024
- var kt = (function() {
1025
- function e(t, r) {
1026
- var n = this;
1027
- this.inject = function(o, s) {
1028
- s === void 0 && (s = Xe);
1029
- var i = n.name + s.hash;
1030
- o.hasNameForId(n.id, i) || o.insertRules(n.id, i, s(n.rules, i, "@keyframes"));
1031
- }, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = r, rt(this, function() {
1032
- throw Z(12, String(n.name));
1033
- });
1034
- }
1035
- return e.prototype.getName = function(t) {
1036
- return t === void 0 && (t = Xe), this.name + t.hash;
1037
- }, e;
1038
- })();
1039
- function en(e, t) {
1040
- return t == null || typeof t == "boolean" || t === "" ? "" : typeof t != "number" || t === 0 || e in Sr || e.startsWith("--") ? String(t).trim() : "".concat(t, "px");
1041
- }
1042
- var tn = function(e) {
1043
- return e >= "A" && e <= "Z";
1044
- };
1045
- function At(e) {
1046
- for (var t = "", r = 0; r < e.length; r++) {
1047
- var n = e[r];
1048
- if (r === 1 && n === "-" && e[0] === "-") return e;
1049
- tn(n) ? t += "-" + n.toLowerCase() : t += n;
1050
- }
1051
- return t.startsWith("ms-") ? "-" + t : t;
1052
- }
1053
- var Wt = function(e) {
1054
- return e == null || e === !1 || e === "";
1055
- }, qt = function(e) {
1056
- var t = [];
1057
- for (var r in e) {
1058
- var n = e[r];
1059
- e.hasOwnProperty(r) && !Wt(n) && (Array.isArray(n) && n.isCss || ae(n) ? t.push("".concat(At(r), ":"), n, ";") : ce(n) ? t.push.apply(t, oe(oe(["".concat(r, " {")], qt(n), !1), ["}"], !1)) : t.push("".concat(At(r), ": ").concat(en(r, n), ";")));
1060
- }
1061
- return t;
1062
- };
1063
- function U(e, t, r, n) {
1064
- if (Wt(e)) return [];
1065
- if (tt(e)) return [".".concat(e.styledComponentId)];
1066
- if (ae(e)) {
1067
- if (!ae(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e];
1068
- var o = e(t);
1069
- return process.env.NODE_ENV === "production" || typeof o != "object" || Array.isArray(o) || o instanceof kt || ce(o) || o === null || console.error("".concat(Mt(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.")), U(o, t, r, n);
1070
- }
1071
- var s;
1072
- return e instanceof kt ? r ? (e.inject(r, n), [e.getName(n)]) : [e] : ce(e) ? qt(e) : Array.isArray(e) ? Array.prototype.concat.apply(je, e.map(function(i) {
1073
- return U(i, t, r, n);
1074
- })) : [e.toString()];
1075
- }
1076
- function rn(e) {
1077
- for (var t = 0; t < e.length; t += 1) {
1078
- var r = e[t];
1079
- if (ae(r) && !tt(r)) return !1;
1080
- }
1081
- return !0;
1082
- }
1083
- var nn = jt($e), on = (function() {
1084
- function e(t, r, n) {
1085
- this.rules = t, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (n === void 0 || n.isStatic) && rn(t), this.componentId = r, this.baseHash = W(nn, r), this.baseStyle = n, Gt.registerId(r);
1086
- }
1087
- return e.prototype.generateAndInjectStyles = function(t, r, n) {
1088
- var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, r, n).className : "";
1089
- if (this.isStatic && !n.hash) if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId)) o = q(o, this.staticRulesId);
1090
- else {
1091
- var s = yt(U(this.rules, t, r, n)), i = qe(W(this.baseHash, s) >>> 0);
1092
- if (!r.hasNameForId(this.componentId, i)) {
1093
- var p = n(s, ".".concat(i), void 0, this.componentId);
1094
- r.insertRules(this.componentId, i, p);
1095
- }
1096
- o = q(o, i), this.staticRulesId = i;
1097
- }
1098
- else {
1099
- for (var u = W(this.baseHash, n.hash), b = "", h = 0; h < this.rules.length; h++) {
1100
- var m = this.rules[h];
1101
- if (typeof m == "string") b += m, process.env.NODE_ENV !== "production" && (u = W(u, m));
1102
- else if (m) {
1103
- var w = yt(U(m, t, r, n));
1104
- u = W(u, w + h), b += w;
1105
- }
1106
- }
1107
- if (b) {
1108
- var v = qe(u >>> 0);
1109
- if (!r.hasNameForId(this.componentId, v)) {
1110
- var S = n(b, ".".concat(v), void 0, this.componentId);
1111
- r.insertRules(this.componentId, v, S);
1112
- }
1113
- o = q(o, v);
1114
- }
1115
- }
1116
- return { className: o, css: typeof window > "u" ? r.getTag().getGroup(de(this.componentId)) : "" };
1117
- }, e;
1118
- })(), nt = Y ? { Provider: function(e) {
1119
- return e.children;
1120
- }, Consumer: function(e) {
1121
- return (0, e.children)(void 0);
1122
- } } : I.createContext(void 0);
1123
- nt.Consumer;
1124
- function sn() {
1125
- var e = Y ? void 0 : I.useContext(nt);
1126
- if (!e) throw Z(18);
1127
- return e;
1128
- }
1129
- var Ge = {}, Ct = /* @__PURE__ */ new Set();
1130
- function an(e, t, r) {
1131
- var n = tt(e), o = e, s = !Be(e), i = t.attrs, p = i === void 0 ? je : i, u = t.componentId, b = u === void 0 ? (function(d, g) {
1132
- var l = typeof d != "string" ? "sc" : ft(d);
1133
- Ge[l] = (Ge[l] || 0) + 1;
1134
- var a = "".concat(l, "-").concat(Nr($e + l + Ge[l]));
1135
- return g ? "".concat(g, "-").concat(a) : a;
1136
- })(t.displayName, t.parentComponentId) : u, h = t.displayName, m = h === void 0 ? (function(d) {
1137
- return Be(d) ? "styled.".concat(d) : "Styled(".concat(Mt(d), ")");
1138
- })(e) : h, w = t.displayName && t.componentId ? "".concat(ft(t.displayName), "-").concat(t.componentId) : t.componentId || b, v = n && o.attrs ? o.attrs.concat(p).filter(Boolean) : p, S = t.shouldForwardProp;
1139
- if (n && o.shouldForwardProp) {
1140
- var C = o.shouldForwardProp;
1141
- if (t.shouldForwardProp) {
1142
- var _ = t.shouldForwardProp;
1143
- S = function(d, g) {
1144
- return C(d, g) && _(d, g);
1145
- };
1146
- } else S = C;
1147
- }
1148
- var P = new on(r, w, n ? o.componentStyle : void 0);
1149
- function x(d, g) {
1150
- return (function(l, a, E) {
1151
- var T = l.attrs, k = l.componentStyle, j = l.defaultProps, L = l.foldedComponentIds, J = l.styledComponentId, ge = l.target, Kt = Y ? void 0 : I.useContext(nt), Zt = St(), Me = l.shouldForwardProp || Zt.shouldForwardProp;
1152
- process.env.NODE_ENV !== "production" && I.useDebugValue && I.useDebugValue(J);
1153
- var ot = Cr(a, Kt, j) || ie, F = (function(ve, Q, be) {
1154
- for (var ee, V = R(R({}, Q), { className: void 0, theme: be }), Le = 0; Le < ve.length; Le += 1) {
1155
- var we = ae(ee = ve[Le]) ? ee(V) : ee;
1156
- for (var te in we) te === "className" ? V.className = q(V.className, we[te]) : te === "style" ? V.style = R(R({}, V.style), we[te]) : V[te] = we[te];
1157
- }
1158
- return "className" in Q && typeof Q.className == "string" && (V.className = q(V.className, Q.className)), V;
1159
- })(T, a, ot), le = F.as || ge, pe = {};
1160
- for (var D in F) F[D] === void 0 || D[0] === "$" || D === "as" || D === "theme" && F.theme === ot || (D === "forwardedAs" ? pe.as = F.forwardedAs : Me && !Me(D, le) || (pe[D] = F[D], Me || process.env.NODE_ENV !== "development" || tr(D) || Ct.has(D) || !We.has(le) || (Ct.add(D), console.warn('styled-components: it looks like an unknown prop "'.concat(D, '" 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.)')))));
1161
- var st = (function(ve, Q) {
1162
- var be = St(), ee = ve.generateAndInjectStyles(Q, be.styleSheet, be.stylis);
1163
- return process.env.NODE_ENV !== "production" && I.useDebugValue && I.useDebugValue(ee.className), ee;
1164
- })(k, F), ye = st.className, it = st.css;
1165
- process.env.NODE_ENV !== "production" && l.warnTooManyClasses && l.warnTooManyClasses(ye);
1166
- var ze = q(L, J);
1167
- ye && (ze += " " + ye), F.className && (ze += " " + F.className), pe[Be(le) && !We.has(le) ? "class" : "className"] = ze, E && (pe.ref = E);
1168
- var at = Jt(le, pe);
1169
- return Y && it ? I.createElement(I.Fragment, null, I.createElement("style", { precedence: "styled-components", href: "sc-".concat(J, "-").concat(ye), children: it }), at) : at;
1170
- })(c, d, g);
1171
- }
1172
- x.displayName = m;
1173
- var c = I.forwardRef(x);
1174
- return c.attrs = v, c.componentStyle = P, c.displayName = m, c.shouldForwardProp = S, c.foldedComponentIds = n ? q(o.foldedComponentIds, o.styledComponentId) : "", c.styledComponentId = w, c.target = n ? o.target : e, Object.defineProperty(c, "defaultProps", { get: function() {
1175
- return this._foldedDefaultProps;
1176
- }, set: function(d) {
1177
- this._foldedDefaultProps = n ? (function(g) {
1178
- for (var l = [], a = 1; a < arguments.length; a++) l[a - 1] = arguments[a];
1179
- for (var E = 0, T = l; E < T.length; E++) Ue(g, T[E], !0);
1180
- return g;
1181
- })({}, o.defaultProps, d) : d;
1182
- } }), process.env.NODE_ENV !== "production" && (Ar(m, w), c.warnTooManyClasses = /* @__PURE__ */ (function(d, g) {
1183
- var l = {}, a = !1;
1184
- return function(E) {
1185
- if (!a && (l[E] = !0, Object.keys(l).length >= 200)) {
1186
- var T = g ? ' with the id of "'.concat(g, '"') : "";
1187
- console.warn("Over ".concat(200, " classes were generated for component ").concat(d).concat(T, `.
1188
- `) + `Consider using the attrs method, together with a style object for frequently changed styles.
1189
- Example:
1190
- const Component = styled.div.attrs(props => ({
1191
- style: {
1192
- background: props.background,
1193
- },
1194
- }))\`width: 100%;\`
1195
-
1196
- <Component />`), a = !0, l = {};
1197
- }
1198
- };
1199
- })(m, w)), rt(c, function() {
1200
- return ".".concat(c.styledComponentId);
1201
- }), s && Vt(c, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), c;
1202
- }
1203
- function xt(e, t) {
1204
- for (var r = [e[0]], n = 0, o = t.length; n < o; n += 1) r.push(t[n], e[n + 1]);
1205
- return r;
1206
- }
1207
- var Et = function(e) {
1208
- return Object.assign(e, { isCss: !0 });
1209
- };
1210
- function cn(e) {
1211
- for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
1212
- if (ae(e) || ce(e)) return Et(U(xt(je, oe([e], t, !0))));
1213
- var n = e;
1214
- return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? U(n) : Et(U(xt(n, t)));
1215
- }
1216
- function Ze(e, t, r) {
1217
- if (r === void 0 && (r = ie), !t) throw Z(1, t);
1218
- var n = function(o) {
1219
- for (var s = [], i = 1; i < arguments.length; i++) s[i - 1] = arguments[i];
1220
- return e(t, r, cn.apply(void 0, oe([o], s, !1)));
1221
- };
1222
- return n.attrs = function(o) {
1223
- return Ze(e, t, R(R({}, r), { attrs: Array.prototype.concat(r.attrs, o).filter(Boolean) }));
1224
- }, n.withConfig = function(o) {
1225
- return Ze(e, t, R(R({}, r), o));
1226
- }, n;
1227
- }
1228
- var Ut = function(e) {
1229
- return Ze(an, e);
1230
- }, un = Ut;
1231
- We.forEach(function(e) {
1232
- un[e] = Ut(e);
1233
- });
1234
- process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
1235
- Perhaps you're looking to import 'styled-components/native'?
1236
- Read more about this at https://www.styled-components.com/docs/basics#react-native`);
1237
- var ke = "__sc-".concat(K, "__");
1238
- process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[ke] || (window[ke] = 0), window[ke] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
1239
-
1240
- See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`), window[ke] += 1);
1241
- function Xt(e) {
1242
- const t = {};
1
+ import { useTheme as m } from "styled-components";
2
+ function r(e) {
3
+ const n = {};
1243
4
  return new Proxy(e, {
1244
- get(r, n) {
1245
- return n === "prototype" ? Function.prototype : (t[n] ??= Xt((o) => {
1246
- const s = r(o);
1247
- return ln(s) ? s?.[n] : void 0;
1248
- }), t[n]);
5
+ get(u, t) {
6
+ return t === "prototype" ? Function.prototype : (n[t] ??= r((c) => {
7
+ const o = u(c);
8
+ return i(o) ? o?.[t] : void 0;
9
+ }), n[t]);
1249
10
  }
1250
11
  });
1251
12
  }
1252
- function ln(e) {
13
+ function i(e) {
1253
14
  return typeof e == "object";
1254
15
  }
1255
- function fn() {
16
+ function h() {
1256
17
  return {
1257
- theme: Xt((e) => e.theme),
1258
- useTheme: () => sn()
18
+ theme: r((e) => e.theme),
19
+ useTheme: () => m()
1259
20
  };
1260
21
  }
1261
22
  export {
1262
- fn as mkTheme
23
+ h as mkTheme
1263
24
  };