@xsolla/xui-b2c-other-card 0.202.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/README.md +4 -0
- package/native/index.d.mts +49 -0
- package/native/index.d.ts +49 -0
- package/native/index.js +629 -0
- package/native/index.js.map +1 -0
- package/native/index.mjs +599 -0
- package/native/index.mjs.map +1 -0
- package/package.json +57 -0
- package/web/index.d.mts +49 -0
- package/web/index.d.ts +49 -0
- package/web/index.js +4185 -0
- package/web/index.js.map +1 -0
- package/web/index.mjs +4171 -0
- package/web/index.mjs.map +1 -0
package/web/index.mjs
ADDED
|
@@ -0,0 +1,4171 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// ../../../node_modules/stylis/stylis.min.js
|
|
28
|
+
var require_stylis_min = __commonJS({
|
|
29
|
+
"../../../node_modules/stylis/stylis.min.js"(exports, module) {
|
|
30
|
+
"use strict";
|
|
31
|
+
!(function(e) {
|
|
32
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = e(null) : "function" == typeof define && define.amd ? define(e(null)) : window.stylis = e(null);
|
|
33
|
+
})(function e(a) {
|
|
34
|
+
"use strict";
|
|
35
|
+
var r = /^\0+/g, c = /[\0\r\f]/g, s = /: */g, t = /zoo|gra/, i = /([,: ])(transform)/g, f = /,+\s*(?![^(]*[)])/g, n = / +\s*(?![^(]*[)])/g, l = / *[\0] */g, o = /,\r+?/g, h = /([\t\r\n ])*\f?&/g, u = /:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g, d = /\W+/g, b = /@(k\w+)\s*(\S*)\s*/, p = /::(place)/g, k = /:(read-only)/g, g = /\s+(?=[{\];=:>])/g, A = /([[}=:>])\s+/g, C = /(\{[^{]+?);(?=\})/g, w = /\s{2,}/g, v = /([^\(])(:+) */g, m = /[svh]\w+-[tblr]{2}/, x = /\(\s*(.*)\s*\)/g, $ = /([\s\S]*?);/g, y = /-self|flex-/g, O = /[^]*?(:[rp][el]a[\w-]+)[^]*/, j = /stretch|:\s*\w+\-(?:conte|avail)/, z = /([^-])(image-set\()/, N = "-webkit-", S = "-moz-", F = "-ms-", W = 59, q = 125, B = 123, D = 40, E = 41, G = 91, H = 93, I = 10, J = 13, K = 9, L = 64, M = 32, P = 38, Q = 45, R = 95, T = 42, U = 44, V = 58, X = 39, Y = 34, Z = 47, _ = 62, ee = 43, ae = 126, re = 0, ce = 12, se = 11, te = 107, ie = 109, fe = 115, ne = 112, le = 111, oe = 105, he = 99, ue = 100, de = 112, be = 1, pe = 1, ke = 0, ge = 1, Ae = 1, Ce = 1, we = 0, ve = 0, me = 0, xe = [], $e = [], ye = 0, Oe = null, je = -2, ze = -1, Ne = 0, Se = 1, Fe = 2, We = 3, qe = 0, Be = 1, De = "", Ee = "", Ge = "";
|
|
36
|
+
function He(e2, a2, s2, t2, i2) {
|
|
37
|
+
for (var f2, n2, o2 = 0, h2 = 0, u2 = 0, d2 = 0, g2 = 0, A2 = 0, C2 = 0, w2 = 0, m2 = 0, $2 = 0, y2 = 0, O2 = 0, j2 = 0, z2 = 0, R2 = 0, we2 = 0, $e2 = 0, Oe2 = 0, je2 = 0, ze2 = s2.length, Je2 = ze2 - 1, Re2 = "", Te2 = "", Ue = "", Ve = "", Xe = "", Ye = ""; R2 < ze2; ) {
|
|
38
|
+
if (C2 = s2.charCodeAt(R2), R2 === Je2) {
|
|
39
|
+
if (h2 + d2 + u2 + o2 !== 0) {
|
|
40
|
+
if (0 !== h2) C2 = h2 === Z ? I : Z;
|
|
41
|
+
d2 = u2 = o2 = 0, ze2++, Je2++;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (h2 + d2 + u2 + o2 === 0) {
|
|
45
|
+
if (R2 === Je2) {
|
|
46
|
+
if (we2 > 0) Te2 = Te2.replace(c, "");
|
|
47
|
+
if (Te2.trim().length > 0) {
|
|
48
|
+
switch (C2) {
|
|
49
|
+
case M:
|
|
50
|
+
case K:
|
|
51
|
+
case W:
|
|
52
|
+
case J:
|
|
53
|
+
case I:
|
|
54
|
+
break;
|
|
55
|
+
default:
|
|
56
|
+
Te2 += s2.charAt(R2);
|
|
57
|
+
}
|
|
58
|
+
C2 = W;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (1 === $e2) switch (C2) {
|
|
62
|
+
case B:
|
|
63
|
+
case q:
|
|
64
|
+
case W:
|
|
65
|
+
case Y:
|
|
66
|
+
case X:
|
|
67
|
+
case D:
|
|
68
|
+
case E:
|
|
69
|
+
case U:
|
|
70
|
+
$e2 = 0;
|
|
71
|
+
case K:
|
|
72
|
+
case J:
|
|
73
|
+
case I:
|
|
74
|
+
case M:
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
for ($e2 = 0, je2 = R2, g2 = C2, R2--, C2 = W; je2 < ze2; ) switch (s2.charCodeAt(je2++)) {
|
|
78
|
+
case I:
|
|
79
|
+
case J:
|
|
80
|
+
case W:
|
|
81
|
+
++R2, C2 = g2, je2 = ze2;
|
|
82
|
+
break;
|
|
83
|
+
case V:
|
|
84
|
+
if (we2 > 0) ++R2, C2 = g2;
|
|
85
|
+
case B:
|
|
86
|
+
je2 = ze2;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
switch (C2) {
|
|
90
|
+
case B:
|
|
91
|
+
for (g2 = (Te2 = Te2.trim()).charCodeAt(0), y2 = 1, je2 = ++R2; R2 < ze2; ) {
|
|
92
|
+
switch (C2 = s2.charCodeAt(R2)) {
|
|
93
|
+
case B:
|
|
94
|
+
y2++;
|
|
95
|
+
break;
|
|
96
|
+
case q:
|
|
97
|
+
y2--;
|
|
98
|
+
break;
|
|
99
|
+
case Z:
|
|
100
|
+
switch (A2 = s2.charCodeAt(R2 + 1)) {
|
|
101
|
+
case T:
|
|
102
|
+
case Z:
|
|
103
|
+
R2 = Qe(A2, R2, Je2, s2);
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case G:
|
|
107
|
+
C2++;
|
|
108
|
+
case D:
|
|
109
|
+
C2++;
|
|
110
|
+
case Y:
|
|
111
|
+
case X:
|
|
112
|
+
for (; R2++ < Je2 && s2.charCodeAt(R2) !== C2; ) ;
|
|
113
|
+
}
|
|
114
|
+
if (0 === y2) break;
|
|
115
|
+
R2++;
|
|
116
|
+
}
|
|
117
|
+
if (Ue = s2.substring(je2, R2), g2 === re) g2 = (Te2 = Te2.replace(r, "").trim()).charCodeAt(0);
|
|
118
|
+
switch (g2) {
|
|
119
|
+
case L:
|
|
120
|
+
if (we2 > 0) Te2 = Te2.replace(c, "");
|
|
121
|
+
switch (A2 = Te2.charCodeAt(1)) {
|
|
122
|
+
case ue:
|
|
123
|
+
case ie:
|
|
124
|
+
case fe:
|
|
125
|
+
case Q:
|
|
126
|
+
f2 = a2;
|
|
127
|
+
break;
|
|
128
|
+
default:
|
|
129
|
+
f2 = xe;
|
|
130
|
+
}
|
|
131
|
+
if (je2 = (Ue = He(a2, f2, Ue, A2, i2 + 1)).length, me > 0 && 0 === je2) je2 = Te2.length;
|
|
132
|
+
if (ye > 0) {
|
|
133
|
+
if (f2 = Ie(xe, Te2, Oe2), n2 = Pe(We, Ue, f2, a2, pe, be, je2, A2, i2, t2), Te2 = f2.join(""), void 0 !== n2) {
|
|
134
|
+
if (0 === (je2 = (Ue = n2.trim()).length)) A2 = 0, Ue = "";
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (je2 > 0) switch (A2) {
|
|
138
|
+
case fe:
|
|
139
|
+
Te2 = Te2.replace(x, Me);
|
|
140
|
+
case ue:
|
|
141
|
+
case ie:
|
|
142
|
+
case Q:
|
|
143
|
+
Ue = Te2 + "{" + Ue + "}";
|
|
144
|
+
break;
|
|
145
|
+
case te:
|
|
146
|
+
if (Ue = (Te2 = Te2.replace(b, "$1 $2" + (Be > 0 ? De : ""))) + "{" + Ue + "}", 1 === Ae || 2 === Ae && Le("@" + Ue, 3)) Ue = "@" + N + Ue + "@" + Ue;
|
|
147
|
+
else Ue = "@" + Ue;
|
|
148
|
+
break;
|
|
149
|
+
default:
|
|
150
|
+
if (Ue = Te2 + Ue, t2 === de) Ve += Ue, Ue = "";
|
|
151
|
+
}
|
|
152
|
+
else Ue = "";
|
|
153
|
+
break;
|
|
154
|
+
default:
|
|
155
|
+
Ue = He(a2, Ie(a2, Te2, Oe2), Ue, t2, i2 + 1);
|
|
156
|
+
}
|
|
157
|
+
Xe += Ue, O2 = 0, $e2 = 0, z2 = 0, we2 = 0, Oe2 = 0, j2 = 0, Te2 = "", Ue = "", C2 = s2.charCodeAt(++R2);
|
|
158
|
+
break;
|
|
159
|
+
case q:
|
|
160
|
+
case W:
|
|
161
|
+
if ((je2 = (Te2 = (we2 > 0 ? Te2.replace(c, "") : Te2).trim()).length) > 1) {
|
|
162
|
+
if (0 === z2) {
|
|
163
|
+
if ((g2 = Te2.charCodeAt(0)) === Q || g2 > 96 && g2 < 123) je2 = (Te2 = Te2.replace(" ", ":")).length;
|
|
164
|
+
}
|
|
165
|
+
if (ye > 0) {
|
|
166
|
+
if (void 0 !== (n2 = Pe(Se, Te2, a2, e2, pe, be, Ve.length, t2, i2, t2))) {
|
|
167
|
+
if (0 === (je2 = (Te2 = n2.trim()).length)) Te2 = "\0\0";
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
switch (g2 = Te2.charCodeAt(0), A2 = Te2.charCodeAt(1), g2) {
|
|
171
|
+
case re:
|
|
172
|
+
break;
|
|
173
|
+
case L:
|
|
174
|
+
if (A2 === oe || A2 === he) {
|
|
175
|
+
Ye += Te2 + s2.charAt(R2);
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
default:
|
|
179
|
+
if (Te2.charCodeAt(je2 - 1) === V) break;
|
|
180
|
+
Ve += Ke(Te2, g2, A2, Te2.charCodeAt(2));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
O2 = 0, $e2 = 0, z2 = 0, we2 = 0, Oe2 = 0, Te2 = "", C2 = s2.charCodeAt(++R2);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
switch (C2) {
|
|
187
|
+
case J:
|
|
188
|
+
case I:
|
|
189
|
+
if (h2 + d2 + u2 + o2 + ve === 0) switch ($2) {
|
|
190
|
+
case E:
|
|
191
|
+
case X:
|
|
192
|
+
case Y:
|
|
193
|
+
case L:
|
|
194
|
+
case ae:
|
|
195
|
+
case _:
|
|
196
|
+
case T:
|
|
197
|
+
case ee:
|
|
198
|
+
case Z:
|
|
199
|
+
case Q:
|
|
200
|
+
case V:
|
|
201
|
+
case U:
|
|
202
|
+
case W:
|
|
203
|
+
case B:
|
|
204
|
+
case q:
|
|
205
|
+
break;
|
|
206
|
+
default:
|
|
207
|
+
if (z2 > 0) $e2 = 1;
|
|
208
|
+
}
|
|
209
|
+
if (h2 === Z) h2 = 0;
|
|
210
|
+
else if (ge + O2 === 0 && t2 !== te && Te2.length > 0) we2 = 1, Te2 += "\0";
|
|
211
|
+
if (ye * qe > 0) Pe(Ne, Te2, a2, e2, pe, be, Ve.length, t2, i2, t2);
|
|
212
|
+
be = 1, pe++;
|
|
213
|
+
break;
|
|
214
|
+
case W:
|
|
215
|
+
case q:
|
|
216
|
+
if (h2 + d2 + u2 + o2 === 0) {
|
|
217
|
+
be++;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
default:
|
|
221
|
+
switch (be++, Re2 = s2.charAt(R2), C2) {
|
|
222
|
+
case K:
|
|
223
|
+
case M:
|
|
224
|
+
if (d2 + o2 + h2 === 0) switch (w2) {
|
|
225
|
+
case U:
|
|
226
|
+
case V:
|
|
227
|
+
case K:
|
|
228
|
+
case M:
|
|
229
|
+
Re2 = "";
|
|
230
|
+
break;
|
|
231
|
+
default:
|
|
232
|
+
if (C2 !== M) Re2 = " ";
|
|
233
|
+
}
|
|
234
|
+
break;
|
|
235
|
+
case re:
|
|
236
|
+
Re2 = "\\0";
|
|
237
|
+
break;
|
|
238
|
+
case ce:
|
|
239
|
+
Re2 = "\\f";
|
|
240
|
+
break;
|
|
241
|
+
case se:
|
|
242
|
+
Re2 = "\\v";
|
|
243
|
+
break;
|
|
244
|
+
case P:
|
|
245
|
+
if (d2 + h2 + o2 === 0 && ge > 0) Oe2 = 1, we2 = 1, Re2 = "\f" + Re2;
|
|
246
|
+
break;
|
|
247
|
+
case 108:
|
|
248
|
+
if (d2 + h2 + o2 + ke === 0 && z2 > 0) switch (R2 - z2) {
|
|
249
|
+
case 2:
|
|
250
|
+
if (w2 === ne && s2.charCodeAt(R2 - 3) === V) ke = w2;
|
|
251
|
+
case 8:
|
|
252
|
+
if (m2 === le) ke = m2;
|
|
253
|
+
}
|
|
254
|
+
break;
|
|
255
|
+
case V:
|
|
256
|
+
if (d2 + h2 + o2 === 0) z2 = R2;
|
|
257
|
+
break;
|
|
258
|
+
case U:
|
|
259
|
+
if (h2 + u2 + d2 + o2 === 0) we2 = 1, Re2 += "\r";
|
|
260
|
+
break;
|
|
261
|
+
case Y:
|
|
262
|
+
case X:
|
|
263
|
+
if (0 === h2) d2 = d2 === C2 ? 0 : 0 === d2 ? C2 : d2;
|
|
264
|
+
break;
|
|
265
|
+
case G:
|
|
266
|
+
if (d2 + h2 + u2 === 0) o2++;
|
|
267
|
+
break;
|
|
268
|
+
case H:
|
|
269
|
+
if (d2 + h2 + u2 === 0) o2--;
|
|
270
|
+
break;
|
|
271
|
+
case E:
|
|
272
|
+
if (d2 + h2 + o2 === 0) u2--;
|
|
273
|
+
break;
|
|
274
|
+
case D:
|
|
275
|
+
if (d2 + h2 + o2 === 0) {
|
|
276
|
+
if (0 === O2) switch (2 * w2 + 3 * m2) {
|
|
277
|
+
case 533:
|
|
278
|
+
break;
|
|
279
|
+
default:
|
|
280
|
+
y2 = 0, O2 = 1;
|
|
281
|
+
}
|
|
282
|
+
u2++;
|
|
283
|
+
}
|
|
284
|
+
break;
|
|
285
|
+
case L:
|
|
286
|
+
if (h2 + u2 + d2 + o2 + z2 + j2 === 0) j2 = 1;
|
|
287
|
+
break;
|
|
288
|
+
case T:
|
|
289
|
+
case Z:
|
|
290
|
+
if (d2 + o2 + u2 > 0) break;
|
|
291
|
+
switch (h2) {
|
|
292
|
+
case 0:
|
|
293
|
+
switch (2 * C2 + 3 * s2.charCodeAt(R2 + 1)) {
|
|
294
|
+
case 235:
|
|
295
|
+
h2 = Z;
|
|
296
|
+
break;
|
|
297
|
+
case 220:
|
|
298
|
+
je2 = R2, h2 = T;
|
|
299
|
+
}
|
|
300
|
+
break;
|
|
301
|
+
case T:
|
|
302
|
+
if (C2 === Z && w2 === T && je2 + 2 !== R2) {
|
|
303
|
+
if (33 === s2.charCodeAt(je2 + 2)) Ve += s2.substring(je2, R2 + 1);
|
|
304
|
+
Re2 = "", h2 = 0;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
if (0 === h2) {
|
|
309
|
+
if (ge + d2 + o2 + j2 === 0 && t2 !== te && C2 !== W) switch (C2) {
|
|
310
|
+
case U:
|
|
311
|
+
case ae:
|
|
312
|
+
case _:
|
|
313
|
+
case ee:
|
|
314
|
+
case E:
|
|
315
|
+
case D:
|
|
316
|
+
if (0 === O2) {
|
|
317
|
+
switch (w2) {
|
|
318
|
+
case K:
|
|
319
|
+
case M:
|
|
320
|
+
case I:
|
|
321
|
+
case J:
|
|
322
|
+
Re2 += "\0";
|
|
323
|
+
break;
|
|
324
|
+
default:
|
|
325
|
+
Re2 = "\0" + Re2 + (C2 === U ? "" : "\0");
|
|
326
|
+
}
|
|
327
|
+
we2 = 1;
|
|
328
|
+
} else switch (C2) {
|
|
329
|
+
case D:
|
|
330
|
+
if (z2 + 7 === R2 && 108 === w2) z2 = 0;
|
|
331
|
+
O2 = ++y2;
|
|
332
|
+
break;
|
|
333
|
+
case E:
|
|
334
|
+
if (0 == (O2 = --y2)) we2 = 1, Re2 += "\0";
|
|
335
|
+
}
|
|
336
|
+
break;
|
|
337
|
+
case K:
|
|
338
|
+
case M:
|
|
339
|
+
switch (w2) {
|
|
340
|
+
case re:
|
|
341
|
+
case B:
|
|
342
|
+
case q:
|
|
343
|
+
case W:
|
|
344
|
+
case U:
|
|
345
|
+
case ce:
|
|
346
|
+
case K:
|
|
347
|
+
case M:
|
|
348
|
+
case I:
|
|
349
|
+
case J:
|
|
350
|
+
break;
|
|
351
|
+
default:
|
|
352
|
+
if (0 === O2) we2 = 1, Re2 += "\0";
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
if (Te2 += Re2, C2 !== M && C2 !== K) $2 = C2;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
m2 = w2, w2 = C2, R2++;
|
|
359
|
+
}
|
|
360
|
+
if (je2 = Ve.length, me > 0) {
|
|
361
|
+
if (0 === je2 && 0 === Xe.length && 0 === a2[0].length == false) {
|
|
362
|
+
if (t2 !== ie || 1 === a2.length && (ge > 0 ? Ee : Ge) === a2[0]) je2 = a2.join(",").length + 2;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
if (je2 > 0) {
|
|
366
|
+
if (f2 = 0 === ge && t2 !== te ? (function(e3) {
|
|
367
|
+
for (var a3, r2, s3 = 0, t3 = e3.length, i3 = Array(t3); s3 < t3; ++s3) {
|
|
368
|
+
for (var f3 = e3[s3].split(l), n3 = "", o3 = 0, h3 = 0, u3 = 0, d3 = 0, b2 = f3.length; o3 < b2; ++o3) {
|
|
369
|
+
if (0 === (h3 = (r2 = f3[o3]).length) && b2 > 1) continue;
|
|
370
|
+
if (u3 = n3.charCodeAt(n3.length - 1), d3 = r2.charCodeAt(0), a3 = "", 0 !== o3) switch (u3) {
|
|
371
|
+
case T:
|
|
372
|
+
case ae:
|
|
373
|
+
case _:
|
|
374
|
+
case ee:
|
|
375
|
+
case M:
|
|
376
|
+
case D:
|
|
377
|
+
break;
|
|
378
|
+
default:
|
|
379
|
+
a3 = " ";
|
|
380
|
+
}
|
|
381
|
+
switch (d3) {
|
|
382
|
+
case P:
|
|
383
|
+
r2 = a3 + Ee;
|
|
384
|
+
case ae:
|
|
385
|
+
case _:
|
|
386
|
+
case ee:
|
|
387
|
+
case M:
|
|
388
|
+
case E:
|
|
389
|
+
case D:
|
|
390
|
+
break;
|
|
391
|
+
case G:
|
|
392
|
+
r2 = a3 + r2 + Ee;
|
|
393
|
+
break;
|
|
394
|
+
case V:
|
|
395
|
+
switch (2 * r2.charCodeAt(1) + 3 * r2.charCodeAt(2)) {
|
|
396
|
+
case 530:
|
|
397
|
+
if (Ce > 0) {
|
|
398
|
+
r2 = a3 + r2.substring(8, h3 - 1);
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
default:
|
|
402
|
+
if (o3 < 1 || f3[o3 - 1].length < 1) r2 = a3 + Ee + r2;
|
|
403
|
+
}
|
|
404
|
+
break;
|
|
405
|
+
case U:
|
|
406
|
+
a3 = "";
|
|
407
|
+
default:
|
|
408
|
+
if (h3 > 1 && r2.indexOf(":") > 0) r2 = a3 + r2.replace(v, "$1" + Ee + "$2");
|
|
409
|
+
else r2 = a3 + r2 + Ee;
|
|
410
|
+
}
|
|
411
|
+
n3 += r2;
|
|
412
|
+
}
|
|
413
|
+
i3[s3] = n3.replace(c, "").trim();
|
|
414
|
+
}
|
|
415
|
+
return i3;
|
|
416
|
+
})(a2) : a2, ye > 0) {
|
|
417
|
+
if (void 0 !== (n2 = Pe(Fe, Ve, f2, e2, pe, be, je2, t2, i2, t2)) && 0 === (Ve = n2).length) return Ye + Ve + Xe;
|
|
418
|
+
}
|
|
419
|
+
if (Ve = f2.join(",") + "{" + Ve + "}", Ae * ke != 0) {
|
|
420
|
+
if (2 === Ae && !Le(Ve, 2)) ke = 0;
|
|
421
|
+
switch (ke) {
|
|
422
|
+
case le:
|
|
423
|
+
Ve = Ve.replace(k, ":" + S + "$1") + Ve;
|
|
424
|
+
break;
|
|
425
|
+
case ne:
|
|
426
|
+
Ve = Ve.replace(p, "::" + N + "input-$1") + Ve.replace(p, "::" + S + "$1") + Ve.replace(p, ":" + F + "input-$1") + Ve;
|
|
427
|
+
}
|
|
428
|
+
ke = 0;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return Ye + Ve + Xe;
|
|
432
|
+
}
|
|
433
|
+
function Ie(e2, a2, r2) {
|
|
434
|
+
var c2 = a2.trim().split(o), s2 = c2, t2 = c2.length, i2 = e2.length;
|
|
435
|
+
switch (i2) {
|
|
436
|
+
case 0:
|
|
437
|
+
case 1:
|
|
438
|
+
for (var f2 = 0, n2 = 0 === i2 ? "" : e2[0] + " "; f2 < t2; ++f2) s2[f2] = Je(n2, s2[f2], r2, i2).trim();
|
|
439
|
+
break;
|
|
440
|
+
default:
|
|
441
|
+
f2 = 0;
|
|
442
|
+
var l2 = 0;
|
|
443
|
+
for (s2 = []; f2 < t2; ++f2) for (var h2 = 0; h2 < i2; ++h2) s2[l2++] = Je(e2[h2] + " ", c2[f2], r2, i2).trim();
|
|
444
|
+
}
|
|
445
|
+
return s2;
|
|
446
|
+
}
|
|
447
|
+
function Je(e2, a2, r2, c2) {
|
|
448
|
+
var s2 = a2, t2 = s2.charCodeAt(0);
|
|
449
|
+
if (t2 < 33) t2 = (s2 = s2.trim()).charCodeAt(0);
|
|
450
|
+
switch (t2) {
|
|
451
|
+
case P:
|
|
452
|
+
switch (ge + c2) {
|
|
453
|
+
case 0:
|
|
454
|
+
case 1:
|
|
455
|
+
if (0 === e2.trim().length) break;
|
|
456
|
+
default:
|
|
457
|
+
return s2.replace(h, "$1" + e2.trim());
|
|
458
|
+
}
|
|
459
|
+
break;
|
|
460
|
+
case V:
|
|
461
|
+
switch (s2.charCodeAt(1)) {
|
|
462
|
+
case 103:
|
|
463
|
+
if (Ce > 0 && ge > 0) return s2.replace(u, "$1").replace(h, "$1" + Ge);
|
|
464
|
+
break;
|
|
465
|
+
default:
|
|
466
|
+
return e2.trim() + s2.replace(h, "$1" + e2.trim());
|
|
467
|
+
}
|
|
468
|
+
default:
|
|
469
|
+
if (r2 * ge > 0 && s2.indexOf("\f") > 0) return s2.replace(h, (e2.charCodeAt(0) === V ? "" : "$1") + e2.trim());
|
|
470
|
+
}
|
|
471
|
+
return e2 + s2;
|
|
472
|
+
}
|
|
473
|
+
function Ke(e2, a2, r2, c2) {
|
|
474
|
+
var l2, o2 = 0, h2 = e2 + ";", u2 = 2 * a2 + 3 * r2 + 4 * c2;
|
|
475
|
+
if (944 === u2) return (function(e3) {
|
|
476
|
+
var a3 = e3.length, r3 = e3.indexOf(":", 9) + 1, c3 = e3.substring(0, r3).trim(), s2 = e3.substring(r3, a3 - 1).trim();
|
|
477
|
+
switch (e3.charCodeAt(9) * Be) {
|
|
478
|
+
case 0:
|
|
479
|
+
break;
|
|
480
|
+
case Q:
|
|
481
|
+
if (110 !== e3.charCodeAt(10)) break;
|
|
482
|
+
default:
|
|
483
|
+
for (var t2 = s2.split((s2 = "", f)), i2 = 0, r3 = 0, a3 = t2.length; i2 < a3; r3 = 0, ++i2) {
|
|
484
|
+
for (var l3 = t2[i2], o3 = l3.split(n); l3 = o3[r3]; ) {
|
|
485
|
+
var h3 = l3.charCodeAt(0);
|
|
486
|
+
if (1 === Be && (h3 > L && h3 < 90 || h3 > 96 && h3 < 123 || h3 === R || h3 === Q && l3.charCodeAt(1) !== Q)) switch (isNaN(parseFloat(l3)) + (-1 !== l3.indexOf("("))) {
|
|
487
|
+
case 1:
|
|
488
|
+
switch (l3) {
|
|
489
|
+
case "infinite":
|
|
490
|
+
case "alternate":
|
|
491
|
+
case "backwards":
|
|
492
|
+
case "running":
|
|
493
|
+
case "normal":
|
|
494
|
+
case "forwards":
|
|
495
|
+
case "both":
|
|
496
|
+
case "none":
|
|
497
|
+
case "linear":
|
|
498
|
+
case "ease":
|
|
499
|
+
case "ease-in":
|
|
500
|
+
case "ease-out":
|
|
501
|
+
case "ease-in-out":
|
|
502
|
+
case "paused":
|
|
503
|
+
case "reverse":
|
|
504
|
+
case "alternate-reverse":
|
|
505
|
+
case "inherit":
|
|
506
|
+
case "initial":
|
|
507
|
+
case "unset":
|
|
508
|
+
case "step-start":
|
|
509
|
+
case "step-end":
|
|
510
|
+
break;
|
|
511
|
+
default:
|
|
512
|
+
l3 += De;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
o3[r3++] = l3;
|
|
516
|
+
}
|
|
517
|
+
s2 += (0 === i2 ? "" : ",") + o3.join(" ");
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (s2 = c3 + s2 + ";", 1 === Ae || 2 === Ae && Le(s2, 1)) return N + s2 + s2;
|
|
521
|
+
return s2;
|
|
522
|
+
})(h2);
|
|
523
|
+
else if (0 === Ae || 2 === Ae && !Le(h2, 1)) return h2;
|
|
524
|
+
switch (u2) {
|
|
525
|
+
case 1015:
|
|
526
|
+
return 97 === h2.charCodeAt(10) ? N + h2 + h2 : h2;
|
|
527
|
+
case 951:
|
|
528
|
+
return 116 === h2.charCodeAt(3) ? N + h2 + h2 : h2;
|
|
529
|
+
case 963:
|
|
530
|
+
return 110 === h2.charCodeAt(5) ? N + h2 + h2 : h2;
|
|
531
|
+
case 1009:
|
|
532
|
+
if (100 !== h2.charCodeAt(4)) break;
|
|
533
|
+
case 969:
|
|
534
|
+
case 942:
|
|
535
|
+
return N + h2 + h2;
|
|
536
|
+
case 978:
|
|
537
|
+
return N + h2 + S + h2 + h2;
|
|
538
|
+
case 1019:
|
|
539
|
+
case 983:
|
|
540
|
+
return N + h2 + S + h2 + F + h2 + h2;
|
|
541
|
+
case 883:
|
|
542
|
+
if (h2.charCodeAt(8) === Q) return N + h2 + h2;
|
|
543
|
+
if (h2.indexOf("image-set(", 11) > 0) return h2.replace(z, "$1" + N + "$2") + h2;
|
|
544
|
+
return h2;
|
|
545
|
+
case 932:
|
|
546
|
+
if (h2.charCodeAt(4) === Q) switch (h2.charCodeAt(5)) {
|
|
547
|
+
case 103:
|
|
548
|
+
return N + "box-" + h2.replace("-grow", "") + N + h2 + F + h2.replace("grow", "positive") + h2;
|
|
549
|
+
case 115:
|
|
550
|
+
return N + h2 + F + h2.replace("shrink", "negative") + h2;
|
|
551
|
+
case 98:
|
|
552
|
+
return N + h2 + F + h2.replace("basis", "preferred-size") + h2;
|
|
553
|
+
}
|
|
554
|
+
return N + h2 + F + h2 + h2;
|
|
555
|
+
case 964:
|
|
556
|
+
return N + h2 + F + "flex-" + h2 + h2;
|
|
557
|
+
case 1023:
|
|
558
|
+
if (99 !== h2.charCodeAt(8)) break;
|
|
559
|
+
return l2 = h2.substring(h2.indexOf(":", 15)).replace("flex-", "").replace("space-between", "justify"), N + "box-pack" + l2 + N + h2 + F + "flex-pack" + l2 + h2;
|
|
560
|
+
case 1005:
|
|
561
|
+
return t.test(h2) ? h2.replace(s, ":" + N) + h2.replace(s, ":" + S) + h2 : h2;
|
|
562
|
+
case 1e3:
|
|
563
|
+
switch (o2 = (l2 = h2.substring(13).trim()).indexOf("-") + 1, l2.charCodeAt(0) + l2.charCodeAt(o2)) {
|
|
564
|
+
case 226:
|
|
565
|
+
l2 = h2.replace(m, "tb");
|
|
566
|
+
break;
|
|
567
|
+
case 232:
|
|
568
|
+
l2 = h2.replace(m, "tb-rl");
|
|
569
|
+
break;
|
|
570
|
+
case 220:
|
|
571
|
+
l2 = h2.replace(m, "lr");
|
|
572
|
+
break;
|
|
573
|
+
default:
|
|
574
|
+
return h2;
|
|
575
|
+
}
|
|
576
|
+
return N + h2 + F + l2 + h2;
|
|
577
|
+
case 1017:
|
|
578
|
+
if (-1 === h2.indexOf("sticky", 9)) return h2;
|
|
579
|
+
case 975:
|
|
580
|
+
switch (o2 = (h2 = e2).length - 10, u2 = (l2 = (33 === h2.charCodeAt(o2) ? h2.substring(0, o2) : h2).substring(e2.indexOf(":", 7) + 1).trim()).charCodeAt(0) + (0 | l2.charCodeAt(7))) {
|
|
581
|
+
case 203:
|
|
582
|
+
if (l2.charCodeAt(8) < 111) break;
|
|
583
|
+
case 115:
|
|
584
|
+
h2 = h2.replace(l2, N + l2) + ";" + h2;
|
|
585
|
+
break;
|
|
586
|
+
case 207:
|
|
587
|
+
case 102:
|
|
588
|
+
h2 = h2.replace(l2, N + (u2 > 102 ? "inline-" : "") + "box") + ";" + h2.replace(l2, N + l2) + ";" + h2.replace(l2, F + l2 + "box") + ";" + h2;
|
|
589
|
+
}
|
|
590
|
+
return h2 + ";";
|
|
591
|
+
case 938:
|
|
592
|
+
if (h2.charCodeAt(5) === Q) switch (h2.charCodeAt(6)) {
|
|
593
|
+
case 105:
|
|
594
|
+
return l2 = h2.replace("-items", ""), N + h2 + N + "box-" + l2 + F + "flex-" + l2 + h2;
|
|
595
|
+
case 115:
|
|
596
|
+
return N + h2 + F + "flex-item-" + h2.replace(y, "") + h2;
|
|
597
|
+
default:
|
|
598
|
+
return N + h2 + F + "flex-line-pack" + h2.replace("align-content", "").replace(y, "") + h2;
|
|
599
|
+
}
|
|
600
|
+
break;
|
|
601
|
+
case 973:
|
|
602
|
+
case 989:
|
|
603
|
+
if (h2.charCodeAt(3) !== Q || 122 === h2.charCodeAt(4)) break;
|
|
604
|
+
case 931:
|
|
605
|
+
case 953:
|
|
606
|
+
if (true === j.test(e2)) if (115 === (l2 = e2.substring(e2.indexOf(":") + 1)).charCodeAt(0)) return Ke(e2.replace("stretch", "fill-available"), a2, r2, c2).replace(":fill-available", ":stretch");
|
|
607
|
+
else return h2.replace(l2, N + l2) + h2.replace(l2, S + l2.replace("fill-", "")) + h2;
|
|
608
|
+
break;
|
|
609
|
+
case 962:
|
|
610
|
+
if (h2 = N + h2 + (102 === h2.charCodeAt(5) ? F + h2 : "") + h2, r2 + c2 === 211 && 105 === h2.charCodeAt(13) && h2.indexOf("transform", 10) > 0) return h2.substring(0, h2.indexOf(";", 27) + 1).replace(i, "$1" + N + "$2") + h2;
|
|
611
|
+
}
|
|
612
|
+
return h2;
|
|
613
|
+
}
|
|
614
|
+
function Le(e2, a2) {
|
|
615
|
+
var r2 = e2.indexOf(1 === a2 ? ":" : "{"), c2 = e2.substring(0, 3 !== a2 ? r2 : 10), s2 = e2.substring(r2 + 1, e2.length - 1);
|
|
616
|
+
return Oe(2 !== a2 ? c2 : c2.replace(O, "$1"), s2, a2);
|
|
617
|
+
}
|
|
618
|
+
function Me(e2, a2) {
|
|
619
|
+
var r2 = Ke(a2, a2.charCodeAt(0), a2.charCodeAt(1), a2.charCodeAt(2));
|
|
620
|
+
return r2 !== a2 + ";" ? r2.replace($, " or ($1)").substring(4) : "(" + a2 + ")";
|
|
621
|
+
}
|
|
622
|
+
function Pe(e2, a2, r2, c2, s2, t2, i2, f2, n2, l2) {
|
|
623
|
+
for (var o2, h2 = 0, u2 = a2; h2 < ye; ++h2) switch (o2 = $e[h2].call(Te, e2, u2, r2, c2, s2, t2, i2, f2, n2, l2)) {
|
|
624
|
+
case void 0:
|
|
625
|
+
case false:
|
|
626
|
+
case true:
|
|
627
|
+
case null:
|
|
628
|
+
break;
|
|
629
|
+
default:
|
|
630
|
+
u2 = o2;
|
|
631
|
+
}
|
|
632
|
+
if (u2 !== a2) return u2;
|
|
633
|
+
}
|
|
634
|
+
function Qe(e2, a2, r2, c2) {
|
|
635
|
+
for (var s2 = a2 + 1; s2 < r2; ++s2) switch (c2.charCodeAt(s2)) {
|
|
636
|
+
case Z:
|
|
637
|
+
if (e2 === T) {
|
|
638
|
+
if (c2.charCodeAt(s2 - 1) === T && a2 + 2 !== s2) return s2 + 1;
|
|
639
|
+
}
|
|
640
|
+
break;
|
|
641
|
+
case I:
|
|
642
|
+
if (e2 === Z) return s2 + 1;
|
|
643
|
+
}
|
|
644
|
+
return s2;
|
|
645
|
+
}
|
|
646
|
+
function Re(e2) {
|
|
647
|
+
for (var a2 in e2) {
|
|
648
|
+
var r2 = e2[a2];
|
|
649
|
+
switch (a2) {
|
|
650
|
+
case "keyframe":
|
|
651
|
+
Be = 0 | r2;
|
|
652
|
+
break;
|
|
653
|
+
case "global":
|
|
654
|
+
Ce = 0 | r2;
|
|
655
|
+
break;
|
|
656
|
+
case "cascade":
|
|
657
|
+
ge = 0 | r2;
|
|
658
|
+
break;
|
|
659
|
+
case "compress":
|
|
660
|
+
we = 0 | r2;
|
|
661
|
+
break;
|
|
662
|
+
case "semicolon":
|
|
663
|
+
ve = 0 | r2;
|
|
664
|
+
break;
|
|
665
|
+
case "preserve":
|
|
666
|
+
me = 0 | r2;
|
|
667
|
+
break;
|
|
668
|
+
case "prefix":
|
|
669
|
+
if (Oe = null, !r2) Ae = 0;
|
|
670
|
+
else if ("function" != typeof r2) Ae = 1;
|
|
671
|
+
else Ae = 2, Oe = r2;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
return Re;
|
|
675
|
+
}
|
|
676
|
+
function Te(a2, r2) {
|
|
677
|
+
if (void 0 !== this && this.constructor === Te) return e(a2);
|
|
678
|
+
var s2 = a2, t2 = s2.charCodeAt(0);
|
|
679
|
+
if (t2 < 33) t2 = (s2 = s2.trim()).charCodeAt(0);
|
|
680
|
+
if (Be > 0) De = s2.replace(d, t2 === G ? "" : "-");
|
|
681
|
+
if (t2 = 1, 1 === ge) Ge = s2;
|
|
682
|
+
else Ee = s2;
|
|
683
|
+
var i2, f2 = [Ge];
|
|
684
|
+
if (ye > 0) {
|
|
685
|
+
if (void 0 !== (i2 = Pe(ze, r2, f2, f2, pe, be, 0, 0, 0, 0)) && "string" == typeof i2) r2 = i2;
|
|
686
|
+
}
|
|
687
|
+
var n2 = He(xe, f2, r2, 0, 0);
|
|
688
|
+
if (ye > 0) {
|
|
689
|
+
if (void 0 !== (i2 = Pe(je, n2, f2, f2, pe, be, n2.length, 0, 0, 0)) && "string" != typeof (n2 = i2)) t2 = 0;
|
|
690
|
+
}
|
|
691
|
+
return De = "", Ge = "", Ee = "", ke = 0, pe = 1, be = 1, we * t2 == 0 ? n2 : n2.replace(c, "").replace(g, "").replace(A, "$1").replace(C, "$1").replace(w, " ");
|
|
692
|
+
}
|
|
693
|
+
if (Te.use = function e2(a2) {
|
|
694
|
+
switch (a2) {
|
|
695
|
+
case void 0:
|
|
696
|
+
case null:
|
|
697
|
+
ye = $e.length = 0;
|
|
698
|
+
break;
|
|
699
|
+
default:
|
|
700
|
+
if ("function" == typeof a2) $e[ye++] = a2;
|
|
701
|
+
else if ("object" == typeof a2) for (var r2 = 0, c2 = a2.length; r2 < c2; ++r2) e2(a2[r2]);
|
|
702
|
+
else qe = 0 | !!a2;
|
|
703
|
+
}
|
|
704
|
+
return e2;
|
|
705
|
+
}, Te.set = Re, void 0 !== a) Re(a);
|
|
706
|
+
return Te;
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
|
|
711
|
+
// ../../../node_modules/stylis-rule-sheet/index.js
|
|
712
|
+
var require_stylis_rule_sheet = __commonJS({
|
|
713
|
+
"../../../node_modules/stylis-rule-sheet/index.js"(exports, module) {
|
|
714
|
+
"use strict";
|
|
715
|
+
(function(factory) {
|
|
716
|
+
typeof exports === "object" && typeof module !== "undefined" ? module["exports"] = factory() : typeof define === "function" && define["amd"] ? define(factory()) : window["stylisRuleSheet"] = factory();
|
|
717
|
+
})(function() {
|
|
718
|
+
"use strict";
|
|
719
|
+
return function(insertRule) {
|
|
720
|
+
var delimiter = "/*|*/";
|
|
721
|
+
var needle = delimiter + "}";
|
|
722
|
+
function toSheet(block) {
|
|
723
|
+
if (block)
|
|
724
|
+
try {
|
|
725
|
+
insertRule(block + "}");
|
|
726
|
+
} catch (e) {
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
return function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {
|
|
730
|
+
switch (context) {
|
|
731
|
+
// property
|
|
732
|
+
case 1:
|
|
733
|
+
if (depth === 0 && content.charCodeAt(0) === 64)
|
|
734
|
+
return insertRule(content + ";"), "";
|
|
735
|
+
break;
|
|
736
|
+
// selector
|
|
737
|
+
case 2:
|
|
738
|
+
if (ns === 0)
|
|
739
|
+
return content + delimiter;
|
|
740
|
+
break;
|
|
741
|
+
// at-rule
|
|
742
|
+
case 3:
|
|
743
|
+
switch (ns) {
|
|
744
|
+
// @font-face, @page
|
|
745
|
+
case 102:
|
|
746
|
+
case 112:
|
|
747
|
+
return insertRule(selectors[0] + content), "";
|
|
748
|
+
default:
|
|
749
|
+
return content + (at === 0 ? delimiter : "");
|
|
750
|
+
}
|
|
751
|
+
case -2:
|
|
752
|
+
content.split(needle).forEach(toSheet);
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
|
|
760
|
+
// ../../../node_modules/react-is/cjs/react-is.production.min.js
|
|
761
|
+
var require_react_is_production_min = __commonJS({
|
|
762
|
+
"../../../node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
763
|
+
"use strict";
|
|
764
|
+
var b = "function" === typeof Symbol && Symbol.for;
|
|
765
|
+
var c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
766
|
+
var d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
|
|
767
|
+
var e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
|
|
768
|
+
var f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
|
|
769
|
+
var g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
|
|
770
|
+
var h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
|
|
771
|
+
var k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
|
|
772
|
+
var l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
|
|
773
|
+
var m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
|
|
774
|
+
var n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
|
|
775
|
+
var p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
|
|
776
|
+
var q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
|
|
777
|
+
var r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
|
|
778
|
+
var t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
|
|
779
|
+
var v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
|
|
780
|
+
var w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
|
|
781
|
+
var x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
|
|
782
|
+
var y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
783
|
+
function z(a) {
|
|
784
|
+
if ("object" === typeof a && null !== a) {
|
|
785
|
+
var u = a.$$typeof;
|
|
786
|
+
switch (u) {
|
|
787
|
+
case c:
|
|
788
|
+
switch (a = a.type, a) {
|
|
789
|
+
case l:
|
|
790
|
+
case m:
|
|
791
|
+
case e:
|
|
792
|
+
case g:
|
|
793
|
+
case f:
|
|
794
|
+
case p:
|
|
795
|
+
return a;
|
|
796
|
+
default:
|
|
797
|
+
switch (a = a && a.$$typeof, a) {
|
|
798
|
+
case k:
|
|
799
|
+
case n:
|
|
800
|
+
case t:
|
|
801
|
+
case r:
|
|
802
|
+
case h:
|
|
803
|
+
return a;
|
|
804
|
+
default:
|
|
805
|
+
return u;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
case d:
|
|
809
|
+
return u;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
function A(a) {
|
|
814
|
+
return z(a) === m;
|
|
815
|
+
}
|
|
816
|
+
exports.AsyncMode = l;
|
|
817
|
+
exports.ConcurrentMode = m;
|
|
818
|
+
exports.ContextConsumer = k;
|
|
819
|
+
exports.ContextProvider = h;
|
|
820
|
+
exports.Element = c;
|
|
821
|
+
exports.ForwardRef = n;
|
|
822
|
+
exports.Fragment = e;
|
|
823
|
+
exports.Lazy = t;
|
|
824
|
+
exports.Memo = r;
|
|
825
|
+
exports.Portal = d;
|
|
826
|
+
exports.Profiler = g;
|
|
827
|
+
exports.StrictMode = f;
|
|
828
|
+
exports.Suspense = p;
|
|
829
|
+
exports.isAsyncMode = function(a) {
|
|
830
|
+
return A(a) || z(a) === l;
|
|
831
|
+
};
|
|
832
|
+
exports.isConcurrentMode = A;
|
|
833
|
+
exports.isContextConsumer = function(a) {
|
|
834
|
+
return z(a) === k;
|
|
835
|
+
};
|
|
836
|
+
exports.isContextProvider = function(a) {
|
|
837
|
+
return z(a) === h;
|
|
838
|
+
};
|
|
839
|
+
exports.isElement = function(a) {
|
|
840
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
841
|
+
};
|
|
842
|
+
exports.isForwardRef = function(a) {
|
|
843
|
+
return z(a) === n;
|
|
844
|
+
};
|
|
845
|
+
exports.isFragment = function(a) {
|
|
846
|
+
return z(a) === e;
|
|
847
|
+
};
|
|
848
|
+
exports.isLazy = function(a) {
|
|
849
|
+
return z(a) === t;
|
|
850
|
+
};
|
|
851
|
+
exports.isMemo = function(a) {
|
|
852
|
+
return z(a) === r;
|
|
853
|
+
};
|
|
854
|
+
exports.isPortal = function(a) {
|
|
855
|
+
return z(a) === d;
|
|
856
|
+
};
|
|
857
|
+
exports.isProfiler = function(a) {
|
|
858
|
+
return z(a) === g;
|
|
859
|
+
};
|
|
860
|
+
exports.isStrictMode = function(a) {
|
|
861
|
+
return z(a) === f;
|
|
862
|
+
};
|
|
863
|
+
exports.isSuspense = function(a) {
|
|
864
|
+
return z(a) === p;
|
|
865
|
+
};
|
|
866
|
+
exports.isValidElementType = function(a) {
|
|
867
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
868
|
+
};
|
|
869
|
+
exports.typeOf = z;
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
|
|
873
|
+
// ../../../node_modules/react-is/cjs/react-is.development.js
|
|
874
|
+
var require_react_is_development = __commonJS({
|
|
875
|
+
"../../../node_modules/react-is/cjs/react-is.development.js"(exports) {
|
|
876
|
+
"use strict";
|
|
877
|
+
if (process.env.NODE_ENV !== "production") {
|
|
878
|
+
(function() {
|
|
879
|
+
"use strict";
|
|
880
|
+
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
881
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
882
|
+
var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
|
|
883
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
|
|
884
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
|
|
885
|
+
var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
|
|
886
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
|
|
887
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
|
|
888
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
|
|
889
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
|
|
890
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
|
|
891
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
|
|
892
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
|
|
893
|
+
var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
|
|
894
|
+
var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
|
|
895
|
+
var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
|
|
896
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
|
|
897
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
|
|
898
|
+
var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
899
|
+
function isValidElementType2(type) {
|
|
900
|
+
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
901
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
902
|
+
}
|
|
903
|
+
function typeOf(object) {
|
|
904
|
+
if (typeof object === "object" && object !== null) {
|
|
905
|
+
var $$typeof = object.$$typeof;
|
|
906
|
+
switch ($$typeof) {
|
|
907
|
+
case REACT_ELEMENT_TYPE:
|
|
908
|
+
var type = object.type;
|
|
909
|
+
switch (type) {
|
|
910
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
911
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
912
|
+
case REACT_FRAGMENT_TYPE:
|
|
913
|
+
case REACT_PROFILER_TYPE:
|
|
914
|
+
case REACT_STRICT_MODE_TYPE:
|
|
915
|
+
case REACT_SUSPENSE_TYPE:
|
|
916
|
+
return type;
|
|
917
|
+
default:
|
|
918
|
+
var $$typeofType = type && type.$$typeof;
|
|
919
|
+
switch ($$typeofType) {
|
|
920
|
+
case REACT_CONTEXT_TYPE:
|
|
921
|
+
case REACT_FORWARD_REF_TYPE:
|
|
922
|
+
case REACT_LAZY_TYPE:
|
|
923
|
+
case REACT_MEMO_TYPE:
|
|
924
|
+
case REACT_PROVIDER_TYPE:
|
|
925
|
+
return $$typeofType;
|
|
926
|
+
default:
|
|
927
|
+
return $$typeof;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
case REACT_PORTAL_TYPE:
|
|
931
|
+
return $$typeof;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
return void 0;
|
|
935
|
+
}
|
|
936
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
937
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
938
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
939
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
940
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
941
|
+
var ForwardRef2 = REACT_FORWARD_REF_TYPE;
|
|
942
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
943
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
944
|
+
var Memo = REACT_MEMO_TYPE;
|
|
945
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
946
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
947
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
948
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
949
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
950
|
+
function isAsyncMode(object) {
|
|
951
|
+
{
|
|
952
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
953
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
954
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
958
|
+
}
|
|
959
|
+
function isConcurrentMode(object) {
|
|
960
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
961
|
+
}
|
|
962
|
+
function isContextConsumer(object) {
|
|
963
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
964
|
+
}
|
|
965
|
+
function isContextProvider(object) {
|
|
966
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
967
|
+
}
|
|
968
|
+
function isElement2(object) {
|
|
969
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
970
|
+
}
|
|
971
|
+
function isForwardRef(object) {
|
|
972
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
973
|
+
}
|
|
974
|
+
function isFragment(object) {
|
|
975
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
976
|
+
}
|
|
977
|
+
function isLazy(object) {
|
|
978
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
979
|
+
}
|
|
980
|
+
function isMemo(object) {
|
|
981
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
982
|
+
}
|
|
983
|
+
function isPortal(object) {
|
|
984
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
985
|
+
}
|
|
986
|
+
function isProfiler(object) {
|
|
987
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
988
|
+
}
|
|
989
|
+
function isStrictMode(object) {
|
|
990
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
991
|
+
}
|
|
992
|
+
function isSuspense(object) {
|
|
993
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
994
|
+
}
|
|
995
|
+
exports.AsyncMode = AsyncMode;
|
|
996
|
+
exports.ConcurrentMode = ConcurrentMode;
|
|
997
|
+
exports.ContextConsumer = ContextConsumer;
|
|
998
|
+
exports.ContextProvider = ContextProvider;
|
|
999
|
+
exports.Element = Element;
|
|
1000
|
+
exports.ForwardRef = ForwardRef2;
|
|
1001
|
+
exports.Fragment = Fragment;
|
|
1002
|
+
exports.Lazy = Lazy;
|
|
1003
|
+
exports.Memo = Memo;
|
|
1004
|
+
exports.Portal = Portal;
|
|
1005
|
+
exports.Profiler = Profiler;
|
|
1006
|
+
exports.StrictMode = StrictMode;
|
|
1007
|
+
exports.Suspense = Suspense;
|
|
1008
|
+
exports.isAsyncMode = isAsyncMode;
|
|
1009
|
+
exports.isConcurrentMode = isConcurrentMode;
|
|
1010
|
+
exports.isContextConsumer = isContextConsumer;
|
|
1011
|
+
exports.isContextProvider = isContextProvider;
|
|
1012
|
+
exports.isElement = isElement2;
|
|
1013
|
+
exports.isForwardRef = isForwardRef;
|
|
1014
|
+
exports.isFragment = isFragment;
|
|
1015
|
+
exports.isLazy = isLazy;
|
|
1016
|
+
exports.isMemo = isMemo;
|
|
1017
|
+
exports.isPortal = isPortal;
|
|
1018
|
+
exports.isProfiler = isProfiler;
|
|
1019
|
+
exports.isStrictMode = isStrictMode;
|
|
1020
|
+
exports.isSuspense = isSuspense;
|
|
1021
|
+
exports.isValidElementType = isValidElementType2;
|
|
1022
|
+
exports.typeOf = typeOf;
|
|
1023
|
+
})();
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
});
|
|
1027
|
+
|
|
1028
|
+
// ../../../node_modules/react-is/index.js
|
|
1029
|
+
var require_react_is = __commonJS({
|
|
1030
|
+
"../../../node_modules/react-is/index.js"(exports, module) {
|
|
1031
|
+
"use strict";
|
|
1032
|
+
if (process.env.NODE_ENV === "production") {
|
|
1033
|
+
module.exports = require_react_is_production_min();
|
|
1034
|
+
} else {
|
|
1035
|
+
module.exports = require_react_is_development();
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
|
|
1040
|
+
// ../../../node_modules/object-assign/index.js
|
|
1041
|
+
var require_object_assign = __commonJS({
|
|
1042
|
+
"../../../node_modules/object-assign/index.js"(exports, module) {
|
|
1043
|
+
"use strict";
|
|
1044
|
+
var getOwnPropertySymbols2 = Object.getOwnPropertySymbols;
|
|
1045
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1046
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1047
|
+
function toObject(val) {
|
|
1048
|
+
if (val === null || val === void 0) {
|
|
1049
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
1050
|
+
}
|
|
1051
|
+
return Object(val);
|
|
1052
|
+
}
|
|
1053
|
+
function shouldUseNative() {
|
|
1054
|
+
try {
|
|
1055
|
+
if (!Object.assign) {
|
|
1056
|
+
return false;
|
|
1057
|
+
}
|
|
1058
|
+
var test1 = new String("abc");
|
|
1059
|
+
test1[5] = "de";
|
|
1060
|
+
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
1061
|
+
return false;
|
|
1062
|
+
}
|
|
1063
|
+
var test2 = {};
|
|
1064
|
+
for (var i = 0; i < 10; i++) {
|
|
1065
|
+
test2["_" + String.fromCharCode(i)] = i;
|
|
1066
|
+
}
|
|
1067
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
1068
|
+
return test2[n];
|
|
1069
|
+
});
|
|
1070
|
+
if (order2.join("") !== "0123456789") {
|
|
1071
|
+
return false;
|
|
1072
|
+
}
|
|
1073
|
+
var test3 = {};
|
|
1074
|
+
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
1075
|
+
test3[letter] = letter;
|
|
1076
|
+
});
|
|
1077
|
+
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
1078
|
+
return false;
|
|
1079
|
+
}
|
|
1080
|
+
return true;
|
|
1081
|
+
} catch (err) {
|
|
1082
|
+
return false;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
module.exports = shouldUseNative() ? Object.assign : function(target, source) {
|
|
1086
|
+
var from;
|
|
1087
|
+
var to = toObject(target);
|
|
1088
|
+
var symbols;
|
|
1089
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
1090
|
+
from = Object(arguments[s]);
|
|
1091
|
+
for (var key in from) {
|
|
1092
|
+
if (hasOwnProperty.call(from, key)) {
|
|
1093
|
+
to[key] = from[key];
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
if (getOwnPropertySymbols2) {
|
|
1097
|
+
symbols = getOwnPropertySymbols2(from);
|
|
1098
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
1099
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
1100
|
+
to[symbols[i]] = from[symbols[i]];
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
return to;
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1108
|
+
});
|
|
1109
|
+
|
|
1110
|
+
// ../../../node_modules/prop-types/lib/ReactPropTypesSecret.js
|
|
1111
|
+
var require_ReactPropTypesSecret = __commonJS({
|
|
1112
|
+
"../../../node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
|
|
1113
|
+
"use strict";
|
|
1114
|
+
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
1115
|
+
module.exports = ReactPropTypesSecret;
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
|
|
1119
|
+
// ../../../node_modules/prop-types/lib/has.js
|
|
1120
|
+
var require_has = __commonJS({
|
|
1121
|
+
"../../../node_modules/prop-types/lib/has.js"(exports, module) {
|
|
1122
|
+
"use strict";
|
|
1123
|
+
module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1126
|
+
|
|
1127
|
+
// ../../../node_modules/prop-types/checkPropTypes.js
|
|
1128
|
+
var require_checkPropTypes = __commonJS({
|
|
1129
|
+
"../../../node_modules/prop-types/checkPropTypes.js"(exports, module) {
|
|
1130
|
+
"use strict";
|
|
1131
|
+
var printWarning = function() {
|
|
1132
|
+
};
|
|
1133
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1134
|
+
ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
1135
|
+
loggedTypeFailures = {};
|
|
1136
|
+
has = require_has();
|
|
1137
|
+
printWarning = function(text) {
|
|
1138
|
+
var message = "Warning: " + text;
|
|
1139
|
+
if (typeof console !== "undefined") {
|
|
1140
|
+
console.error(message);
|
|
1141
|
+
}
|
|
1142
|
+
try {
|
|
1143
|
+
throw new Error(message);
|
|
1144
|
+
} catch (x) {
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
var ReactPropTypesSecret;
|
|
1149
|
+
var loggedTypeFailures;
|
|
1150
|
+
var has;
|
|
1151
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
1152
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1153
|
+
for (var typeSpecName in typeSpecs) {
|
|
1154
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
1155
|
+
var error;
|
|
1156
|
+
try {
|
|
1157
|
+
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
1158
|
+
var err = Error(
|
|
1159
|
+
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1160
|
+
);
|
|
1161
|
+
err.name = "Invariant Violation";
|
|
1162
|
+
throw err;
|
|
1163
|
+
}
|
|
1164
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
1165
|
+
} catch (ex) {
|
|
1166
|
+
error = ex;
|
|
1167
|
+
}
|
|
1168
|
+
if (error && !(error instanceof Error)) {
|
|
1169
|
+
printWarning(
|
|
1170
|
+
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1171
|
+
);
|
|
1172
|
+
}
|
|
1173
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1174
|
+
loggedTypeFailures[error.message] = true;
|
|
1175
|
+
var stack = getStack ? getStack() : "";
|
|
1176
|
+
printWarning(
|
|
1177
|
+
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
1178
|
+
);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
checkPropTypes.resetWarningCache = function() {
|
|
1185
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1186
|
+
loggedTypeFailures = {};
|
|
1187
|
+
}
|
|
1188
|
+
};
|
|
1189
|
+
module.exports = checkPropTypes;
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
|
|
1193
|
+
// ../../../node_modules/prop-types/factoryWithTypeCheckers.js
|
|
1194
|
+
var require_factoryWithTypeCheckers = __commonJS({
|
|
1195
|
+
"../../../node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module) {
|
|
1196
|
+
"use strict";
|
|
1197
|
+
var ReactIs = require_react_is();
|
|
1198
|
+
var assign = require_object_assign();
|
|
1199
|
+
var ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
1200
|
+
var has = require_has();
|
|
1201
|
+
var checkPropTypes = require_checkPropTypes();
|
|
1202
|
+
var printWarning = function() {
|
|
1203
|
+
};
|
|
1204
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1205
|
+
printWarning = function(text) {
|
|
1206
|
+
var message = "Warning: " + text;
|
|
1207
|
+
if (typeof console !== "undefined") {
|
|
1208
|
+
console.error(message);
|
|
1209
|
+
}
|
|
1210
|
+
try {
|
|
1211
|
+
throw new Error(message);
|
|
1212
|
+
} catch (x) {
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
function emptyFunctionThatReturnsNull() {
|
|
1217
|
+
return null;
|
|
1218
|
+
}
|
|
1219
|
+
module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
1220
|
+
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
1221
|
+
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
1222
|
+
function getIteratorFn(maybeIterable) {
|
|
1223
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
1224
|
+
if (typeof iteratorFn === "function") {
|
|
1225
|
+
return iteratorFn;
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
var ANONYMOUS = "<<anonymous>>";
|
|
1229
|
+
var ReactPropTypes = {
|
|
1230
|
+
array: createPrimitiveTypeChecker("array"),
|
|
1231
|
+
bigint: createPrimitiveTypeChecker("bigint"),
|
|
1232
|
+
bool: createPrimitiveTypeChecker("boolean"),
|
|
1233
|
+
func: createPrimitiveTypeChecker("function"),
|
|
1234
|
+
number: createPrimitiveTypeChecker("number"),
|
|
1235
|
+
object: createPrimitiveTypeChecker("object"),
|
|
1236
|
+
string: createPrimitiveTypeChecker("string"),
|
|
1237
|
+
symbol: createPrimitiveTypeChecker("symbol"),
|
|
1238
|
+
any: createAnyTypeChecker(),
|
|
1239
|
+
arrayOf: createArrayOfTypeChecker,
|
|
1240
|
+
element: createElementTypeChecker(),
|
|
1241
|
+
elementType: createElementTypeTypeChecker(),
|
|
1242
|
+
instanceOf: createInstanceTypeChecker,
|
|
1243
|
+
node: createNodeChecker(),
|
|
1244
|
+
objectOf: createObjectOfTypeChecker,
|
|
1245
|
+
oneOf: createEnumTypeChecker,
|
|
1246
|
+
oneOfType: createUnionTypeChecker,
|
|
1247
|
+
shape: createShapeTypeChecker,
|
|
1248
|
+
exact: createStrictShapeTypeChecker
|
|
1249
|
+
};
|
|
1250
|
+
function is(x, y) {
|
|
1251
|
+
if (x === y) {
|
|
1252
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
1253
|
+
} else {
|
|
1254
|
+
return x !== x && y !== y;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
function PropTypeError(message, data) {
|
|
1258
|
+
this.message = message;
|
|
1259
|
+
this.data = data && typeof data === "object" ? data : {};
|
|
1260
|
+
this.stack = "";
|
|
1261
|
+
}
|
|
1262
|
+
PropTypeError.prototype = Error.prototype;
|
|
1263
|
+
function createChainableTypeChecker(validate) {
|
|
1264
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1265
|
+
var manualPropTypeCallCache = {};
|
|
1266
|
+
var manualPropTypeWarningCount = 0;
|
|
1267
|
+
}
|
|
1268
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
1269
|
+
componentName = componentName || ANONYMOUS;
|
|
1270
|
+
propFullName = propFullName || propName;
|
|
1271
|
+
if (secret !== ReactPropTypesSecret) {
|
|
1272
|
+
if (throwOnDirectAccess) {
|
|
1273
|
+
var err = new Error(
|
|
1274
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1275
|
+
);
|
|
1276
|
+
err.name = "Invariant Violation";
|
|
1277
|
+
throw err;
|
|
1278
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
|
|
1279
|
+
var cacheKey = componentName + ":" + propName;
|
|
1280
|
+
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1281
|
+
manualPropTypeWarningCount < 3) {
|
|
1282
|
+
printWarning(
|
|
1283
|
+
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1284
|
+
);
|
|
1285
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
1286
|
+
manualPropTypeWarningCount++;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
if (props[propName] == null) {
|
|
1291
|
+
if (isRequired) {
|
|
1292
|
+
if (props[propName] === null) {
|
|
1293
|
+
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
|
|
1294
|
+
}
|
|
1295
|
+
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
|
|
1296
|
+
}
|
|
1297
|
+
return null;
|
|
1298
|
+
} else {
|
|
1299
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
1303
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
1304
|
+
return chainedCheckType;
|
|
1305
|
+
}
|
|
1306
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
1307
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
1308
|
+
var propValue = props[propName];
|
|
1309
|
+
var propType = getPropType(propValue);
|
|
1310
|
+
if (propType !== expectedType) {
|
|
1311
|
+
var preciseType = getPreciseType(propValue);
|
|
1312
|
+
return new PropTypeError(
|
|
1313
|
+
"Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
|
|
1314
|
+
{ expectedType }
|
|
1315
|
+
);
|
|
1316
|
+
}
|
|
1317
|
+
return null;
|
|
1318
|
+
}
|
|
1319
|
+
return createChainableTypeChecker(validate);
|
|
1320
|
+
}
|
|
1321
|
+
function createAnyTypeChecker() {
|
|
1322
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
1323
|
+
}
|
|
1324
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
1325
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1326
|
+
if (typeof typeChecker !== "function") {
|
|
1327
|
+
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
|
|
1328
|
+
}
|
|
1329
|
+
var propValue = props[propName];
|
|
1330
|
+
if (!Array.isArray(propValue)) {
|
|
1331
|
+
var propType = getPropType(propValue);
|
|
1332
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
|
|
1333
|
+
}
|
|
1334
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
1335
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
|
1336
|
+
if (error instanceof Error) {
|
|
1337
|
+
return error;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
return null;
|
|
1341
|
+
}
|
|
1342
|
+
return createChainableTypeChecker(validate);
|
|
1343
|
+
}
|
|
1344
|
+
function createElementTypeChecker() {
|
|
1345
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1346
|
+
var propValue = props[propName];
|
|
1347
|
+
if (!isValidElement(propValue)) {
|
|
1348
|
+
var propType = getPropType(propValue);
|
|
1349
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
1350
|
+
}
|
|
1351
|
+
return null;
|
|
1352
|
+
}
|
|
1353
|
+
return createChainableTypeChecker(validate);
|
|
1354
|
+
}
|
|
1355
|
+
function createElementTypeTypeChecker() {
|
|
1356
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1357
|
+
var propValue = props[propName];
|
|
1358
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
1359
|
+
var propType = getPropType(propValue);
|
|
1360
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
|
|
1361
|
+
}
|
|
1362
|
+
return null;
|
|
1363
|
+
}
|
|
1364
|
+
return createChainableTypeChecker(validate);
|
|
1365
|
+
}
|
|
1366
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
1367
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1368
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
1369
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1370
|
+
var actualClassName = getClassName(props[propName]);
|
|
1371
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
|
1372
|
+
}
|
|
1373
|
+
return null;
|
|
1374
|
+
}
|
|
1375
|
+
return createChainableTypeChecker(validate);
|
|
1376
|
+
}
|
|
1377
|
+
function createEnumTypeChecker(expectedValues) {
|
|
1378
|
+
if (!Array.isArray(expectedValues)) {
|
|
1379
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1380
|
+
if (arguments.length > 1) {
|
|
1381
|
+
printWarning(
|
|
1382
|
+
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1383
|
+
);
|
|
1384
|
+
} else {
|
|
1385
|
+
printWarning("Invalid argument supplied to oneOf, expected an array.");
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
return emptyFunctionThatReturnsNull;
|
|
1389
|
+
}
|
|
1390
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1391
|
+
var propValue = props[propName];
|
|
1392
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
1393
|
+
if (is(propValue, expectedValues[i])) {
|
|
1394
|
+
return null;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1398
|
+
var type = getPreciseType(value);
|
|
1399
|
+
if (type === "symbol") {
|
|
1400
|
+
return String(value);
|
|
1401
|
+
}
|
|
1402
|
+
return value;
|
|
1403
|
+
});
|
|
1404
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
|
|
1405
|
+
}
|
|
1406
|
+
return createChainableTypeChecker(validate);
|
|
1407
|
+
}
|
|
1408
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
1409
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1410
|
+
if (typeof typeChecker !== "function") {
|
|
1411
|
+
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
|
|
1412
|
+
}
|
|
1413
|
+
var propValue = props[propName];
|
|
1414
|
+
var propType = getPropType(propValue);
|
|
1415
|
+
if (propType !== "object") {
|
|
1416
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
|
|
1417
|
+
}
|
|
1418
|
+
for (var key in propValue) {
|
|
1419
|
+
if (has(propValue, key)) {
|
|
1420
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
1421
|
+
if (error instanceof Error) {
|
|
1422
|
+
return error;
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
return null;
|
|
1427
|
+
}
|
|
1428
|
+
return createChainableTypeChecker(validate);
|
|
1429
|
+
}
|
|
1430
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
1431
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
1432
|
+
process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
|
|
1433
|
+
return emptyFunctionThatReturnsNull;
|
|
1434
|
+
}
|
|
1435
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1436
|
+
var checker = arrayOfTypeCheckers[i];
|
|
1437
|
+
if (typeof checker !== "function") {
|
|
1438
|
+
printWarning(
|
|
1439
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
1440
|
+
);
|
|
1441
|
+
return emptyFunctionThatReturnsNull;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1445
|
+
var expectedTypes = [];
|
|
1446
|
+
for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
|
|
1447
|
+
var checker2 = arrayOfTypeCheckers[i2];
|
|
1448
|
+
var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
1449
|
+
if (checkerResult == null) {
|
|
1450
|
+
return null;
|
|
1451
|
+
}
|
|
1452
|
+
if (checkerResult.data && has(checkerResult.data, "expectedType")) {
|
|
1453
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
|
|
1457
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
|
|
1458
|
+
}
|
|
1459
|
+
return createChainableTypeChecker(validate);
|
|
1460
|
+
}
|
|
1461
|
+
function createNodeChecker() {
|
|
1462
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1463
|
+
if (!isNode(props[propName])) {
|
|
1464
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
|
|
1465
|
+
}
|
|
1466
|
+
return null;
|
|
1467
|
+
}
|
|
1468
|
+
return createChainableTypeChecker(validate);
|
|
1469
|
+
}
|
|
1470
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
1471
|
+
return new PropTypeError(
|
|
1472
|
+
(componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
|
|
1473
|
+
);
|
|
1474
|
+
}
|
|
1475
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
1476
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1477
|
+
var propValue = props[propName];
|
|
1478
|
+
var propType = getPropType(propValue);
|
|
1479
|
+
if (propType !== "object") {
|
|
1480
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
1481
|
+
}
|
|
1482
|
+
for (var key in shapeTypes) {
|
|
1483
|
+
var checker = shapeTypes[key];
|
|
1484
|
+
if (typeof checker !== "function") {
|
|
1485
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1486
|
+
}
|
|
1487
|
+
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
1488
|
+
if (error) {
|
|
1489
|
+
return error;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
return null;
|
|
1493
|
+
}
|
|
1494
|
+
return createChainableTypeChecker(validate);
|
|
1495
|
+
}
|
|
1496
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1497
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1498
|
+
var propValue = props[propName];
|
|
1499
|
+
var propType = getPropType(propValue);
|
|
1500
|
+
if (propType !== "object") {
|
|
1501
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
1502
|
+
}
|
|
1503
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
1504
|
+
for (var key in allKeys) {
|
|
1505
|
+
var checker = shapeTypes[key];
|
|
1506
|
+
if (has(shapeTypes, key) && typeof checker !== "function") {
|
|
1507
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1508
|
+
}
|
|
1509
|
+
if (!checker) {
|
|
1510
|
+
return new PropTypeError(
|
|
1511
|
+
"Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
|
|
1512
|
+
);
|
|
1513
|
+
}
|
|
1514
|
+
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
1515
|
+
if (error) {
|
|
1516
|
+
return error;
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
return null;
|
|
1520
|
+
}
|
|
1521
|
+
return createChainableTypeChecker(validate);
|
|
1522
|
+
}
|
|
1523
|
+
function isNode(propValue) {
|
|
1524
|
+
switch (typeof propValue) {
|
|
1525
|
+
case "number":
|
|
1526
|
+
case "string":
|
|
1527
|
+
case "undefined":
|
|
1528
|
+
return true;
|
|
1529
|
+
case "boolean":
|
|
1530
|
+
return !propValue;
|
|
1531
|
+
case "object":
|
|
1532
|
+
if (Array.isArray(propValue)) {
|
|
1533
|
+
return propValue.every(isNode);
|
|
1534
|
+
}
|
|
1535
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
1536
|
+
return true;
|
|
1537
|
+
}
|
|
1538
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
1539
|
+
if (iteratorFn) {
|
|
1540
|
+
var iterator = iteratorFn.call(propValue);
|
|
1541
|
+
var step;
|
|
1542
|
+
if (iteratorFn !== propValue.entries) {
|
|
1543
|
+
while (!(step = iterator.next()).done) {
|
|
1544
|
+
if (!isNode(step.value)) {
|
|
1545
|
+
return false;
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
} else {
|
|
1549
|
+
while (!(step = iterator.next()).done) {
|
|
1550
|
+
var entry = step.value;
|
|
1551
|
+
if (entry) {
|
|
1552
|
+
if (!isNode(entry[1])) {
|
|
1553
|
+
return false;
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
} else {
|
|
1559
|
+
return false;
|
|
1560
|
+
}
|
|
1561
|
+
return true;
|
|
1562
|
+
default:
|
|
1563
|
+
return false;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
function isSymbol2(propType, propValue) {
|
|
1567
|
+
if (propType === "symbol") {
|
|
1568
|
+
return true;
|
|
1569
|
+
}
|
|
1570
|
+
if (!propValue) {
|
|
1571
|
+
return false;
|
|
1572
|
+
}
|
|
1573
|
+
if (propValue["@@toStringTag"] === "Symbol") {
|
|
1574
|
+
return true;
|
|
1575
|
+
}
|
|
1576
|
+
if (typeof Symbol === "function" && propValue instanceof Symbol) {
|
|
1577
|
+
return true;
|
|
1578
|
+
}
|
|
1579
|
+
return false;
|
|
1580
|
+
}
|
|
1581
|
+
function getPropType(propValue) {
|
|
1582
|
+
var propType = typeof propValue;
|
|
1583
|
+
if (Array.isArray(propValue)) {
|
|
1584
|
+
return "array";
|
|
1585
|
+
}
|
|
1586
|
+
if (propValue instanceof RegExp) {
|
|
1587
|
+
return "object";
|
|
1588
|
+
}
|
|
1589
|
+
if (isSymbol2(propType, propValue)) {
|
|
1590
|
+
return "symbol";
|
|
1591
|
+
}
|
|
1592
|
+
return propType;
|
|
1593
|
+
}
|
|
1594
|
+
function getPreciseType(propValue) {
|
|
1595
|
+
if (typeof propValue === "undefined" || propValue === null) {
|
|
1596
|
+
return "" + propValue;
|
|
1597
|
+
}
|
|
1598
|
+
var propType = getPropType(propValue);
|
|
1599
|
+
if (propType === "object") {
|
|
1600
|
+
if (propValue instanceof Date) {
|
|
1601
|
+
return "date";
|
|
1602
|
+
} else if (propValue instanceof RegExp) {
|
|
1603
|
+
return "regexp";
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
return propType;
|
|
1607
|
+
}
|
|
1608
|
+
function getPostfixForTypeWarning(value) {
|
|
1609
|
+
var type = getPreciseType(value);
|
|
1610
|
+
switch (type) {
|
|
1611
|
+
case "array":
|
|
1612
|
+
case "object":
|
|
1613
|
+
return "an " + type;
|
|
1614
|
+
case "boolean":
|
|
1615
|
+
case "date":
|
|
1616
|
+
case "regexp":
|
|
1617
|
+
return "a " + type;
|
|
1618
|
+
default:
|
|
1619
|
+
return type;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
function getClassName(propValue) {
|
|
1623
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1624
|
+
return ANONYMOUS;
|
|
1625
|
+
}
|
|
1626
|
+
return propValue.constructor.name;
|
|
1627
|
+
}
|
|
1628
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
1629
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
1630
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1631
|
+
return ReactPropTypes;
|
|
1632
|
+
};
|
|
1633
|
+
}
|
|
1634
|
+
});
|
|
1635
|
+
|
|
1636
|
+
// ../../../node_modules/prop-types/factoryWithThrowingShims.js
|
|
1637
|
+
var require_factoryWithThrowingShims = __commonJS({
|
|
1638
|
+
"../../../node_modules/prop-types/factoryWithThrowingShims.js"(exports, module) {
|
|
1639
|
+
"use strict";
|
|
1640
|
+
var ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
1641
|
+
function emptyFunction() {
|
|
1642
|
+
}
|
|
1643
|
+
function emptyFunctionWithReset() {
|
|
1644
|
+
}
|
|
1645
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1646
|
+
module.exports = function() {
|
|
1647
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1648
|
+
if (secret === ReactPropTypesSecret) {
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
var err = new Error(
|
|
1652
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1653
|
+
);
|
|
1654
|
+
err.name = "Invariant Violation";
|
|
1655
|
+
throw err;
|
|
1656
|
+
}
|
|
1657
|
+
;
|
|
1658
|
+
shim.isRequired = shim;
|
|
1659
|
+
function getShim() {
|
|
1660
|
+
return shim;
|
|
1661
|
+
}
|
|
1662
|
+
;
|
|
1663
|
+
var ReactPropTypes = {
|
|
1664
|
+
array: shim,
|
|
1665
|
+
bigint: shim,
|
|
1666
|
+
bool: shim,
|
|
1667
|
+
func: shim,
|
|
1668
|
+
number: shim,
|
|
1669
|
+
object: shim,
|
|
1670
|
+
string: shim,
|
|
1671
|
+
symbol: shim,
|
|
1672
|
+
any: shim,
|
|
1673
|
+
arrayOf: getShim,
|
|
1674
|
+
element: shim,
|
|
1675
|
+
elementType: shim,
|
|
1676
|
+
instanceOf: getShim,
|
|
1677
|
+
node: shim,
|
|
1678
|
+
objectOf: getShim,
|
|
1679
|
+
oneOf: getShim,
|
|
1680
|
+
oneOfType: getShim,
|
|
1681
|
+
shape: getShim,
|
|
1682
|
+
exact: getShim,
|
|
1683
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
1684
|
+
resetWarningCache: emptyFunction
|
|
1685
|
+
};
|
|
1686
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1687
|
+
return ReactPropTypes;
|
|
1688
|
+
};
|
|
1689
|
+
}
|
|
1690
|
+
});
|
|
1691
|
+
|
|
1692
|
+
// ../../../node_modules/prop-types/index.js
|
|
1693
|
+
var require_prop_types = __commonJS({
|
|
1694
|
+
"../../../node_modules/prop-types/index.js"(exports, module) {
|
|
1695
|
+
"use strict";
|
|
1696
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1697
|
+
ReactIs = require_react_is();
|
|
1698
|
+
throwOnDirectAccess = true;
|
|
1699
|
+
module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
1700
|
+
} else {
|
|
1701
|
+
module.exports = require_factoryWithThrowingShims()();
|
|
1702
|
+
}
|
|
1703
|
+
var ReactIs;
|
|
1704
|
+
var throwOnDirectAccess;
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
|
|
1708
|
+
// src/OtherCard.tsx
|
|
1709
|
+
import React4 from "react";
|
|
1710
|
+
|
|
1711
|
+
// ../../foundation/primitives-web/src/Box.tsx
|
|
1712
|
+
import React3 from "react";
|
|
1713
|
+
|
|
1714
|
+
// ../../../node_modules/styled-components/dist/styled-components.esm.js
|
|
1715
|
+
var import_stylis = __toESM(require_stylis_min());
|
|
1716
|
+
var import_stylis_rule_sheet = __toESM(require_stylis_rule_sheet());
|
|
1717
|
+
import React, { cloneElement, createContext, Component, createElement } from "react";
|
|
1718
|
+
|
|
1719
|
+
// ../../../node_modules/@emotion/unitless/dist/unitless.esm.js
|
|
1720
|
+
var unitlessKeys = {
|
|
1721
|
+
animationIterationCount: 1,
|
|
1722
|
+
borderImageOutset: 1,
|
|
1723
|
+
borderImageSlice: 1,
|
|
1724
|
+
borderImageWidth: 1,
|
|
1725
|
+
boxFlex: 1,
|
|
1726
|
+
boxFlexGroup: 1,
|
|
1727
|
+
boxOrdinalGroup: 1,
|
|
1728
|
+
columnCount: 1,
|
|
1729
|
+
columns: 1,
|
|
1730
|
+
flex: 1,
|
|
1731
|
+
flexGrow: 1,
|
|
1732
|
+
flexPositive: 1,
|
|
1733
|
+
flexShrink: 1,
|
|
1734
|
+
flexNegative: 1,
|
|
1735
|
+
flexOrder: 1,
|
|
1736
|
+
gridRow: 1,
|
|
1737
|
+
gridRowEnd: 1,
|
|
1738
|
+
gridRowSpan: 1,
|
|
1739
|
+
gridRowStart: 1,
|
|
1740
|
+
gridColumn: 1,
|
|
1741
|
+
gridColumnEnd: 1,
|
|
1742
|
+
gridColumnSpan: 1,
|
|
1743
|
+
gridColumnStart: 1,
|
|
1744
|
+
msGridRow: 1,
|
|
1745
|
+
msGridRowSpan: 1,
|
|
1746
|
+
msGridColumn: 1,
|
|
1747
|
+
msGridColumnSpan: 1,
|
|
1748
|
+
fontWeight: 1,
|
|
1749
|
+
lineHeight: 1,
|
|
1750
|
+
opacity: 1,
|
|
1751
|
+
order: 1,
|
|
1752
|
+
orphans: 1,
|
|
1753
|
+
tabSize: 1,
|
|
1754
|
+
widows: 1,
|
|
1755
|
+
zIndex: 1,
|
|
1756
|
+
zoom: 1,
|
|
1757
|
+
WebkitLineClamp: 1,
|
|
1758
|
+
// SVG-related properties
|
|
1759
|
+
fillOpacity: 1,
|
|
1760
|
+
floodOpacity: 1,
|
|
1761
|
+
stopOpacity: 1,
|
|
1762
|
+
strokeDasharray: 1,
|
|
1763
|
+
strokeDashoffset: 1,
|
|
1764
|
+
strokeMiterlimit: 1,
|
|
1765
|
+
strokeOpacity: 1,
|
|
1766
|
+
strokeWidth: 1
|
|
1767
|
+
};
|
|
1768
|
+
var unitless_esm_default = unitlessKeys;
|
|
1769
|
+
|
|
1770
|
+
// ../../../node_modules/styled-components/dist/styled-components.esm.js
|
|
1771
|
+
var import_react_is = __toESM(require_react_is());
|
|
1772
|
+
|
|
1773
|
+
// ../../../node_modules/memoize-one/dist/memoize-one.esm.js
|
|
1774
|
+
var safeIsNaN = Number.isNaN || function ponyfill(value) {
|
|
1775
|
+
return typeof value === "number" && value !== value;
|
|
1776
|
+
};
|
|
1777
|
+
function isEqual(first, second) {
|
|
1778
|
+
if (first === second) {
|
|
1779
|
+
return true;
|
|
1780
|
+
}
|
|
1781
|
+
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
1782
|
+
return true;
|
|
1783
|
+
}
|
|
1784
|
+
return false;
|
|
1785
|
+
}
|
|
1786
|
+
function areInputsEqual(newInputs, lastInputs) {
|
|
1787
|
+
if (newInputs.length !== lastInputs.length) {
|
|
1788
|
+
return false;
|
|
1789
|
+
}
|
|
1790
|
+
for (var i = 0; i < newInputs.length; i++) {
|
|
1791
|
+
if (!isEqual(newInputs[i], lastInputs[i])) {
|
|
1792
|
+
return false;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
return true;
|
|
1796
|
+
}
|
|
1797
|
+
function memoizeOne(resultFn, isEqual2) {
|
|
1798
|
+
if (isEqual2 === void 0) {
|
|
1799
|
+
isEqual2 = areInputsEqual;
|
|
1800
|
+
}
|
|
1801
|
+
var lastThis;
|
|
1802
|
+
var lastArgs = [];
|
|
1803
|
+
var lastResult;
|
|
1804
|
+
var calledOnce = false;
|
|
1805
|
+
function memoized() {
|
|
1806
|
+
var newArgs = [];
|
|
1807
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1808
|
+
newArgs[_i] = arguments[_i];
|
|
1809
|
+
}
|
|
1810
|
+
if (calledOnce && lastThis === this && isEqual2(newArgs, lastArgs)) {
|
|
1811
|
+
return lastResult;
|
|
1812
|
+
}
|
|
1813
|
+
lastResult = resultFn.apply(this, newArgs);
|
|
1814
|
+
calledOnce = true;
|
|
1815
|
+
lastThis = this;
|
|
1816
|
+
lastArgs = newArgs;
|
|
1817
|
+
return lastResult;
|
|
1818
|
+
}
|
|
1819
|
+
return memoized;
|
|
1820
|
+
}
|
|
1821
|
+
var memoize_one_esm_default = memoizeOne;
|
|
1822
|
+
|
|
1823
|
+
// ../../../node_modules/styled-components/dist/styled-components.esm.js
|
|
1824
|
+
var import_prop_types = __toESM(require_prop_types());
|
|
1825
|
+
import stream from "stream";
|
|
1826
|
+
|
|
1827
|
+
// ../../../node_modules/@emotion/memoize/dist/memoize.esm.js
|
|
1828
|
+
function memoize(fn) {
|
|
1829
|
+
var cache = {};
|
|
1830
|
+
return function(arg) {
|
|
1831
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
1832
|
+
return cache[arg];
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
var memoize_esm_default = memoize;
|
|
1836
|
+
|
|
1837
|
+
// ../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
|
|
1838
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|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)-.*))$/;
|
|
1839
|
+
var index = memoize_esm_default(
|
|
1840
|
+
function(prop) {
|
|
1841
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
1842
|
+
}
|
|
1843
|
+
/* Z+1 */
|
|
1844
|
+
);
|
|
1845
|
+
var is_prop_valid_esm_default = index;
|
|
1846
|
+
|
|
1847
|
+
// ../../../node_modules/is-what/dist/index.esm.js
|
|
1848
|
+
function getType(payload) {
|
|
1849
|
+
return Object.prototype.toString.call(payload).slice(8, -1);
|
|
1850
|
+
}
|
|
1851
|
+
function isUndefined(payload) {
|
|
1852
|
+
return getType(payload) === "Undefined";
|
|
1853
|
+
}
|
|
1854
|
+
function isNull(payload) {
|
|
1855
|
+
return getType(payload) === "Null";
|
|
1856
|
+
}
|
|
1857
|
+
function isPlainObject(payload) {
|
|
1858
|
+
if (getType(payload) !== "Object")
|
|
1859
|
+
return false;
|
|
1860
|
+
return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
|
|
1861
|
+
}
|
|
1862
|
+
function isArray(payload) {
|
|
1863
|
+
return getType(payload) === "Array";
|
|
1864
|
+
}
|
|
1865
|
+
function isSymbol(payload) {
|
|
1866
|
+
return getType(payload) === "Symbol";
|
|
1867
|
+
}
|
|
1868
|
+
var isNullOrUndefined = isOneOf(isNull, isUndefined);
|
|
1869
|
+
function isOneOf(a, b, c, d, e) {
|
|
1870
|
+
return function(value) {
|
|
1871
|
+
return a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
|
|
1872
|
+
};
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
// ../../../node_modules/merge-anything/dist/index.esm.js
|
|
1876
|
+
function __spreadArrays() {
|
|
1877
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
1878
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
1879
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
1880
|
+
r[k] = a[j];
|
|
1881
|
+
return r;
|
|
1882
|
+
}
|
|
1883
|
+
function assignProp(carry, key, newVal, originalObject) {
|
|
1884
|
+
var propType = originalObject.propertyIsEnumerable(key) ? "enumerable" : "nonenumerable";
|
|
1885
|
+
if (propType === "enumerable")
|
|
1886
|
+
carry[key] = newVal;
|
|
1887
|
+
if (propType === "nonenumerable") {
|
|
1888
|
+
Object.defineProperty(carry, key, {
|
|
1889
|
+
value: newVal,
|
|
1890
|
+
enumerable: false,
|
|
1891
|
+
writable: true,
|
|
1892
|
+
configurable: true
|
|
1893
|
+
});
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
function mergeRecursively(origin, newComer, extensions) {
|
|
1897
|
+
if (!isPlainObject(newComer)) {
|
|
1898
|
+
if (extensions && isArray(extensions)) {
|
|
1899
|
+
extensions.forEach(function(extend) {
|
|
1900
|
+
newComer = extend(origin, newComer);
|
|
1901
|
+
});
|
|
1902
|
+
}
|
|
1903
|
+
return newComer;
|
|
1904
|
+
}
|
|
1905
|
+
var newObject = {};
|
|
1906
|
+
if (isPlainObject(origin)) {
|
|
1907
|
+
var props_1 = Object.getOwnPropertyNames(origin);
|
|
1908
|
+
var symbols_1 = Object.getOwnPropertySymbols(origin);
|
|
1909
|
+
newObject = __spreadArrays(props_1, symbols_1).reduce(function(carry, key) {
|
|
1910
|
+
var targetVal = origin[key];
|
|
1911
|
+
if (!isSymbol(key) && !Object.getOwnPropertyNames(newComer).includes(key) || isSymbol(key) && !Object.getOwnPropertySymbols(newComer).includes(key)) {
|
|
1912
|
+
assignProp(carry, key, targetVal, origin);
|
|
1913
|
+
}
|
|
1914
|
+
return carry;
|
|
1915
|
+
}, {});
|
|
1916
|
+
}
|
|
1917
|
+
var props = Object.getOwnPropertyNames(newComer);
|
|
1918
|
+
var symbols = Object.getOwnPropertySymbols(newComer);
|
|
1919
|
+
var result = __spreadArrays(props, symbols).reduce(function(carry, key) {
|
|
1920
|
+
var newVal = newComer[key];
|
|
1921
|
+
var targetVal = isPlainObject(origin) ? origin[key] : void 0;
|
|
1922
|
+
if (extensions && isArray(extensions)) {
|
|
1923
|
+
extensions.forEach(function(extend) {
|
|
1924
|
+
newVal = extend(targetVal, newVal);
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
if (targetVal !== void 0 && isPlainObject(newVal)) {
|
|
1928
|
+
newVal = mergeRecursively(targetVal, newVal, extensions);
|
|
1929
|
+
}
|
|
1930
|
+
assignProp(carry, key, newVal, newComer);
|
|
1931
|
+
return carry;
|
|
1932
|
+
}, newObject);
|
|
1933
|
+
return result;
|
|
1934
|
+
}
|
|
1935
|
+
function merge(origin) {
|
|
1936
|
+
var newComers = [];
|
|
1937
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1938
|
+
newComers[_i - 1] = arguments[_i];
|
|
1939
|
+
}
|
|
1940
|
+
var extensions = null;
|
|
1941
|
+
var base = origin;
|
|
1942
|
+
if (isPlainObject(origin) && origin.extensions && Object.keys(origin).length === 1) {
|
|
1943
|
+
base = {};
|
|
1944
|
+
extensions = origin.extensions;
|
|
1945
|
+
}
|
|
1946
|
+
return newComers.reduce(function(result, newComer) {
|
|
1947
|
+
return mergeRecursively(result, newComer, extensions);
|
|
1948
|
+
}, base);
|
|
1949
|
+
}
|
|
1950
|
+
var index_esm_default = merge;
|
|
1951
|
+
|
|
1952
|
+
// ../../../node_modules/styled-components/dist/styled-components.esm.js
|
|
1953
|
+
var interleave = (function(strings, interpolations) {
|
|
1954
|
+
var result = [strings[0]];
|
|
1955
|
+
for (var i = 0, len = interpolations.length; i < len; i += 1) {
|
|
1956
|
+
result.push(interpolations[i], strings[i + 1]);
|
|
1957
|
+
}
|
|
1958
|
+
return result;
|
|
1959
|
+
});
|
|
1960
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
1961
|
+
return typeof obj;
|
|
1962
|
+
} : function(obj) {
|
|
1963
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1964
|
+
};
|
|
1965
|
+
var classCallCheck = function(instance, Constructor) {
|
|
1966
|
+
if (!(instance instanceof Constructor)) {
|
|
1967
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1968
|
+
}
|
|
1969
|
+
};
|
|
1970
|
+
var createClass = /* @__PURE__ */ (function() {
|
|
1971
|
+
function defineProperties(target, props) {
|
|
1972
|
+
for (var i = 0; i < props.length; i++) {
|
|
1973
|
+
var descriptor = props[i];
|
|
1974
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1975
|
+
descriptor.configurable = true;
|
|
1976
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1977
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
return function(Constructor, protoProps, staticProps) {
|
|
1981
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
1982
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
1983
|
+
return Constructor;
|
|
1984
|
+
};
|
|
1985
|
+
})();
|
|
1986
|
+
var _extends = Object.assign || function(target) {
|
|
1987
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1988
|
+
var source = arguments[i];
|
|
1989
|
+
for (var key in source) {
|
|
1990
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1991
|
+
target[key] = source[key];
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
return target;
|
|
1996
|
+
};
|
|
1997
|
+
var inherits = function(subClass, superClass) {
|
|
1998
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
1999
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
2000
|
+
}
|
|
2001
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
2002
|
+
constructor: {
|
|
2003
|
+
value: subClass,
|
|
2004
|
+
enumerable: false,
|
|
2005
|
+
writable: true,
|
|
2006
|
+
configurable: true
|
|
2007
|
+
}
|
|
2008
|
+
});
|
|
2009
|
+
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
2010
|
+
};
|
|
2011
|
+
var objectWithoutProperties = function(obj, keys) {
|
|
2012
|
+
var target = {};
|
|
2013
|
+
for (var i in obj) {
|
|
2014
|
+
if (keys.indexOf(i) >= 0) continue;
|
|
2015
|
+
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
|
|
2016
|
+
target[i] = obj[i];
|
|
2017
|
+
}
|
|
2018
|
+
return target;
|
|
2019
|
+
};
|
|
2020
|
+
var possibleConstructorReturn = function(self, call) {
|
|
2021
|
+
if (!self) {
|
|
2022
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2023
|
+
}
|
|
2024
|
+
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
2025
|
+
};
|
|
2026
|
+
var isPlainObject2 = (function(x) {
|
|
2027
|
+
return (typeof x === "undefined" ? "undefined" : _typeof(x)) === "object" && x.constructor === Object;
|
|
2028
|
+
});
|
|
2029
|
+
var EMPTY_ARRAY = Object.freeze([]);
|
|
2030
|
+
var EMPTY_OBJECT = Object.freeze({});
|
|
2031
|
+
function isFunction(test) {
|
|
2032
|
+
return typeof test === "function";
|
|
2033
|
+
}
|
|
2034
|
+
function getComponentName(target) {
|
|
2035
|
+
return (process.env.NODE_ENV !== "production" ? typeof target === "string" && target : false) || target.displayName || target.name || "Component";
|
|
2036
|
+
}
|
|
2037
|
+
function isStatelessFunction(test) {
|
|
2038
|
+
return typeof test === "function" && !(test.prototype && test.prototype.isReactComponent);
|
|
2039
|
+
}
|
|
2040
|
+
function isStyledComponent(target) {
|
|
2041
|
+
return target && typeof target.styledComponentId === "string";
|
|
2042
|
+
}
|
|
2043
|
+
var SC_ATTR = typeof process !== "undefined" && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled";
|
|
2044
|
+
var SC_VERSION_ATTR = "data-styled-version";
|
|
2045
|
+
var SC_STREAM_ATTR = "data-styled-streamed";
|
|
2046
|
+
var IS_BROWSER = typeof window !== "undefined" && "HTMLElement" in window;
|
|
2047
|
+
var DISABLE_SPEEDY = typeof SC_DISABLE_SPEEDY === "boolean" && SC_DISABLE_SPEEDY || typeof process !== "undefined" && (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY) || process.env.NODE_ENV !== "production";
|
|
2048
|
+
var ERRORS = process.env.NODE_ENV !== "production" ? {
|
|
2049
|
+
"1": "Cannot create styled-component for component: %s.\n\n",
|
|
2050
|
+
"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.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",
|
|
2051
|
+
"3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
|
|
2052
|
+
"4": "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",
|
|
2053
|
+
"5": "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",
|
|
2054
|
+
"6": "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",
|
|
2055
|
+
"7": 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',
|
|
2056
|
+
"8": 'ThemeProvider: Please make your "theme" prop an object.\n\n',
|
|
2057
|
+
"9": "Missing document `<head>`\n\n",
|
|
2058
|
+
"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\n\n",
|
|
2059
|
+
"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.\n\n",
|
|
2060
|
+
"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",
|
|
2061
|
+
"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.\n"
|
|
2062
|
+
} : {};
|
|
2063
|
+
function format() {
|
|
2064
|
+
var a = arguments.length <= 0 ? void 0 : arguments[0];
|
|
2065
|
+
var b = [];
|
|
2066
|
+
for (var c = 1, len = arguments.length; c < len; c += 1) {
|
|
2067
|
+
b.push(arguments.length <= c ? void 0 : arguments[c]);
|
|
2068
|
+
}
|
|
2069
|
+
b.forEach(function(d) {
|
|
2070
|
+
a = a.replace(/%[a-z]/, d);
|
|
2071
|
+
});
|
|
2072
|
+
return a;
|
|
2073
|
+
}
|
|
2074
|
+
var StyledComponentsError = (function(_Error) {
|
|
2075
|
+
inherits(StyledComponentsError2, _Error);
|
|
2076
|
+
function StyledComponentsError2(code) {
|
|
2077
|
+
classCallCheck(this, StyledComponentsError2);
|
|
2078
|
+
for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2079
|
+
interpolations[_key - 1] = arguments[_key];
|
|
2080
|
+
}
|
|
2081
|
+
if (process.env.NODE_ENV === "production") {
|
|
2082
|
+
var _this = possibleConstructorReturn(this, _Error.call(this, "An error occurred. See https://github.com/styled-components/styled-components/blob/master/packages/styled-components/src/utils/errors.md#" + code + " for more information." + (interpolations.length > 0 ? " Additional arguments: " + interpolations.join(", ") : "")));
|
|
2083
|
+
} else {
|
|
2084
|
+
var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(interpolations)).trim()));
|
|
2085
|
+
}
|
|
2086
|
+
return possibleConstructorReturn(_this);
|
|
2087
|
+
}
|
|
2088
|
+
return StyledComponentsError2;
|
|
2089
|
+
})(Error);
|
|
2090
|
+
var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
|
|
2091
|
+
var extractComps = (function(maybeCSS) {
|
|
2092
|
+
var css2 = "" + (maybeCSS || "");
|
|
2093
|
+
var existingComponents = [];
|
|
2094
|
+
css2.replace(SC_COMPONENT_ID, function(match, componentId, matchIndex) {
|
|
2095
|
+
existingComponents.push({ componentId, matchIndex });
|
|
2096
|
+
return match;
|
|
2097
|
+
});
|
|
2098
|
+
return existingComponents.map(function(_ref, i) {
|
|
2099
|
+
var componentId = _ref.componentId, matchIndex = _ref.matchIndex;
|
|
2100
|
+
var nextComp = existingComponents[i + 1];
|
|
2101
|
+
var cssFromDOM = nextComp ? css2.slice(matchIndex, nextComp.matchIndex) : css2.slice(matchIndex);
|
|
2102
|
+
return { componentId, cssFromDOM };
|
|
2103
|
+
});
|
|
2104
|
+
});
|
|
2105
|
+
var COMMENT_REGEX = /^\s*\/\/.*$/gm;
|
|
2106
|
+
var stylisSplitter = new import_stylis.default({
|
|
2107
|
+
global: false,
|
|
2108
|
+
cascade: true,
|
|
2109
|
+
keyframe: false,
|
|
2110
|
+
prefix: false,
|
|
2111
|
+
compress: false,
|
|
2112
|
+
semicolon: true
|
|
2113
|
+
});
|
|
2114
|
+
var stylis = new import_stylis.default({
|
|
2115
|
+
global: false,
|
|
2116
|
+
cascade: true,
|
|
2117
|
+
keyframe: false,
|
|
2118
|
+
prefix: true,
|
|
2119
|
+
compress: false,
|
|
2120
|
+
semicolon: false
|
|
2121
|
+
// NOTE: This means "autocomplete missing semicolons"
|
|
2122
|
+
});
|
|
2123
|
+
var parsingRules = [];
|
|
2124
|
+
var returnRulesPlugin = function returnRulesPlugin2(context) {
|
|
2125
|
+
if (context === -2) {
|
|
2126
|
+
var parsedRules = parsingRules;
|
|
2127
|
+
parsingRules = [];
|
|
2128
|
+
return parsedRules;
|
|
2129
|
+
}
|
|
2130
|
+
};
|
|
2131
|
+
var parseRulesPlugin = (0, import_stylis_rule_sheet.default)(function(rule) {
|
|
2132
|
+
parsingRules.push(rule);
|
|
2133
|
+
});
|
|
2134
|
+
var _componentId = void 0;
|
|
2135
|
+
var _selector = void 0;
|
|
2136
|
+
var _selectorRegexp = void 0;
|
|
2137
|
+
var selfReferenceReplacer = function selfReferenceReplacer2(match, offset, string) {
|
|
2138
|
+
if (
|
|
2139
|
+
// the first self-ref is always untouched
|
|
2140
|
+
offset > 0 && // there should be at least two self-refs to do a replacement (.b > .b)
|
|
2141
|
+
string.slice(0, offset).indexOf(_selector) !== -1 && // no consecutive self refs (.b.b); that is a precedence boost and treated differently
|
|
2142
|
+
string.slice(offset - _selector.length, offset) !== _selector
|
|
2143
|
+
) {
|
|
2144
|
+
return "." + _componentId;
|
|
2145
|
+
}
|
|
2146
|
+
return match;
|
|
2147
|
+
};
|
|
2148
|
+
var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin2(context, _, selectors) {
|
|
2149
|
+
if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
|
|
2150
|
+
selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
|
|
2154
|
+
stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
|
|
2155
|
+
var splitByRules = function splitByRules2(css2) {
|
|
2156
|
+
return stylisSplitter("", css2);
|
|
2157
|
+
};
|
|
2158
|
+
function stringifyRules(rules, selector, prefix) {
|
|
2159
|
+
var componentId = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "&";
|
|
2160
|
+
var flatCSS = rules.join("").replace(COMMENT_REGEX, "");
|
|
2161
|
+
var cssStr = selector && prefix ? prefix + " " + selector + " { " + flatCSS + " }" : flatCSS;
|
|
2162
|
+
_componentId = componentId;
|
|
2163
|
+
_selector = selector;
|
|
2164
|
+
_selectorRegexp = new RegExp("\\" + _selector + "\\b", "g");
|
|
2165
|
+
return stylis(prefix || !selector ? "" : selector, cssStr);
|
|
2166
|
+
}
|
|
2167
|
+
var getNonce = (function() {
|
|
2168
|
+
return typeof __webpack_nonce__ !== "undefined" ? __webpack_nonce__ : null;
|
|
2169
|
+
});
|
|
2170
|
+
var addNameForId = function addNameForId2(names, id, name) {
|
|
2171
|
+
if (name) {
|
|
2172
|
+
var namesForId = names[id] || (names[id] = /* @__PURE__ */ Object.create(null));
|
|
2173
|
+
namesForId[name] = true;
|
|
2174
|
+
}
|
|
2175
|
+
};
|
|
2176
|
+
var resetIdNames = function resetIdNames2(names, id) {
|
|
2177
|
+
names[id] = /* @__PURE__ */ Object.create(null);
|
|
2178
|
+
};
|
|
2179
|
+
var hasNameForId = function hasNameForId2(names) {
|
|
2180
|
+
return function(id, name) {
|
|
2181
|
+
return names[id] !== void 0 && names[id][name];
|
|
2182
|
+
};
|
|
2183
|
+
};
|
|
2184
|
+
var stringifyNames = function stringifyNames2(names) {
|
|
2185
|
+
var str = "";
|
|
2186
|
+
for (var id in names) {
|
|
2187
|
+
str += Object.keys(names[id]).join(" ") + " ";
|
|
2188
|
+
}
|
|
2189
|
+
return str.trim();
|
|
2190
|
+
};
|
|
2191
|
+
var cloneNames = function cloneNames2(names) {
|
|
2192
|
+
var clone = /* @__PURE__ */ Object.create(null);
|
|
2193
|
+
for (var id in names) {
|
|
2194
|
+
clone[id] = _extends({}, names[id]);
|
|
2195
|
+
}
|
|
2196
|
+
return clone;
|
|
2197
|
+
};
|
|
2198
|
+
var sheetForTag = function sheetForTag2(tag) {
|
|
2199
|
+
if (tag.sheet) return tag.sheet;
|
|
2200
|
+
var size = tag.ownerDocument.styleSheets.length;
|
|
2201
|
+
for (var i = 0; i < size; i += 1) {
|
|
2202
|
+
var sheet = tag.ownerDocument.styleSheets[i];
|
|
2203
|
+
if (sheet.ownerNode === tag) return sheet;
|
|
2204
|
+
}
|
|
2205
|
+
throw new StyledComponentsError(10);
|
|
2206
|
+
};
|
|
2207
|
+
var safeInsertRule = function safeInsertRule2(sheet, cssRule, index2) {
|
|
2208
|
+
if (!cssRule) return false;
|
|
2209
|
+
var maxIndex = sheet.cssRules.length;
|
|
2210
|
+
try {
|
|
2211
|
+
sheet.insertRule(cssRule, index2 <= maxIndex ? index2 : maxIndex);
|
|
2212
|
+
} catch (err) {
|
|
2213
|
+
return false;
|
|
2214
|
+
}
|
|
2215
|
+
return true;
|
|
2216
|
+
};
|
|
2217
|
+
var deleteRules = function deleteRules2(sheet, removalIndex, size) {
|
|
2218
|
+
var lowerBound = removalIndex - size;
|
|
2219
|
+
for (var i = removalIndex; i > lowerBound; i -= 1) {
|
|
2220
|
+
sheet.deleteRule(i);
|
|
2221
|
+
}
|
|
2222
|
+
};
|
|
2223
|
+
var makeTextMarker = function makeTextMarker2(id) {
|
|
2224
|
+
return "\n/* sc-component-id: " + id + " */\n";
|
|
2225
|
+
};
|
|
2226
|
+
var addUpUntilIndex = function addUpUntilIndex2(sizes, index2) {
|
|
2227
|
+
var totalUpToIndex = 0;
|
|
2228
|
+
for (var i = 0; i <= index2; i += 1) {
|
|
2229
|
+
totalUpToIndex += sizes[i];
|
|
2230
|
+
}
|
|
2231
|
+
return totalUpToIndex;
|
|
2232
|
+
};
|
|
2233
|
+
var makeStyleTag = function makeStyleTag2(target, tagEl, insertBefore) {
|
|
2234
|
+
var targetDocument = document;
|
|
2235
|
+
if (target) targetDocument = target.ownerDocument;
|
|
2236
|
+
else if (tagEl) targetDocument = tagEl.ownerDocument;
|
|
2237
|
+
var el = targetDocument.createElement("style");
|
|
2238
|
+
el.setAttribute(SC_ATTR, "");
|
|
2239
|
+
el.setAttribute(SC_VERSION_ATTR, "4.4.1");
|
|
2240
|
+
var nonce = getNonce();
|
|
2241
|
+
if (nonce) {
|
|
2242
|
+
el.setAttribute("nonce", nonce);
|
|
2243
|
+
}
|
|
2244
|
+
el.appendChild(targetDocument.createTextNode(""));
|
|
2245
|
+
if (target && !tagEl) {
|
|
2246
|
+
target.appendChild(el);
|
|
2247
|
+
} else {
|
|
2248
|
+
if (!tagEl || !target || !tagEl.parentNode) {
|
|
2249
|
+
throw new StyledComponentsError(6);
|
|
2250
|
+
}
|
|
2251
|
+
tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
|
|
2252
|
+
}
|
|
2253
|
+
return el;
|
|
2254
|
+
};
|
|
2255
|
+
var wrapAsHtmlTag = function wrapAsHtmlTag2(css2, names) {
|
|
2256
|
+
return function(additionalAttrs) {
|
|
2257
|
+
var nonce = getNonce();
|
|
2258
|
+
var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="4.4.1"', additionalAttrs];
|
|
2259
|
+
var htmlAttr = attrs.filter(Boolean).join(" ");
|
|
2260
|
+
return "<style " + htmlAttr + ">" + css2() + "</style>";
|
|
2261
|
+
};
|
|
2262
|
+
};
|
|
2263
|
+
var wrapAsElement = function wrapAsElement2(css2, names) {
|
|
2264
|
+
return function() {
|
|
2265
|
+
var _props;
|
|
2266
|
+
var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
|
|
2267
|
+
var nonce = getNonce();
|
|
2268
|
+
if (nonce) {
|
|
2269
|
+
props.nonce = nonce;
|
|
2270
|
+
}
|
|
2271
|
+
return React.createElement("style", _extends({}, props, { dangerouslySetInnerHTML: { __html: css2() } }));
|
|
2272
|
+
};
|
|
2273
|
+
};
|
|
2274
|
+
var getIdsFromMarkersFactory = function getIdsFromMarkersFactory2(markers) {
|
|
2275
|
+
return function() {
|
|
2276
|
+
return Object.keys(markers);
|
|
2277
|
+
};
|
|
2278
|
+
};
|
|
2279
|
+
var makeSpeedyTag = function makeSpeedyTag2(el, getImportRuleTag) {
|
|
2280
|
+
var names = /* @__PURE__ */ Object.create(null);
|
|
2281
|
+
var markers = /* @__PURE__ */ Object.create(null);
|
|
2282
|
+
var sizes = [];
|
|
2283
|
+
var extractImport = getImportRuleTag !== void 0;
|
|
2284
|
+
var usedImportRuleTag = false;
|
|
2285
|
+
var insertMarker = function insertMarker2(id) {
|
|
2286
|
+
var prev = markers[id];
|
|
2287
|
+
if (prev !== void 0) {
|
|
2288
|
+
return prev;
|
|
2289
|
+
}
|
|
2290
|
+
markers[id] = sizes.length;
|
|
2291
|
+
sizes.push(0);
|
|
2292
|
+
resetIdNames(names, id);
|
|
2293
|
+
return markers[id];
|
|
2294
|
+
};
|
|
2295
|
+
var insertRules = function insertRules2(id, cssRules, name) {
|
|
2296
|
+
var marker = insertMarker(id);
|
|
2297
|
+
var sheet = sheetForTag(el);
|
|
2298
|
+
var insertIndex = addUpUntilIndex(sizes, marker);
|
|
2299
|
+
var injectedRules = 0;
|
|
2300
|
+
var importRules = [];
|
|
2301
|
+
var cssRulesSize = cssRules.length;
|
|
2302
|
+
for (var i = 0; i < cssRulesSize; i += 1) {
|
|
2303
|
+
var cssRule = cssRules[i];
|
|
2304
|
+
var mayHaveImport = extractImport;
|
|
2305
|
+
if (mayHaveImport && cssRule.indexOf("@import") !== -1) {
|
|
2306
|
+
importRules.push(cssRule);
|
|
2307
|
+
} else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
|
|
2308
|
+
mayHaveImport = false;
|
|
2309
|
+
injectedRules += 1;
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
if (extractImport && importRules.length > 0) {
|
|
2313
|
+
usedImportRuleTag = true;
|
|
2314
|
+
getImportRuleTag().insertRules(id + "-import", importRules);
|
|
2315
|
+
}
|
|
2316
|
+
sizes[marker] += injectedRules;
|
|
2317
|
+
addNameForId(names, id, name);
|
|
2318
|
+
};
|
|
2319
|
+
var removeRules = function removeRules2(id) {
|
|
2320
|
+
var marker = markers[id];
|
|
2321
|
+
if (marker === void 0) return;
|
|
2322
|
+
if (el.isConnected === false) return;
|
|
2323
|
+
var size = sizes[marker];
|
|
2324
|
+
var sheet = sheetForTag(el);
|
|
2325
|
+
var removalIndex = addUpUntilIndex(sizes, marker) - 1;
|
|
2326
|
+
deleteRules(sheet, removalIndex, size);
|
|
2327
|
+
sizes[marker] = 0;
|
|
2328
|
+
resetIdNames(names, id);
|
|
2329
|
+
if (extractImport && usedImportRuleTag) {
|
|
2330
|
+
getImportRuleTag().removeRules(id + "-import");
|
|
2331
|
+
}
|
|
2332
|
+
};
|
|
2333
|
+
var css2 = function css3() {
|
|
2334
|
+
var _sheetForTag = sheetForTag(el), cssRules = _sheetForTag.cssRules;
|
|
2335
|
+
var str = "";
|
|
2336
|
+
for (var id in markers) {
|
|
2337
|
+
str += makeTextMarker(id);
|
|
2338
|
+
var marker = markers[id];
|
|
2339
|
+
var end = addUpUntilIndex(sizes, marker);
|
|
2340
|
+
var size = sizes[marker];
|
|
2341
|
+
for (var i = end - size; i < end; i += 1) {
|
|
2342
|
+
var rule = cssRules[i];
|
|
2343
|
+
if (rule !== void 0) {
|
|
2344
|
+
str += rule.cssText;
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
return str;
|
|
2349
|
+
};
|
|
2350
|
+
return {
|
|
2351
|
+
clone: function clone() {
|
|
2352
|
+
throw new StyledComponentsError(5);
|
|
2353
|
+
},
|
|
2354
|
+
css: css2,
|
|
2355
|
+
getIds: getIdsFromMarkersFactory(markers),
|
|
2356
|
+
hasNameForId: hasNameForId(names),
|
|
2357
|
+
insertMarker,
|
|
2358
|
+
insertRules,
|
|
2359
|
+
removeRules,
|
|
2360
|
+
sealed: false,
|
|
2361
|
+
styleTag: el,
|
|
2362
|
+
toElement: wrapAsElement(css2, names),
|
|
2363
|
+
toHTML: wrapAsHtmlTag(css2, names)
|
|
2364
|
+
};
|
|
2365
|
+
};
|
|
2366
|
+
var makeTextNode = function makeTextNode2(targetDocument, id) {
|
|
2367
|
+
return targetDocument.createTextNode(makeTextMarker(id));
|
|
2368
|
+
};
|
|
2369
|
+
var makeBrowserTag = function makeBrowserTag2(el, getImportRuleTag) {
|
|
2370
|
+
var names = /* @__PURE__ */ Object.create(null);
|
|
2371
|
+
var markers = /* @__PURE__ */ Object.create(null);
|
|
2372
|
+
var extractImport = getImportRuleTag !== void 0;
|
|
2373
|
+
var usedImportRuleTag = false;
|
|
2374
|
+
var insertMarker = function insertMarker2(id) {
|
|
2375
|
+
var prev = markers[id];
|
|
2376
|
+
if (prev !== void 0) {
|
|
2377
|
+
return prev;
|
|
2378
|
+
}
|
|
2379
|
+
markers[id] = makeTextNode(el.ownerDocument, id);
|
|
2380
|
+
el.appendChild(markers[id]);
|
|
2381
|
+
names[id] = /* @__PURE__ */ Object.create(null);
|
|
2382
|
+
return markers[id];
|
|
2383
|
+
};
|
|
2384
|
+
var insertRules = function insertRules2(id, cssRules, name) {
|
|
2385
|
+
var marker = insertMarker(id);
|
|
2386
|
+
var importRules = [];
|
|
2387
|
+
var cssRulesSize = cssRules.length;
|
|
2388
|
+
for (var i = 0; i < cssRulesSize; i += 1) {
|
|
2389
|
+
var rule = cssRules[i];
|
|
2390
|
+
var mayHaveImport = extractImport;
|
|
2391
|
+
if (mayHaveImport && rule.indexOf("@import") !== -1) {
|
|
2392
|
+
importRules.push(rule);
|
|
2393
|
+
} else {
|
|
2394
|
+
mayHaveImport = false;
|
|
2395
|
+
var separator = i === cssRulesSize - 1 ? "" : " ";
|
|
2396
|
+
marker.appendData("" + rule + separator);
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
addNameForId(names, id, name);
|
|
2400
|
+
if (extractImport && importRules.length > 0) {
|
|
2401
|
+
usedImportRuleTag = true;
|
|
2402
|
+
getImportRuleTag().insertRules(id + "-import", importRules);
|
|
2403
|
+
}
|
|
2404
|
+
};
|
|
2405
|
+
var removeRules = function removeRules2(id) {
|
|
2406
|
+
var marker = markers[id];
|
|
2407
|
+
if (marker === void 0) return;
|
|
2408
|
+
var newMarker = makeTextNode(el.ownerDocument, id);
|
|
2409
|
+
el.replaceChild(newMarker, marker);
|
|
2410
|
+
markers[id] = newMarker;
|
|
2411
|
+
resetIdNames(names, id);
|
|
2412
|
+
if (extractImport && usedImportRuleTag) {
|
|
2413
|
+
getImportRuleTag().removeRules(id + "-import");
|
|
2414
|
+
}
|
|
2415
|
+
};
|
|
2416
|
+
var css2 = function css3() {
|
|
2417
|
+
var str = "";
|
|
2418
|
+
for (var id in markers) {
|
|
2419
|
+
str += markers[id].data;
|
|
2420
|
+
}
|
|
2421
|
+
return str;
|
|
2422
|
+
};
|
|
2423
|
+
return {
|
|
2424
|
+
clone: function clone() {
|
|
2425
|
+
throw new StyledComponentsError(5);
|
|
2426
|
+
},
|
|
2427
|
+
css: css2,
|
|
2428
|
+
getIds: getIdsFromMarkersFactory(markers),
|
|
2429
|
+
hasNameForId: hasNameForId(names),
|
|
2430
|
+
insertMarker,
|
|
2431
|
+
insertRules,
|
|
2432
|
+
removeRules,
|
|
2433
|
+
sealed: false,
|
|
2434
|
+
styleTag: el,
|
|
2435
|
+
toElement: wrapAsElement(css2, names),
|
|
2436
|
+
toHTML: wrapAsHtmlTag(css2, names)
|
|
2437
|
+
};
|
|
2438
|
+
};
|
|
2439
|
+
var makeServerTag = function makeServerTag2(namesArg, markersArg) {
|
|
2440
|
+
var names = namesArg === void 0 ? /* @__PURE__ */ Object.create(null) : namesArg;
|
|
2441
|
+
var markers = markersArg === void 0 ? /* @__PURE__ */ Object.create(null) : markersArg;
|
|
2442
|
+
var insertMarker = function insertMarker2(id) {
|
|
2443
|
+
var prev = markers[id];
|
|
2444
|
+
if (prev !== void 0) {
|
|
2445
|
+
return prev;
|
|
2446
|
+
}
|
|
2447
|
+
return markers[id] = [""];
|
|
2448
|
+
};
|
|
2449
|
+
var insertRules = function insertRules2(id, cssRules, name) {
|
|
2450
|
+
var marker = insertMarker(id);
|
|
2451
|
+
marker[0] += cssRules.join(" ");
|
|
2452
|
+
addNameForId(names, id, name);
|
|
2453
|
+
};
|
|
2454
|
+
var removeRules = function removeRules2(id) {
|
|
2455
|
+
var marker = markers[id];
|
|
2456
|
+
if (marker === void 0) return;
|
|
2457
|
+
marker[0] = "";
|
|
2458
|
+
resetIdNames(names, id);
|
|
2459
|
+
};
|
|
2460
|
+
var css2 = function css3() {
|
|
2461
|
+
var str = "";
|
|
2462
|
+
for (var id in markers) {
|
|
2463
|
+
var cssForId = markers[id][0];
|
|
2464
|
+
if (cssForId) {
|
|
2465
|
+
str += makeTextMarker(id) + cssForId;
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
return str;
|
|
2469
|
+
};
|
|
2470
|
+
var clone = function clone2() {
|
|
2471
|
+
var namesClone = cloneNames(names);
|
|
2472
|
+
var markersClone = /* @__PURE__ */ Object.create(null);
|
|
2473
|
+
for (var id in markers) {
|
|
2474
|
+
markersClone[id] = [markers[id][0]];
|
|
2475
|
+
}
|
|
2476
|
+
return makeServerTag2(namesClone, markersClone);
|
|
2477
|
+
};
|
|
2478
|
+
var tag = {
|
|
2479
|
+
clone,
|
|
2480
|
+
css: css2,
|
|
2481
|
+
getIds: getIdsFromMarkersFactory(markers),
|
|
2482
|
+
hasNameForId: hasNameForId(names),
|
|
2483
|
+
insertMarker,
|
|
2484
|
+
insertRules,
|
|
2485
|
+
removeRules,
|
|
2486
|
+
sealed: false,
|
|
2487
|
+
styleTag: null,
|
|
2488
|
+
toElement: wrapAsElement(css2, names),
|
|
2489
|
+
toHTML: wrapAsHtmlTag(css2, names)
|
|
2490
|
+
};
|
|
2491
|
+
return tag;
|
|
2492
|
+
};
|
|
2493
|
+
var makeTag = function makeTag2(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
|
|
2494
|
+
if (IS_BROWSER && !forceServer) {
|
|
2495
|
+
var el = makeStyleTag(target, tagEl, insertBefore);
|
|
2496
|
+
if (DISABLE_SPEEDY) {
|
|
2497
|
+
return makeBrowserTag(el, getImportRuleTag);
|
|
2498
|
+
} else {
|
|
2499
|
+
return makeSpeedyTag(el, getImportRuleTag);
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
return makeServerTag();
|
|
2503
|
+
};
|
|
2504
|
+
var rehydrate = function rehydrate2(tag, els, extracted) {
|
|
2505
|
+
for (var i = 0, len = extracted.length; i < len; i += 1) {
|
|
2506
|
+
var _extracted$i = extracted[i], componentId = _extracted$i.componentId, cssFromDOM = _extracted$i.cssFromDOM;
|
|
2507
|
+
var cssRules = splitByRules(cssFromDOM);
|
|
2508
|
+
tag.insertRules(componentId, cssRules);
|
|
2509
|
+
}
|
|
2510
|
+
for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
|
|
2511
|
+
var el = els[_i];
|
|
2512
|
+
if (el.parentNode) {
|
|
2513
|
+
el.parentNode.removeChild(el);
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
};
|
|
2517
|
+
var SPLIT_REGEX = /\s+/;
|
|
2518
|
+
var MAX_SIZE = void 0;
|
|
2519
|
+
if (IS_BROWSER) {
|
|
2520
|
+
MAX_SIZE = DISABLE_SPEEDY ? 40 : 1e3;
|
|
2521
|
+
} else {
|
|
2522
|
+
MAX_SIZE = -1;
|
|
2523
|
+
}
|
|
2524
|
+
var sheetRunningId = 0;
|
|
2525
|
+
var master = void 0;
|
|
2526
|
+
var StyleSheet = (function() {
|
|
2527
|
+
function StyleSheet2() {
|
|
2528
|
+
var _this = this;
|
|
2529
|
+
var target = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : IS_BROWSER ? document.head : null;
|
|
2530
|
+
var forceServer = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
2531
|
+
classCallCheck(this, StyleSheet2);
|
|
2532
|
+
this.getImportRuleTag = function() {
|
|
2533
|
+
var importRuleTag = _this.importRuleTag;
|
|
2534
|
+
if (importRuleTag !== void 0) {
|
|
2535
|
+
return importRuleTag;
|
|
2536
|
+
}
|
|
2537
|
+
var firstTag = _this.tags[0];
|
|
2538
|
+
var insertBefore = true;
|
|
2539
|
+
return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
|
|
2540
|
+
};
|
|
2541
|
+
sheetRunningId += 1;
|
|
2542
|
+
this.id = sheetRunningId;
|
|
2543
|
+
this.forceServer = forceServer;
|
|
2544
|
+
this.target = forceServer ? null : target;
|
|
2545
|
+
this.tagMap = {};
|
|
2546
|
+
this.deferred = {};
|
|
2547
|
+
this.rehydratedNames = {};
|
|
2548
|
+
this.ignoreRehydratedNames = {};
|
|
2549
|
+
this.tags = [];
|
|
2550
|
+
this.capacity = 1;
|
|
2551
|
+
this.clones = [];
|
|
2552
|
+
}
|
|
2553
|
+
StyleSheet2.prototype.rehydrate = function rehydrate$$1() {
|
|
2554
|
+
if (!IS_BROWSER || this.forceServer) return this;
|
|
2555
|
+
var els = [];
|
|
2556
|
+
var extracted = [];
|
|
2557
|
+
var isStreamed = false;
|
|
2558
|
+
var nodes = document.querySelectorAll("style[" + SC_ATTR + "][" + SC_VERSION_ATTR + '="4.4.1"]');
|
|
2559
|
+
var nodesSize = nodes.length;
|
|
2560
|
+
if (!nodesSize) return this;
|
|
2561
|
+
for (var i = 0; i < nodesSize; i += 1) {
|
|
2562
|
+
var el = nodes[i];
|
|
2563
|
+
if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
|
|
2564
|
+
var elNames = (el.getAttribute(SC_ATTR) || "").trim().split(SPLIT_REGEX);
|
|
2565
|
+
var elNamesSize = elNames.length;
|
|
2566
|
+
for (var j = 0, name; j < elNamesSize; j += 1) {
|
|
2567
|
+
name = elNames[j];
|
|
2568
|
+
this.rehydratedNames[name] = true;
|
|
2569
|
+
}
|
|
2570
|
+
extracted.push.apply(extracted, extractComps(el.textContent));
|
|
2571
|
+
els.push(el);
|
|
2572
|
+
}
|
|
2573
|
+
var extractedSize = extracted.length;
|
|
2574
|
+
if (!extractedSize) return this;
|
|
2575
|
+
var tag = this.makeTag(null);
|
|
2576
|
+
rehydrate(tag, els, extracted);
|
|
2577
|
+
this.capacity = Math.max(1, MAX_SIZE - extractedSize);
|
|
2578
|
+
this.tags.push(tag);
|
|
2579
|
+
for (var _j = 0; _j < extractedSize; _j += 1) {
|
|
2580
|
+
this.tagMap[extracted[_j].componentId] = tag;
|
|
2581
|
+
}
|
|
2582
|
+
return this;
|
|
2583
|
+
};
|
|
2584
|
+
StyleSheet2.reset = function reset() {
|
|
2585
|
+
var forceServer = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2586
|
+
master = new StyleSheet2(void 0, forceServer).rehydrate();
|
|
2587
|
+
};
|
|
2588
|
+
StyleSheet2.prototype.clone = function clone() {
|
|
2589
|
+
var sheet = new StyleSheet2(this.target, this.forceServer);
|
|
2590
|
+
this.clones.push(sheet);
|
|
2591
|
+
sheet.tags = this.tags.map(function(tag) {
|
|
2592
|
+
var ids = tag.getIds();
|
|
2593
|
+
var newTag = tag.clone();
|
|
2594
|
+
for (var i = 0; i < ids.length; i += 1) {
|
|
2595
|
+
sheet.tagMap[ids[i]] = newTag;
|
|
2596
|
+
}
|
|
2597
|
+
return newTag;
|
|
2598
|
+
});
|
|
2599
|
+
sheet.rehydratedNames = _extends({}, this.rehydratedNames);
|
|
2600
|
+
sheet.deferred = _extends({}, this.deferred);
|
|
2601
|
+
return sheet;
|
|
2602
|
+
};
|
|
2603
|
+
StyleSheet2.prototype.sealAllTags = function sealAllTags() {
|
|
2604
|
+
this.capacity = 1;
|
|
2605
|
+
this.tags.forEach(function(tag) {
|
|
2606
|
+
tag.sealed = true;
|
|
2607
|
+
});
|
|
2608
|
+
};
|
|
2609
|
+
StyleSheet2.prototype.makeTag = function makeTag$$1(tag) {
|
|
2610
|
+
var lastEl = tag ? tag.styleTag : null;
|
|
2611
|
+
var insertBefore = false;
|
|
2612
|
+
return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
|
|
2613
|
+
};
|
|
2614
|
+
StyleSheet2.prototype.getTagForId = function getTagForId(id) {
|
|
2615
|
+
var prev = this.tagMap[id];
|
|
2616
|
+
if (prev !== void 0 && !prev.sealed) {
|
|
2617
|
+
return prev;
|
|
2618
|
+
}
|
|
2619
|
+
var tag = this.tags[this.tags.length - 1];
|
|
2620
|
+
this.capacity -= 1;
|
|
2621
|
+
if (this.capacity === 0) {
|
|
2622
|
+
this.capacity = MAX_SIZE;
|
|
2623
|
+
tag = this.makeTag(tag);
|
|
2624
|
+
this.tags.push(tag);
|
|
2625
|
+
}
|
|
2626
|
+
return this.tagMap[id] = tag;
|
|
2627
|
+
};
|
|
2628
|
+
StyleSheet2.prototype.hasId = function hasId(id) {
|
|
2629
|
+
return this.tagMap[id] !== void 0;
|
|
2630
|
+
};
|
|
2631
|
+
StyleSheet2.prototype.hasNameForId = function hasNameForId3(id, name) {
|
|
2632
|
+
if (this.ignoreRehydratedNames[id] === void 0 && this.rehydratedNames[name]) {
|
|
2633
|
+
return true;
|
|
2634
|
+
}
|
|
2635
|
+
var tag = this.tagMap[id];
|
|
2636
|
+
return tag !== void 0 && tag.hasNameForId(id, name);
|
|
2637
|
+
};
|
|
2638
|
+
StyleSheet2.prototype.deferredInject = function deferredInject(id, cssRules) {
|
|
2639
|
+
if (this.tagMap[id] !== void 0) return;
|
|
2640
|
+
var clones = this.clones;
|
|
2641
|
+
for (var i = 0; i < clones.length; i += 1) {
|
|
2642
|
+
clones[i].deferredInject(id, cssRules);
|
|
2643
|
+
}
|
|
2644
|
+
this.getTagForId(id).insertMarker(id);
|
|
2645
|
+
this.deferred[id] = cssRules;
|
|
2646
|
+
};
|
|
2647
|
+
StyleSheet2.prototype.inject = function inject(id, cssRules, name) {
|
|
2648
|
+
var clones = this.clones;
|
|
2649
|
+
for (var i = 0; i < clones.length; i += 1) {
|
|
2650
|
+
clones[i].inject(id, cssRules, name);
|
|
2651
|
+
}
|
|
2652
|
+
var tag = this.getTagForId(id);
|
|
2653
|
+
if (this.deferred[id] !== void 0) {
|
|
2654
|
+
var rules = this.deferred[id].concat(cssRules);
|
|
2655
|
+
tag.insertRules(id, rules, name);
|
|
2656
|
+
this.deferred[id] = void 0;
|
|
2657
|
+
} else {
|
|
2658
|
+
tag.insertRules(id, cssRules, name);
|
|
2659
|
+
}
|
|
2660
|
+
};
|
|
2661
|
+
StyleSheet2.prototype.remove = function remove(id) {
|
|
2662
|
+
var tag = this.tagMap[id];
|
|
2663
|
+
if (tag === void 0) return;
|
|
2664
|
+
var clones = this.clones;
|
|
2665
|
+
for (var i = 0; i < clones.length; i += 1) {
|
|
2666
|
+
clones[i].remove(id);
|
|
2667
|
+
}
|
|
2668
|
+
tag.removeRules(id);
|
|
2669
|
+
this.ignoreRehydratedNames[id] = true;
|
|
2670
|
+
this.deferred[id] = void 0;
|
|
2671
|
+
};
|
|
2672
|
+
StyleSheet2.prototype.toHTML = function toHTML() {
|
|
2673
|
+
return this.tags.map(function(tag) {
|
|
2674
|
+
return tag.toHTML();
|
|
2675
|
+
}).join("");
|
|
2676
|
+
};
|
|
2677
|
+
StyleSheet2.prototype.toReactElements = function toReactElements() {
|
|
2678
|
+
var id = this.id;
|
|
2679
|
+
return this.tags.map(function(tag, i) {
|
|
2680
|
+
var key = "sc-" + id + "-" + i;
|
|
2681
|
+
return cloneElement(tag.toElement(), { key });
|
|
2682
|
+
});
|
|
2683
|
+
};
|
|
2684
|
+
createClass(StyleSheet2, null, [{
|
|
2685
|
+
key: "master",
|
|
2686
|
+
get: function get$$1() {
|
|
2687
|
+
return master || (master = new StyleSheet2().rehydrate());
|
|
2688
|
+
}
|
|
2689
|
+
/* NOTE: This is just for backwards-compatibility with jest-styled-components */
|
|
2690
|
+
}, {
|
|
2691
|
+
key: "instance",
|
|
2692
|
+
get: function get$$1() {
|
|
2693
|
+
return StyleSheet2.master;
|
|
2694
|
+
}
|
|
2695
|
+
}]);
|
|
2696
|
+
return StyleSheet2;
|
|
2697
|
+
})();
|
|
2698
|
+
var Keyframes = (function() {
|
|
2699
|
+
function Keyframes2(name, rules) {
|
|
2700
|
+
var _this = this;
|
|
2701
|
+
classCallCheck(this, Keyframes2);
|
|
2702
|
+
this.inject = function(styleSheet) {
|
|
2703
|
+
if (!styleSheet.hasNameForId(_this.id, _this.name)) {
|
|
2704
|
+
styleSheet.inject(_this.id, _this.rules, _this.name);
|
|
2705
|
+
}
|
|
2706
|
+
};
|
|
2707
|
+
this.toString = function() {
|
|
2708
|
+
throw new StyledComponentsError(12, String(_this.name));
|
|
2709
|
+
};
|
|
2710
|
+
this.name = name;
|
|
2711
|
+
this.rules = rules;
|
|
2712
|
+
this.id = "sc-keyframes-" + name;
|
|
2713
|
+
}
|
|
2714
|
+
Keyframes2.prototype.getName = function getName() {
|
|
2715
|
+
return this.name;
|
|
2716
|
+
};
|
|
2717
|
+
return Keyframes2;
|
|
2718
|
+
})();
|
|
2719
|
+
var uppercasePattern = /([A-Z])/g;
|
|
2720
|
+
var msPattern = /^ms-/;
|
|
2721
|
+
function hyphenateStyleName(string) {
|
|
2722
|
+
return string.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern, "-ms-");
|
|
2723
|
+
}
|
|
2724
|
+
function addUnitIfNeeded(name, value) {
|
|
2725
|
+
if (value == null || typeof value === "boolean" || value === "") {
|
|
2726
|
+
return "";
|
|
2727
|
+
}
|
|
2728
|
+
if (typeof value === "number" && value !== 0 && !(name in unitless_esm_default)) {
|
|
2729
|
+
return value + "px";
|
|
2730
|
+
}
|
|
2731
|
+
return String(value).trim();
|
|
2732
|
+
}
|
|
2733
|
+
var isFalsish = function isFalsish2(chunk) {
|
|
2734
|
+
return chunk === void 0 || chunk === null || chunk === false || chunk === "";
|
|
2735
|
+
};
|
|
2736
|
+
var objToCssArray = function objToCssArray2(obj, prevKey) {
|
|
2737
|
+
var rules = [];
|
|
2738
|
+
var keys = Object.keys(obj);
|
|
2739
|
+
keys.forEach(function(key) {
|
|
2740
|
+
if (!isFalsish(obj[key])) {
|
|
2741
|
+
if (isPlainObject2(obj[key])) {
|
|
2742
|
+
rules.push.apply(rules, objToCssArray2(obj[key], key));
|
|
2743
|
+
return rules;
|
|
2744
|
+
} else if (isFunction(obj[key])) {
|
|
2745
|
+
rules.push(hyphenateStyleName(key) + ":", obj[key], ";");
|
|
2746
|
+
return rules;
|
|
2747
|
+
}
|
|
2748
|
+
rules.push(hyphenateStyleName(key) + ": " + addUnitIfNeeded(key, obj[key]) + ";");
|
|
2749
|
+
}
|
|
2750
|
+
return rules;
|
|
2751
|
+
});
|
|
2752
|
+
return prevKey ? [prevKey + " {"].concat(rules, ["}"]) : rules;
|
|
2753
|
+
};
|
|
2754
|
+
function flatten(chunk, executionContext, styleSheet) {
|
|
2755
|
+
if (Array.isArray(chunk)) {
|
|
2756
|
+
var ruleSet = [];
|
|
2757
|
+
for (var i = 0, len = chunk.length, result; i < len; i += 1) {
|
|
2758
|
+
result = flatten(chunk[i], executionContext, styleSheet);
|
|
2759
|
+
if (result === null) continue;
|
|
2760
|
+
else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);
|
|
2761
|
+
else ruleSet.push(result);
|
|
2762
|
+
}
|
|
2763
|
+
return ruleSet;
|
|
2764
|
+
}
|
|
2765
|
+
if (isFalsish(chunk)) {
|
|
2766
|
+
return null;
|
|
2767
|
+
}
|
|
2768
|
+
if (isStyledComponent(chunk)) {
|
|
2769
|
+
return "." + chunk.styledComponentId;
|
|
2770
|
+
}
|
|
2771
|
+
if (isFunction(chunk)) {
|
|
2772
|
+
if (isStatelessFunction(chunk) && executionContext) {
|
|
2773
|
+
var _result = chunk(executionContext);
|
|
2774
|
+
if (process.env.NODE_ENV !== "production" && (0, import_react_is.isElement)(_result)) {
|
|
2775
|
+
console.warn(getComponentName(chunk) + " 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.");
|
|
2776
|
+
}
|
|
2777
|
+
return flatten(_result, executionContext, styleSheet);
|
|
2778
|
+
} else return chunk;
|
|
2779
|
+
}
|
|
2780
|
+
if (chunk instanceof Keyframes) {
|
|
2781
|
+
if (styleSheet) {
|
|
2782
|
+
chunk.inject(styleSheet);
|
|
2783
|
+
return chunk.getName();
|
|
2784
|
+
} else return chunk;
|
|
2785
|
+
}
|
|
2786
|
+
return isPlainObject2(chunk) ? objToCssArray(chunk) : chunk.toString();
|
|
2787
|
+
}
|
|
2788
|
+
function css(styles) {
|
|
2789
|
+
for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2790
|
+
interpolations[_key - 1] = arguments[_key];
|
|
2791
|
+
}
|
|
2792
|
+
if (isFunction(styles) || isPlainObject2(styles)) {
|
|
2793
|
+
return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
|
|
2794
|
+
}
|
|
2795
|
+
return flatten(interleave(styles, interpolations));
|
|
2796
|
+
}
|
|
2797
|
+
function constructWithOptions(componentConstructor, tag) {
|
|
2798
|
+
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : EMPTY_OBJECT;
|
|
2799
|
+
if (!(0, import_react_is.isValidElementType)(tag)) {
|
|
2800
|
+
throw new StyledComponentsError(1, String(tag));
|
|
2801
|
+
}
|
|
2802
|
+
var templateFunction = function templateFunction2() {
|
|
2803
|
+
return componentConstructor(tag, options, css.apply(void 0, arguments));
|
|
2804
|
+
};
|
|
2805
|
+
templateFunction.withConfig = function(config) {
|
|
2806
|
+
return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
|
|
2807
|
+
};
|
|
2808
|
+
templateFunction.attrs = function(attrs) {
|
|
2809
|
+
return constructWithOptions(componentConstructor, tag, _extends({}, options, {
|
|
2810
|
+
attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
|
|
2811
|
+
}));
|
|
2812
|
+
};
|
|
2813
|
+
return templateFunction;
|
|
2814
|
+
}
|
|
2815
|
+
function murmurhash(c) {
|
|
2816
|
+
for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4; ) {
|
|
2817
|
+
b = c.charCodeAt(d) & 255 | (c.charCodeAt(++d) & 255) << 8 | (c.charCodeAt(++d) & 255) << 16 | (c.charCodeAt(++d) & 255) << 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), b ^= b >>> 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16) ^ b, e -= 4, ++d;
|
|
2818
|
+
}
|
|
2819
|
+
switch (e) {
|
|
2820
|
+
case 3:
|
|
2821
|
+
a ^= (c.charCodeAt(d + 2) & 255) << 16;
|
|
2822
|
+
case 2:
|
|
2823
|
+
a ^= (c.charCodeAt(d + 1) & 255) << 8;
|
|
2824
|
+
case 1:
|
|
2825
|
+
a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
|
|
2826
|
+
}
|
|
2827
|
+
a ^= a >>> 13;
|
|
2828
|
+
a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
|
|
2829
|
+
return (a ^ a >>> 15) >>> 0;
|
|
2830
|
+
}
|
|
2831
|
+
var charsLength = 52;
|
|
2832
|
+
var getAlphabeticChar = function getAlphabeticChar2(code) {
|
|
2833
|
+
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
2834
|
+
};
|
|
2835
|
+
function generateAlphabeticName(code) {
|
|
2836
|
+
var name = "";
|
|
2837
|
+
var x = void 0;
|
|
2838
|
+
for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
|
|
2839
|
+
name = getAlphabeticChar(x % charsLength) + name;
|
|
2840
|
+
}
|
|
2841
|
+
return getAlphabeticChar(x % charsLength) + name;
|
|
2842
|
+
}
|
|
2843
|
+
function hasFunctionObjectKey(obj) {
|
|
2844
|
+
for (var key in obj) {
|
|
2845
|
+
if (isFunction(obj[key])) {
|
|
2846
|
+
return true;
|
|
2847
|
+
}
|
|
2848
|
+
}
|
|
2849
|
+
return false;
|
|
2850
|
+
}
|
|
2851
|
+
function isStaticRules(rules, attrs) {
|
|
2852
|
+
for (var i = 0; i < rules.length; i += 1) {
|
|
2853
|
+
var rule = rules[i];
|
|
2854
|
+
if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
|
|
2855
|
+
return false;
|
|
2856
|
+
} else if (isFunction(rule) && !isStyledComponent(rule)) {
|
|
2857
|
+
return false;
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
if (attrs.some(function(x) {
|
|
2861
|
+
return isFunction(x) || hasFunctionObjectKey(x);
|
|
2862
|
+
})) return false;
|
|
2863
|
+
return true;
|
|
2864
|
+
}
|
|
2865
|
+
var hasher = function hasher2(str) {
|
|
2866
|
+
return generateAlphabeticName(murmurhash(str));
|
|
2867
|
+
};
|
|
2868
|
+
var ComponentStyle = (function() {
|
|
2869
|
+
function ComponentStyle2(rules, attrs, componentId) {
|
|
2870
|
+
classCallCheck(this, ComponentStyle2);
|
|
2871
|
+
this.rules = rules;
|
|
2872
|
+
this.isStatic = process.env.NODE_ENV === "production" && isStaticRules(rules, attrs);
|
|
2873
|
+
this.componentId = componentId;
|
|
2874
|
+
if (!StyleSheet.master.hasId(componentId)) {
|
|
2875
|
+
StyleSheet.master.deferredInject(componentId, []);
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
ComponentStyle2.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
|
|
2879
|
+
var isStatic = this.isStatic, componentId = this.componentId, lastClassName = this.lastClassName;
|
|
2880
|
+
if (IS_BROWSER && isStatic && typeof lastClassName === "string" && styleSheet.hasNameForId(componentId, lastClassName)) {
|
|
2881
|
+
return lastClassName;
|
|
2882
|
+
}
|
|
2883
|
+
var flatCSS = flatten(this.rules, executionContext, styleSheet);
|
|
2884
|
+
var name = hasher(this.componentId + flatCSS.join(""));
|
|
2885
|
+
if (!styleSheet.hasNameForId(componentId, name)) {
|
|
2886
|
+
styleSheet.inject(this.componentId, stringifyRules(flatCSS, "." + name, void 0, componentId), name);
|
|
2887
|
+
}
|
|
2888
|
+
this.lastClassName = name;
|
|
2889
|
+
return name;
|
|
2890
|
+
};
|
|
2891
|
+
ComponentStyle2.generateName = function generateName(str) {
|
|
2892
|
+
return hasher(str);
|
|
2893
|
+
};
|
|
2894
|
+
return ComponentStyle2;
|
|
2895
|
+
})();
|
|
2896
|
+
var LIMIT = 200;
|
|
2897
|
+
var createWarnTooManyClasses = (function(displayName) {
|
|
2898
|
+
var generatedClasses = {};
|
|
2899
|
+
var warningSeen = false;
|
|
2900
|
+
return function(className) {
|
|
2901
|
+
if (!warningSeen) {
|
|
2902
|
+
generatedClasses[className] = true;
|
|
2903
|
+
if (Object.keys(generatedClasses).length >= LIMIT) {
|
|
2904
|
+
console.warn("Over " + LIMIT + " classes were generated for component " + displayName + ". \nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />");
|
|
2905
|
+
warningSeen = true;
|
|
2906
|
+
generatedClasses = {};
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
};
|
|
2910
|
+
});
|
|
2911
|
+
var determineTheme = (function(props, fallbackTheme) {
|
|
2912
|
+
var defaultProps = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : EMPTY_OBJECT;
|
|
2913
|
+
var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
|
|
2914
|
+
var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
|
|
2915
|
+
return theme;
|
|
2916
|
+
});
|
|
2917
|
+
var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
|
|
2918
|
+
var dashesAtEnds = /(^-|-$)/g;
|
|
2919
|
+
function escape(str) {
|
|
2920
|
+
return str.replace(escapeRegex, "-").replace(dashesAtEnds, "");
|
|
2921
|
+
}
|
|
2922
|
+
function isTag(target) {
|
|
2923
|
+
return typeof target === "string" && (process.env.NODE_ENV !== "production" ? target.charAt(0) === target.charAt(0).toLowerCase() : true);
|
|
2924
|
+
}
|
|
2925
|
+
function generateDisplayName(target) {
|
|
2926
|
+
return isTag(target) ? "styled." + target : "Styled(" + getComponentName(target) + ")";
|
|
2927
|
+
}
|
|
2928
|
+
var _TYPE_STATICS;
|
|
2929
|
+
var REACT_STATICS = {
|
|
2930
|
+
childContextTypes: true,
|
|
2931
|
+
contextTypes: true,
|
|
2932
|
+
defaultProps: true,
|
|
2933
|
+
displayName: true,
|
|
2934
|
+
getDerivedStateFromProps: true,
|
|
2935
|
+
propTypes: true,
|
|
2936
|
+
type: true
|
|
2937
|
+
};
|
|
2938
|
+
var KNOWN_STATICS = {
|
|
2939
|
+
name: true,
|
|
2940
|
+
length: true,
|
|
2941
|
+
prototype: true,
|
|
2942
|
+
caller: true,
|
|
2943
|
+
callee: true,
|
|
2944
|
+
arguments: true,
|
|
2945
|
+
arity: true
|
|
2946
|
+
};
|
|
2947
|
+
var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[import_react_is.ForwardRef] = {
|
|
2948
|
+
$$typeof: true,
|
|
2949
|
+
render: true
|
|
2950
|
+
}, _TYPE_STATICS);
|
|
2951
|
+
var defineProperty$1 = Object.defineProperty;
|
|
2952
|
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
2953
|
+
var _Object$getOwnPropert = Object.getOwnPropertySymbols;
|
|
2954
|
+
var getOwnPropertySymbols = _Object$getOwnPropert === void 0 ? function() {
|
|
2955
|
+
return [];
|
|
2956
|
+
} : _Object$getOwnPropert;
|
|
2957
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2958
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
2959
|
+
var objectPrototype = Object.prototype;
|
|
2960
|
+
var arrayPrototype = Array.prototype;
|
|
2961
|
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
2962
|
+
if (typeof sourceComponent !== "string") {
|
|
2963
|
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
2964
|
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
2965
|
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
2966
|
+
}
|
|
2967
|
+
var keys = arrayPrototype.concat(
|
|
2968
|
+
getOwnPropertyNames(sourceComponent),
|
|
2969
|
+
// $FlowFixMe
|
|
2970
|
+
getOwnPropertySymbols(sourceComponent)
|
|
2971
|
+
);
|
|
2972
|
+
var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
|
|
2973
|
+
var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
|
|
2974
|
+
var i = keys.length;
|
|
2975
|
+
var descriptor = void 0;
|
|
2976
|
+
var key = void 0;
|
|
2977
|
+
while (i--) {
|
|
2978
|
+
key = keys[i];
|
|
2979
|
+
if (
|
|
2980
|
+
// $FlowFixMe
|
|
2981
|
+
!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && // $FlowFixMe
|
|
2982
|
+
!(targetStatics && targetStatics[key])
|
|
2983
|
+
) {
|
|
2984
|
+
descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
2985
|
+
if (descriptor) {
|
|
2986
|
+
try {
|
|
2987
|
+
defineProperty$1(targetComponent, key, descriptor);
|
|
2988
|
+
} catch (e) {
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
return targetComponent;
|
|
2994
|
+
}
|
|
2995
|
+
return targetComponent;
|
|
2996
|
+
}
|
|
2997
|
+
function isDerivedReactComponent(fn) {
|
|
2998
|
+
return !!(fn && fn.prototype && fn.prototype.isReactComponent);
|
|
2999
|
+
}
|
|
3000
|
+
var once = (function(cb) {
|
|
3001
|
+
var called = false;
|
|
3002
|
+
return function() {
|
|
3003
|
+
if (!called) {
|
|
3004
|
+
called = true;
|
|
3005
|
+
cb.apply(void 0, arguments);
|
|
3006
|
+
}
|
|
3007
|
+
};
|
|
3008
|
+
});
|
|
3009
|
+
var ThemeContext = createContext();
|
|
3010
|
+
var ThemeConsumer = ThemeContext.Consumer;
|
|
3011
|
+
var ThemeProvider = (function(_Component) {
|
|
3012
|
+
inherits(ThemeProvider2, _Component);
|
|
3013
|
+
function ThemeProvider2(props) {
|
|
3014
|
+
classCallCheck(this, ThemeProvider2);
|
|
3015
|
+
var _this = possibleConstructorReturn(this, _Component.call(this, props));
|
|
3016
|
+
_this.getContext = memoize_one_esm_default(_this.getContext.bind(_this));
|
|
3017
|
+
_this.renderInner = _this.renderInner.bind(_this);
|
|
3018
|
+
return _this;
|
|
3019
|
+
}
|
|
3020
|
+
ThemeProvider2.prototype.render = function render() {
|
|
3021
|
+
if (!this.props.children) return null;
|
|
3022
|
+
return React.createElement(
|
|
3023
|
+
ThemeContext.Consumer,
|
|
3024
|
+
null,
|
|
3025
|
+
this.renderInner
|
|
3026
|
+
);
|
|
3027
|
+
};
|
|
3028
|
+
ThemeProvider2.prototype.renderInner = function renderInner(outerTheme) {
|
|
3029
|
+
var context = this.getContext(this.props.theme, outerTheme);
|
|
3030
|
+
return React.createElement(
|
|
3031
|
+
ThemeContext.Provider,
|
|
3032
|
+
{ value: context },
|
|
3033
|
+
this.props.children
|
|
3034
|
+
);
|
|
3035
|
+
};
|
|
3036
|
+
ThemeProvider2.prototype.getTheme = function getTheme(theme, outerTheme) {
|
|
3037
|
+
if (isFunction(theme)) {
|
|
3038
|
+
var mergedTheme = theme(outerTheme);
|
|
3039
|
+
if (process.env.NODE_ENV !== "production" && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === "undefined" ? "undefined" : _typeof(mergedTheme)) !== "object")) {
|
|
3040
|
+
throw new StyledComponentsError(7);
|
|
3041
|
+
}
|
|
3042
|
+
return mergedTheme;
|
|
3043
|
+
}
|
|
3044
|
+
if (theme === null || Array.isArray(theme) || (typeof theme === "undefined" ? "undefined" : _typeof(theme)) !== "object") {
|
|
3045
|
+
throw new StyledComponentsError(8);
|
|
3046
|
+
}
|
|
3047
|
+
return _extends({}, outerTheme, theme);
|
|
3048
|
+
};
|
|
3049
|
+
ThemeProvider2.prototype.getContext = function getContext(theme, outerTheme) {
|
|
3050
|
+
return this.getTheme(theme, outerTheme);
|
|
3051
|
+
};
|
|
3052
|
+
return ThemeProvider2;
|
|
3053
|
+
})(Component);
|
|
3054
|
+
var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
|
|
3055
|
+
var ServerStyleSheet = (function() {
|
|
3056
|
+
function ServerStyleSheet2() {
|
|
3057
|
+
classCallCheck(this, ServerStyleSheet2);
|
|
3058
|
+
this.masterSheet = StyleSheet.master;
|
|
3059
|
+
this.instance = this.masterSheet.clone();
|
|
3060
|
+
this.sealed = false;
|
|
3061
|
+
}
|
|
3062
|
+
ServerStyleSheet2.prototype.seal = function seal() {
|
|
3063
|
+
if (!this.sealed) {
|
|
3064
|
+
var index2 = this.masterSheet.clones.indexOf(this.instance);
|
|
3065
|
+
this.masterSheet.clones.splice(index2, 1);
|
|
3066
|
+
this.sealed = true;
|
|
3067
|
+
}
|
|
3068
|
+
};
|
|
3069
|
+
ServerStyleSheet2.prototype.collectStyles = function collectStyles(children) {
|
|
3070
|
+
if (this.sealed) {
|
|
3071
|
+
throw new StyledComponentsError(2);
|
|
3072
|
+
}
|
|
3073
|
+
return React.createElement(
|
|
3074
|
+
StyleSheetManager,
|
|
3075
|
+
{ sheet: this.instance },
|
|
3076
|
+
children
|
|
3077
|
+
);
|
|
3078
|
+
};
|
|
3079
|
+
ServerStyleSheet2.prototype.getStyleTags = function getStyleTags() {
|
|
3080
|
+
this.seal();
|
|
3081
|
+
return this.instance.toHTML();
|
|
3082
|
+
};
|
|
3083
|
+
ServerStyleSheet2.prototype.getStyleElement = function getStyleElement() {
|
|
3084
|
+
this.seal();
|
|
3085
|
+
return this.instance.toReactElements();
|
|
3086
|
+
};
|
|
3087
|
+
ServerStyleSheet2.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
|
|
3088
|
+
var _this = this;
|
|
3089
|
+
if (IS_BROWSER) {
|
|
3090
|
+
throw new StyledComponentsError(3);
|
|
3091
|
+
}
|
|
3092
|
+
var instance = this.instance;
|
|
3093
|
+
var instanceTagIndex = 0;
|
|
3094
|
+
var streamAttr = SC_STREAM_ATTR + '="true"';
|
|
3095
|
+
var transformer = new stream.Transform({
|
|
3096
|
+
transform: function appendStyleChunks(chunk, _, callback) {
|
|
3097
|
+
var tags = instance.tags;
|
|
3098
|
+
var html = "";
|
|
3099
|
+
for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
|
|
3100
|
+
var tag = tags[instanceTagIndex];
|
|
3101
|
+
html += tag.toHTML(streamAttr);
|
|
3102
|
+
}
|
|
3103
|
+
instance.sealAllTags();
|
|
3104
|
+
var renderedHtml = chunk.toString();
|
|
3105
|
+
if (CLOSING_TAG_R.test(renderedHtml)) {
|
|
3106
|
+
var endOfClosingTag = renderedHtml.indexOf(">");
|
|
3107
|
+
this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
|
|
3108
|
+
} else this.push(html + renderedHtml);
|
|
3109
|
+
callback();
|
|
3110
|
+
}
|
|
3111
|
+
});
|
|
3112
|
+
readableStream.on("end", function() {
|
|
3113
|
+
return _this.seal();
|
|
3114
|
+
});
|
|
3115
|
+
readableStream.on("error", function(err) {
|
|
3116
|
+
_this.seal();
|
|
3117
|
+
transformer.emit("error", err);
|
|
3118
|
+
});
|
|
3119
|
+
return readableStream.pipe(transformer);
|
|
3120
|
+
};
|
|
3121
|
+
return ServerStyleSheet2;
|
|
3122
|
+
})();
|
|
3123
|
+
var StyleSheetContext = createContext();
|
|
3124
|
+
var StyleSheetConsumer = StyleSheetContext.Consumer;
|
|
3125
|
+
var StyleSheetManager = (function(_Component) {
|
|
3126
|
+
inherits(StyleSheetManager2, _Component);
|
|
3127
|
+
function StyleSheetManager2(props) {
|
|
3128
|
+
classCallCheck(this, StyleSheetManager2);
|
|
3129
|
+
var _this = possibleConstructorReturn(this, _Component.call(this, props));
|
|
3130
|
+
_this.getContext = memoize_one_esm_default(_this.getContext);
|
|
3131
|
+
return _this;
|
|
3132
|
+
}
|
|
3133
|
+
StyleSheetManager2.prototype.getContext = function getContext(sheet, target) {
|
|
3134
|
+
if (sheet) {
|
|
3135
|
+
return sheet;
|
|
3136
|
+
} else if (target) {
|
|
3137
|
+
return new StyleSheet(target);
|
|
3138
|
+
} else {
|
|
3139
|
+
throw new StyledComponentsError(4);
|
|
3140
|
+
}
|
|
3141
|
+
};
|
|
3142
|
+
StyleSheetManager2.prototype.render = function render() {
|
|
3143
|
+
var _props = this.props, children = _props.children, sheet = _props.sheet, target = _props.target;
|
|
3144
|
+
return React.createElement(
|
|
3145
|
+
StyleSheetContext.Provider,
|
|
3146
|
+
{ value: this.getContext(sheet, target) },
|
|
3147
|
+
process.env.NODE_ENV !== "production" ? React.Children.only(children) : children
|
|
3148
|
+
);
|
|
3149
|
+
};
|
|
3150
|
+
return StyleSheetManager2;
|
|
3151
|
+
})(Component);
|
|
3152
|
+
process.env.NODE_ENV !== "production" ? StyleSheetManager.propTypes = {
|
|
3153
|
+
sheet: import_prop_types.default.oneOfType([import_prop_types.default.instanceOf(StyleSheet), import_prop_types.default.instanceOf(ServerStyleSheet)]),
|
|
3154
|
+
target: import_prop_types.default.shape({
|
|
3155
|
+
appendChild: import_prop_types.default.func.isRequired
|
|
3156
|
+
})
|
|
3157
|
+
} : void 0;
|
|
3158
|
+
var identifiers = {};
|
|
3159
|
+
function generateId(_ComponentStyle, _displayName, parentComponentId) {
|
|
3160
|
+
var displayName = typeof _displayName !== "string" ? "sc" : escape(_displayName);
|
|
3161
|
+
var nr = (identifiers[displayName] || 0) + 1;
|
|
3162
|
+
identifiers[displayName] = nr;
|
|
3163
|
+
var componentId = displayName + "-" + _ComponentStyle.generateName(displayName + nr);
|
|
3164
|
+
return parentComponentId ? parentComponentId + "-" + componentId : componentId;
|
|
3165
|
+
}
|
|
3166
|
+
var StyledComponent = (function(_Component) {
|
|
3167
|
+
inherits(StyledComponent2, _Component);
|
|
3168
|
+
function StyledComponent2() {
|
|
3169
|
+
classCallCheck(this, StyledComponent2);
|
|
3170
|
+
var _this = possibleConstructorReturn(this, _Component.call(this));
|
|
3171
|
+
_this.attrs = {};
|
|
3172
|
+
_this.renderOuter = _this.renderOuter.bind(_this);
|
|
3173
|
+
_this.renderInner = _this.renderInner.bind(_this);
|
|
3174
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3175
|
+
_this.warnInnerRef = once(function(displayName) {
|
|
3176
|
+
return (
|
|
3177
|
+
// eslint-disable-next-line no-console
|
|
3178
|
+
console.warn('The "innerRef" API has been removed in styled-components v4 in favor of React 16 ref forwarding, use "ref" instead like a typical component. "innerRef" was detected on component "' + displayName + '".')
|
|
3179
|
+
);
|
|
3180
|
+
});
|
|
3181
|
+
_this.warnAttrsFnObjectKeyDeprecated = once(function(key, displayName) {
|
|
3182
|
+
return (
|
|
3183
|
+
// eslint-disable-next-line no-console
|
|
3184
|
+
console.warn('Functions as object-form attrs({}) keys are now deprecated and will be removed in a future version of styled-components. Switch to the new attrs(props => ({})) syntax instead for easier and more powerful composition. The attrs key in question is "' + key + '" on component "' + displayName + '".', "\n " + new Error().stack)
|
|
3185
|
+
);
|
|
3186
|
+
});
|
|
3187
|
+
_this.warnNonStyledComponentAttrsObjectKey = once(function(key, displayName) {
|
|
3188
|
+
return (
|
|
3189
|
+
// eslint-disable-next-line no-console
|
|
3190
|
+
console.warn(`It looks like you've used a non styled-component as the value for the "` + key + '" prop in an object-form attrs constructor of "' + displayName + `".
|
|
3191
|
+
You should use the new function-form attrs constructor which avoids this issue: attrs(props => ({ yourStuff }))
|
|
3192
|
+
To continue using the deprecated object syntax, you'll need to wrap your component prop in a function to make it available inside the styled component (you'll still get the deprecation warning though.)
|
|
3193
|
+
` + ("For example, { " + key + ": () => InnerComponent } instead of { " + key + ": InnerComponent }"))
|
|
3194
|
+
);
|
|
3195
|
+
});
|
|
3196
|
+
}
|
|
3197
|
+
return _this;
|
|
3198
|
+
}
|
|
3199
|
+
StyledComponent2.prototype.render = function render() {
|
|
3200
|
+
return React.createElement(
|
|
3201
|
+
StyleSheetConsumer,
|
|
3202
|
+
null,
|
|
3203
|
+
this.renderOuter
|
|
3204
|
+
);
|
|
3205
|
+
};
|
|
3206
|
+
StyledComponent2.prototype.renderOuter = function renderOuter() {
|
|
3207
|
+
var styleSheet = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : StyleSheet.master;
|
|
3208
|
+
this.styleSheet = styleSheet;
|
|
3209
|
+
if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
|
|
3210
|
+
return React.createElement(
|
|
3211
|
+
ThemeConsumer,
|
|
3212
|
+
null,
|
|
3213
|
+
this.renderInner
|
|
3214
|
+
);
|
|
3215
|
+
};
|
|
3216
|
+
StyledComponent2.prototype.renderInner = function renderInner(theme) {
|
|
3217
|
+
var _props$forwardedCompo = this.props.forwardedComponent, componentStyle = _props$forwardedCompo.componentStyle, defaultProps = _props$forwardedCompo.defaultProps, displayName = _props$forwardedCompo.displayName, foldedComponentIds = _props$forwardedCompo.foldedComponentIds, styledComponentId = _props$forwardedCompo.styledComponentId, target = _props$forwardedCompo.target;
|
|
3218
|
+
var generatedClassName = void 0;
|
|
3219
|
+
if (componentStyle.isStatic) {
|
|
3220
|
+
generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
|
|
3221
|
+
} else {
|
|
3222
|
+
generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
|
|
3223
|
+
}
|
|
3224
|
+
var elementToBeCreated = this.props.as || this.attrs.as || target;
|
|
3225
|
+
var isTargetTag = isTag(elementToBeCreated);
|
|
3226
|
+
var propsForElement = {};
|
|
3227
|
+
var computedProps = _extends({}, this.props, this.attrs);
|
|
3228
|
+
var key = void 0;
|
|
3229
|
+
for (key in computedProps) {
|
|
3230
|
+
if (process.env.NODE_ENV !== "production" && key === "innerRef" && isTargetTag) {
|
|
3231
|
+
this.warnInnerRef(displayName);
|
|
3232
|
+
}
|
|
3233
|
+
if (key === "forwardedComponent" || key === "as") {
|
|
3234
|
+
continue;
|
|
3235
|
+
} else if (key === "forwardedRef") propsForElement.ref = computedProps[key];
|
|
3236
|
+
else if (key === "forwardedAs") propsForElement.as = computedProps[key];
|
|
3237
|
+
else if (!isTargetTag || is_prop_valid_esm_default(key)) {
|
|
3238
|
+
propsForElement[key] = computedProps[key];
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
if (this.props.style && this.attrs.style) {
|
|
3242
|
+
propsForElement.style = _extends({}, this.attrs.style, this.props.style);
|
|
3243
|
+
}
|
|
3244
|
+
propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(" ");
|
|
3245
|
+
return createElement(elementToBeCreated, propsForElement);
|
|
3246
|
+
};
|
|
3247
|
+
StyledComponent2.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
|
|
3248
|
+
var _this2 = this;
|
|
3249
|
+
var context = _extends({}, props, { theme });
|
|
3250
|
+
if (!attrs.length) return context;
|
|
3251
|
+
this.attrs = {};
|
|
3252
|
+
attrs.forEach(function(attrDef) {
|
|
3253
|
+
var resolvedAttrDef = attrDef;
|
|
3254
|
+
var attrDefWasFn = false;
|
|
3255
|
+
var attr = void 0;
|
|
3256
|
+
var key = void 0;
|
|
3257
|
+
if (isFunction(resolvedAttrDef)) {
|
|
3258
|
+
resolvedAttrDef = resolvedAttrDef(context);
|
|
3259
|
+
attrDefWasFn = true;
|
|
3260
|
+
}
|
|
3261
|
+
for (key in resolvedAttrDef) {
|
|
3262
|
+
attr = resolvedAttrDef[key];
|
|
3263
|
+
if (!attrDefWasFn) {
|
|
3264
|
+
if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
|
|
3265
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3266
|
+
_this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
|
|
3267
|
+
}
|
|
3268
|
+
attr = attr(context);
|
|
3269
|
+
if (process.env.NODE_ENV !== "production" && React.isValidElement(attr)) {
|
|
3270
|
+
_this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3273
|
+
}
|
|
3274
|
+
_this2.attrs[key] = attr;
|
|
3275
|
+
context[key] = attr;
|
|
3276
|
+
}
|
|
3277
|
+
});
|
|
3278
|
+
return context;
|
|
3279
|
+
};
|
|
3280
|
+
StyledComponent2.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
|
|
3281
|
+
var _props$forwardedCompo2 = props.forwardedComponent, attrs = _props$forwardedCompo2.attrs, componentStyle = _props$forwardedCompo2.componentStyle, warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
|
|
3282
|
+
if (componentStyle.isStatic && !attrs.length) {
|
|
3283
|
+
return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
|
|
3284
|
+
}
|
|
3285
|
+
var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
|
|
3286
|
+
if (process.env.NODE_ENV !== "production" && warnTooManyClasses) warnTooManyClasses(className);
|
|
3287
|
+
return className;
|
|
3288
|
+
};
|
|
3289
|
+
return StyledComponent2;
|
|
3290
|
+
})(Component);
|
|
3291
|
+
function createStyledComponent(target, options, rules) {
|
|
3292
|
+
var isTargetStyledComp = isStyledComponent(target);
|
|
3293
|
+
var isClass = !isTag(target);
|
|
3294
|
+
var _options$displayName = options.displayName, displayName = _options$displayName === void 0 ? generateDisplayName(target) : _options$displayName, _options$componentId = options.componentId, componentId = _options$componentId === void 0 ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId, _options$ParentCompon = options.ParentComponent, ParentComponent = _options$ParentCompon === void 0 ? StyledComponent : _options$ParentCompon, _options$attrs = options.attrs, attrs = _options$attrs === void 0 ? EMPTY_ARRAY : _options$attrs;
|
|
3295
|
+
var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + "-" + options.componentId : options.componentId || componentId;
|
|
3296
|
+
var finalAttrs = (
|
|
3297
|
+
// $FlowFixMe
|
|
3298
|
+
isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs
|
|
3299
|
+
);
|
|
3300
|
+
var componentStyle = new ComponentStyle(isTargetStyledComp ? (
|
|
3301
|
+
// fold the underlying StyledComponent rules up (implicit extend)
|
|
3302
|
+
// $FlowFixMe
|
|
3303
|
+
target.componentStyle.rules.concat(rules)
|
|
3304
|
+
) : rules, finalAttrs, styledComponentId);
|
|
3305
|
+
var WrappedStyledComponent = void 0;
|
|
3306
|
+
var forwardRef = function forwardRef2(props, ref) {
|
|
3307
|
+
return React.createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
|
|
3308
|
+
};
|
|
3309
|
+
forwardRef.displayName = displayName;
|
|
3310
|
+
WrappedStyledComponent = React.forwardRef(forwardRef);
|
|
3311
|
+
WrappedStyledComponent.displayName = displayName;
|
|
3312
|
+
WrappedStyledComponent.attrs = finalAttrs;
|
|
3313
|
+
WrappedStyledComponent.componentStyle = componentStyle;
|
|
3314
|
+
WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? (
|
|
3315
|
+
// $FlowFixMe
|
|
3316
|
+
Array.prototype.concat(target.foldedComponentIds, target.styledComponentId)
|
|
3317
|
+
) : EMPTY_ARRAY;
|
|
3318
|
+
WrappedStyledComponent.styledComponentId = styledComponentId;
|
|
3319
|
+
WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
|
|
3320
|
+
WrappedStyledComponent.withComponent = function withComponent(tag) {
|
|
3321
|
+
var previousComponentId = options.componentId, optionsToCopy = objectWithoutProperties(options, ["componentId"]);
|
|
3322
|
+
var newComponentId = previousComponentId && previousComponentId + "-" + (isTag(tag) ? tag : escape(getComponentName(tag)));
|
|
3323
|
+
var newOptions = _extends({}, optionsToCopy, {
|
|
3324
|
+
attrs: finalAttrs,
|
|
3325
|
+
componentId: newComponentId,
|
|
3326
|
+
ParentComponent
|
|
3327
|
+
});
|
|
3328
|
+
return createStyledComponent(tag, newOptions, rules);
|
|
3329
|
+
};
|
|
3330
|
+
Object.defineProperty(WrappedStyledComponent, "defaultProps", {
|
|
3331
|
+
get: function get$$1() {
|
|
3332
|
+
return this._foldedDefaultProps;
|
|
3333
|
+
},
|
|
3334
|
+
set: function set$$1(obj) {
|
|
3335
|
+
this._foldedDefaultProps = isTargetStyledComp ? index_esm_default(target.defaultProps, obj) : obj;
|
|
3336
|
+
}
|
|
3337
|
+
});
|
|
3338
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3339
|
+
WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
|
|
3340
|
+
}
|
|
3341
|
+
WrappedStyledComponent.toString = function() {
|
|
3342
|
+
return "." + WrappedStyledComponent.styledComponentId;
|
|
3343
|
+
};
|
|
3344
|
+
if (isClass) {
|
|
3345
|
+
hoistNonReactStatics(WrappedStyledComponent, target, {
|
|
3346
|
+
// all SC-specific things should not be hoisted
|
|
3347
|
+
attrs: true,
|
|
3348
|
+
componentStyle: true,
|
|
3349
|
+
displayName: true,
|
|
3350
|
+
foldedComponentIds: true,
|
|
3351
|
+
styledComponentId: true,
|
|
3352
|
+
target: true,
|
|
3353
|
+
withComponent: true
|
|
3354
|
+
});
|
|
3355
|
+
}
|
|
3356
|
+
return WrappedStyledComponent;
|
|
3357
|
+
}
|
|
3358
|
+
var domElements = [
|
|
3359
|
+
"a",
|
|
3360
|
+
"abbr",
|
|
3361
|
+
"address",
|
|
3362
|
+
"area",
|
|
3363
|
+
"article",
|
|
3364
|
+
"aside",
|
|
3365
|
+
"audio",
|
|
3366
|
+
"b",
|
|
3367
|
+
"base",
|
|
3368
|
+
"bdi",
|
|
3369
|
+
"bdo",
|
|
3370
|
+
"big",
|
|
3371
|
+
"blockquote",
|
|
3372
|
+
"body",
|
|
3373
|
+
"br",
|
|
3374
|
+
"button",
|
|
3375
|
+
"canvas",
|
|
3376
|
+
"caption",
|
|
3377
|
+
"cite",
|
|
3378
|
+
"code",
|
|
3379
|
+
"col",
|
|
3380
|
+
"colgroup",
|
|
3381
|
+
"data",
|
|
3382
|
+
"datalist",
|
|
3383
|
+
"dd",
|
|
3384
|
+
"del",
|
|
3385
|
+
"details",
|
|
3386
|
+
"dfn",
|
|
3387
|
+
"dialog",
|
|
3388
|
+
"div",
|
|
3389
|
+
"dl",
|
|
3390
|
+
"dt",
|
|
3391
|
+
"em",
|
|
3392
|
+
"embed",
|
|
3393
|
+
"fieldset",
|
|
3394
|
+
"figcaption",
|
|
3395
|
+
"figure",
|
|
3396
|
+
"footer",
|
|
3397
|
+
"form",
|
|
3398
|
+
"h1",
|
|
3399
|
+
"h2",
|
|
3400
|
+
"h3",
|
|
3401
|
+
"h4",
|
|
3402
|
+
"h5",
|
|
3403
|
+
"h6",
|
|
3404
|
+
"head",
|
|
3405
|
+
"header",
|
|
3406
|
+
"hgroup",
|
|
3407
|
+
"hr",
|
|
3408
|
+
"html",
|
|
3409
|
+
"i",
|
|
3410
|
+
"iframe",
|
|
3411
|
+
"img",
|
|
3412
|
+
"input",
|
|
3413
|
+
"ins",
|
|
3414
|
+
"kbd",
|
|
3415
|
+
"keygen",
|
|
3416
|
+
"label",
|
|
3417
|
+
"legend",
|
|
3418
|
+
"li",
|
|
3419
|
+
"link",
|
|
3420
|
+
"main",
|
|
3421
|
+
"map",
|
|
3422
|
+
"mark",
|
|
3423
|
+
"marquee",
|
|
3424
|
+
"menu",
|
|
3425
|
+
"menuitem",
|
|
3426
|
+
"meta",
|
|
3427
|
+
"meter",
|
|
3428
|
+
"nav",
|
|
3429
|
+
"noscript",
|
|
3430
|
+
"object",
|
|
3431
|
+
"ol",
|
|
3432
|
+
"optgroup",
|
|
3433
|
+
"option",
|
|
3434
|
+
"output",
|
|
3435
|
+
"p",
|
|
3436
|
+
"param",
|
|
3437
|
+
"picture",
|
|
3438
|
+
"pre",
|
|
3439
|
+
"progress",
|
|
3440
|
+
"q",
|
|
3441
|
+
"rp",
|
|
3442
|
+
"rt",
|
|
3443
|
+
"ruby",
|
|
3444
|
+
"s",
|
|
3445
|
+
"samp",
|
|
3446
|
+
"script",
|
|
3447
|
+
"section",
|
|
3448
|
+
"select",
|
|
3449
|
+
"small",
|
|
3450
|
+
"source",
|
|
3451
|
+
"span",
|
|
3452
|
+
"strong",
|
|
3453
|
+
"style",
|
|
3454
|
+
"sub",
|
|
3455
|
+
"summary",
|
|
3456
|
+
"sup",
|
|
3457
|
+
"table",
|
|
3458
|
+
"tbody",
|
|
3459
|
+
"td",
|
|
3460
|
+
"textarea",
|
|
3461
|
+
"tfoot",
|
|
3462
|
+
"th",
|
|
3463
|
+
"thead",
|
|
3464
|
+
"time",
|
|
3465
|
+
"title",
|
|
3466
|
+
"tr",
|
|
3467
|
+
"track",
|
|
3468
|
+
"u",
|
|
3469
|
+
"ul",
|
|
3470
|
+
"var",
|
|
3471
|
+
"video",
|
|
3472
|
+
"wbr",
|
|
3473
|
+
// SVG
|
|
3474
|
+
"circle",
|
|
3475
|
+
"clipPath",
|
|
3476
|
+
"defs",
|
|
3477
|
+
"ellipse",
|
|
3478
|
+
"foreignObject",
|
|
3479
|
+
"g",
|
|
3480
|
+
"image",
|
|
3481
|
+
"line",
|
|
3482
|
+
"linearGradient",
|
|
3483
|
+
"marker",
|
|
3484
|
+
"mask",
|
|
3485
|
+
"path",
|
|
3486
|
+
"pattern",
|
|
3487
|
+
"polygon",
|
|
3488
|
+
"polyline",
|
|
3489
|
+
"radialGradient",
|
|
3490
|
+
"rect",
|
|
3491
|
+
"stop",
|
|
3492
|
+
"svg",
|
|
3493
|
+
"text",
|
|
3494
|
+
"tspan"
|
|
3495
|
+
];
|
|
3496
|
+
var styled = function styled2(tag) {
|
|
3497
|
+
return constructWithOptions(createStyledComponent, tag);
|
|
3498
|
+
};
|
|
3499
|
+
domElements.forEach(function(domElement) {
|
|
3500
|
+
styled[domElement] = styled(domElement);
|
|
3501
|
+
});
|
|
3502
|
+
var GlobalStyle = (function() {
|
|
3503
|
+
function GlobalStyle2(rules, componentId) {
|
|
3504
|
+
classCallCheck(this, GlobalStyle2);
|
|
3505
|
+
this.rules = rules;
|
|
3506
|
+
this.componentId = componentId;
|
|
3507
|
+
this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
|
|
3508
|
+
if (!StyleSheet.master.hasId(componentId)) {
|
|
3509
|
+
StyleSheet.master.deferredInject(componentId, []);
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
GlobalStyle2.prototype.createStyles = function createStyles(executionContext, styleSheet) {
|
|
3513
|
+
var flatCSS = flatten(this.rules, executionContext, styleSheet);
|
|
3514
|
+
var css2 = stringifyRules(flatCSS, "");
|
|
3515
|
+
styleSheet.inject(this.componentId, css2);
|
|
3516
|
+
};
|
|
3517
|
+
GlobalStyle2.prototype.removeStyles = function removeStyles(styleSheet) {
|
|
3518
|
+
var componentId = this.componentId;
|
|
3519
|
+
if (styleSheet.hasId(componentId)) {
|
|
3520
|
+
styleSheet.remove(componentId);
|
|
3521
|
+
}
|
|
3522
|
+
};
|
|
3523
|
+
GlobalStyle2.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
|
|
3524
|
+
this.removeStyles(styleSheet);
|
|
3525
|
+
this.createStyles(executionContext, styleSheet);
|
|
3526
|
+
};
|
|
3527
|
+
return GlobalStyle2;
|
|
3528
|
+
})();
|
|
3529
|
+
if (IS_BROWSER) {
|
|
3530
|
+
window.scCGSHMRCache = {};
|
|
3531
|
+
}
|
|
3532
|
+
if (process.env.NODE_ENV !== "production" && typeof navigator !== "undefined" && navigator.product === "ReactNative") {
|
|
3533
|
+
console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");
|
|
3534
|
+
}
|
|
3535
|
+
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window !== "undefined" && typeof navigator !== "undefined" && typeof navigator.userAgent === "string" && navigator.userAgent.indexOf("Node.js") === -1 && navigator.userAgent.indexOf("jsdom") === -1) {
|
|
3536
|
+
window["__styled-components-init__"] = window["__styled-components-init__"] || 0;
|
|
3537
|
+
if (window["__styled-components-init__"] === 1) {
|
|
3538
|
+
console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles not rendering properly, errors happening during rehydration process and makes your application bigger without a good reason.\n\nSee https://s-c.sh/2BAXzed for more info.");
|
|
3539
|
+
}
|
|
3540
|
+
window["__styled-components-init__"] += 1;
|
|
3541
|
+
}
|
|
3542
|
+
var styled_components_esm_default = styled;
|
|
3543
|
+
|
|
3544
|
+
// ../../foundation/primitives-web/src/filterDOMProps.ts
|
|
3545
|
+
import React2 from "react";
|
|
3546
|
+
var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
|
|
3547
|
+
// RN-only event handlers (pass isPropValid's on* pattern)
|
|
3548
|
+
"onPress",
|
|
3549
|
+
"onChangeText",
|
|
3550
|
+
"onLayout",
|
|
3551
|
+
"onMoveShouldSetResponder",
|
|
3552
|
+
"onResponderGrant",
|
|
3553
|
+
"onResponderMove",
|
|
3554
|
+
"onResponderRelease",
|
|
3555
|
+
"onResponderTerminate",
|
|
3556
|
+
// SVG attributes that pass isPropValid
|
|
3557
|
+
"strokeWidth",
|
|
3558
|
+
// CSS properties that pass isPropValid but are used as component props
|
|
3559
|
+
"overflow",
|
|
3560
|
+
"opacity",
|
|
3561
|
+
"cursor",
|
|
3562
|
+
"fontSize",
|
|
3563
|
+
"fontWeight",
|
|
3564
|
+
"fontFamily",
|
|
3565
|
+
"textDecoration",
|
|
3566
|
+
// Cross-platform layout prop that Text consumes as CSS, never as an
|
|
3567
|
+
// attribute. Pinned explicitly because it is now spread into the styled
|
|
3568
|
+
// component rather than destructured away before it can reach the DOM.
|
|
3569
|
+
"numberOfLines"
|
|
3570
|
+
]);
|
|
3571
|
+
function shouldForwardProp(key) {
|
|
3572
|
+
if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;
|
|
3573
|
+
return is_prop_valid_esm_default(key);
|
|
3574
|
+
}
|
|
3575
|
+
function createFilteredElement(defaultTag) {
|
|
3576
|
+
const Component2 = React2.forwardRef(
|
|
3577
|
+
({ children, elementType, ...props }, ref) => {
|
|
3578
|
+
const Tag2 = elementType || defaultTag;
|
|
3579
|
+
const htmlProps = {};
|
|
3580
|
+
for (const key of Object.keys(props)) {
|
|
3581
|
+
if (shouldForwardProp(key)) {
|
|
3582
|
+
htmlProps[key] = props[key];
|
|
3583
|
+
}
|
|
3584
|
+
}
|
|
3585
|
+
return React2.createElement(
|
|
3586
|
+
Tag2,
|
|
3587
|
+
{ ref, ...htmlProps },
|
|
3588
|
+
children
|
|
3589
|
+
);
|
|
3590
|
+
}
|
|
3591
|
+
);
|
|
3592
|
+
Component2.displayName = `Filtered(${defaultTag})`;
|
|
3593
|
+
return Component2;
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3596
|
+
// ../../foundation/primitives-web/src/Box.tsx
|
|
3597
|
+
import { jsx } from "react/jsx-runtime";
|
|
3598
|
+
var FilteredDiv = createFilteredElement("div");
|
|
3599
|
+
var StyledBox = styled_components_esm_default(FilteredDiv)`
|
|
3600
|
+
display: flex;
|
|
3601
|
+
box-sizing: border-box;
|
|
3602
|
+
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
3603
|
+
border-color: ${(props) => props.borderColor || "transparent"};
|
|
3604
|
+
border-width: ${(props) => typeof props.borderWidth === "number" ? `${props.borderWidth}px` : props.borderWidth || 0};
|
|
3605
|
+
|
|
3606
|
+
${(props) => props.borderBottomWidth !== void 0 && `
|
|
3607
|
+
border-bottom-width: ${typeof props.borderBottomWidth === "number" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};
|
|
3608
|
+
border-bottom-color: ${props.borderBottomColor || props.borderColor || "transparent"};
|
|
3609
|
+
border-bottom-style: solid;
|
|
3610
|
+
`}
|
|
3611
|
+
${(props) => props.borderTopWidth !== void 0 && `
|
|
3612
|
+
border-top-width: ${typeof props.borderTopWidth === "number" ? `${props.borderTopWidth}px` : props.borderTopWidth};
|
|
3613
|
+
border-top-color: ${props.borderTopColor || props.borderColor || "transparent"};
|
|
3614
|
+
border-top-style: solid;
|
|
3615
|
+
`}
|
|
3616
|
+
${(props) => props.borderLeftWidth !== void 0 && `
|
|
3617
|
+
border-left-width: ${typeof props.borderLeftWidth === "number" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};
|
|
3618
|
+
border-left-color: ${props.borderLeftColor || props.borderColor || "transparent"};
|
|
3619
|
+
border-left-style: solid;
|
|
3620
|
+
`}
|
|
3621
|
+
${(props) => props.borderRightWidth !== void 0 && `
|
|
3622
|
+
border-right-width: ${typeof props.borderRightWidth === "number" ? `${props.borderRightWidth}px` : props.borderRightWidth};
|
|
3623
|
+
border-right-color: ${props.borderRightColor || props.borderColor || "transparent"};
|
|
3624
|
+
border-right-style: solid;
|
|
3625
|
+
`}
|
|
3626
|
+
|
|
3627
|
+
border-style: ${(props) => props.borderStyle || (props.borderWidth || props.borderBottomWidth || props.borderTopWidth || props.borderLeftWidth || props.borderRightWidth ? "solid" : "none")};
|
|
3628
|
+
border-radius: ${(props) => typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius || 0};
|
|
3629
|
+
height: ${(props) => typeof props.height === "number" ? `${props.height}px` : props.height || "auto"};
|
|
3630
|
+
width: ${(props) => typeof props.width === "number" ? `${props.width}px` : props.width || "auto"};
|
|
3631
|
+
min-width: ${(props) => typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth || "auto"};
|
|
3632
|
+
min-height: ${(props) => typeof props.minHeight === "number" ? `${props.minHeight}px` : props.minHeight || "auto"};
|
|
3633
|
+
max-width: ${(props) => typeof props.maxWidth === "number" ? `${props.maxWidth}px` : props.maxWidth || "none"};
|
|
3634
|
+
max-height: ${(props) => typeof props.maxHeight === "number" ? `${props.maxHeight}px` : props.maxHeight || "none"};
|
|
3635
|
+
|
|
3636
|
+
padding: ${(props) => typeof props.padding === "number" ? `${props.padding}px` : props.padding || 0};
|
|
3637
|
+
${(props) => props.paddingHorizontal && `
|
|
3638
|
+
padding-left: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
|
|
3639
|
+
padding-right: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
|
|
3640
|
+
`}
|
|
3641
|
+
${(props) => props.paddingVertical && `
|
|
3642
|
+
padding-top: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
|
|
3643
|
+
padding-bottom: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
|
|
3644
|
+
`}
|
|
3645
|
+
${(props) => props.paddingTop !== void 0 && `padding-top: ${typeof props.paddingTop === "number" ? `${props.paddingTop}px` : props.paddingTop};`}
|
|
3646
|
+
${(props) => props.paddingBottom !== void 0 && `padding-bottom: ${typeof props.paddingBottom === "number" ? `${props.paddingBottom}px` : props.paddingBottom};`}
|
|
3647
|
+
${(props) => props.paddingLeft !== void 0 && `padding-left: ${typeof props.paddingLeft === "number" ? `${props.paddingLeft}px` : props.paddingLeft};`}
|
|
3648
|
+
${(props) => props.paddingRight !== void 0 && `padding-right: ${typeof props.paddingRight === "number" ? `${props.paddingRight}px` : props.paddingRight};`}
|
|
3649
|
+
|
|
3650
|
+
margin: ${(props) => typeof props.margin === "number" ? `${props.margin}px` : props.margin || 0};
|
|
3651
|
+
${(props) => props.marginTop !== void 0 && `margin-top: ${typeof props.marginTop === "number" ? `${props.marginTop}px` : props.marginTop};`}
|
|
3652
|
+
${(props) => props.marginBottom !== void 0 && `margin-bottom: ${typeof props.marginBottom === "number" ? `${props.marginBottom}px` : props.marginBottom};`}
|
|
3653
|
+
${(props) => props.marginLeft !== void 0 && `margin-left: ${typeof props.marginLeft === "number" ? `${props.marginLeft}px` : props.marginLeft};`}
|
|
3654
|
+
${(props) => props.marginRight !== void 0 && `margin-right: ${typeof props.marginRight === "number" ? `${props.marginRight}px` : props.marginRight};`}
|
|
3655
|
+
|
|
3656
|
+
flex-direction: ${(props) => props.flexDirection || "column"};
|
|
3657
|
+
flex-wrap: ${(props) => props.flexWrap || "nowrap"};
|
|
3658
|
+
align-items: ${(props) => props.alignItems || "stretch"};
|
|
3659
|
+
justify-content: ${(props) => props.justifyContent || "flex-start"};
|
|
3660
|
+
cursor: ${(props) => props.cursor ? props.cursor : props.onClick || props.onPress ? "pointer" : "inherit"};
|
|
3661
|
+
position: ${(props) => props.position || "static"};
|
|
3662
|
+
top: ${(props) => typeof props.top === "number" ? `${props.top}px` : props.top};
|
|
3663
|
+
bottom: ${(props) => typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom};
|
|
3664
|
+
left: ${(props) => typeof props.left === "number" ? `${props.left}px` : props.left};
|
|
3665
|
+
right: ${(props) => typeof props.right === "number" ? `${props.right}px` : props.right};
|
|
3666
|
+
flex: ${(props) => props.flex};
|
|
3667
|
+
flex-shrink: ${(props) => props.flexShrink ?? 1};
|
|
3668
|
+
gap: ${(props) => typeof props.gap === "number" ? `${props.gap}px` : props.gap || 0};
|
|
3669
|
+
align-self: ${(props) => props.alignSelf || "auto"};
|
|
3670
|
+
/* Only emit overflow-x/y when explicitly set. Defaulting them to
|
|
3671
|
+
visible after overflow would override the shorthand and break
|
|
3672
|
+
clipping (e.g. OtherCard bottom-right promo image). */
|
|
3673
|
+
overflow: ${(props) => props.overflow || "visible"};
|
|
3674
|
+
${(props) => props.overflowX != null ? `overflow-x: ${props.overflowX};` : ""}
|
|
3675
|
+
${(props) => props.overflowY != null ? `overflow-y: ${props.overflowY};` : ""}
|
|
3676
|
+
z-index: ${(props) => props.zIndex};
|
|
3677
|
+
opacity: ${(props) => props.opacity != null ? props.opacity : props.disabled ? 0.5 : 1};
|
|
3678
|
+
pointer-events: ${(props) => props.disabled ? "none" : "auto"};
|
|
3679
|
+
|
|
3680
|
+
&:hover {
|
|
3681
|
+
${(props) => props.hoverStyle?.backgroundColor && `background-color: ${props.hoverStyle.backgroundColor};`}
|
|
3682
|
+
${(props) => props.hoverStyle?.borderColor && `border-color: ${props.hoverStyle.borderColor};`}
|
|
3683
|
+
}
|
|
3684
|
+
|
|
3685
|
+
&:active {
|
|
3686
|
+
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
3687
|
+
}
|
|
3688
|
+
`;
|
|
3689
|
+
var Box = React3.forwardRef(
|
|
3690
|
+
({
|
|
3691
|
+
children,
|
|
3692
|
+
onPress,
|
|
3693
|
+
onKeyDown,
|
|
3694
|
+
onKeyUp,
|
|
3695
|
+
role,
|
|
3696
|
+
"aria-label": ariaLabel,
|
|
3697
|
+
"aria-labelledby": ariaLabelledBy,
|
|
3698
|
+
"aria-current": ariaCurrent,
|
|
3699
|
+
"aria-disabled": ariaDisabled,
|
|
3700
|
+
"aria-live": ariaLive,
|
|
3701
|
+
"aria-busy": ariaBusy,
|
|
3702
|
+
"aria-describedby": ariaDescribedBy,
|
|
3703
|
+
"aria-expanded": ariaExpanded,
|
|
3704
|
+
"aria-haspopup": ariaHasPopup,
|
|
3705
|
+
"aria-pressed": ariaPressed,
|
|
3706
|
+
"aria-controls": ariaControls,
|
|
3707
|
+
tabIndex,
|
|
3708
|
+
as,
|
|
3709
|
+
src,
|
|
3710
|
+
alt,
|
|
3711
|
+
onError,
|
|
3712
|
+
onLoad,
|
|
3713
|
+
type,
|
|
3714
|
+
disabled,
|
|
3715
|
+
id,
|
|
3716
|
+
testID,
|
|
3717
|
+
"data-testid": dataTestId,
|
|
3718
|
+
...props
|
|
3719
|
+
}, ref) => {
|
|
3720
|
+
if (as === "img" && src) {
|
|
3721
|
+
return /* @__PURE__ */ jsx(
|
|
3722
|
+
"img",
|
|
3723
|
+
{
|
|
3724
|
+
src,
|
|
3725
|
+
alt: alt || "",
|
|
3726
|
+
onError,
|
|
3727
|
+
onLoad,
|
|
3728
|
+
"data-testid": dataTestId || testID,
|
|
3729
|
+
style: {
|
|
3730
|
+
display: "block",
|
|
3731
|
+
objectFit: "cover",
|
|
3732
|
+
width: typeof props.width === "number" ? `${props.width}px` : props.width,
|
|
3733
|
+
height: typeof props.height === "number" ? `${props.height}px` : props.height,
|
|
3734
|
+
borderRadius: typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius,
|
|
3735
|
+
position: props.position,
|
|
3736
|
+
top: typeof props.top === "number" ? `${props.top}px` : props.top,
|
|
3737
|
+
left: typeof props.left === "number" ? `${props.left}px` : props.left,
|
|
3738
|
+
right: typeof props.right === "number" ? `${props.right}px` : props.right,
|
|
3739
|
+
bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom,
|
|
3740
|
+
...props.style
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
3743
|
+
);
|
|
3744
|
+
}
|
|
3745
|
+
return /* @__PURE__ */ jsx(
|
|
3746
|
+
StyledBox,
|
|
3747
|
+
{
|
|
3748
|
+
ref,
|
|
3749
|
+
elementType: as,
|
|
3750
|
+
id,
|
|
3751
|
+
type: as === "button" ? type || "button" : void 0,
|
|
3752
|
+
disabled: as === "button" ? disabled : void 0,
|
|
3753
|
+
onClick: onPress,
|
|
3754
|
+
onKeyDown,
|
|
3755
|
+
onKeyUp,
|
|
3756
|
+
role,
|
|
3757
|
+
"aria-label": ariaLabel,
|
|
3758
|
+
"aria-labelledby": ariaLabelledBy,
|
|
3759
|
+
"aria-current": ariaCurrent,
|
|
3760
|
+
"aria-disabled": ariaDisabled,
|
|
3761
|
+
"aria-busy": ariaBusy,
|
|
3762
|
+
"aria-describedby": ariaDescribedBy,
|
|
3763
|
+
"aria-expanded": ariaExpanded,
|
|
3764
|
+
"aria-haspopup": ariaHasPopup,
|
|
3765
|
+
"aria-pressed": ariaPressed,
|
|
3766
|
+
"aria-controls": ariaControls,
|
|
3767
|
+
"aria-live": ariaLive,
|
|
3768
|
+
tabIndex: tabIndex !== void 0 ? tabIndex : void 0,
|
|
3769
|
+
"data-testid": dataTestId || testID,
|
|
3770
|
+
...props,
|
|
3771
|
+
children
|
|
3772
|
+
}
|
|
3773
|
+
);
|
|
3774
|
+
}
|
|
3775
|
+
);
|
|
3776
|
+
Box.displayName = "Box";
|
|
3777
|
+
|
|
3778
|
+
// ../../foundation/primitives-web/src/textTruncation.ts
|
|
3779
|
+
var truncationStyles = (numberOfLines) => {
|
|
3780
|
+
if (!numberOfLines || numberOfLines < 1) return "";
|
|
3781
|
+
if (numberOfLines === 1) {
|
|
3782
|
+
return `
|
|
3783
|
+
display: block;
|
|
3784
|
+
max-width: 100%;
|
|
3785
|
+
min-width: 0;
|
|
3786
|
+
overflow: hidden;
|
|
3787
|
+
text-overflow: ellipsis;
|
|
3788
|
+
white-space: nowrap;
|
|
3789
|
+
`;
|
|
3790
|
+
}
|
|
3791
|
+
return `
|
|
3792
|
+
display: -webkit-box;
|
|
3793
|
+
-webkit-box-orient: vertical;
|
|
3794
|
+
-webkit-line-clamp: ${numberOfLines};
|
|
3795
|
+
line-clamp: ${numberOfLines};
|
|
3796
|
+
max-width: 100%;
|
|
3797
|
+
min-width: 0;
|
|
3798
|
+
overflow: hidden;
|
|
3799
|
+
`;
|
|
3800
|
+
};
|
|
3801
|
+
|
|
3802
|
+
// ../../foundation/primitives-web/src/Text.tsx
|
|
3803
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
3804
|
+
var FilteredSpan = createFilteredElement("span");
|
|
3805
|
+
var StyledText = styled_components_esm_default(FilteredSpan)`
|
|
3806
|
+
color: ${(props) => props.color || "inherit"};
|
|
3807
|
+
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
3808
|
+
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
3809
|
+
font-family: ${(props) => props.fontFamily || '"Aktiv Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'};
|
|
3810
|
+
line-height: ${(props) => typeof props.lineHeight === "number" ? `${props.lineHeight}px` : props.lineHeight || "inherit"};
|
|
3811
|
+
white-space: ${(props) => props.whiteSpace || "normal"};
|
|
3812
|
+
text-align: ${(props) => props.textAlign || "inherit"};
|
|
3813
|
+
text-decoration: ${(props) => props.textDecoration || "none"};
|
|
3814
|
+
|
|
3815
|
+
/* Keep last: single-line truncation has to win over white-space above. */
|
|
3816
|
+
${(props) => truncationStyles(props.numberOfLines)}
|
|
3817
|
+
`;
|
|
3818
|
+
var Text = ({
|
|
3819
|
+
style,
|
|
3820
|
+
className,
|
|
3821
|
+
id,
|
|
3822
|
+
role,
|
|
3823
|
+
testID,
|
|
3824
|
+
"data-testid": dataTestId,
|
|
3825
|
+
...props
|
|
3826
|
+
}) => {
|
|
3827
|
+
return /* @__PURE__ */ jsx2(
|
|
3828
|
+
StyledText,
|
|
3829
|
+
{
|
|
3830
|
+
...props,
|
|
3831
|
+
style,
|
|
3832
|
+
className,
|
|
3833
|
+
id,
|
|
3834
|
+
role,
|
|
3835
|
+
"data-testid": dataTestId || testID
|
|
3836
|
+
}
|
|
3837
|
+
);
|
|
3838
|
+
};
|
|
3839
|
+
|
|
3840
|
+
// src/OtherCard.tsx
|
|
3841
|
+
import { useResolvedTheme } from "@xsolla/xui-core";
|
|
3842
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
3843
|
+
var CARD_WIDTH = 366;
|
|
3844
|
+
var IMAGE_SIZE = 160;
|
|
3845
|
+
var IMAGE_OFFSET_RIGHT = -28;
|
|
3846
|
+
var IMAGE_OFFSET_BOTTOM = -8;
|
|
3847
|
+
var IMAGE_GUTTER = 136;
|
|
3848
|
+
var renderIcon = (icon, size, color) => {
|
|
3849
|
+
if (!React4.isValidElement(icon)) return icon;
|
|
3850
|
+
return React4.cloneElement(
|
|
3851
|
+
icon,
|
|
3852
|
+
{
|
|
3853
|
+
size,
|
|
3854
|
+
color
|
|
3855
|
+
}
|
|
3856
|
+
);
|
|
3857
|
+
};
|
|
3858
|
+
var asPlainText = (value) => typeof value === "string" ? value : void 0;
|
|
3859
|
+
var Tag = ({ tag, tone, theme }) => {
|
|
3860
|
+
const palette = tone === "alert" ? theme.colors.control.alert : theme.colors.control.brand;
|
|
3861
|
+
const textColor = palette.text.primary;
|
|
3862
|
+
const size = theme.sizing.tag("sm");
|
|
3863
|
+
return /* @__PURE__ */ jsxs(
|
|
3864
|
+
Box,
|
|
3865
|
+
{
|
|
3866
|
+
height: size.height,
|
|
3867
|
+
flexShrink: 0,
|
|
3868
|
+
flexDirection: "row",
|
|
3869
|
+
alignItems: "center",
|
|
3870
|
+
justifyContent: "center",
|
|
3871
|
+
gap: size.gap,
|
|
3872
|
+
paddingHorizontal: size.padding,
|
|
3873
|
+
borderRadius: size.radius,
|
|
3874
|
+
borderWidth: size.borderWidth,
|
|
3875
|
+
borderStyle: "solid",
|
|
3876
|
+
borderColor: palette.primary.border,
|
|
3877
|
+
backgroundColor: palette.primary.bg,
|
|
3878
|
+
children: [
|
|
3879
|
+
tag.icon && renderIcon(tag.icon, size.iconSize, textColor),
|
|
3880
|
+
/* @__PURE__ */ jsx3(
|
|
3881
|
+
Text,
|
|
3882
|
+
{
|
|
3883
|
+
color: textColor,
|
|
3884
|
+
fontFamily: theme.fonts.body,
|
|
3885
|
+
fontSize: size.fontSize,
|
|
3886
|
+
lineHeight: size.lineHeight,
|
|
3887
|
+
fontWeight: "500",
|
|
3888
|
+
numberOfLines: 1,
|
|
3889
|
+
children: tag.label
|
|
3890
|
+
}
|
|
3891
|
+
)
|
|
3892
|
+
]
|
|
3893
|
+
}
|
|
3894
|
+
);
|
|
3895
|
+
};
|
|
3896
|
+
var OtherCard = ({
|
|
3897
|
+
title,
|
|
3898
|
+
description,
|
|
3899
|
+
publisherName,
|
|
3900
|
+
publisherAvatarSrc,
|
|
3901
|
+
publisherAvatarAlt = "",
|
|
3902
|
+
tags = [],
|
|
3903
|
+
status,
|
|
3904
|
+
actionLabel,
|
|
3905
|
+
onActionPress,
|
|
3906
|
+
onPress,
|
|
3907
|
+
imageSrc,
|
|
3908
|
+
imageAlt = "",
|
|
3909
|
+
imageVisible = true,
|
|
3910
|
+
state = "default",
|
|
3911
|
+
disabled,
|
|
3912
|
+
width = CARD_WIDTH,
|
|
3913
|
+
"aria-label": ariaLabel,
|
|
3914
|
+
testID,
|
|
3915
|
+
themeMode,
|
|
3916
|
+
themeProductContext = "b2c"
|
|
3917
|
+
}) => {
|
|
3918
|
+
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
3919
|
+
const isDisabled = Boolean(disabled) || state === "disabled";
|
|
3920
|
+
const isInteractive = Boolean(onPress) && !isDisabled;
|
|
3921
|
+
const isActionInteractive = Boolean(onActionPress) && !isDisabled;
|
|
3922
|
+
const showImage = imageVisible && Boolean(imageSrc);
|
|
3923
|
+
const cardBackground = state === "press" ? theme.colors.overlay.brand : state === "hover" ? theme.colors.overlay.monoHover : theme.colors.overlay.mono;
|
|
3924
|
+
const derivedLabel = [publisherName, title, status].map(asPlainText).filter(Boolean).join(", ");
|
|
3925
|
+
const resolvedAriaLabel = ariaLabel || derivedLabel || void 0;
|
|
3926
|
+
const plainActionLabel = asPlainText(actionLabel);
|
|
3927
|
+
const plainTitle = asPlainText(title);
|
|
3928
|
+
const actionAriaLabel = plainActionLabel && plainTitle ? `${plainActionLabel} for ${plainTitle}` : plainActionLabel;
|
|
3929
|
+
return /* @__PURE__ */ jsxs(
|
|
3930
|
+
Box,
|
|
3931
|
+
{
|
|
3932
|
+
width,
|
|
3933
|
+
flexDirection: "column",
|
|
3934
|
+
gap: 16,
|
|
3935
|
+
padding: 12,
|
|
3936
|
+
borderRadius: 8,
|
|
3937
|
+
borderWidth: 1,
|
|
3938
|
+
borderStyle: "solid",
|
|
3939
|
+
borderColor: theme.colors.border.secondary,
|
|
3940
|
+
backgroundColor: cardBackground,
|
|
3941
|
+
position: "relative",
|
|
3942
|
+
overflow: "hidden",
|
|
3943
|
+
opacity: isDisabled ? 0.48 : 1,
|
|
3944
|
+
cursor: isInteractive ? "pointer" : void 0,
|
|
3945
|
+
role: isInteractive ? "button" : "group",
|
|
3946
|
+
"aria-label": resolvedAriaLabel,
|
|
3947
|
+
"aria-disabled": isDisabled || void 0,
|
|
3948
|
+
tabIndex: isInteractive ? 0 : void 0,
|
|
3949
|
+
onPress: isInteractive ? onPress : void 0,
|
|
3950
|
+
hoverStyle: isInteractive && state === "default" ? { backgroundColor: theme.colors.overlay.monoHover } : void 0,
|
|
3951
|
+
pressStyle: isInteractive ? { backgroundColor: theme.colors.overlay.brand } : void 0,
|
|
3952
|
+
testID: testID || "other-card",
|
|
3953
|
+
children: [
|
|
3954
|
+
tags.length > 0 && /* @__PURE__ */ jsx3(
|
|
3955
|
+
Box,
|
|
3956
|
+
{
|
|
3957
|
+
flexDirection: "row",
|
|
3958
|
+
alignItems: "center",
|
|
3959
|
+
gap: 4,
|
|
3960
|
+
overflow: "hidden",
|
|
3961
|
+
testID: "other-card-tags",
|
|
3962
|
+
children: tags.map((tag, index2) => /* @__PURE__ */ jsx3(
|
|
3963
|
+
Tag,
|
|
3964
|
+
{
|
|
3965
|
+
tag,
|
|
3966
|
+
tone: tag.tone || (index2 === 0 ? "brand" : "alert"),
|
|
3967
|
+
theme
|
|
3968
|
+
},
|
|
3969
|
+
`${String(tag.label)}-${index2}`
|
|
3970
|
+
))
|
|
3971
|
+
}
|
|
3972
|
+
),
|
|
3973
|
+
/* @__PURE__ */ jsxs(
|
|
3974
|
+
Box,
|
|
3975
|
+
{
|
|
3976
|
+
flexDirection: "column",
|
|
3977
|
+
gap: 16,
|
|
3978
|
+
paddingRight: showImage ? IMAGE_GUTTER : 0,
|
|
3979
|
+
children: [
|
|
3980
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 16, children: [
|
|
3981
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 8, children: [
|
|
3982
|
+
publisherName && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: 6, children: [
|
|
3983
|
+
publisherAvatarSrc && /* @__PURE__ */ jsx3(
|
|
3984
|
+
Box,
|
|
3985
|
+
{
|
|
3986
|
+
as: "img",
|
|
3987
|
+
src: publisherAvatarSrc,
|
|
3988
|
+
alt: publisherAvatarAlt,
|
|
3989
|
+
width: 24,
|
|
3990
|
+
height: 24,
|
|
3991
|
+
borderRadius: 999,
|
|
3992
|
+
flexShrink: 0,
|
|
3993
|
+
style: { objectFit: "cover" }
|
|
3994
|
+
}
|
|
3995
|
+
),
|
|
3996
|
+
/* @__PURE__ */ jsx3(
|
|
3997
|
+
Text,
|
|
3998
|
+
{
|
|
3999
|
+
color: theme.colors.content.tertiary,
|
|
4000
|
+
fontFamily: theme.fonts.body,
|
|
4001
|
+
fontSize: 12,
|
|
4002
|
+
lineHeight: 16,
|
|
4003
|
+
fontWeight: "400",
|
|
4004
|
+
numberOfLines: 1,
|
|
4005
|
+
children: publisherName
|
|
4006
|
+
}
|
|
4007
|
+
)
|
|
4008
|
+
] }),
|
|
4009
|
+
/* @__PURE__ */ jsx3(
|
|
4010
|
+
Text,
|
|
4011
|
+
{
|
|
4012
|
+
color: theme.colors.content.primary,
|
|
4013
|
+
fontFamily: theme.fonts.heading,
|
|
4014
|
+
fontSize: 20,
|
|
4015
|
+
lineHeight: 20,
|
|
4016
|
+
fontWeight: "700",
|
|
4017
|
+
numberOfLines: 2,
|
|
4018
|
+
children: title
|
|
4019
|
+
}
|
|
4020
|
+
),
|
|
4021
|
+
description && /* @__PURE__ */ jsx3(
|
|
4022
|
+
Text,
|
|
4023
|
+
{
|
|
4024
|
+
color: theme.colors.content.tertiary,
|
|
4025
|
+
fontFamily: theme.fonts.body,
|
|
4026
|
+
fontSize: 12,
|
|
4027
|
+
lineHeight: 16,
|
|
4028
|
+
fontWeight: "400",
|
|
4029
|
+
numberOfLines: 3,
|
|
4030
|
+
children: description
|
|
4031
|
+
}
|
|
4032
|
+
)
|
|
4033
|
+
] }),
|
|
4034
|
+
status && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: 6, children: [
|
|
4035
|
+
/* @__PURE__ */ jsx3(
|
|
4036
|
+
Box,
|
|
4037
|
+
{
|
|
4038
|
+
width: 6,
|
|
4039
|
+
height: 6,
|
|
4040
|
+
borderRadius: 999,
|
|
4041
|
+
flexShrink: 0,
|
|
4042
|
+
backgroundColor: theme.colors.content.success.primary
|
|
4043
|
+
}
|
|
4044
|
+
),
|
|
4045
|
+
/* @__PURE__ */ jsx3(
|
|
4046
|
+
Text,
|
|
4047
|
+
{
|
|
4048
|
+
color: theme.colors.content.success.primary,
|
|
4049
|
+
fontFamily: theme.fonts.body,
|
|
4050
|
+
fontSize: 14,
|
|
4051
|
+
lineHeight: 16,
|
|
4052
|
+
fontWeight: "400",
|
|
4053
|
+
numberOfLines: 1,
|
|
4054
|
+
children: status
|
|
4055
|
+
}
|
|
4056
|
+
)
|
|
4057
|
+
] })
|
|
4058
|
+
] }),
|
|
4059
|
+
actionLabel && /* @__PURE__ */ jsx3(
|
|
4060
|
+
Box,
|
|
4061
|
+
{
|
|
4062
|
+
alignSelf: "flex-start",
|
|
4063
|
+
height: 32,
|
|
4064
|
+
flexDirection: "row",
|
|
4065
|
+
alignItems: "center",
|
|
4066
|
+
justifyContent: "center",
|
|
4067
|
+
paddingHorizontal: 12,
|
|
4068
|
+
borderRadius: 4,
|
|
4069
|
+
borderWidth: 1,
|
|
4070
|
+
borderStyle: "solid",
|
|
4071
|
+
borderColor: theme.colors.control.brand.secondary.border,
|
|
4072
|
+
backgroundColor: theme.colors.control.brand.secondary.bg,
|
|
4073
|
+
cursor: isActionInteractive ? "pointer" : void 0,
|
|
4074
|
+
role: isActionInteractive ? "button" : void 0,
|
|
4075
|
+
"aria-label": isActionInteractive ? actionAriaLabel : void 0,
|
|
4076
|
+
"aria-disabled": isDisabled || void 0,
|
|
4077
|
+
tabIndex: isActionInteractive ? 0 : void 0,
|
|
4078
|
+
onPress: isActionInteractive ? onActionPress : void 0,
|
|
4079
|
+
hoverStyle: isActionInteractive ? {
|
|
4080
|
+
backgroundColor: theme.colors.control.brand.secondary.bgHover
|
|
4081
|
+
} : void 0,
|
|
4082
|
+
pressStyle: isActionInteractive ? {
|
|
4083
|
+
backgroundColor: theme.colors.control.brand.secondary.bgPress
|
|
4084
|
+
} : void 0,
|
|
4085
|
+
testID: "other-card-action",
|
|
4086
|
+
children: /* @__PURE__ */ jsx3(
|
|
4087
|
+
Text,
|
|
4088
|
+
{
|
|
4089
|
+
color: theme.colors.control.brand.text.secondary,
|
|
4090
|
+
fontFamily: theme.fonts.body,
|
|
4091
|
+
fontSize: 12,
|
|
4092
|
+
lineHeight: 14,
|
|
4093
|
+
fontWeight: "500",
|
|
4094
|
+
numberOfLines: 1,
|
|
4095
|
+
children: actionLabel
|
|
4096
|
+
}
|
|
4097
|
+
)
|
|
4098
|
+
}
|
|
4099
|
+
)
|
|
4100
|
+
]
|
|
4101
|
+
}
|
|
4102
|
+
),
|
|
4103
|
+
showImage && /* @__PURE__ */ jsx3(
|
|
4104
|
+
Box,
|
|
4105
|
+
{
|
|
4106
|
+
as: "img",
|
|
4107
|
+
src: imageSrc,
|
|
4108
|
+
alt: imageAlt,
|
|
4109
|
+
position: "absolute",
|
|
4110
|
+
right: IMAGE_OFFSET_RIGHT,
|
|
4111
|
+
bottom: IMAGE_OFFSET_BOTTOM,
|
|
4112
|
+
width: IMAGE_SIZE,
|
|
4113
|
+
height: IMAGE_SIZE,
|
|
4114
|
+
borderRadius: 8,
|
|
4115
|
+
style: { objectFit: "cover", pointerEvents: "none" },
|
|
4116
|
+
testID: "other-card-image"
|
|
4117
|
+
}
|
|
4118
|
+
)
|
|
4119
|
+
]
|
|
4120
|
+
}
|
|
4121
|
+
);
|
|
4122
|
+
};
|
|
4123
|
+
export {
|
|
4124
|
+
OtherCard
|
|
4125
|
+
};
|
|
4126
|
+
/*! Bundled license information:
|
|
4127
|
+
|
|
4128
|
+
react-is/cjs/react-is.production.min.js:
|
|
4129
|
+
(** @license React v16.13.1
|
|
4130
|
+
* react-is.production.min.js
|
|
4131
|
+
*
|
|
4132
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4133
|
+
*
|
|
4134
|
+
* This source code is licensed under the MIT license found in the
|
|
4135
|
+
* LICENSE file in the root directory of this source tree.
|
|
4136
|
+
*)
|
|
4137
|
+
|
|
4138
|
+
react-is/cjs/react-is.development.js:
|
|
4139
|
+
(** @license React v16.13.1
|
|
4140
|
+
* react-is.development.js
|
|
4141
|
+
*
|
|
4142
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4143
|
+
*
|
|
4144
|
+
* This source code is licensed under the MIT license found in the
|
|
4145
|
+
* LICENSE file in the root directory of this source tree.
|
|
4146
|
+
*)
|
|
4147
|
+
|
|
4148
|
+
object-assign/index.js:
|
|
4149
|
+
(*
|
|
4150
|
+
object-assign
|
|
4151
|
+
(c) Sindre Sorhus
|
|
4152
|
+
@license MIT
|
|
4153
|
+
*)
|
|
4154
|
+
|
|
4155
|
+
merge-anything/dist/index.esm.js:
|
|
4156
|
+
(*! *****************************************************************************
|
|
4157
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4158
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4159
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
4160
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4161
|
+
|
|
4162
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4163
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
4164
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
4165
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
4166
|
+
|
|
4167
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
4168
|
+
and limitations under the License.
|
|
4169
|
+
***************************************************************************** *)
|
|
4170
|
+
*/
|
|
4171
|
+
//# sourceMappingURL=index.mjs.map
|