1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | 'use strict';
|
11 |
|
12 |
|
13 |
|
14 | if (process.env.NODE_ENV !== "production") {
|
15 | (function() {
|
16 | 'use strict';
|
17 |
|
18 | Object.defineProperty(exports, '__esModule', { value: true });
|
19 |
|
20 |
|
21 |
|
22 | var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
23 |
|
24 | var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
25 | var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
26 | var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
27 | var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
28 | var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
29 | var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
30 | var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
31 | var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
32 | var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
33 | var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
34 | var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
35 | var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
36 | var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
37 |
|
38 | function isValidElementType(type) {
|
39 | return typeof type === 'string' || typeof type === 'function' ||
|
40 |
|
41 | type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_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);
|
42 | }
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 | var lowPriorityWarning = function () {};
|
59 |
|
60 | {
|
61 | var printWarning = function (format) {
|
62 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
63 | args[_key - 1] = arguments[_key];
|
64 | }
|
65 |
|
66 | var argIndex = 0;
|
67 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
68 | return args[argIndex++];
|
69 | });
|
70 | if (typeof console !== 'undefined') {
|
71 | console.warn(message);
|
72 | }
|
73 | try {
|
74 |
|
75 |
|
76 |
|
77 | throw new Error(message);
|
78 | } catch (x) {}
|
79 | };
|
80 |
|
81 | lowPriorityWarning = function (condition, format) {
|
82 | if (format === undefined) {
|
83 | throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
|
84 | }
|
85 | if (!condition) {
|
86 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
87 | args[_key2 - 2] = arguments[_key2];
|
88 | }
|
89 |
|
90 | printWarning.apply(undefined, [format].concat(args));
|
91 | }
|
92 | };
|
93 | }
|
94 |
|
95 | var lowPriorityWarning$1 = lowPriorityWarning;
|
96 |
|
97 | function typeOf(object) {
|
98 | if (typeof object === 'object' && object !== null) {
|
99 | var $$typeof = object.$$typeof;
|
100 | switch ($$typeof) {
|
101 | case REACT_ELEMENT_TYPE:
|
102 | var type = object.type;
|
103 |
|
104 | switch (type) {
|
105 | case REACT_ASYNC_MODE_TYPE:
|
106 | case REACT_CONCURRENT_MODE_TYPE:
|
107 | case REACT_FRAGMENT_TYPE:
|
108 | case REACT_PROFILER_TYPE:
|
109 | case REACT_STRICT_MODE_TYPE:
|
110 | case REACT_SUSPENSE_TYPE:
|
111 | return type;
|
112 | default:
|
113 | var $$typeofType = type && type.$$typeof;
|
114 |
|
115 | switch ($$typeofType) {
|
116 | case REACT_CONTEXT_TYPE:
|
117 | case REACT_FORWARD_REF_TYPE:
|
118 | case REACT_PROVIDER_TYPE:
|
119 | return $$typeofType;
|
120 | default:
|
121 | return $$typeof;
|
122 | }
|
123 | }
|
124 | case REACT_LAZY_TYPE:
|
125 | case REACT_MEMO_TYPE:
|
126 | case REACT_PORTAL_TYPE:
|
127 | return $$typeof;
|
128 | }
|
129 | }
|
130 |
|
131 | return undefined;
|
132 | }
|
133 |
|
134 |
|
135 | var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
136 | var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
137 | var ContextConsumer = REACT_CONTEXT_TYPE;
|
138 | var ContextProvider = REACT_PROVIDER_TYPE;
|
139 | var Element = REACT_ELEMENT_TYPE;
|
140 | var ForwardRef = REACT_FORWARD_REF_TYPE;
|
141 | var Fragment = REACT_FRAGMENT_TYPE;
|
142 | var Lazy = REACT_LAZY_TYPE;
|
143 | var Memo = REACT_MEMO_TYPE;
|
144 | var Portal = REACT_PORTAL_TYPE;
|
145 | var Profiler = REACT_PROFILER_TYPE;
|
146 | var StrictMode = REACT_STRICT_MODE_TYPE;
|
147 | var Suspense = REACT_SUSPENSE_TYPE;
|
148 |
|
149 | var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
150 |
|
151 |
|
152 | function isAsyncMode(object) {
|
153 | {
|
154 | if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
155 | hasWarnedAboutDeprecatedIsAsyncMode = true;
|
156 | lowPriorityWarning$1(false, '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.');
|
157 | }
|
158 | }
|
159 | return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
160 | }
|
161 | function isConcurrentMode(object) {
|
162 | return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
163 | }
|
164 | function isContextConsumer(object) {
|
165 | return typeOf(object) === REACT_CONTEXT_TYPE;
|
166 | }
|
167 | function isContextProvider(object) {
|
168 | return typeOf(object) === REACT_PROVIDER_TYPE;
|
169 | }
|
170 | function isElement(object) {
|
171 | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
172 | }
|
173 | function isForwardRef(object) {
|
174 | return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
175 | }
|
176 | function isFragment(object) {
|
177 | return typeOf(object) === REACT_FRAGMENT_TYPE;
|
178 | }
|
179 | function isLazy(object) {
|
180 | return typeOf(object) === REACT_LAZY_TYPE;
|
181 | }
|
182 | function isMemo(object) {
|
183 | return typeOf(object) === REACT_MEMO_TYPE;
|
184 | }
|
185 | function isPortal(object) {
|
186 | return typeOf(object) === REACT_PORTAL_TYPE;
|
187 | }
|
188 | function isProfiler(object) {
|
189 | return typeOf(object) === REACT_PROFILER_TYPE;
|
190 | }
|
191 | function isStrictMode(object) {
|
192 | return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
193 | }
|
194 | function isSuspense(object) {
|
195 | return typeOf(object) === REACT_SUSPENSE_TYPE;
|
196 | }
|
197 |
|
198 | exports.typeOf = typeOf;
|
199 | exports.AsyncMode = AsyncMode;
|
200 | exports.ConcurrentMode = ConcurrentMode;
|
201 | exports.ContextConsumer = ContextConsumer;
|
202 | exports.ContextProvider = ContextProvider;
|
203 | exports.Element = Element;
|
204 | exports.ForwardRef = ForwardRef;
|
205 | exports.Fragment = Fragment;
|
206 | exports.Lazy = Lazy;
|
207 | exports.Memo = Memo;
|
208 | exports.Portal = Portal;
|
209 | exports.Profiler = Profiler;
|
210 | exports.StrictMode = StrictMode;
|
211 | exports.Suspense = Suspense;
|
212 | exports.isValidElementType = isValidElementType;
|
213 | exports.isAsyncMode = isAsyncMode;
|
214 | exports.isConcurrentMode = isConcurrentMode;
|
215 | exports.isContextConsumer = isContextConsumer;
|
216 | exports.isContextProvider = isContextProvider;
|
217 | exports.isElement = isElement;
|
218 | exports.isForwardRef = isForwardRef;
|
219 | exports.isFragment = isFragment;
|
220 | exports.isLazy = isLazy;
|
221 | exports.isMemo = isMemo;
|
222 | exports.isPortal = isPortal;
|
223 | exports.isProfiler = isProfiler;
|
224 | exports.isStrictMode = isStrictMode;
|
225 | exports.isSuspense = isSuspense;
|
226 | })();
|
227 | }
|