@vxrn/react-native-prebuilt 1.2.46 → 1.2.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.js +12 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/index.js +12 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +23 -8
- package/types/index.d.ts.map +1 -1
- package/vendor/react-18.3.1/index.js +2030 -1717
- package/vendor/react-jsx-runtime-18.3.1/index.js +964 -796
- package/vendor/react-native-0.74.1/index.js +112929 -79202
- package/vendor/rn-react-19-support/ReactFabric-dev.js +6202 -7742
- package/vendor/rn-react-19-support/ReactFabric-prod.js +3859 -4777
- package/vendor/rn-react-19-support/ReactNativeRenderer-dev.js +6299 -7872
- package/vendor/rn-react-19-support/ReactNativeRenderer-prod.js +3970 -4898
|
@@ -1,899 +1,1064 @@
|
|
|
1
|
+
const run = () => {
|
|
2
|
+
'use strict'
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
4
|
+
var __commonJS = (cb, mod) =>
|
|
5
|
+
function __require() {
|
|
6
|
+
return (
|
|
7
|
+
mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod),
|
|
8
|
+
mod.exports
|
|
9
|
+
)
|
|
10
|
+
}
|
|
1
11
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
43
|
-
function error(format) {
|
|
44
|
-
{
|
|
12
|
+
// ../../node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
|
13
|
+
var require_react_jsx_dev_runtime_development = __commonJS({
|
|
14
|
+
'../../node_modules/react/cjs/react-jsx-dev-runtime.development.js'(exports2) {
|
|
15
|
+
'use strict'
|
|
16
|
+
if (true) {
|
|
17
|
+
;(function () {
|
|
18
|
+
'use strict'
|
|
19
|
+
var React = require('react')
|
|
20
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element')
|
|
21
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal')
|
|
22
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment')
|
|
23
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode')
|
|
24
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler')
|
|
25
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider')
|
|
26
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context')
|
|
27
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref')
|
|
28
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense')
|
|
29
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list')
|
|
30
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo')
|
|
31
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy')
|
|
32
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen')
|
|
33
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator
|
|
34
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'
|
|
35
|
+
function getIteratorFn(maybeIterable) {
|
|
36
|
+
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
37
|
+
return null
|
|
38
|
+
}
|
|
39
|
+
var maybeIterator =
|
|
40
|
+
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
41
|
+
maybeIterable[FAUX_ITERATOR_SYMBOL]
|
|
42
|
+
if (typeof maybeIterator === 'function') {
|
|
43
|
+
return maybeIterator
|
|
44
|
+
}
|
|
45
|
+
return null
|
|
46
|
+
}
|
|
47
|
+
var ReactSharedInternals =
|
|
48
|
+
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
49
|
+
function error(format) {
|
|
45
50
|
{
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
{
|
|
52
|
+
for (
|
|
53
|
+
var _len2 = arguments.length,
|
|
54
|
+
args = new Array(_len2 > 1 ? _len2 - 1 : 0),
|
|
55
|
+
_key2 = 1;
|
|
56
|
+
_key2 < _len2;
|
|
57
|
+
_key2++
|
|
58
|
+
) {
|
|
59
|
+
args[_key2 - 1] = arguments[_key2]
|
|
60
|
+
}
|
|
61
|
+
printWarning('error', format, args)
|
|
48
62
|
}
|
|
49
|
-
printWarning("error", format, args);
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
var enableScopeAPI = false;
|
|
69
|
-
var enableCacheElement = false;
|
|
70
|
-
var enableTransitionTracing = false;
|
|
71
|
-
var enableLegacyHidden = false;
|
|
72
|
-
var enableDebugTracing = false;
|
|
73
|
-
var REACT_MODULE_REFERENCE;
|
|
74
|
-
{
|
|
75
|
-
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
76
|
-
}
|
|
77
|
-
function isValidElementType(type) {
|
|
78
|
-
if (typeof type === "string" || typeof type === "function") {
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
if (typeof type === "object" && type !== null) {
|
|
85
|
-
if (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 || // This needs to include all possible module reference object
|
|
86
|
-
// types supported by any Flight configuration anywhere since
|
|
87
|
-
// we don't know which Flight build this will end up being used
|
|
88
|
-
// with.
|
|
89
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
96
|
-
var displayName = outerType.displayName;
|
|
97
|
-
if (displayName) {
|
|
98
|
-
return displayName;
|
|
99
|
-
}
|
|
100
|
-
var functionName = innerType.displayName || innerType.name || "";
|
|
101
|
-
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
102
|
-
}
|
|
103
|
-
function getContextName(type) {
|
|
104
|
-
return type.displayName || "Context";
|
|
105
|
-
}
|
|
106
|
-
function getComponentNameFromType(type) {
|
|
107
|
-
if (type == null) {
|
|
108
|
-
return null;
|
|
65
|
+
function printWarning(level, format, args) {
|
|
66
|
+
{
|
|
67
|
+
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame
|
|
68
|
+
var stack = ReactDebugCurrentFrame2.getStackAddendum()
|
|
69
|
+
if (stack !== '') {
|
|
70
|
+
format += '%s'
|
|
71
|
+
args = args.concat([stack])
|
|
72
|
+
}
|
|
73
|
+
var argsWithFormat = args.map(function (item) {
|
|
74
|
+
return String(item)
|
|
75
|
+
})
|
|
76
|
+
argsWithFormat.unshift('Warning: ' + format)
|
|
77
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat)
|
|
78
|
+
}
|
|
109
79
|
}
|
|
80
|
+
var enableScopeAPI = false
|
|
81
|
+
var enableCacheElement = false
|
|
82
|
+
var enableTransitionTracing = false
|
|
83
|
+
var enableLegacyHidden = false
|
|
84
|
+
var enableDebugTracing = false
|
|
85
|
+
var REACT_MODULE_REFERENCE
|
|
110
86
|
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if (outerName !== null) {
|
|
148
|
-
return outerName;
|
|
149
|
-
}
|
|
150
|
-
return getComponentNameFromType(type.type) || "Memo";
|
|
151
|
-
case REACT_LAZY_TYPE: {
|
|
152
|
-
var lazyComponent = type;
|
|
153
|
-
var payload = lazyComponent._payload;
|
|
154
|
-
var init = lazyComponent._init;
|
|
155
|
-
try {
|
|
156
|
-
return getComponentNameFromType(init(payload));
|
|
157
|
-
} catch (x) {
|
|
158
|
-
return null;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
var assign = Object.assign;
|
|
166
|
-
var disabledDepth = 0;
|
|
167
|
-
var prevLog;
|
|
168
|
-
var prevInfo;
|
|
169
|
-
var prevWarn;
|
|
170
|
-
var prevError;
|
|
171
|
-
var prevGroup;
|
|
172
|
-
var prevGroupCollapsed;
|
|
173
|
-
var prevGroupEnd;
|
|
174
|
-
function disabledLog() {
|
|
175
|
-
}
|
|
176
|
-
disabledLog.__reactDisabledLog = true;
|
|
177
|
-
function disableLogs() {
|
|
178
|
-
{
|
|
179
|
-
if (disabledDepth === 0) {
|
|
180
|
-
prevLog = console.log;
|
|
181
|
-
prevInfo = console.info;
|
|
182
|
-
prevWarn = console.warn;
|
|
183
|
-
prevError = console.error;
|
|
184
|
-
prevGroup = console.group;
|
|
185
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
186
|
-
prevGroupEnd = console.groupEnd;
|
|
187
|
-
var props = {
|
|
188
|
-
configurable: true,
|
|
189
|
-
enumerable: true,
|
|
190
|
-
value: disabledLog,
|
|
191
|
-
writable: true
|
|
192
|
-
};
|
|
193
|
-
Object.defineProperties(console, {
|
|
194
|
-
info: props,
|
|
195
|
-
log: props,
|
|
196
|
-
warn: props,
|
|
197
|
-
error: props,
|
|
198
|
-
group: props,
|
|
199
|
-
groupCollapsed: props,
|
|
200
|
-
groupEnd: props
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
disabledDepth++;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
function reenableLogs() {
|
|
207
|
-
{
|
|
208
|
-
disabledDepth--;
|
|
209
|
-
if (disabledDepth === 0) {
|
|
210
|
-
var props = {
|
|
211
|
-
configurable: true,
|
|
212
|
-
enumerable: true,
|
|
213
|
-
writable: true
|
|
214
|
-
};
|
|
215
|
-
Object.defineProperties(console, {
|
|
216
|
-
log: assign({}, props, {
|
|
217
|
-
value: prevLog
|
|
218
|
-
}),
|
|
219
|
-
info: assign({}, props, {
|
|
220
|
-
value: prevInfo
|
|
221
|
-
}),
|
|
222
|
-
warn: assign({}, props, {
|
|
223
|
-
value: prevWarn
|
|
224
|
-
}),
|
|
225
|
-
error: assign({}, props, {
|
|
226
|
-
value: prevError
|
|
227
|
-
}),
|
|
228
|
-
group: assign({}, props, {
|
|
229
|
-
value: prevGroup
|
|
230
|
-
}),
|
|
231
|
-
groupCollapsed: assign({}, props, {
|
|
232
|
-
value: prevGroupCollapsed
|
|
233
|
-
}),
|
|
234
|
-
groupEnd: assign({}, props, {
|
|
235
|
-
value: prevGroupEnd
|
|
236
|
-
})
|
|
237
|
-
});
|
|
87
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference')
|
|
88
|
+
}
|
|
89
|
+
function isValidElementType(type) {
|
|
90
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
91
|
+
return true
|
|
92
|
+
}
|
|
93
|
+
if (
|
|
94
|
+
type === REACT_FRAGMENT_TYPE ||
|
|
95
|
+
type === REACT_PROFILER_TYPE ||
|
|
96
|
+
enableDebugTracing ||
|
|
97
|
+
type === REACT_STRICT_MODE_TYPE ||
|
|
98
|
+
type === REACT_SUSPENSE_TYPE ||
|
|
99
|
+
type === REACT_SUSPENSE_LIST_TYPE ||
|
|
100
|
+
enableLegacyHidden ||
|
|
101
|
+
type === REACT_OFFSCREEN_TYPE ||
|
|
102
|
+
enableScopeAPI ||
|
|
103
|
+
enableCacheElement ||
|
|
104
|
+
enableTransitionTracing
|
|
105
|
+
) {
|
|
106
|
+
return true
|
|
107
|
+
}
|
|
108
|
+
if (typeof type === 'object' && type !== null) {
|
|
109
|
+
if (
|
|
110
|
+
type.$$typeof === REACT_LAZY_TYPE ||
|
|
111
|
+
type.$$typeof === REACT_MEMO_TYPE ||
|
|
112
|
+
type.$$typeof === REACT_PROVIDER_TYPE ||
|
|
113
|
+
type.$$typeof === REACT_CONTEXT_TYPE ||
|
|
114
|
+
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
115
|
+
// types supported by any Flight configuration anywhere since
|
|
116
|
+
// we don't know which Flight build this will end up being used
|
|
117
|
+
// with.
|
|
118
|
+
type.$$typeof === REACT_MODULE_REFERENCE ||
|
|
119
|
+
type.getModuleId !== void 0
|
|
120
|
+
) {
|
|
121
|
+
return true
|
|
122
|
+
}
|
|
238
123
|
}
|
|
239
|
-
|
|
240
|
-
|
|
124
|
+
return false
|
|
125
|
+
}
|
|
126
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
127
|
+
var displayName = outerType.displayName
|
|
128
|
+
if (displayName) {
|
|
129
|
+
return displayName
|
|
241
130
|
}
|
|
131
|
+
var functionName = innerType.displayName || innerType.name || ''
|
|
132
|
+
return functionName !== ''
|
|
133
|
+
? wrapperName + '(' + functionName + ')'
|
|
134
|
+
: wrapperName
|
|
242
135
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
136
|
+
function getContextName(type) {
|
|
137
|
+
return type.displayName || 'Context'
|
|
138
|
+
}
|
|
139
|
+
function getComponentNameFromType(type) {
|
|
140
|
+
if (type == null) {
|
|
141
|
+
return null
|
|
142
|
+
}
|
|
143
|
+
{
|
|
144
|
+
if (typeof type.tag === 'number') {
|
|
145
|
+
error(
|
|
146
|
+
'Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.'
|
|
147
|
+
)
|
|
254
148
|
}
|
|
255
149
|
}
|
|
256
|
-
|
|
150
|
+
if (typeof type === 'function') {
|
|
151
|
+
return type.displayName || type.name || null
|
|
152
|
+
}
|
|
153
|
+
if (typeof type === 'string') {
|
|
154
|
+
return type
|
|
155
|
+
}
|
|
156
|
+
switch (type) {
|
|
157
|
+
case REACT_FRAGMENT_TYPE:
|
|
158
|
+
return 'Fragment'
|
|
159
|
+
case REACT_PORTAL_TYPE:
|
|
160
|
+
return 'Portal'
|
|
161
|
+
case REACT_PROFILER_TYPE:
|
|
162
|
+
return 'Profiler'
|
|
163
|
+
case REACT_STRICT_MODE_TYPE:
|
|
164
|
+
return 'StrictMode'
|
|
165
|
+
case REACT_SUSPENSE_TYPE:
|
|
166
|
+
return 'Suspense'
|
|
167
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
168
|
+
return 'SuspenseList'
|
|
169
|
+
}
|
|
170
|
+
if (typeof type === 'object') {
|
|
171
|
+
switch (type.$$typeof) {
|
|
172
|
+
case REACT_CONTEXT_TYPE:
|
|
173
|
+
var context = type
|
|
174
|
+
return getContextName(context) + '.Consumer'
|
|
175
|
+
case REACT_PROVIDER_TYPE:
|
|
176
|
+
var provider = type
|
|
177
|
+
return getContextName(provider._context) + '.Provider'
|
|
178
|
+
case REACT_FORWARD_REF_TYPE:
|
|
179
|
+
return getWrappedName(type, type.render, 'ForwardRef')
|
|
180
|
+
case REACT_MEMO_TYPE:
|
|
181
|
+
var outerName = type.displayName || null
|
|
182
|
+
if (outerName !== null) {
|
|
183
|
+
return outerName
|
|
184
|
+
}
|
|
185
|
+
return getComponentNameFromType(type.type) || 'Memo'
|
|
186
|
+
case REACT_LAZY_TYPE: {
|
|
187
|
+
var lazyComponent = type
|
|
188
|
+
var payload = lazyComponent._payload
|
|
189
|
+
var init = lazyComponent._init
|
|
190
|
+
try {
|
|
191
|
+
return getComponentNameFromType(init(payload))
|
|
192
|
+
} catch (x) {
|
|
193
|
+
return null
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return null
|
|
257
199
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
var
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
200
|
+
var assign = Object.assign
|
|
201
|
+
var disabledDepth = 0
|
|
202
|
+
var prevLog
|
|
203
|
+
var prevInfo
|
|
204
|
+
var prevWarn
|
|
205
|
+
var prevError
|
|
206
|
+
var prevGroup
|
|
207
|
+
var prevGroupCollapsed
|
|
208
|
+
var prevGroupEnd
|
|
209
|
+
function disabledLog() {}
|
|
210
|
+
disabledLog.__reactDisabledLog = true
|
|
211
|
+
function disableLogs() {
|
|
212
|
+
{
|
|
213
|
+
if (disabledDepth === 0) {
|
|
214
|
+
prevLog = console.log
|
|
215
|
+
prevInfo = console.info
|
|
216
|
+
prevWarn = console.warn
|
|
217
|
+
prevError = console.error
|
|
218
|
+
prevGroup = console.group
|
|
219
|
+
prevGroupCollapsed = console.groupCollapsed
|
|
220
|
+
prevGroupEnd = console.groupEnd
|
|
221
|
+
var props = {
|
|
222
|
+
configurable: true,
|
|
223
|
+
enumerable: true,
|
|
224
|
+
value: disabledLog,
|
|
225
|
+
writable: true,
|
|
226
|
+
}
|
|
227
|
+
Object.defineProperties(console, {
|
|
228
|
+
info: props,
|
|
229
|
+
log: props,
|
|
230
|
+
warn: props,
|
|
231
|
+
error: props,
|
|
232
|
+
group: props,
|
|
233
|
+
groupCollapsed: props,
|
|
234
|
+
groupEnd: props,
|
|
235
|
+
})
|
|
236
|
+
}
|
|
237
|
+
disabledDepth++
|
|
238
|
+
}
|
|
268
239
|
}
|
|
269
|
-
{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
240
|
+
function reenableLogs() {
|
|
241
|
+
{
|
|
242
|
+
disabledDepth--
|
|
243
|
+
if (disabledDepth === 0) {
|
|
244
|
+
var props = {
|
|
245
|
+
configurable: true,
|
|
246
|
+
enumerable: true,
|
|
247
|
+
writable: true,
|
|
248
|
+
}
|
|
249
|
+
Object.defineProperties(console, {
|
|
250
|
+
log: assign({}, props, {
|
|
251
|
+
value: prevLog,
|
|
252
|
+
}),
|
|
253
|
+
info: assign({}, props, {
|
|
254
|
+
value: prevInfo,
|
|
255
|
+
}),
|
|
256
|
+
warn: assign({}, props, {
|
|
257
|
+
value: prevWarn,
|
|
258
|
+
}),
|
|
259
|
+
error: assign({}, props, {
|
|
260
|
+
value: prevError,
|
|
261
|
+
}),
|
|
262
|
+
group: assign({}, props, {
|
|
263
|
+
value: prevGroup,
|
|
264
|
+
}),
|
|
265
|
+
groupCollapsed: assign({}, props, {
|
|
266
|
+
value: prevGroupCollapsed,
|
|
267
|
+
}),
|
|
268
|
+
groupEnd: assign({}, props, {
|
|
269
|
+
value: prevGroupEnd,
|
|
270
|
+
}),
|
|
271
|
+
})
|
|
272
|
+
}
|
|
273
|
+
if (disabledDepth < 0) {
|
|
274
|
+
error(
|
|
275
|
+
'disabledDepth fell below zero. This is a bug in React. Please file an issue.'
|
|
276
|
+
)
|
|
277
|
+
}
|
|
273
278
|
}
|
|
274
279
|
}
|
|
275
|
-
var
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
{
|
|
281
|
-
previousDispatcher = ReactCurrentDispatcher.current;
|
|
282
|
-
ReactCurrentDispatcher.current = null;
|
|
283
|
-
disableLogs();
|
|
284
|
-
}
|
|
285
|
-
try {
|
|
286
|
-
if (construct) {
|
|
287
|
-
var Fake = function() {
|
|
288
|
-
throw Error();
|
|
289
|
-
};
|
|
290
|
-
Object.defineProperty(Fake.prototype, "props", {
|
|
291
|
-
set: function() {
|
|
292
|
-
throw Error();
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
if (typeof Reflect === "object" && Reflect.construct) {
|
|
280
|
+
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher
|
|
281
|
+
var prefix
|
|
282
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
283
|
+
{
|
|
284
|
+
if (prefix === void 0) {
|
|
296
285
|
try {
|
|
297
|
-
|
|
286
|
+
throw Error()
|
|
298
287
|
} catch (x) {
|
|
299
|
-
|
|
288
|
+
var match = x.stack.trim().match(/\n( *(at )?)/)
|
|
289
|
+
prefix = (match && match[1]) || ''
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return '\n' + prefix + name
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
var reentry = false
|
|
296
|
+
var componentFrameCache
|
|
297
|
+
{
|
|
298
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map
|
|
299
|
+
componentFrameCache = new PossiblyWeakMap()
|
|
300
|
+
}
|
|
301
|
+
function describeNativeComponentFrame(fn, construct) {
|
|
302
|
+
if (!fn || reentry) {
|
|
303
|
+
return ''
|
|
304
|
+
}
|
|
305
|
+
{
|
|
306
|
+
var frame = componentFrameCache.get(fn)
|
|
307
|
+
if (frame !== void 0) {
|
|
308
|
+
return frame
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
var control
|
|
312
|
+
reentry = true
|
|
313
|
+
var previousPrepareStackTrace = Error.prepareStackTrace
|
|
314
|
+
Error.prepareStackTrace = void 0
|
|
315
|
+
var previousDispatcher
|
|
316
|
+
{
|
|
317
|
+
previousDispatcher = ReactCurrentDispatcher.current
|
|
318
|
+
ReactCurrentDispatcher.current = null
|
|
319
|
+
disableLogs()
|
|
320
|
+
}
|
|
321
|
+
try {
|
|
322
|
+
if (construct) {
|
|
323
|
+
var Fake = function () {
|
|
324
|
+
throw Error()
|
|
325
|
+
}
|
|
326
|
+
Object.defineProperty(Fake.prototype, 'props', {
|
|
327
|
+
set: function () {
|
|
328
|
+
throw Error()
|
|
329
|
+
},
|
|
330
|
+
})
|
|
331
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
332
|
+
try {
|
|
333
|
+
Reflect.construct(Fake, [])
|
|
334
|
+
} catch (x) {
|
|
335
|
+
control = x
|
|
336
|
+
}
|
|
337
|
+
Reflect.construct(fn, [], Fake)
|
|
338
|
+
} else {
|
|
339
|
+
try {
|
|
340
|
+
Fake.call()
|
|
341
|
+
} catch (x) {
|
|
342
|
+
control = x
|
|
343
|
+
}
|
|
344
|
+
fn.call(Fake.prototype)
|
|
300
345
|
}
|
|
301
|
-
Reflect.construct(fn, [], Fake);
|
|
302
346
|
} else {
|
|
303
347
|
try {
|
|
304
|
-
|
|
348
|
+
throw Error()
|
|
305
349
|
} catch (x) {
|
|
306
|
-
control = x
|
|
350
|
+
control = x
|
|
307
351
|
}
|
|
308
|
-
fn
|
|
352
|
+
fn()
|
|
309
353
|
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
if (s !== 1 || c !== 1) {
|
|
330
|
-
do {
|
|
331
|
-
s--;
|
|
332
|
-
c--;
|
|
333
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
334
|
-
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
|
335
|
-
if (fn.displayName && _frame.includes("<anonymous>")) {
|
|
336
|
-
_frame = _frame.replace("<anonymous>", fn.displayName);
|
|
337
|
-
}
|
|
338
|
-
{
|
|
339
|
-
if (typeof fn === "function") {
|
|
340
|
-
componentFrameCache.set(fn, _frame);
|
|
354
|
+
} catch (sample) {
|
|
355
|
+
if (sample && control && typeof sample.stack === 'string') {
|
|
356
|
+
var sampleLines = sample.stack.split('\n')
|
|
357
|
+
var controlLines = control.stack.split('\n')
|
|
358
|
+
var s = sampleLines.length - 1
|
|
359
|
+
var c = controlLines.length - 1
|
|
360
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
361
|
+
c--
|
|
362
|
+
}
|
|
363
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
|
364
|
+
if (sampleLines[s] !== controlLines[c]) {
|
|
365
|
+
if (s !== 1 || c !== 1) {
|
|
366
|
+
do {
|
|
367
|
+
s--
|
|
368
|
+
c--
|
|
369
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
370
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ')
|
|
371
|
+
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
372
|
+
_frame = _frame.replace('<anonymous>', fn.displayName)
|
|
341
373
|
}
|
|
374
|
+
{
|
|
375
|
+
if (typeof fn === 'function') {
|
|
376
|
+
componentFrameCache.set(fn, _frame)
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return _frame
|
|
342
380
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
381
|
+
} while (s >= 1 && c >= 0)
|
|
382
|
+
}
|
|
383
|
+
break
|
|
346
384
|
}
|
|
347
|
-
break;
|
|
348
385
|
}
|
|
349
386
|
}
|
|
387
|
+
} finally {
|
|
388
|
+
reentry = false
|
|
389
|
+
{
|
|
390
|
+
ReactCurrentDispatcher.current = previousDispatcher
|
|
391
|
+
reenableLogs()
|
|
392
|
+
}
|
|
393
|
+
Error.prepareStackTrace = previousPrepareStackTrace
|
|
350
394
|
}
|
|
351
|
-
|
|
352
|
-
|
|
395
|
+
var name = fn ? fn.displayName || fn.name : ''
|
|
396
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''
|
|
353
397
|
{
|
|
354
|
-
|
|
355
|
-
|
|
398
|
+
if (typeof fn === 'function') {
|
|
399
|
+
componentFrameCache.set(fn, syntheticFrame)
|
|
400
|
+
}
|
|
356
401
|
}
|
|
357
|
-
|
|
402
|
+
return syntheticFrame
|
|
358
403
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
if (typeof fn === "function") {
|
|
363
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
404
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
405
|
+
{
|
|
406
|
+
return describeNativeComponentFrame(fn, false)
|
|
364
407
|
}
|
|
365
408
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
{
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
try {
|
|
406
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
407
|
-
} catch (x) {
|
|
409
|
+
function shouldConstruct(Component) {
|
|
410
|
+
var prototype = Component.prototype
|
|
411
|
+
return !!(prototype && prototype.isReactComponent)
|
|
412
|
+
}
|
|
413
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
414
|
+
if (type == null) {
|
|
415
|
+
return ''
|
|
416
|
+
}
|
|
417
|
+
if (typeof type === 'function') {
|
|
418
|
+
{
|
|
419
|
+
return describeNativeComponentFrame(type, shouldConstruct(type))
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
if (typeof type === 'string') {
|
|
423
|
+
return describeBuiltInComponentFrame(type)
|
|
424
|
+
}
|
|
425
|
+
switch (type) {
|
|
426
|
+
case REACT_SUSPENSE_TYPE:
|
|
427
|
+
return describeBuiltInComponentFrame('Suspense')
|
|
428
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
429
|
+
return describeBuiltInComponentFrame('SuspenseList')
|
|
430
|
+
}
|
|
431
|
+
if (typeof type === 'object') {
|
|
432
|
+
switch (type.$$typeof) {
|
|
433
|
+
case REACT_FORWARD_REF_TYPE:
|
|
434
|
+
return describeFunctionComponentFrame(type.render)
|
|
435
|
+
case REACT_MEMO_TYPE:
|
|
436
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn)
|
|
437
|
+
case REACT_LAZY_TYPE: {
|
|
438
|
+
var lazyComponent = type
|
|
439
|
+
var payload = lazyComponent._payload
|
|
440
|
+
var init = lazyComponent._init
|
|
441
|
+
try {
|
|
442
|
+
return describeUnknownElementTypeFrameInDEV(
|
|
443
|
+
init(payload),
|
|
444
|
+
source,
|
|
445
|
+
ownerFn
|
|
446
|
+
)
|
|
447
|
+
} catch (x) {}
|
|
408
448
|
}
|
|
409
449
|
}
|
|
410
450
|
}
|
|
451
|
+
return ''
|
|
411
452
|
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
453
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty
|
|
454
|
+
var loggedTypeFailures = {}
|
|
455
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame
|
|
456
|
+
function setCurrentlyValidatingElement(element) {
|
|
457
|
+
{
|
|
458
|
+
if (element) {
|
|
459
|
+
var owner = element._owner
|
|
460
|
+
var stack = describeUnknownElementTypeFrameInDEV(
|
|
461
|
+
element.type,
|
|
462
|
+
element._source,
|
|
463
|
+
owner ? owner.type : null
|
|
464
|
+
)
|
|
465
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack)
|
|
466
|
+
} else {
|
|
467
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null)
|
|
468
|
+
}
|
|
425
469
|
}
|
|
426
470
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
471
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
472
|
+
{
|
|
473
|
+
var has = Function.call.bind(hasOwnProperty)
|
|
474
|
+
for (var typeSpecName in typeSpecs) {
|
|
475
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
476
|
+
var error$1 = void 0
|
|
477
|
+
try {
|
|
478
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
479
|
+
var err = Error(
|
|
480
|
+
(componentName || 'React class') +
|
|
481
|
+
': ' +
|
|
482
|
+
location +
|
|
483
|
+
' type `' +
|
|
484
|
+
typeSpecName +
|
|
485
|
+
'` is invalid; it must be a function, usually from the `prop-types` package, but received `' +
|
|
486
|
+
typeof typeSpecs[typeSpecName] +
|
|
487
|
+
'`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
488
|
+
)
|
|
489
|
+
err.name = 'Invariant Violation'
|
|
490
|
+
throw err
|
|
491
|
+
}
|
|
492
|
+
error$1 = typeSpecs[typeSpecName](
|
|
493
|
+
values,
|
|
494
|
+
typeSpecName,
|
|
495
|
+
componentName,
|
|
496
|
+
location,
|
|
497
|
+
null,
|
|
498
|
+
'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'
|
|
499
|
+
)
|
|
500
|
+
} catch (ex) {
|
|
501
|
+
error$1 = ex
|
|
502
|
+
}
|
|
503
|
+
if (error$1 && !(error$1 instanceof Error)) {
|
|
504
|
+
setCurrentlyValidatingElement(element)
|
|
505
|
+
error(
|
|
506
|
+
'%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).',
|
|
507
|
+
componentName || 'React class',
|
|
508
|
+
location,
|
|
509
|
+
typeSpecName,
|
|
510
|
+
typeof error$1
|
|
511
|
+
)
|
|
512
|
+
setCurrentlyValidatingElement(null)
|
|
513
|
+
}
|
|
514
|
+
if (
|
|
515
|
+
error$1 instanceof Error &&
|
|
516
|
+
!(error$1.message in loggedTypeFailures)
|
|
517
|
+
) {
|
|
518
|
+
loggedTypeFailures[error$1.message] = true
|
|
519
|
+
setCurrentlyValidatingElement(element)
|
|
520
|
+
error('Failed %s type: %s', location, error$1.message)
|
|
521
|
+
setCurrentlyValidatingElement(null)
|
|
439
522
|
}
|
|
440
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
441
|
-
} catch (ex) {
|
|
442
|
-
error$1 = ex;
|
|
443
|
-
}
|
|
444
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
445
|
-
setCurrentlyValidatingElement(element);
|
|
446
|
-
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
|
447
|
-
setCurrentlyValidatingElement(null);
|
|
448
|
-
}
|
|
449
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
450
|
-
loggedTypeFailures[error$1.message] = true;
|
|
451
|
-
setCurrentlyValidatingElement(element);
|
|
452
|
-
error("Failed %s type: %s", location, error$1.message);
|
|
453
|
-
setCurrentlyValidatingElement(null);
|
|
454
523
|
}
|
|
455
524
|
}
|
|
456
525
|
}
|
|
457
526
|
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
return isArrayImpl(a);
|
|
462
|
-
}
|
|
463
|
-
function typeName(value) {
|
|
464
|
-
{
|
|
465
|
-
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
|
466
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
467
|
-
return type;
|
|
527
|
+
var isArrayImpl = Array.isArray
|
|
528
|
+
function isArray(a) {
|
|
529
|
+
return isArrayImpl(a)
|
|
468
530
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
return
|
|
531
|
+
function typeName(value) {
|
|
532
|
+
{
|
|
533
|
+
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag
|
|
534
|
+
var type =
|
|
535
|
+
(hasToStringTag && value[Symbol.toStringTag]) ||
|
|
536
|
+
value.constructor.name ||
|
|
537
|
+
'Object'
|
|
538
|
+
return type
|
|
477
539
|
}
|
|
478
540
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
487
|
-
return testStringCoercion(value);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
492
|
-
var RESERVED_PROPS = {
|
|
493
|
-
key: true,
|
|
494
|
-
ref: true,
|
|
495
|
-
__self: true,
|
|
496
|
-
__source: true
|
|
497
|
-
};
|
|
498
|
-
var specialPropKeyWarningShown;
|
|
499
|
-
var specialPropRefWarningShown;
|
|
500
|
-
var didWarnAboutStringRefs;
|
|
501
|
-
{
|
|
502
|
-
didWarnAboutStringRefs = {};
|
|
503
|
-
}
|
|
504
|
-
function hasValidRef(config) {
|
|
505
|
-
{
|
|
506
|
-
if (hasOwnProperty.call(config, "ref")) {
|
|
507
|
-
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
508
|
-
if (getter && getter.isReactWarning) {
|
|
509
|
-
return false;
|
|
541
|
+
function willCoercionThrow(value) {
|
|
542
|
+
{
|
|
543
|
+
try {
|
|
544
|
+
testStringCoercion(value)
|
|
545
|
+
return false
|
|
546
|
+
} catch (e) {
|
|
547
|
+
return true
|
|
510
548
|
}
|
|
511
549
|
}
|
|
512
550
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
{
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
551
|
+
function testStringCoercion(value) {
|
|
552
|
+
return '' + value
|
|
553
|
+
}
|
|
554
|
+
function checkKeyStringCoercion(value) {
|
|
555
|
+
{
|
|
556
|
+
if (willCoercionThrow(value)) {
|
|
557
|
+
error(
|
|
558
|
+
'The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.',
|
|
559
|
+
typeName(value)
|
|
560
|
+
)
|
|
561
|
+
return testStringCoercion(value)
|
|
521
562
|
}
|
|
522
563
|
}
|
|
523
564
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
565
|
+
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner
|
|
566
|
+
var RESERVED_PROPS = {
|
|
567
|
+
key: true,
|
|
568
|
+
ref: true,
|
|
569
|
+
__self: true,
|
|
570
|
+
__source: true,
|
|
571
|
+
}
|
|
572
|
+
var specialPropKeyWarningShown
|
|
573
|
+
var specialPropRefWarningShown
|
|
574
|
+
var didWarnAboutStringRefs
|
|
527
575
|
{
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
576
|
+
didWarnAboutStringRefs = {}
|
|
577
|
+
}
|
|
578
|
+
function hasValidRef(config) {
|
|
579
|
+
{
|
|
580
|
+
if (hasOwnProperty.call(config, 'ref')) {
|
|
581
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get
|
|
582
|
+
if (getter && getter.isReactWarning) {
|
|
583
|
+
return false
|
|
584
|
+
}
|
|
533
585
|
}
|
|
534
586
|
}
|
|
587
|
+
return config.ref !== void 0
|
|
535
588
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
};
|
|
545
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
546
|
-
Object.defineProperty(props, "key", {
|
|
547
|
-
get: warnAboutAccessingKey,
|
|
548
|
-
configurable: true
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
553
|
-
{
|
|
554
|
-
var warnAboutAccessingRef = function() {
|
|
555
|
-
if (!specialPropRefWarningShown) {
|
|
556
|
-
specialPropRefWarningShown = true;
|
|
557
|
-
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
561
|
-
Object.defineProperty(props, "ref", {
|
|
562
|
-
get: warnAboutAccessingRef,
|
|
563
|
-
configurable: true
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
568
|
-
var element = {
|
|
569
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
570
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
571
|
-
// Built-in properties that belong on the element
|
|
572
|
-
type,
|
|
573
|
-
key,
|
|
574
|
-
ref,
|
|
575
|
-
props,
|
|
576
|
-
// Record the component responsible for creating this element.
|
|
577
|
-
_owner: owner
|
|
578
|
-
};
|
|
579
|
-
{
|
|
580
|
-
element._store = {};
|
|
581
|
-
Object.defineProperty(element._store, "validated", {
|
|
582
|
-
configurable: false,
|
|
583
|
-
enumerable: false,
|
|
584
|
-
writable: true,
|
|
585
|
-
value: false
|
|
586
|
-
});
|
|
587
|
-
Object.defineProperty(element, "_self", {
|
|
588
|
-
configurable: false,
|
|
589
|
-
enumerable: false,
|
|
590
|
-
writable: false,
|
|
591
|
-
value: self
|
|
592
|
-
});
|
|
593
|
-
Object.defineProperty(element, "_source", {
|
|
594
|
-
configurable: false,
|
|
595
|
-
enumerable: false,
|
|
596
|
-
writable: false,
|
|
597
|
-
value: source
|
|
598
|
-
});
|
|
599
|
-
if (Object.freeze) {
|
|
600
|
-
Object.freeze(element.props);
|
|
601
|
-
Object.freeze(element);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
return element;
|
|
605
|
-
};
|
|
606
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
607
|
-
{
|
|
608
|
-
var propName;
|
|
609
|
-
var props = {};
|
|
610
|
-
var key = null;
|
|
611
|
-
var ref = null;
|
|
612
|
-
if (maybeKey !== void 0) {
|
|
613
|
-
{
|
|
614
|
-
checkKeyStringCoercion(maybeKey);
|
|
589
|
+
function hasValidKey(config) {
|
|
590
|
+
{
|
|
591
|
+
if (hasOwnProperty.call(config, 'key')) {
|
|
592
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'key').get
|
|
593
|
+
if (getter && getter.isReactWarning) {
|
|
594
|
+
return false
|
|
595
|
+
}
|
|
615
596
|
}
|
|
616
|
-
key = "" + maybeKey;
|
|
617
597
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
598
|
+
return config.key !== void 0
|
|
599
|
+
}
|
|
600
|
+
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
601
|
+
{
|
|
602
|
+
if (
|
|
603
|
+
typeof config.ref === 'string' &&
|
|
604
|
+
ReactCurrentOwner.current &&
|
|
605
|
+
self &&
|
|
606
|
+
ReactCurrentOwner.current.stateNode !== self
|
|
607
|
+
) {
|
|
608
|
+
var componentName = getComponentNameFromType(
|
|
609
|
+
ReactCurrentOwner.current.type
|
|
610
|
+
)
|
|
611
|
+
if (!didWarnAboutStringRefs[componentName]) {
|
|
612
|
+
error(
|
|
613
|
+
'Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
|
|
614
|
+
getComponentNameFromType(ReactCurrentOwner.current.type),
|
|
615
|
+
config.ref
|
|
616
|
+
)
|
|
617
|
+
didWarnAboutStringRefs[componentName] = true
|
|
618
|
+
}
|
|
621
619
|
}
|
|
622
|
-
key = "" + config.key;
|
|
623
|
-
}
|
|
624
|
-
if (hasValidRef(config)) {
|
|
625
|
-
ref = config.ref;
|
|
626
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
627
620
|
}
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
621
|
+
}
|
|
622
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
623
|
+
{
|
|
624
|
+
var warnAboutAccessingKey = function () {
|
|
625
|
+
if (!specialPropKeyWarningShown) {
|
|
626
|
+
specialPropKeyWarningShown = true
|
|
627
|
+
error(
|
|
628
|
+
'%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)',
|
|
629
|
+
displayName
|
|
630
|
+
)
|
|
631
|
+
}
|
|
631
632
|
}
|
|
633
|
+
warnAboutAccessingKey.isReactWarning = true
|
|
634
|
+
Object.defineProperty(props, 'key', {
|
|
635
|
+
get: warnAboutAccessingKey,
|
|
636
|
+
configurable: true,
|
|
637
|
+
})
|
|
632
638
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
639
|
+
}
|
|
640
|
+
function defineRefPropWarningGetter(props, displayName) {
|
|
641
|
+
{
|
|
642
|
+
var warnAboutAccessingRef = function () {
|
|
643
|
+
if (!specialPropRefWarningShown) {
|
|
644
|
+
specialPropRefWarningShown = true
|
|
645
|
+
error(
|
|
646
|
+
'%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)',
|
|
647
|
+
displayName
|
|
648
|
+
)
|
|
638
649
|
}
|
|
639
650
|
}
|
|
651
|
+
warnAboutAccessingRef.isReactWarning = true
|
|
652
|
+
Object.defineProperty(props, 'ref', {
|
|
653
|
+
get: warnAboutAccessingRef,
|
|
654
|
+
configurable: true,
|
|
655
|
+
})
|
|
640
656
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
657
|
+
}
|
|
658
|
+
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
659
|
+
var element = {
|
|
660
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
661
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
662
|
+
// Built-in properties that belong on the element
|
|
663
|
+
type,
|
|
664
|
+
key,
|
|
665
|
+
ref,
|
|
666
|
+
props,
|
|
667
|
+
// Record the component responsible for creating this element.
|
|
668
|
+
_owner: owner,
|
|
669
|
+
}
|
|
670
|
+
{
|
|
671
|
+
element._store = {}
|
|
672
|
+
Object.defineProperty(element._store, 'validated', {
|
|
673
|
+
configurable: false,
|
|
674
|
+
enumerable: false,
|
|
675
|
+
writable: true,
|
|
676
|
+
value: false,
|
|
677
|
+
})
|
|
678
|
+
Object.defineProperty(element, '_self', {
|
|
679
|
+
configurable: false,
|
|
680
|
+
enumerable: false,
|
|
681
|
+
writable: false,
|
|
682
|
+
value: self,
|
|
683
|
+
})
|
|
684
|
+
Object.defineProperty(element, '_source', {
|
|
685
|
+
configurable: false,
|
|
686
|
+
enumerable: false,
|
|
687
|
+
writable: false,
|
|
688
|
+
value: source,
|
|
689
|
+
})
|
|
690
|
+
if (Object.freeze) {
|
|
691
|
+
Object.freeze(element.props)
|
|
692
|
+
Object.freeze(element)
|
|
648
693
|
}
|
|
649
694
|
}
|
|
650
|
-
return
|
|
695
|
+
return element
|
|
651
696
|
}
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
697
|
+
function jsxDEV(type, config, maybeKey, source, self) {
|
|
698
|
+
{
|
|
699
|
+
var propName
|
|
700
|
+
var props = {}
|
|
701
|
+
var key = null
|
|
702
|
+
var ref = null
|
|
703
|
+
if (maybeKey !== void 0) {
|
|
704
|
+
{
|
|
705
|
+
checkKeyStringCoercion(maybeKey)
|
|
706
|
+
}
|
|
707
|
+
key = '' + maybeKey
|
|
708
|
+
}
|
|
709
|
+
if (hasValidKey(config)) {
|
|
710
|
+
{
|
|
711
|
+
checkKeyStringCoercion(config.key)
|
|
712
|
+
}
|
|
713
|
+
key = '' + config.key
|
|
714
|
+
}
|
|
715
|
+
if (hasValidRef(config)) {
|
|
716
|
+
ref = config.ref
|
|
717
|
+
warnIfStringRefCannotBeAutoConverted(config, self)
|
|
718
|
+
}
|
|
719
|
+
for (propName in config) {
|
|
720
|
+
if (
|
|
721
|
+
hasOwnProperty.call(config, propName) &&
|
|
722
|
+
!RESERVED_PROPS.hasOwnProperty(propName)
|
|
723
|
+
) {
|
|
724
|
+
props[propName] = config[propName]
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
if (type && type.defaultProps) {
|
|
728
|
+
var defaultProps = type.defaultProps
|
|
729
|
+
for (propName in defaultProps) {
|
|
730
|
+
if (props[propName] === void 0) {
|
|
731
|
+
props[propName] = defaultProps[propName]
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
if (key || ref) {
|
|
736
|
+
var displayName =
|
|
737
|
+
typeof type === 'function'
|
|
738
|
+
? type.displayName || type.name || 'Unknown'
|
|
739
|
+
: type
|
|
740
|
+
if (key) {
|
|
741
|
+
defineKeyPropWarningGetter(props, displayName)
|
|
742
|
+
}
|
|
743
|
+
if (ref) {
|
|
744
|
+
defineRefPropWarningGetter(props, displayName)
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
return ReactElement(
|
|
748
|
+
type,
|
|
749
|
+
key,
|
|
750
|
+
ref,
|
|
751
|
+
self,
|
|
752
|
+
source,
|
|
753
|
+
ReactCurrentOwner.current,
|
|
754
|
+
props
|
|
755
|
+
)
|
|
756
|
+
}
|
|
673
757
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
{
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
758
|
+
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner
|
|
759
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame
|
|
760
|
+
function setCurrentlyValidatingElement$1(element) {
|
|
761
|
+
{
|
|
762
|
+
if (element) {
|
|
763
|
+
var owner = element._owner
|
|
764
|
+
var stack = describeUnknownElementTypeFrameInDEV(
|
|
765
|
+
element.type,
|
|
766
|
+
element._source,
|
|
767
|
+
owner ? owner.type : null
|
|
768
|
+
)
|
|
769
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack)
|
|
770
|
+
} else {
|
|
771
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null)
|
|
681
772
|
}
|
|
682
773
|
}
|
|
683
|
-
return "";
|
|
684
774
|
}
|
|
685
|
-
|
|
686
|
-
function getSourceInfoErrorAddendum(source) {
|
|
775
|
+
var propTypesMisspellWarningShown
|
|
687
776
|
{
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
777
|
+
propTypesMisspellWarningShown = false
|
|
778
|
+
}
|
|
779
|
+
function isValidElement(object) {
|
|
780
|
+
{
|
|
781
|
+
return (
|
|
782
|
+
typeof object === 'object' &&
|
|
783
|
+
object !== null &&
|
|
784
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
785
|
+
)
|
|
692
786
|
}
|
|
693
|
-
return "";
|
|
694
787
|
}
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
if (parentName) {
|
|
703
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
788
|
+
function getDeclarationErrorAddendum() {
|
|
789
|
+
{
|
|
790
|
+
if (ReactCurrentOwner$1.current) {
|
|
791
|
+
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type)
|
|
792
|
+
if (name) {
|
|
793
|
+
return '\n\nCheck the render method of `' + name + '`.'
|
|
794
|
+
}
|
|
704
795
|
}
|
|
796
|
+
return ''
|
|
705
797
|
}
|
|
706
|
-
return info;
|
|
707
798
|
}
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
799
|
+
function getSourceInfoErrorAddendum(source) {
|
|
800
|
+
{
|
|
801
|
+
if (source !== void 0) {
|
|
802
|
+
var fileName = source.fileName.replace(/^.*[\\\/]/, '')
|
|
803
|
+
var lineNumber = source.lineNumber
|
|
804
|
+
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'
|
|
805
|
+
}
|
|
806
|
+
return ''
|
|
713
807
|
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
808
|
+
}
|
|
809
|
+
var ownerHasKeyUseWarning = {}
|
|
810
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
811
|
+
{
|
|
812
|
+
var info = getDeclarationErrorAddendum()
|
|
813
|
+
if (!info) {
|
|
814
|
+
var parentName =
|
|
815
|
+
typeof parentType === 'string'
|
|
816
|
+
? parentType
|
|
817
|
+
: parentType.displayName || parentType.name
|
|
818
|
+
if (parentName) {
|
|
819
|
+
info = '\n\nCheck the top-level render call using <' + parentName + '>.'
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
return info
|
|
718
823
|
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
824
|
+
}
|
|
825
|
+
function validateExplicitKey(element, parentType) {
|
|
826
|
+
{
|
|
827
|
+
if (!element._store || element._store.validated || element.key != null) {
|
|
828
|
+
return
|
|
829
|
+
}
|
|
830
|
+
element._store.validated = true
|
|
831
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType)
|
|
832
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
833
|
+
return
|
|
834
|
+
}
|
|
835
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = true
|
|
836
|
+
var childOwner = ''
|
|
837
|
+
if (
|
|
838
|
+
element &&
|
|
839
|
+
element._owner &&
|
|
840
|
+
element._owner !== ReactCurrentOwner$1.current
|
|
841
|
+
) {
|
|
842
|
+
childOwner =
|
|
843
|
+
' It was passed a child from ' +
|
|
844
|
+
getComponentNameFromType(element._owner.type) +
|
|
845
|
+
'.'
|
|
846
|
+
}
|
|
847
|
+
setCurrentlyValidatingElement$1(element)
|
|
848
|
+
error(
|
|
849
|
+
'Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',
|
|
850
|
+
currentComponentErrorInfo,
|
|
851
|
+
childOwner
|
|
852
|
+
)
|
|
853
|
+
setCurrentlyValidatingElement$1(null)
|
|
723
854
|
}
|
|
724
|
-
setCurrentlyValidatingElement$1(element);
|
|
725
|
-
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
726
|
-
setCurrentlyValidatingElement$1(null);
|
|
727
855
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
856
|
+
function validateChildKeys(node, parentType) {
|
|
857
|
+
{
|
|
858
|
+
if (typeof node !== 'object') {
|
|
859
|
+
return
|
|
860
|
+
}
|
|
861
|
+
if (isArray(node)) {
|
|
862
|
+
for (var i = 0; i < node.length; i++) {
|
|
863
|
+
var child = node[i]
|
|
864
|
+
if (isValidElement(child)) {
|
|
865
|
+
validateExplicitKey(child, parentType)
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
} else if (isValidElement(node)) {
|
|
869
|
+
if (node._store) {
|
|
870
|
+
node._store.validated = true
|
|
871
|
+
}
|
|
872
|
+
} else if (node) {
|
|
873
|
+
var iteratorFn = getIteratorFn(node)
|
|
874
|
+
if (typeof iteratorFn === 'function') {
|
|
875
|
+
if (iteratorFn !== node.entries) {
|
|
876
|
+
var iterator = iteratorFn.call(node)
|
|
877
|
+
var step
|
|
878
|
+
while (!(step = iterator.next()).done) {
|
|
879
|
+
if (isValidElement(step.value)) {
|
|
880
|
+
validateExplicitKey(step.value, parentType)
|
|
881
|
+
}
|
|
754
882
|
}
|
|
755
883
|
}
|
|
756
884
|
}
|
|
757
885
|
}
|
|
758
886
|
}
|
|
759
887
|
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
return;
|
|
766
|
-
}
|
|
767
|
-
var propTypes;
|
|
768
|
-
if (typeof type === "function") {
|
|
769
|
-
propTypes = type.propTypes;
|
|
770
|
-
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
771
|
-
// Inner props are checked in the reconciler.
|
|
772
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
773
|
-
propTypes = type.propTypes;
|
|
774
|
-
} else {
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
if (propTypes) {
|
|
778
|
-
var name = getComponentNameFromType(type);
|
|
779
|
-
checkPropTypes(propTypes, element.props, "prop", name, element);
|
|
780
|
-
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
781
|
-
propTypesMisspellWarningShown = true;
|
|
782
|
-
var _name = getComponentNameFromType(type);
|
|
783
|
-
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
784
|
-
}
|
|
785
|
-
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
|
786
|
-
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
function validateFragmentProps(fragment) {
|
|
791
|
-
{
|
|
792
|
-
var keys = Object.keys(fragment.props);
|
|
793
|
-
for (var i = 0; i < keys.length; i++) {
|
|
794
|
-
var key = keys[i];
|
|
795
|
-
if (key !== "children" && key !== "key") {
|
|
796
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
797
|
-
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
798
|
-
setCurrentlyValidatingElement$1(null);
|
|
799
|
-
break;
|
|
888
|
+
function validatePropTypes(element) {
|
|
889
|
+
{
|
|
890
|
+
var type = element.type
|
|
891
|
+
if (type === null || type === void 0 || typeof type === 'string') {
|
|
892
|
+
return
|
|
800
893
|
}
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
{
|
|
812
|
-
var validType = isValidElementType(type);
|
|
813
|
-
if (!validType) {
|
|
814
|
-
var info = "";
|
|
815
|
-
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
|
816
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
817
|
-
}
|
|
818
|
-
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
819
|
-
if (sourceInfo) {
|
|
820
|
-
info += sourceInfo;
|
|
821
|
-
} else {
|
|
822
|
-
info += getDeclarationErrorAddendum();
|
|
823
|
-
}
|
|
824
|
-
var typeString;
|
|
825
|
-
if (type === null) {
|
|
826
|
-
typeString = "null";
|
|
827
|
-
} else if (isArray(type)) {
|
|
828
|
-
typeString = "array";
|
|
829
|
-
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
830
|
-
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
|
831
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
894
|
+
var propTypes
|
|
895
|
+
if (typeof type === 'function') {
|
|
896
|
+
propTypes = type.propTypes
|
|
897
|
+
} else if (
|
|
898
|
+
typeof type === 'object' &&
|
|
899
|
+
(type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
900
|
+
// Inner props are checked in the reconciler.
|
|
901
|
+
type.$$typeof === REACT_MEMO_TYPE)
|
|
902
|
+
) {
|
|
903
|
+
propTypes = type.propTypes
|
|
832
904
|
} else {
|
|
833
|
-
|
|
905
|
+
return
|
|
906
|
+
}
|
|
907
|
+
if (propTypes) {
|
|
908
|
+
var name = getComponentNameFromType(type)
|
|
909
|
+
checkPropTypes(propTypes, element.props, 'prop', name, element)
|
|
910
|
+
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
911
|
+
propTypesMisspellWarningShown = true
|
|
912
|
+
var _name = getComponentNameFromType(type)
|
|
913
|
+
error(
|
|
914
|
+
'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?',
|
|
915
|
+
_name || 'Unknown'
|
|
916
|
+
)
|
|
917
|
+
}
|
|
918
|
+
if (
|
|
919
|
+
typeof type.getDefaultProps === 'function' &&
|
|
920
|
+
!type.getDefaultProps.isReactClassApproved
|
|
921
|
+
) {
|
|
922
|
+
error(
|
|
923
|
+
'getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.'
|
|
924
|
+
)
|
|
834
925
|
}
|
|
835
|
-
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
836
926
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
927
|
+
}
|
|
928
|
+
function validateFragmentProps(fragment) {
|
|
929
|
+
{
|
|
930
|
+
var keys = Object.keys(fragment.props)
|
|
931
|
+
for (var i = 0; i < keys.length; i++) {
|
|
932
|
+
var key = keys[i]
|
|
933
|
+
if (key !== 'children' && key !== 'key') {
|
|
934
|
+
setCurrentlyValidatingElement$1(fragment)
|
|
935
|
+
error(
|
|
936
|
+
'Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.',
|
|
937
|
+
key
|
|
938
|
+
)
|
|
939
|
+
setCurrentlyValidatingElement$1(null)
|
|
940
|
+
break
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
if (fragment.ref !== null) {
|
|
944
|
+
setCurrentlyValidatingElement$1(fragment)
|
|
945
|
+
error('Invalid attribute `ref` supplied to `React.Fragment`.')
|
|
946
|
+
setCurrentlyValidatingElement$1(null)
|
|
947
|
+
}
|
|
840
948
|
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
949
|
+
}
|
|
950
|
+
var didWarnAboutKeySpread = {}
|
|
951
|
+
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
952
|
+
{
|
|
953
|
+
var validType = isValidElementType(type)
|
|
954
|
+
if (!validType) {
|
|
955
|
+
var info = ''
|
|
956
|
+
if (
|
|
957
|
+
type === void 0 ||
|
|
958
|
+
(typeof type === 'object' &&
|
|
959
|
+
type !== null &&
|
|
960
|
+
Object.keys(type).length === 0)
|
|
961
|
+
) {
|
|
962
|
+
info +=
|
|
963
|
+
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."
|
|
964
|
+
}
|
|
965
|
+
var sourceInfo = getSourceInfoErrorAddendum(source)
|
|
966
|
+
if (sourceInfo) {
|
|
967
|
+
info += sourceInfo
|
|
968
|
+
} else {
|
|
969
|
+
info += getDeclarationErrorAddendum()
|
|
970
|
+
}
|
|
971
|
+
var typeString
|
|
972
|
+
if (type === null) {
|
|
973
|
+
typeString = 'null'
|
|
974
|
+
} else if (isArray(type)) {
|
|
975
|
+
typeString = 'array'
|
|
976
|
+
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
977
|
+
typeString =
|
|
978
|
+
'<' + (getComponentNameFromType(type.type) || 'Unknown') + ' />'
|
|
979
|
+
info =
|
|
980
|
+
' Did you accidentally export a JSX literal instead of a component?'
|
|
981
|
+
} else {
|
|
982
|
+
typeString = typeof type
|
|
983
|
+
}
|
|
984
|
+
error(
|
|
985
|
+
'React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s',
|
|
986
|
+
typeString,
|
|
987
|
+
info
|
|
988
|
+
)
|
|
989
|
+
}
|
|
990
|
+
var element = jsxDEV(type, props, key, source, self)
|
|
991
|
+
if (element == null) {
|
|
992
|
+
return element
|
|
993
|
+
}
|
|
994
|
+
if (validType) {
|
|
995
|
+
var children = props.children
|
|
996
|
+
if (children !== void 0) {
|
|
997
|
+
if (isStaticChildren) {
|
|
998
|
+
if (isArray(children)) {
|
|
999
|
+
for (var i = 0; i < children.length; i++) {
|
|
1000
|
+
validateChildKeys(children[i], type)
|
|
1001
|
+
}
|
|
1002
|
+
if (Object.freeze) {
|
|
1003
|
+
Object.freeze(children)
|
|
1004
|
+
}
|
|
1005
|
+
} else {
|
|
1006
|
+
error(
|
|
1007
|
+
'React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.'
|
|
1008
|
+
)
|
|
851
1009
|
}
|
|
852
1010
|
} else {
|
|
853
|
-
|
|
1011
|
+
validateChildKeys(children, type)
|
|
854
1012
|
}
|
|
855
|
-
} else {
|
|
856
|
-
validateChildKeys(children, type);
|
|
857
1013
|
}
|
|
858
1014
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
1015
|
+
{
|
|
1016
|
+
if (hasOwnProperty.call(props, 'key')) {
|
|
1017
|
+
var componentName = getComponentNameFromType(type)
|
|
1018
|
+
var keys = Object.keys(props).filter(function (k) {
|
|
1019
|
+
return k !== 'key'
|
|
1020
|
+
})
|
|
1021
|
+
var beforeExample =
|
|
1022
|
+
keys.length > 0
|
|
1023
|
+
? '{key: someKey, ' + keys.join(': ..., ') + ': ...}'
|
|
1024
|
+
: '{key: someKey}'
|
|
1025
|
+
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
1026
|
+
var afterExample =
|
|
1027
|
+
keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}'
|
|
1028
|
+
error(
|
|
1029
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
1030
|
+
beforeExample,
|
|
1031
|
+
componentName,
|
|
1032
|
+
afterExample,
|
|
1033
|
+
componentName
|
|
1034
|
+
)
|
|
1035
|
+
didWarnAboutKeySpread[componentName + beforeExample] = true
|
|
1036
|
+
}
|
|
871
1037
|
}
|
|
872
1038
|
}
|
|
1039
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
1040
|
+
validateFragmentProps(element)
|
|
1041
|
+
} else {
|
|
1042
|
+
validatePropTypes(element)
|
|
1043
|
+
}
|
|
1044
|
+
return element
|
|
873
1045
|
}
|
|
874
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
875
|
-
validateFragmentProps(element);
|
|
876
|
-
} else {
|
|
877
|
-
validatePropTypes(element);
|
|
878
|
-
}
|
|
879
|
-
return element;
|
|
880
1046
|
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
});
|
|
1047
|
+
var jsxDEV$1 = jsxWithValidation
|
|
1048
|
+
exports2.Fragment = REACT_FRAGMENT_TYPE
|
|
1049
|
+
exports2.jsxDEV = jsxDEV$1
|
|
1050
|
+
})()
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
})
|
|
889
1054
|
|
|
890
|
-
// ../../node_modules/react/jsx-dev-runtime.js
|
|
891
|
-
if (false) {
|
|
892
|
-
|
|
893
|
-
} else {
|
|
894
|
-
|
|
895
|
-
}
|
|
896
|
-
/*! Bundled license information:
|
|
1055
|
+
// ../../node_modules/react/jsx-dev-runtime.js
|
|
1056
|
+
if (false) {
|
|
1057
|
+
module.exports = null
|
|
1058
|
+
} else {
|
|
1059
|
+
return require_react_jsx_dev_runtime_development()
|
|
1060
|
+
}
|
|
1061
|
+
/*! Bundled license information:
|
|
897
1062
|
|
|
898
1063
|
react/cjs/react-jsx-dev-runtime.development.js:
|
|
899
1064
|
(**
|
|
@@ -906,11 +1071,14 @@ react/cjs/react-jsx-dev-runtime.development.js:
|
|
|
906
1071
|
* LICENSE file in the root directory of this source tree.
|
|
907
1072
|
*)
|
|
908
1073
|
*/
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
1074
|
+
}
|
|
1075
|
+
const __mod__ = run()
|
|
1076
|
+
export const jsx = __mod__.jsx || __mod__.jsx || __mod__.jsxDEV
|
|
1077
|
+
export const jsxs =
|
|
1078
|
+
__mod__.jsxs ||
|
|
1079
|
+
__mod__.jsx ||
|
|
1080
|
+
function (type, props, key) {
|
|
1081
|
+
return __mod__.jsxDEV(type, props, key, true)
|
|
1082
|
+
}
|
|
914
1083
|
export const jsxDEV = __mod__.jsxDEV || __mod__.jsx || __mod__.jsxDEV
|
|
915
1084
|
export const Fragment = __mod__.Fragment || __mod__.jsx || __mod__.jsxDEV
|
|
916
|
-
|