@pie-element/matrix 2.0.1-esmbeta.0 → 2.0.1-esmbeta.1
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/configure/package.json +1 -1
- package/controller/package.json +1 -1
- package/esm/configure.js +2263 -316
- package/esm/configure.js.map +1 -1
- package/package.json +2 -2
package/esm/configure.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { useRef, useDebugValue, useContext, createElement, useState } from 'react';
|
|
3
1
|
import { ModelUpdatedEvent, InsertSoundEvent, DeleteSoundEvent } from '@pie-framework/pie-configure-events';
|
|
4
2
|
import EditableHtml from '@pie-lib/editable-html';
|
|
5
3
|
import { layout, InputContainer, settings } from '@pie-lib/config-ui';
|
|
@@ -44,99 +42,2163 @@ function getAugmentedNamespace(n) {
|
|
|
44
42
|
return a;
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
var
|
|
45
|
+
var react = {exports: {}};
|
|
46
|
+
|
|
47
|
+
var react_production_min = {};
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
object-assign
|
|
51
|
+
(c) Sindre Sorhus
|
|
52
|
+
@license MIT
|
|
53
|
+
*/
|
|
54
|
+
/* eslint-disable no-unused-vars */
|
|
55
|
+
var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
|
|
56
|
+
var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
|
|
57
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
58
|
+
|
|
59
|
+
function toObject(val) {
|
|
60
|
+
if (val === null || val === undefined) {
|
|
61
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return Object(val);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function shouldUseNative() {
|
|
68
|
+
try {
|
|
69
|
+
if (!Object.assign) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
74
|
+
|
|
75
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
76
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
77
|
+
test1[5] = 'de';
|
|
78
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
83
|
+
var test2 = {};
|
|
84
|
+
for (var i = 0; i < 10; i++) {
|
|
85
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
86
|
+
}
|
|
87
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
88
|
+
return test2[n];
|
|
89
|
+
});
|
|
90
|
+
if (order2.join('') !== '0123456789') {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
95
|
+
var test3 = {};
|
|
96
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
97
|
+
test3[letter] = letter;
|
|
98
|
+
});
|
|
99
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
100
|
+
'abcdefghijklmnopqrst') {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return true;
|
|
105
|
+
} catch (err) {
|
|
106
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
112
|
+
var from;
|
|
113
|
+
var to = toObject(target);
|
|
114
|
+
var symbols;
|
|
115
|
+
|
|
116
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
117
|
+
from = Object(arguments[s]);
|
|
118
|
+
|
|
119
|
+
for (var key in from) {
|
|
120
|
+
if (hasOwnProperty$7.call(from, key)) {
|
|
121
|
+
to[key] = from[key];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (getOwnPropertySymbols$1) {
|
|
126
|
+
symbols = getOwnPropertySymbols$1(from);
|
|
127
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
128
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
129
|
+
to[symbols[i]] = from[symbols[i]];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return to;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/** @license React v16.14.0
|
|
139
|
+
* react.production.min.js
|
|
140
|
+
*
|
|
141
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the MIT license found in the
|
|
144
|
+
* LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/
|
|
146
|
+
var l$1=objectAssign,n$2="function"===typeof Symbol&&Symbol.for,p$1=n$2?Symbol.for("react.element"):60103,q$2=n$2?Symbol.for("react.portal"):60106,r$2=n$2?Symbol.for("react.fragment"):60107,t$1=n$2?Symbol.for("react.strict_mode"):60108,u$1=n$2?Symbol.for("react.profiler"):60114,v$3=n$2?Symbol.for("react.provider"):60109,w$3=n$2?Symbol.for("react.context"):60110,x$2=n$2?Symbol.for("react.forward_ref"):60112,y$2=n$2?Symbol.for("react.suspense"):60113,z$2=n$2?Symbol.for("react.memo"):60115,A$2=n$2?Symbol.for("react.lazy"):
|
|
147
|
+
60116,B$1="function"===typeof Symbol&&Symbol.iterator;function C$1(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
|
148
|
+
var D$1={isMounted:function(){return !1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E$2={};function F$2(a,b,c){this.props=a;this.context=b;this.refs=E$2;this.updater=c||D$1;}F$2.prototype.isReactComponent={};F$2.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(C$1(85));this.updater.enqueueSetState(this,a,b,"setState");};F$2.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate");};
|
|
149
|
+
function G$2(){}G$2.prototype=F$2.prototype;function H$2(a,b,c){this.props=a;this.context=b;this.refs=E$2;this.updater=c||D$1;}var I$2=H$2.prototype=new G$2;I$2.constructor=H$2;l$1(I$2,F$2.prototype);I$2.isPureReactComponent=!0;var J$2={current:null},K$2=Object.prototype.hasOwnProperty,L$2={key:!0,ref:!0,__self:!0,__source:!0};
|
|
150
|
+
function M$2(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)K$2.call(b,e)&&!L$2.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h;}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return {$$typeof:p$1,type:a,key:g,ref:k,props:d,_owner:J$2.current}}
|
|
151
|
+
function N$2(a,b){return {$$typeof:p$1,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O$1(a){return "object"===typeof a&&null!==a&&a.$$typeof===p$1}function escape(a){var b={"=":"=0",":":"=2"};return "$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var P$2=/\/+/g,Q$2=[];function R$2(a,b,c,e){if(Q$2.length){var d=Q$2.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return {result:a,keyPrefix:b,func:c,context:e,count:0}}
|
|
152
|
+
function S$2(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q$2.length&&Q$2.push(a);}
|
|
153
|
+
function T$2(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p$1:case q$2:g=!0;}}if(g)return c(e,a,""===b?"."+U$2(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U$2(d,k);g+=T$2(d,f,c,e);}else if(null===a||"object"!==typeof a?f=null:(f=B$1&&a[B$1]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),k=
|
|
154
|
+
0;!(d=a.next()).done;)d=d.value,f=b+U$2(d,k++),g+=T$2(d,f,c,e);else if("object"===d)throw c=""+a,Error(C$1(31,"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return g}function V$2(a,b,c){return null==a?0:T$2(a,"",b,c)}function U$2(a,b){return "object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W$2(a,b){a.func.call(a.context,b,a.count++);}
|
|
155
|
+
function aa$1(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X$2(a,e,c,function(a){return a}):null!=a&&(O$1(a)&&(a=N$2(a,d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(P$2,"$&/")+"/")+c)),e.push(a));}function X$2(a,b,c,e,d){var g="";null!=c&&(g=(""+c).replace(P$2,"$&/")+"/");b=R$2(b,g,e,d);V$2(a,aa$1,b);S$2(b);}var Y$2={current:null};function Z$2(){var a=Y$2.current;if(null===a)throw Error(C$1(321));return a}
|
|
156
|
+
var ba$1={ReactCurrentDispatcher:Y$2,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J$2,IsSomeRendererActing:{current:!1},assign:l$1};react_production_min.Children={map:function(a,b,c){if(null==a)return a;var e=[];X$2(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R$2(null,null,b,c);V$2(a,W$2,b);S$2(b);},count:function(a){return V$2(a,function(){return null},null)},toArray:function(a){var b=[];X$2(a,b,null,function(a){return a});return b},only:function(a){if(!O$1(a))throw Error(C$1(143));return a}};
|
|
157
|
+
react_production_min.Component=F$2;react_production_min.Fragment=r$2;react_production_min.Profiler=u$1;react_production_min.PureComponent=H$2;react_production_min.StrictMode=t$1;react_production_min.Suspense=y$2;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba$1;
|
|
158
|
+
react_production_min.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C$1(267,a));var e=l$1({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J$2.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K$2.call(b,h)&&!L$2.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h]);}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f;}return {$$typeof:p$1,type:a.type,
|
|
159
|
+
key:d,ref:g,props:e,_owner:k}};react_production_min.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w$3,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v$3,_context:a};return a.Consumer=a};react_production_min.createElement=M$2;react_production_min.createFactory=function(a){var b=M$2.bind(null,a);b.type=a;return b};react_production_min.createRef=function(){return {current:null}};react_production_min.forwardRef=function(a){return {$$typeof:x$2,render:a}};react_production_min.isValidElement=O$1;
|
|
160
|
+
react_production_min.lazy=function(a){return {$$typeof:A$2,_ctor:a,_status:-1,_result:null}};react_production_min.memo=function(a,b){return {$$typeof:z$2,type:a,compare:void 0===b?null:b}};react_production_min.useCallback=function(a,b){return Z$2().useCallback(a,b)};react_production_min.useContext=function(a,b){return Z$2().useContext(a,b)};react_production_min.useDebugValue=function(){};react_production_min.useEffect=function(a,b){return Z$2().useEffect(a,b)};react_production_min.useImperativeHandle=function(a,b,c){return Z$2().useImperativeHandle(a,b,c)};
|
|
161
|
+
react_production_min.useLayoutEffect=function(a,b){return Z$2().useLayoutEffect(a,b)};react_production_min.useMemo=function(a,b){return Z$2().useMemo(a,b)};react_production_min.useReducer=function(a,b,c){return Z$2().useReducer(a,b,c)};react_production_min.useRef=function(a){return Z$2().useRef(a)};react_production_min.useState=function(a){return Z$2().useState(a)};react_production_min.version="16.14.0";
|
|
162
|
+
|
|
163
|
+
var react_development = {};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the MIT license found in the
|
|
169
|
+
* LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
173
|
+
|
|
174
|
+
var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
|
|
175
|
+
|
|
176
|
+
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the MIT license found in the
|
|
182
|
+
* LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
var printWarning$2 = function() {};
|
|
186
|
+
|
|
187
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
188
|
+
var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
|
|
189
|
+
var loggedTypeFailures = {};
|
|
190
|
+
var has$1 = has$2;
|
|
191
|
+
|
|
192
|
+
printWarning$2 = function(text) {
|
|
193
|
+
var message = 'Warning: ' + text;
|
|
194
|
+
if (typeof console !== 'undefined') {
|
|
195
|
+
console.error(message);
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
// --- Welcome to debugging React ---
|
|
199
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
200
|
+
// to find the callsite that caused this warning to fire.
|
|
201
|
+
throw new Error(message);
|
|
202
|
+
} catch (x) { /**/ }
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Assert that the values match with the type specs.
|
|
208
|
+
* Error messages are memorized and will only be shown once.
|
|
209
|
+
*
|
|
210
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
211
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
212
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
213
|
+
* @param {string} componentName Name of the component for error messages.
|
|
214
|
+
* @param {?Function} getStack Returns the component stack.
|
|
215
|
+
* @private
|
|
216
|
+
*/
|
|
217
|
+
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
218
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
219
|
+
for (var typeSpecName in typeSpecs) {
|
|
220
|
+
if (has$1(typeSpecs, typeSpecName)) {
|
|
221
|
+
var error;
|
|
222
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
223
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
224
|
+
// After these have been cleaned up, we'll let them throw.
|
|
225
|
+
try {
|
|
226
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
227
|
+
// behavior as without this statement except with a better message.
|
|
228
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
229
|
+
var err = Error(
|
|
230
|
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
231
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
232
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
233
|
+
);
|
|
234
|
+
err.name = 'Invariant Violation';
|
|
235
|
+
throw err;
|
|
236
|
+
}
|
|
237
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
|
|
238
|
+
} catch (ex) {
|
|
239
|
+
error = ex;
|
|
240
|
+
}
|
|
241
|
+
if (error && !(error instanceof Error)) {
|
|
242
|
+
printWarning$2(
|
|
243
|
+
(componentName || 'React class') + ': type specification of ' +
|
|
244
|
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
245
|
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
246
|
+
'You may have forgotten to pass an argument to the type checker ' +
|
|
247
|
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
248
|
+
'shape all require an argument).'
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
252
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
253
|
+
// same error.
|
|
254
|
+
loggedTypeFailures[error.message] = true;
|
|
255
|
+
|
|
256
|
+
var stack = getStack ? getStack() : '';
|
|
257
|
+
|
|
258
|
+
printWarning$2(
|
|
259
|
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Resets warning cache when testing.
|
|
269
|
+
*
|
|
270
|
+
* @private
|
|
271
|
+
*/
|
|
272
|
+
checkPropTypes$1.resetWarningCache = function() {
|
|
273
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
274
|
+
loggedTypeFailures = {};
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
var checkPropTypes_1 = checkPropTypes$1;
|
|
279
|
+
|
|
280
|
+
/** @license React v16.14.0
|
|
281
|
+
* react.development.js
|
|
282
|
+
*
|
|
283
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
284
|
+
*
|
|
285
|
+
* This source code is licensed under the MIT license found in the
|
|
286
|
+
* LICENSE file in the root directory of this source tree.
|
|
287
|
+
*/
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
if (process.env.NODE_ENV !== "production") {
|
|
292
|
+
(function() {
|
|
293
|
+
|
|
294
|
+
var _assign = objectAssign;
|
|
295
|
+
var checkPropTypes = checkPropTypes_1;
|
|
296
|
+
|
|
297
|
+
var ReactVersion = '16.14.0';
|
|
298
|
+
|
|
299
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
300
|
+
// nor polyfill, then a plain number is used for performance.
|
|
301
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
302
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
303
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
304
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
305
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
306
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
307
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
308
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
309
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
310
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
311
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
312
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
313
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
314
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
315
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
316
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
317
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
318
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
319
|
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
320
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
321
|
+
function getIteratorFn(maybeIterable) {
|
|
322
|
+
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
327
|
+
|
|
328
|
+
if (typeof maybeIterator === 'function') {
|
|
329
|
+
return maybeIterator;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
return null;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Keeps track of the current dispatcher.
|
|
337
|
+
*/
|
|
338
|
+
var ReactCurrentDispatcher = {
|
|
339
|
+
/**
|
|
340
|
+
* @internal
|
|
341
|
+
* @type {ReactComponent}
|
|
342
|
+
*/
|
|
343
|
+
current: null
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Keeps track of the current batch's configuration such as how long an update
|
|
348
|
+
* should suspend for if it needs to.
|
|
349
|
+
*/
|
|
350
|
+
var ReactCurrentBatchConfig = {
|
|
351
|
+
suspense: null
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Keeps track of the current owner.
|
|
356
|
+
*
|
|
357
|
+
* The current owner is the component who should own any components that are
|
|
358
|
+
* currently being constructed.
|
|
359
|
+
*/
|
|
360
|
+
var ReactCurrentOwner = {
|
|
361
|
+
/**
|
|
362
|
+
* @internal
|
|
363
|
+
* @type {ReactComponent}
|
|
364
|
+
*/
|
|
365
|
+
current: null
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
|
369
|
+
function describeComponentFrame (name, source, ownerName) {
|
|
370
|
+
var sourceInfo = '';
|
|
371
|
+
|
|
372
|
+
if (source) {
|
|
373
|
+
var path = source.fileName;
|
|
374
|
+
var fileName = path.replace(BEFORE_SLASH_RE, '');
|
|
375
|
+
|
|
376
|
+
{
|
|
377
|
+
// In DEV, include code for a common special case:
|
|
378
|
+
// prefer "folder/index.js" instead of just "index.js".
|
|
379
|
+
if (/^index\./.test(fileName)) {
|
|
380
|
+
var match = path.match(BEFORE_SLASH_RE);
|
|
381
|
+
|
|
382
|
+
if (match) {
|
|
383
|
+
var pathBeforeSlash = match[1];
|
|
384
|
+
|
|
385
|
+
if (pathBeforeSlash) {
|
|
386
|
+
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
|
|
387
|
+
fileName = folderName + '/' + fileName;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
|
|
394
|
+
} else if (ownerName) {
|
|
395
|
+
sourceInfo = ' (created by ' + ownerName + ')';
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
var Resolved = 1;
|
|
402
|
+
function refineResolvedLazyComponent(lazyComponent) {
|
|
403
|
+
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
407
|
+
var functionName = innerType.displayName || innerType.name || '';
|
|
408
|
+
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
function getComponentName(type) {
|
|
412
|
+
if (type == null) {
|
|
413
|
+
// Host root, text node or just invalid type.
|
|
414
|
+
return null;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
{
|
|
418
|
+
if (typeof type.tag === 'number') {
|
|
419
|
+
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if (typeof type === 'function') {
|
|
424
|
+
return type.displayName || type.name || null;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (typeof type === 'string') {
|
|
428
|
+
return type;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
switch (type) {
|
|
432
|
+
case REACT_FRAGMENT_TYPE:
|
|
433
|
+
return 'Fragment';
|
|
434
|
+
|
|
435
|
+
case REACT_PORTAL_TYPE:
|
|
436
|
+
return 'Portal';
|
|
437
|
+
|
|
438
|
+
case REACT_PROFILER_TYPE:
|
|
439
|
+
return "Profiler";
|
|
440
|
+
|
|
441
|
+
case REACT_STRICT_MODE_TYPE:
|
|
442
|
+
return 'StrictMode';
|
|
443
|
+
|
|
444
|
+
case REACT_SUSPENSE_TYPE:
|
|
445
|
+
return 'Suspense';
|
|
446
|
+
|
|
447
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
448
|
+
return 'SuspenseList';
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
if (typeof type === 'object') {
|
|
452
|
+
switch (type.$$typeof) {
|
|
453
|
+
case REACT_CONTEXT_TYPE:
|
|
454
|
+
return 'Context.Consumer';
|
|
455
|
+
|
|
456
|
+
case REACT_PROVIDER_TYPE:
|
|
457
|
+
return 'Context.Provider';
|
|
458
|
+
|
|
459
|
+
case REACT_FORWARD_REF_TYPE:
|
|
460
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
|
461
|
+
|
|
462
|
+
case REACT_MEMO_TYPE:
|
|
463
|
+
return getComponentName(type.type);
|
|
464
|
+
|
|
465
|
+
case REACT_BLOCK_TYPE:
|
|
466
|
+
return getComponentName(type.render);
|
|
467
|
+
|
|
468
|
+
case REACT_LAZY_TYPE:
|
|
469
|
+
{
|
|
470
|
+
var thenable = type;
|
|
471
|
+
var resolvedThenable = refineResolvedLazyComponent(thenable);
|
|
472
|
+
|
|
473
|
+
if (resolvedThenable) {
|
|
474
|
+
return getComponentName(resolvedThenable);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
return null;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
var ReactDebugCurrentFrame = {};
|
|
486
|
+
var currentlyValidatingElement = null;
|
|
487
|
+
function setCurrentlyValidatingElement(element) {
|
|
488
|
+
{
|
|
489
|
+
currentlyValidatingElement = element;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
{
|
|
494
|
+
// Stack implementation injected by the current renderer.
|
|
495
|
+
ReactDebugCurrentFrame.getCurrentStack = null;
|
|
496
|
+
|
|
497
|
+
ReactDebugCurrentFrame.getStackAddendum = function () {
|
|
498
|
+
var stack = ''; // Add an extra top frame while an element is being validated
|
|
499
|
+
|
|
500
|
+
if (currentlyValidatingElement) {
|
|
501
|
+
var name = getComponentName(currentlyValidatingElement.type);
|
|
502
|
+
var owner = currentlyValidatingElement._owner;
|
|
503
|
+
stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
|
|
504
|
+
} // Delegate to the injected renderer-specific implementation
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
var impl = ReactDebugCurrentFrame.getCurrentStack;
|
|
508
|
+
|
|
509
|
+
if (impl) {
|
|
510
|
+
stack += impl() || '';
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
return stack;
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Used by act() to track whether you're inside an act() scope.
|
|
519
|
+
*/
|
|
520
|
+
var IsSomeRendererActing = {
|
|
521
|
+
current: false
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
var ReactSharedInternals = {
|
|
525
|
+
ReactCurrentDispatcher: ReactCurrentDispatcher,
|
|
526
|
+
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
|
527
|
+
ReactCurrentOwner: ReactCurrentOwner,
|
|
528
|
+
IsSomeRendererActing: IsSomeRendererActing,
|
|
529
|
+
// Used by renderers to avoid bundling object-assign twice in UMD bundles:
|
|
530
|
+
assign: _assign
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
{
|
|
534
|
+
_assign(ReactSharedInternals, {
|
|
535
|
+
// These should not be included in production.
|
|
536
|
+
ReactDebugCurrentFrame: ReactDebugCurrentFrame,
|
|
537
|
+
// Shim for React DOM 16.0.0 which still destructured (but not used) this.
|
|
538
|
+
// TODO: remove in React 17.0.
|
|
539
|
+
ReactComponentTreeHook: {}
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// by calls to these methods by a Babel plugin.
|
|
544
|
+
//
|
|
545
|
+
// In PROD (or in packages without access to React internals),
|
|
546
|
+
// they are left as they are instead.
|
|
547
|
+
|
|
548
|
+
function warn(format) {
|
|
549
|
+
{
|
|
550
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
551
|
+
args[_key - 1] = arguments[_key];
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
printWarning('warn', format, args);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
function error(format) {
|
|
558
|
+
{
|
|
559
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
560
|
+
args[_key2 - 1] = arguments[_key2];
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
printWarning('error', format, args);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
function printWarning(level, format, args) {
|
|
568
|
+
// When changing this logic, you might want to also
|
|
569
|
+
// update consoleWithStackDev.www.js as well.
|
|
570
|
+
{
|
|
571
|
+
var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
|
|
572
|
+
|
|
573
|
+
if (!hasExistingStack) {
|
|
574
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
575
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
576
|
+
|
|
577
|
+
if (stack !== '') {
|
|
578
|
+
format += '%s';
|
|
579
|
+
args = args.concat([stack]);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
var argsWithFormat = args.map(function (item) {
|
|
584
|
+
return '' + item;
|
|
585
|
+
}); // Careful: RN currently depends on this prefix
|
|
586
|
+
|
|
587
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
588
|
+
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
589
|
+
// eslint-disable-next-line react-internal/no-production-logging
|
|
590
|
+
|
|
591
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
592
|
+
|
|
593
|
+
try {
|
|
594
|
+
// --- Welcome to debugging React ---
|
|
595
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
596
|
+
// to find the callsite that caused this warning to fire.
|
|
597
|
+
var argIndex = 0;
|
|
598
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
599
|
+
return args[argIndex++];
|
|
600
|
+
});
|
|
601
|
+
throw new Error(message);
|
|
602
|
+
} catch (x) {}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
var didWarnStateUpdateForUnmountedComponent = {};
|
|
607
|
+
|
|
608
|
+
function warnNoop(publicInstance, callerName) {
|
|
609
|
+
{
|
|
610
|
+
var _constructor = publicInstance.constructor;
|
|
611
|
+
var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
|
|
612
|
+
var warningKey = componentName + "." + callerName;
|
|
613
|
+
|
|
614
|
+
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
|
|
619
|
+
|
|
620
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* This is the abstract API for an update queue.
|
|
625
|
+
*/
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
var ReactNoopUpdateQueue = {
|
|
629
|
+
/**
|
|
630
|
+
* Checks whether or not this composite component is mounted.
|
|
631
|
+
* @param {ReactClass} publicInstance The instance we want to test.
|
|
632
|
+
* @return {boolean} True if mounted, false otherwise.
|
|
633
|
+
* @protected
|
|
634
|
+
* @final
|
|
635
|
+
*/
|
|
636
|
+
isMounted: function (publicInstance) {
|
|
637
|
+
return false;
|
|
638
|
+
},
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Forces an update. This should only be invoked when it is known with
|
|
642
|
+
* certainty that we are **not** in a DOM transaction.
|
|
643
|
+
*
|
|
644
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
645
|
+
* component's state has changed but `setState` was not called.
|
|
646
|
+
*
|
|
647
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
648
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
649
|
+
*
|
|
650
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
651
|
+
* @param {?function} callback Called after component is updated.
|
|
652
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
653
|
+
* @internal
|
|
654
|
+
*/
|
|
655
|
+
enqueueForceUpdate: function (publicInstance, callback, callerName) {
|
|
656
|
+
warnNoop(publicInstance, 'forceUpdate');
|
|
657
|
+
},
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
661
|
+
* You should treat `this.state` as immutable.
|
|
662
|
+
*
|
|
663
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
664
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
665
|
+
*
|
|
666
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
667
|
+
* @param {object} completeState Next state.
|
|
668
|
+
* @param {?function} callback Called after component is updated.
|
|
669
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
670
|
+
* @internal
|
|
671
|
+
*/
|
|
672
|
+
enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
|
|
673
|
+
warnNoop(publicInstance, 'replaceState');
|
|
674
|
+
},
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Sets a subset of the state. This only exists because _pendingState is
|
|
678
|
+
* internal. This provides a merging strategy that is not available to deep
|
|
679
|
+
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
680
|
+
* during the merge.
|
|
681
|
+
*
|
|
682
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
683
|
+
* @param {object} partialState Next partial state to be merged with state.
|
|
684
|
+
* @param {?function} callback Called after component is updated.
|
|
685
|
+
* @param {?string} Name of the calling function in the public API.
|
|
686
|
+
* @internal
|
|
687
|
+
*/
|
|
688
|
+
enqueueSetState: function (publicInstance, partialState, callback, callerName) {
|
|
689
|
+
warnNoop(publicInstance, 'setState');
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
var emptyObject = {};
|
|
694
|
+
|
|
695
|
+
{
|
|
696
|
+
Object.freeze(emptyObject);
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Base class helpers for the updating state of a component.
|
|
700
|
+
*/
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
function Component(props, context, updater) {
|
|
704
|
+
this.props = props;
|
|
705
|
+
this.context = context; // If a component has string refs, we will assign a different object later.
|
|
706
|
+
|
|
707
|
+
this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
|
|
708
|
+
// renderer.
|
|
709
|
+
|
|
710
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
Component.prototype.isReactComponent = {};
|
|
714
|
+
/**
|
|
715
|
+
* Sets a subset of the state. Always use this to mutate
|
|
716
|
+
* state. You should treat `this.state` as immutable.
|
|
717
|
+
*
|
|
718
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
719
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
720
|
+
*
|
|
721
|
+
* There is no guarantee that calls to `setState` will run synchronously,
|
|
722
|
+
* as they may eventually be batched together. You can provide an optional
|
|
723
|
+
* callback that will be executed when the call to setState is actually
|
|
724
|
+
* completed.
|
|
725
|
+
*
|
|
726
|
+
* When a function is provided to setState, it will be called at some point in
|
|
727
|
+
* the future (not synchronously). It will be called with the up to date
|
|
728
|
+
* component arguments (state, props, context). These values can be different
|
|
729
|
+
* from this.* because your function may be called after receiveProps but before
|
|
730
|
+
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
|
731
|
+
* assigned to this.
|
|
732
|
+
*
|
|
733
|
+
* @param {object|function} partialState Next partial state or function to
|
|
734
|
+
* produce next partial state to be merged with current state.
|
|
735
|
+
* @param {?function} callback Called after state is updated.
|
|
736
|
+
* @final
|
|
737
|
+
* @protected
|
|
738
|
+
*/
|
|
739
|
+
|
|
740
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
741
|
+
if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
|
|
742
|
+
{
|
|
743
|
+
throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
748
|
+
};
|
|
749
|
+
/**
|
|
750
|
+
* Forces an update. This should only be invoked when it is known with
|
|
751
|
+
* certainty that we are **not** in a DOM transaction.
|
|
752
|
+
*
|
|
753
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
754
|
+
* component's state has changed but `setState` was not called.
|
|
755
|
+
*
|
|
756
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
757
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
758
|
+
*
|
|
759
|
+
* @param {?function} callback Called after update is complete.
|
|
760
|
+
* @final
|
|
761
|
+
* @protected
|
|
762
|
+
*/
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
766
|
+
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
|
770
|
+
* we would like to deprecate them, we're not going to move them over to this
|
|
771
|
+
* modern base class. Instead, we define a getter that warns if it's accessed.
|
|
772
|
+
*/
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
{
|
|
776
|
+
var deprecatedAPIs = {
|
|
777
|
+
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
|
778
|
+
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
var defineDeprecationWarning = function (methodName, info) {
|
|
782
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
783
|
+
get: function () {
|
|
784
|
+
warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
785
|
+
|
|
786
|
+
return undefined;
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
for (var fnName in deprecatedAPIs) {
|
|
792
|
+
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
793
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
function ComponentDummy() {}
|
|
799
|
+
|
|
800
|
+
ComponentDummy.prototype = Component.prototype;
|
|
801
|
+
/**
|
|
802
|
+
* Convenience component with default shallow equality check for sCU.
|
|
803
|
+
*/
|
|
804
|
+
|
|
805
|
+
function PureComponent(props, context, updater) {
|
|
806
|
+
this.props = props;
|
|
807
|
+
this.context = context; // If a component has string refs, we will assign a different object later.
|
|
808
|
+
|
|
809
|
+
this.refs = emptyObject;
|
|
810
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
814
|
+
pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
|
|
815
|
+
|
|
816
|
+
_assign(pureComponentPrototype, Component.prototype);
|
|
817
|
+
|
|
818
|
+
pureComponentPrototype.isPureReactComponent = true;
|
|
819
|
+
|
|
820
|
+
// an immutable object with a single mutable value
|
|
821
|
+
function createRef() {
|
|
822
|
+
var refObject = {
|
|
823
|
+
current: null
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
{
|
|
827
|
+
Object.seal(refObject);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
return refObject;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
834
|
+
var RESERVED_PROPS = {
|
|
835
|
+
key: true,
|
|
836
|
+
ref: true,
|
|
837
|
+
__self: true,
|
|
838
|
+
__source: true
|
|
839
|
+
};
|
|
840
|
+
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
|
|
841
|
+
|
|
842
|
+
{
|
|
843
|
+
didWarnAboutStringRefs = {};
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
function hasValidRef(config) {
|
|
847
|
+
{
|
|
848
|
+
if (hasOwnProperty.call(config, 'ref')) {
|
|
849
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
850
|
+
|
|
851
|
+
if (getter && getter.isReactWarning) {
|
|
852
|
+
return false;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
return config.ref !== undefined;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
function hasValidKey(config) {
|
|
861
|
+
{
|
|
862
|
+
if (hasOwnProperty.call(config, 'key')) {
|
|
863
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
864
|
+
|
|
865
|
+
if (getter && getter.isReactWarning) {
|
|
866
|
+
return false;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
return config.key !== undefined;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
875
|
+
var warnAboutAccessingKey = function () {
|
|
876
|
+
{
|
|
877
|
+
if (!specialPropKeyWarningShown) {
|
|
878
|
+
specialPropKeyWarningShown = true;
|
|
879
|
+
|
|
880
|
+
error('%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://fb.me/react-special-props)', displayName);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
886
|
+
Object.defineProperty(props, 'key', {
|
|
887
|
+
get: warnAboutAccessingKey,
|
|
888
|
+
configurable: true
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
function defineRefPropWarningGetter(props, displayName) {
|
|
893
|
+
var warnAboutAccessingRef = function () {
|
|
894
|
+
{
|
|
895
|
+
if (!specialPropRefWarningShown) {
|
|
896
|
+
specialPropRefWarningShown = true;
|
|
897
|
+
|
|
898
|
+
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://fb.me/react-special-props)', displayName);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
warnAboutAccessingRef.isReactWarning = true;
|
|
904
|
+
Object.defineProperty(props, 'ref', {
|
|
905
|
+
get: warnAboutAccessingRef,
|
|
906
|
+
configurable: true
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
function warnIfStringRefCannotBeAutoConverted(config) {
|
|
911
|
+
{
|
|
912
|
+
if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
|
|
913
|
+
var componentName = getComponentName(ReactCurrentOwner.current.type);
|
|
914
|
+
|
|
915
|
+
if (!didWarnAboutStringRefs[componentName]) {
|
|
916
|
+
error('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://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
|
|
917
|
+
|
|
918
|
+
didWarnAboutStringRefs[componentName] = true;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* Factory method to create a new React element. This no longer adheres to
|
|
925
|
+
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
926
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
927
|
+
* if something is a React Element.
|
|
928
|
+
*
|
|
929
|
+
* @param {*} type
|
|
930
|
+
* @param {*} props
|
|
931
|
+
* @param {*} key
|
|
932
|
+
* @param {string|object} ref
|
|
933
|
+
* @param {*} owner
|
|
934
|
+
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
935
|
+
* different from the `owner` when React.createElement is called, so that we
|
|
936
|
+
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
937
|
+
* functions, and as long as `this` and owner are the same, there will be no
|
|
938
|
+
* change in behavior.
|
|
939
|
+
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
940
|
+
* indicating filename, line number, and/or other information.
|
|
941
|
+
* @internal
|
|
942
|
+
*/
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
946
|
+
var element = {
|
|
947
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
948
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
949
|
+
// Built-in properties that belong on the element
|
|
950
|
+
type: type,
|
|
951
|
+
key: key,
|
|
952
|
+
ref: ref,
|
|
953
|
+
props: props,
|
|
954
|
+
// Record the component responsible for creating this element.
|
|
955
|
+
_owner: owner
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
{
|
|
959
|
+
// The validation flag is currently mutative. We put it on
|
|
960
|
+
// an external backing store so that we can freeze the whole object.
|
|
961
|
+
// This can be replaced with a WeakMap once they are implemented in
|
|
962
|
+
// commonly used development environments.
|
|
963
|
+
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
964
|
+
// the validation flag non-enumerable (where possible, which should
|
|
965
|
+
// include every environment we run tests in), so the test framework
|
|
966
|
+
// ignores it.
|
|
967
|
+
|
|
968
|
+
Object.defineProperty(element._store, 'validated', {
|
|
969
|
+
configurable: false,
|
|
970
|
+
enumerable: false,
|
|
971
|
+
writable: true,
|
|
972
|
+
value: false
|
|
973
|
+
}); // self and source are DEV only properties.
|
|
974
|
+
|
|
975
|
+
Object.defineProperty(element, '_self', {
|
|
976
|
+
configurable: false,
|
|
977
|
+
enumerable: false,
|
|
978
|
+
writable: false,
|
|
979
|
+
value: self
|
|
980
|
+
}); // Two elements created in two different places should be considered
|
|
981
|
+
// equal for testing purposes and therefore we hide it from enumeration.
|
|
982
|
+
|
|
983
|
+
Object.defineProperty(element, '_source', {
|
|
984
|
+
configurable: false,
|
|
985
|
+
enumerable: false,
|
|
986
|
+
writable: false,
|
|
987
|
+
value: source
|
|
988
|
+
});
|
|
989
|
+
|
|
990
|
+
if (Object.freeze) {
|
|
991
|
+
Object.freeze(element.props);
|
|
992
|
+
Object.freeze(element);
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
return element;
|
|
997
|
+
};
|
|
998
|
+
/**
|
|
999
|
+
* Create and return a new ReactElement of the given type.
|
|
1000
|
+
* See https://reactjs.org/docs/react-api.html#createelement
|
|
1001
|
+
*/
|
|
1002
|
+
|
|
1003
|
+
function createElement(type, config, children) {
|
|
1004
|
+
var propName; // Reserved names are extracted
|
|
1005
|
+
|
|
1006
|
+
var props = {};
|
|
1007
|
+
var key = null;
|
|
1008
|
+
var ref = null;
|
|
1009
|
+
var self = null;
|
|
1010
|
+
var source = null;
|
|
1011
|
+
|
|
1012
|
+
if (config != null) {
|
|
1013
|
+
if (hasValidRef(config)) {
|
|
1014
|
+
ref = config.ref;
|
|
1015
|
+
|
|
1016
|
+
{
|
|
1017
|
+
warnIfStringRefCannotBeAutoConverted(config);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
if (hasValidKey(config)) {
|
|
1022
|
+
key = '' + config.key;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
self = config.__self === undefined ? null : config.__self;
|
|
1026
|
+
source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
|
|
1027
|
+
|
|
1028
|
+
for (propName in config) {
|
|
1029
|
+
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
1030
|
+
props[propName] = config[propName];
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
} // Children can be more than one argument, and those are transferred onto
|
|
1034
|
+
// the newly allocated props object.
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
var childrenLength = arguments.length - 2;
|
|
1038
|
+
|
|
1039
|
+
if (childrenLength === 1) {
|
|
1040
|
+
props.children = children;
|
|
1041
|
+
} else if (childrenLength > 1) {
|
|
1042
|
+
var childArray = Array(childrenLength);
|
|
1043
|
+
|
|
1044
|
+
for (var i = 0; i < childrenLength; i++) {
|
|
1045
|
+
childArray[i] = arguments[i + 2];
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
{
|
|
1049
|
+
if (Object.freeze) {
|
|
1050
|
+
Object.freeze(childArray);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
props.children = childArray;
|
|
1055
|
+
} // Resolve default props
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
if (type && type.defaultProps) {
|
|
1059
|
+
var defaultProps = type.defaultProps;
|
|
1060
|
+
|
|
1061
|
+
for (propName in defaultProps) {
|
|
1062
|
+
if (props[propName] === undefined) {
|
|
1063
|
+
props[propName] = defaultProps[propName];
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
{
|
|
1069
|
+
if (key || ref) {
|
|
1070
|
+
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
1071
|
+
|
|
1072
|
+
if (key) {
|
|
1073
|
+
defineKeyPropWarningGetter(props, displayName);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
if (ref) {
|
|
1077
|
+
defineRefPropWarningGetter(props, displayName);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
1083
|
+
}
|
|
1084
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
1085
|
+
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
1086
|
+
return newElement;
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Clone and return a new ReactElement using element as the starting point.
|
|
1090
|
+
* See https://reactjs.org/docs/react-api.html#cloneelement
|
|
1091
|
+
*/
|
|
1092
|
+
|
|
1093
|
+
function cloneElement(element, config, children) {
|
|
1094
|
+
if (!!(element === null || element === undefined)) {
|
|
1095
|
+
{
|
|
1096
|
+
throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
var propName; // Original props are copied
|
|
1101
|
+
|
|
1102
|
+
var props = _assign({}, element.props); // Reserved names are extracted
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
var key = element.key;
|
|
1106
|
+
var ref = element.ref; // Self is preserved since the owner is preserved.
|
|
1107
|
+
|
|
1108
|
+
var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
|
|
1109
|
+
// transpiler, and the original source is probably a better indicator of the
|
|
1110
|
+
// true owner.
|
|
1111
|
+
|
|
1112
|
+
var source = element._source; // Owner will be preserved, unless ref is overridden
|
|
1113
|
+
|
|
1114
|
+
var owner = element._owner;
|
|
1115
|
+
|
|
1116
|
+
if (config != null) {
|
|
1117
|
+
if (hasValidRef(config)) {
|
|
1118
|
+
// Silently steal the ref from the parent.
|
|
1119
|
+
ref = config.ref;
|
|
1120
|
+
owner = ReactCurrentOwner.current;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
if (hasValidKey(config)) {
|
|
1124
|
+
key = '' + config.key;
|
|
1125
|
+
} // Remaining properties override existing props
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
var defaultProps;
|
|
1129
|
+
|
|
1130
|
+
if (element.type && element.type.defaultProps) {
|
|
1131
|
+
defaultProps = element.type.defaultProps;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
for (propName in config) {
|
|
1135
|
+
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
1136
|
+
if (config[propName] === undefined && defaultProps !== undefined) {
|
|
1137
|
+
// Resolve default props
|
|
1138
|
+
props[propName] = defaultProps[propName];
|
|
1139
|
+
} else {
|
|
1140
|
+
props[propName] = config[propName];
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
} // Children can be more than one argument, and those are transferred onto
|
|
1145
|
+
// the newly allocated props object.
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
var childrenLength = arguments.length - 2;
|
|
1149
|
+
|
|
1150
|
+
if (childrenLength === 1) {
|
|
1151
|
+
props.children = children;
|
|
1152
|
+
} else if (childrenLength > 1) {
|
|
1153
|
+
var childArray = Array(childrenLength);
|
|
1154
|
+
|
|
1155
|
+
for (var i = 0; i < childrenLength; i++) {
|
|
1156
|
+
childArray[i] = arguments[i + 2];
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
props.children = childArray;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
return ReactElement(element.type, key, ref, self, source, owner, props);
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Verifies the object is a ReactElement.
|
|
1166
|
+
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
1167
|
+
* @param {?object} object
|
|
1168
|
+
* @return {boolean} True if `object` is a ReactElement.
|
|
1169
|
+
* @final
|
|
1170
|
+
*/
|
|
1171
|
+
|
|
1172
|
+
function isValidElement(object) {
|
|
1173
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
var SEPARATOR = '.';
|
|
1177
|
+
var SUBSEPARATOR = ':';
|
|
1178
|
+
/**
|
|
1179
|
+
* Escape and wrap key so it is safe to use as a reactid
|
|
1180
|
+
*
|
|
1181
|
+
* @param {string} key to be escaped.
|
|
1182
|
+
* @return {string} the escaped key.
|
|
1183
|
+
*/
|
|
1184
|
+
|
|
1185
|
+
function escape(key) {
|
|
1186
|
+
var escapeRegex = /[=:]/g;
|
|
1187
|
+
var escaperLookup = {
|
|
1188
|
+
'=': '=0',
|
|
1189
|
+
':': '=2'
|
|
1190
|
+
};
|
|
1191
|
+
var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
|
1192
|
+
return escaperLookup[match];
|
|
1193
|
+
});
|
|
1194
|
+
return '$' + escapedString;
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* TODO: Test that a single child and an array with one item have the same key
|
|
1198
|
+
* pattern.
|
|
1199
|
+
*/
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
var didWarnAboutMaps = false;
|
|
1203
|
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
1204
|
+
|
|
1205
|
+
function escapeUserProvidedKey(text) {
|
|
1206
|
+
return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
var POOL_SIZE = 10;
|
|
1210
|
+
var traverseContextPool = [];
|
|
1211
|
+
|
|
1212
|
+
function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
|
|
1213
|
+
if (traverseContextPool.length) {
|
|
1214
|
+
var traverseContext = traverseContextPool.pop();
|
|
1215
|
+
traverseContext.result = mapResult;
|
|
1216
|
+
traverseContext.keyPrefix = keyPrefix;
|
|
1217
|
+
traverseContext.func = mapFunction;
|
|
1218
|
+
traverseContext.context = mapContext;
|
|
1219
|
+
traverseContext.count = 0;
|
|
1220
|
+
return traverseContext;
|
|
1221
|
+
} else {
|
|
1222
|
+
return {
|
|
1223
|
+
result: mapResult,
|
|
1224
|
+
keyPrefix: keyPrefix,
|
|
1225
|
+
func: mapFunction,
|
|
1226
|
+
context: mapContext,
|
|
1227
|
+
count: 0
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
function releaseTraverseContext(traverseContext) {
|
|
1233
|
+
traverseContext.result = null;
|
|
1234
|
+
traverseContext.keyPrefix = null;
|
|
1235
|
+
traverseContext.func = null;
|
|
1236
|
+
traverseContext.context = null;
|
|
1237
|
+
traverseContext.count = 0;
|
|
1238
|
+
|
|
1239
|
+
if (traverseContextPool.length < POOL_SIZE) {
|
|
1240
|
+
traverseContextPool.push(traverseContext);
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* @param {?*} children Children tree container.
|
|
1245
|
+
* @param {!string} nameSoFar Name of the key path so far.
|
|
1246
|
+
* @param {!function} callback Callback to invoke with each child found.
|
|
1247
|
+
* @param {?*} traverseContext Used to pass information throughout the traversal
|
|
1248
|
+
* process.
|
|
1249
|
+
* @return {!number} The number of children in this subtree.
|
|
1250
|
+
*/
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
|
1254
|
+
var type = typeof children;
|
|
1255
|
+
|
|
1256
|
+
if (type === 'undefined' || type === 'boolean') {
|
|
1257
|
+
// All of the above are perceived as null.
|
|
1258
|
+
children = null;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
var invokeCallback = false;
|
|
1262
|
+
|
|
1263
|
+
if (children === null) {
|
|
1264
|
+
invokeCallback = true;
|
|
1265
|
+
} else {
|
|
1266
|
+
switch (type) {
|
|
1267
|
+
case 'string':
|
|
1268
|
+
case 'number':
|
|
1269
|
+
invokeCallback = true;
|
|
1270
|
+
break;
|
|
1271
|
+
|
|
1272
|
+
case 'object':
|
|
1273
|
+
switch (children.$$typeof) {
|
|
1274
|
+
case REACT_ELEMENT_TYPE:
|
|
1275
|
+
case REACT_PORTAL_TYPE:
|
|
1276
|
+
invokeCallback = true;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
if (invokeCallback) {
|
|
1283
|
+
callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
|
|
1284
|
+
// so that it's consistent if the number of children grows.
|
|
1285
|
+
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
|
1286
|
+
return 1;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
var child;
|
|
1290
|
+
var nextName;
|
|
1291
|
+
var subtreeCount = 0; // Count of children found in the current subtree.
|
|
1292
|
+
|
|
1293
|
+
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
1294
|
+
|
|
1295
|
+
if (Array.isArray(children)) {
|
|
1296
|
+
for (var i = 0; i < children.length; i++) {
|
|
1297
|
+
child = children[i];
|
|
1298
|
+
nextName = nextNamePrefix + getComponentKey(child, i);
|
|
1299
|
+
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
1300
|
+
}
|
|
1301
|
+
} else {
|
|
1302
|
+
var iteratorFn = getIteratorFn(children);
|
|
1303
|
+
|
|
1304
|
+
if (typeof iteratorFn === 'function') {
|
|
1305
|
+
|
|
1306
|
+
{
|
|
1307
|
+
// Warn about using Maps as children
|
|
1308
|
+
if (iteratorFn === children.entries) {
|
|
1309
|
+
if (!didWarnAboutMaps) {
|
|
1310
|
+
warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
didWarnAboutMaps = true;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
var iterator = iteratorFn.call(children);
|
|
1318
|
+
var step;
|
|
1319
|
+
var ii = 0;
|
|
1320
|
+
|
|
1321
|
+
while (!(step = iterator.next()).done) {
|
|
1322
|
+
child = step.value;
|
|
1323
|
+
nextName = nextNamePrefix + getComponentKey(child, ii++);
|
|
1324
|
+
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
1325
|
+
}
|
|
1326
|
+
} else if (type === 'object') {
|
|
1327
|
+
var addendum = '';
|
|
1328
|
+
|
|
1329
|
+
{
|
|
1330
|
+
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
var childrenString = '' + children;
|
|
1334
|
+
|
|
1335
|
+
{
|
|
1336
|
+
{
|
|
1337
|
+
throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
return subtreeCount;
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Traverses children that are typically specified as `props.children`, but
|
|
1347
|
+
* might also be specified through attributes:
|
|
1348
|
+
*
|
|
1349
|
+
* - `traverseAllChildren(this.props.children, ...)`
|
|
1350
|
+
* - `traverseAllChildren(this.props.leftPanelChildren, ...)`
|
|
1351
|
+
*
|
|
1352
|
+
* The `traverseContext` is an optional argument that is passed through the
|
|
1353
|
+
* entire traversal. It can be used to store accumulations or anything else that
|
|
1354
|
+
* the callback might find relevant.
|
|
1355
|
+
*
|
|
1356
|
+
* @param {?*} children Children tree object.
|
|
1357
|
+
* @param {!function} callback To invoke upon traversing each child.
|
|
1358
|
+
* @param {?*} traverseContext Context for traversal.
|
|
1359
|
+
* @return {!number} The number of children in this subtree.
|
|
1360
|
+
*/
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
function traverseAllChildren(children, callback, traverseContext) {
|
|
1364
|
+
if (children == null) {
|
|
1365
|
+
return 0;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Generate a key string that identifies a component within a set.
|
|
1372
|
+
*
|
|
1373
|
+
* @param {*} component A component that could contain a manual key.
|
|
1374
|
+
* @param {number} index Index that is used if a manual key is not provided.
|
|
1375
|
+
* @return {string}
|
|
1376
|
+
*/
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
function getComponentKey(component, index) {
|
|
1380
|
+
// Do some typechecking here since we call this blindly. We want to ensure
|
|
1381
|
+
// that we don't block potential future ES APIs.
|
|
1382
|
+
if (typeof component === 'object' && component !== null && component.key != null) {
|
|
1383
|
+
// Explicit key
|
|
1384
|
+
return escape(component.key);
|
|
1385
|
+
} // Implicit key determined by the index in the set
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
return index.toString(36);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
function forEachSingleChild(bookKeeping, child, name) {
|
|
1392
|
+
var func = bookKeeping.func,
|
|
1393
|
+
context = bookKeeping.context;
|
|
1394
|
+
func.call(context, child, bookKeeping.count++);
|
|
1395
|
+
}
|
|
1396
|
+
/**
|
|
1397
|
+
* Iterates through children that are typically specified as `props.children`.
|
|
1398
|
+
*
|
|
1399
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenforeach
|
|
1400
|
+
*
|
|
1401
|
+
* The provided forEachFunc(child, index) will be called for each
|
|
1402
|
+
* leaf child.
|
|
1403
|
+
*
|
|
1404
|
+
* @param {?*} children Children tree container.
|
|
1405
|
+
* @param {function(*, int)} forEachFunc
|
|
1406
|
+
* @param {*} forEachContext Context for forEachContext.
|
|
1407
|
+
*/
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
function forEachChildren(children, forEachFunc, forEachContext) {
|
|
1411
|
+
if (children == null) {
|
|
1412
|
+
return children;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
|
|
1416
|
+
traverseAllChildren(children, forEachSingleChild, traverseContext);
|
|
1417
|
+
releaseTraverseContext(traverseContext);
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
|
1421
|
+
var result = bookKeeping.result,
|
|
1422
|
+
keyPrefix = bookKeeping.keyPrefix,
|
|
1423
|
+
func = bookKeeping.func,
|
|
1424
|
+
context = bookKeeping.context;
|
|
1425
|
+
var mappedChild = func.call(context, child, bookKeeping.count++);
|
|
1426
|
+
|
|
1427
|
+
if (Array.isArray(mappedChild)) {
|
|
1428
|
+
mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
|
|
1429
|
+
return c;
|
|
1430
|
+
});
|
|
1431
|
+
} else if (mappedChild != null) {
|
|
1432
|
+
if (isValidElement(mappedChild)) {
|
|
1433
|
+
mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
|
|
1434
|
+
// traverseAllChildren used to do for objects as children
|
|
1435
|
+
keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
result.push(mappedChild);
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
|
1443
|
+
var escapedPrefix = '';
|
|
1444
|
+
|
|
1445
|
+
if (prefix != null) {
|
|
1446
|
+
escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
|
1447
|
+
}
|
|
48
1448
|
|
|
49
|
-
var
|
|
1449
|
+
var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
|
|
1450
|
+
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
|
1451
|
+
releaseTraverseContext(traverseContext);
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Maps children that are typically specified as `props.children`.
|
|
1455
|
+
*
|
|
1456
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenmap
|
|
1457
|
+
*
|
|
1458
|
+
* The provided mapFunction(child, key, index) will be called for each
|
|
1459
|
+
* leaf child.
|
|
1460
|
+
*
|
|
1461
|
+
* @param {?*} children Children tree container.
|
|
1462
|
+
* @param {function(*, int)} func The map function.
|
|
1463
|
+
* @param {*} context Context for mapFunction.
|
|
1464
|
+
* @return {object} Object containing the ordered map of results.
|
|
1465
|
+
*/
|
|
50
1466
|
|
|
51
|
-
/*
|
|
52
|
-
object-assign
|
|
53
|
-
(c) Sindre Sorhus
|
|
54
|
-
@license MIT
|
|
55
|
-
*/
|
|
56
|
-
/* eslint-disable no-unused-vars */
|
|
57
|
-
var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
|
|
58
|
-
var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
|
|
59
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
60
1467
|
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
1468
|
+
function mapChildren(children, func, context) {
|
|
1469
|
+
if (children == null) {
|
|
1470
|
+
return children;
|
|
1471
|
+
}
|
|
65
1472
|
|
|
66
|
-
|
|
1473
|
+
var result = [];
|
|
1474
|
+
mapIntoWithKeyPrefixInternal(children, result, null, func, context);
|
|
1475
|
+
return result;
|
|
67
1476
|
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Count the number of children that are typically specified as
|
|
1479
|
+
* `props.children`.
|
|
1480
|
+
*
|
|
1481
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrencount
|
|
1482
|
+
*
|
|
1483
|
+
* @param {?*} children Children tree container.
|
|
1484
|
+
* @return {number} The number of children.
|
|
1485
|
+
*/
|
|
68
1486
|
|
|
69
|
-
function shouldUseNative() {
|
|
70
|
-
try {
|
|
71
|
-
if (!Object.assign) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
1487
|
|
|
75
|
-
|
|
1488
|
+
function countChildren(children) {
|
|
1489
|
+
return traverseAllChildren(children, function () {
|
|
1490
|
+
return null;
|
|
1491
|
+
}, null);
|
|
1492
|
+
}
|
|
1493
|
+
/**
|
|
1494
|
+
* Flatten a children object (typically specified as `props.children`) and
|
|
1495
|
+
* return an array with appropriately re-keyed children.
|
|
1496
|
+
*
|
|
1497
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrentoarray
|
|
1498
|
+
*/
|
|
76
1499
|
|
|
77
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
78
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
79
|
-
test1[5] = 'de';
|
|
80
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
1500
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
1501
|
+
function toArray(children) {
|
|
1502
|
+
var result = [];
|
|
1503
|
+
mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
|
|
1504
|
+
return child;
|
|
1505
|
+
});
|
|
1506
|
+
return result;
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* Returns the first child in a collection of children and verifies that there
|
|
1510
|
+
* is only one child in the collection.
|
|
1511
|
+
*
|
|
1512
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenonly
|
|
1513
|
+
*
|
|
1514
|
+
* The current implementation of this function assumes that a single child gets
|
|
1515
|
+
* passed without a wrapper, but the purpose of this helper function is to
|
|
1516
|
+
* abstract away the particular structure of children.
|
|
1517
|
+
*
|
|
1518
|
+
* @param {?object} children Child collection structure.
|
|
1519
|
+
* @return {ReactElement} The first and only `ReactElement` contained in the
|
|
1520
|
+
* structure.
|
|
1521
|
+
*/
|
|
95
1522
|
|
|
96
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
97
|
-
var test3 = {};
|
|
98
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
99
|
-
test3[letter] = letter;
|
|
100
|
-
});
|
|
101
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
102
|
-
'abcdefghijklmnopqrst') {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
1523
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
1524
|
+
function onlyChild(children) {
|
|
1525
|
+
if (!isValidElement(children)) {
|
|
1526
|
+
{
|
|
1527
|
+
throw Error( "React.Children.only expected to receive a single React element child." );
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
return children;
|
|
111
1532
|
}
|
|
112
1533
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
1534
|
+
function createContext(defaultValue, calculateChangedBits) {
|
|
1535
|
+
if (calculateChangedBits === undefined) {
|
|
1536
|
+
calculateChangedBits = null;
|
|
1537
|
+
} else {
|
|
1538
|
+
{
|
|
1539
|
+
if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
|
|
1540
|
+
error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
var context = {
|
|
1546
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1547
|
+
_calculateChangedBits: calculateChangedBits,
|
|
1548
|
+
// As a workaround to support multiple concurrent renderers, we categorize
|
|
1549
|
+
// some renderers as primary and others as secondary. We only expect
|
|
1550
|
+
// there to be two concurrent renderers at most: React Native (primary) and
|
|
1551
|
+
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
1552
|
+
// Secondary renderers store their context values on separate fields.
|
|
1553
|
+
_currentValue: defaultValue,
|
|
1554
|
+
_currentValue2: defaultValue,
|
|
1555
|
+
// Used to track how many concurrent renderers this context currently
|
|
1556
|
+
// supports within in a single renderer. Such as parallel server rendering.
|
|
1557
|
+
_threadCount: 0,
|
|
1558
|
+
// These are circular
|
|
1559
|
+
Provider: null,
|
|
1560
|
+
Consumer: null
|
|
1561
|
+
};
|
|
1562
|
+
context.Provider = {
|
|
1563
|
+
$$typeof: REACT_PROVIDER_TYPE,
|
|
1564
|
+
_context: context
|
|
1565
|
+
};
|
|
1566
|
+
var hasWarnedAboutUsingNestedContextConsumers = false;
|
|
1567
|
+
var hasWarnedAboutUsingConsumerProvider = false;
|
|
117
1568
|
|
|
118
|
-
|
|
119
|
-
|
|
1569
|
+
{
|
|
1570
|
+
// A separate object, but proxies back to the original context object for
|
|
1571
|
+
// backwards compatibility. It has a different $$typeof, so we can properly
|
|
1572
|
+
// warn for the incorrect usage of Context as a Consumer.
|
|
1573
|
+
var Consumer = {
|
|
1574
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1575
|
+
_context: context,
|
|
1576
|
+
_calculateChangedBits: context._calculateChangedBits
|
|
1577
|
+
}; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
|
|
1578
|
+
|
|
1579
|
+
Object.defineProperties(Consumer, {
|
|
1580
|
+
Provider: {
|
|
1581
|
+
get: function () {
|
|
1582
|
+
if (!hasWarnedAboutUsingConsumerProvider) {
|
|
1583
|
+
hasWarnedAboutUsingConsumerProvider = true;
|
|
1584
|
+
|
|
1585
|
+
error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
|
|
1586
|
+
}
|
|
120
1587
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1588
|
+
return context.Provider;
|
|
1589
|
+
},
|
|
1590
|
+
set: function (_Provider) {
|
|
1591
|
+
context.Provider = _Provider;
|
|
1592
|
+
}
|
|
1593
|
+
},
|
|
1594
|
+
_currentValue: {
|
|
1595
|
+
get: function () {
|
|
1596
|
+
return context._currentValue;
|
|
1597
|
+
},
|
|
1598
|
+
set: function (_currentValue) {
|
|
1599
|
+
context._currentValue = _currentValue;
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1602
|
+
_currentValue2: {
|
|
1603
|
+
get: function () {
|
|
1604
|
+
return context._currentValue2;
|
|
1605
|
+
},
|
|
1606
|
+
set: function (_currentValue2) {
|
|
1607
|
+
context._currentValue2 = _currentValue2;
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1610
|
+
_threadCount: {
|
|
1611
|
+
get: function () {
|
|
1612
|
+
return context._threadCount;
|
|
1613
|
+
},
|
|
1614
|
+
set: function (_threadCount) {
|
|
1615
|
+
context._threadCount = _threadCount;
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
Consumer: {
|
|
1619
|
+
get: function () {
|
|
1620
|
+
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
|
1621
|
+
hasWarnedAboutUsingNestedContextConsumers = true;
|
|
126
1622
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
130
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
131
|
-
to[symbols[i]] = from[symbols[i]];
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
1623
|
+
error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
|
|
1624
|
+
}
|
|
136
1625
|
|
|
137
|
-
|
|
1626
|
+
return context.Consumer;
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
}); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
|
|
1630
|
+
|
|
1631
|
+
context.Consumer = Consumer;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
{
|
|
1635
|
+
context._currentRenderer = null;
|
|
1636
|
+
context._currentRenderer2 = null;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
return context;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
function lazy(ctor) {
|
|
1643
|
+
var lazyType = {
|
|
1644
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
1645
|
+
_ctor: ctor,
|
|
1646
|
+
// React uses these fields to store the result.
|
|
1647
|
+
_status: -1,
|
|
1648
|
+
_result: null
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
{
|
|
1652
|
+
// In production, this would just set it on the object.
|
|
1653
|
+
var defaultProps;
|
|
1654
|
+
var propTypes;
|
|
1655
|
+
Object.defineProperties(lazyType, {
|
|
1656
|
+
defaultProps: {
|
|
1657
|
+
configurable: true,
|
|
1658
|
+
get: function () {
|
|
1659
|
+
return defaultProps;
|
|
1660
|
+
},
|
|
1661
|
+
set: function (newDefaultProps) {
|
|
1662
|
+
error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
|
1663
|
+
|
|
1664
|
+
defaultProps = newDefaultProps; // Match production behavior more closely:
|
|
1665
|
+
|
|
1666
|
+
Object.defineProperty(lazyType, 'defaultProps', {
|
|
1667
|
+
enumerable: true
|
|
1668
|
+
});
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
propTypes: {
|
|
1672
|
+
configurable: true,
|
|
1673
|
+
get: function () {
|
|
1674
|
+
return propTypes;
|
|
1675
|
+
},
|
|
1676
|
+
set: function (newPropTypes) {
|
|
1677
|
+
error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
|
1678
|
+
|
|
1679
|
+
propTypes = newPropTypes; // Match production behavior more closely:
|
|
1680
|
+
|
|
1681
|
+
Object.defineProperty(lazyType, 'propTypes', {
|
|
1682
|
+
enumerable: true
|
|
1683
|
+
});
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
return lazyType;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
function forwardRef(render) {
|
|
1693
|
+
{
|
|
1694
|
+
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
|
1695
|
+
error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
|
|
1696
|
+
} else if (typeof render !== 'function') {
|
|
1697
|
+
error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
|
|
1698
|
+
} else {
|
|
1699
|
+
if (render.length !== 0 && render.length !== 2) {
|
|
1700
|
+
error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
if (render != null) {
|
|
1705
|
+
if (render.defaultProps != null || render.propTypes != null) {
|
|
1706
|
+
error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
return {
|
|
1712
|
+
$$typeof: REACT_FORWARD_REF_TYPE,
|
|
1713
|
+
render: render
|
|
1714
|
+
};
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
function isValidElementType(type) {
|
|
1718
|
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1719
|
+
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);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
function memo(type, compare) {
|
|
1723
|
+
{
|
|
1724
|
+
if (!isValidElementType(type)) {
|
|
1725
|
+
error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
return {
|
|
1730
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
1731
|
+
type: type,
|
|
1732
|
+
compare: compare === undefined ? null : compare
|
|
1733
|
+
};
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
function resolveDispatcher() {
|
|
1737
|
+
var dispatcher = ReactCurrentDispatcher.current;
|
|
1738
|
+
|
|
1739
|
+
if (!(dispatcher !== null)) {
|
|
1740
|
+
{
|
|
1741
|
+
throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
return dispatcher;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
function useContext(Context, unstable_observedBits) {
|
|
1749
|
+
var dispatcher = resolveDispatcher();
|
|
1750
|
+
|
|
1751
|
+
{
|
|
1752
|
+
if (unstable_observedBits !== undefined) {
|
|
1753
|
+
error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');
|
|
1754
|
+
} // TODO: add a more generic warning for invalid values.
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
if (Context._context !== undefined) {
|
|
1758
|
+
var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
|
|
1759
|
+
// and nobody should be using this in existing code.
|
|
1760
|
+
|
|
1761
|
+
if (realContext.Consumer === Context) {
|
|
1762
|
+
error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
|
|
1763
|
+
} else if (realContext.Provider === Context) {
|
|
1764
|
+
error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
return dispatcher.useContext(Context, unstable_observedBits);
|
|
1770
|
+
}
|
|
1771
|
+
function useState(initialState) {
|
|
1772
|
+
var dispatcher = resolveDispatcher();
|
|
1773
|
+
return dispatcher.useState(initialState);
|
|
1774
|
+
}
|
|
1775
|
+
function useReducer(reducer, initialArg, init) {
|
|
1776
|
+
var dispatcher = resolveDispatcher();
|
|
1777
|
+
return dispatcher.useReducer(reducer, initialArg, init);
|
|
1778
|
+
}
|
|
1779
|
+
function useRef(initialValue) {
|
|
1780
|
+
var dispatcher = resolveDispatcher();
|
|
1781
|
+
return dispatcher.useRef(initialValue);
|
|
1782
|
+
}
|
|
1783
|
+
function useEffect(create, deps) {
|
|
1784
|
+
var dispatcher = resolveDispatcher();
|
|
1785
|
+
return dispatcher.useEffect(create, deps);
|
|
1786
|
+
}
|
|
1787
|
+
function useLayoutEffect(create, deps) {
|
|
1788
|
+
var dispatcher = resolveDispatcher();
|
|
1789
|
+
return dispatcher.useLayoutEffect(create, deps);
|
|
1790
|
+
}
|
|
1791
|
+
function useCallback(callback, deps) {
|
|
1792
|
+
var dispatcher = resolveDispatcher();
|
|
1793
|
+
return dispatcher.useCallback(callback, deps);
|
|
1794
|
+
}
|
|
1795
|
+
function useMemo(create, deps) {
|
|
1796
|
+
var dispatcher = resolveDispatcher();
|
|
1797
|
+
return dispatcher.useMemo(create, deps);
|
|
1798
|
+
}
|
|
1799
|
+
function useImperativeHandle(ref, create, deps) {
|
|
1800
|
+
var dispatcher = resolveDispatcher();
|
|
1801
|
+
return dispatcher.useImperativeHandle(ref, create, deps);
|
|
1802
|
+
}
|
|
1803
|
+
function useDebugValue(value, formatterFn) {
|
|
1804
|
+
{
|
|
1805
|
+
var dispatcher = resolveDispatcher();
|
|
1806
|
+
return dispatcher.useDebugValue(value, formatterFn);
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
var propTypesMisspellWarningShown;
|
|
1811
|
+
|
|
1812
|
+
{
|
|
1813
|
+
propTypesMisspellWarningShown = false;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
function getDeclarationErrorAddendum() {
|
|
1817
|
+
if (ReactCurrentOwner.current) {
|
|
1818
|
+
var name = getComponentName(ReactCurrentOwner.current.type);
|
|
1819
|
+
|
|
1820
|
+
if (name) {
|
|
1821
|
+
return '\n\nCheck the render method of `' + name + '`.';
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
return '';
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
function getSourceInfoErrorAddendum(source) {
|
|
1829
|
+
if (source !== undefined) {
|
|
1830
|
+
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
1831
|
+
var lineNumber = source.lineNumber;
|
|
1832
|
+
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
return '';
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
function getSourceInfoErrorAddendumForProps(elementProps) {
|
|
1839
|
+
if (elementProps !== null && elementProps !== undefined) {
|
|
1840
|
+
return getSourceInfoErrorAddendum(elementProps.__source);
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
return '';
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
1847
|
+
* object keys are not valid. This allows us to keep track of children between
|
|
1848
|
+
* updates.
|
|
1849
|
+
*/
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
var ownerHasKeyUseWarning = {};
|
|
1853
|
+
|
|
1854
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
1855
|
+
var info = getDeclarationErrorAddendum();
|
|
1856
|
+
|
|
1857
|
+
if (!info) {
|
|
1858
|
+
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
1859
|
+
|
|
1860
|
+
if (parentName) {
|
|
1861
|
+
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
return info;
|
|
1866
|
+
}
|
|
1867
|
+
/**
|
|
1868
|
+
* Warn if the element doesn't have an explicit key assigned to it.
|
|
1869
|
+
* This element is in an array. The array could grow and shrink or be
|
|
1870
|
+
* reordered. All children that haven't already been validated are required to
|
|
1871
|
+
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
1872
|
+
* will only be shown once.
|
|
1873
|
+
*
|
|
1874
|
+
* @internal
|
|
1875
|
+
* @param {ReactElement} element Element that requires a key.
|
|
1876
|
+
* @param {*} parentType element's parent's type.
|
|
1877
|
+
*/
|
|
1878
|
+
|
|
1879
|
+
|
|
1880
|
+
function validateExplicitKey(element, parentType) {
|
|
1881
|
+
if (!element._store || element._store.validated || element.key != null) {
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
element._store.validated = true;
|
|
1886
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1887
|
+
|
|
1888
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1889
|
+
return;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
1893
|
+
// property, it may be the creator of the child that's responsible for
|
|
1894
|
+
// assigning it a key.
|
|
1895
|
+
|
|
1896
|
+
var childOwner = '';
|
|
1897
|
+
|
|
1898
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
|
1899
|
+
// Give the component that originally created this child.
|
|
1900
|
+
childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
setCurrentlyValidatingElement(element);
|
|
1904
|
+
|
|
1905
|
+
{
|
|
1906
|
+
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
setCurrentlyValidatingElement(null);
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* Ensure that every element either is passed in a static location, in an
|
|
1913
|
+
* array with an explicit keys property defined, or in an object literal
|
|
1914
|
+
* with valid key property.
|
|
1915
|
+
*
|
|
1916
|
+
* @internal
|
|
1917
|
+
* @param {ReactNode} node Statically passed child of any type.
|
|
1918
|
+
* @param {*} parentType node's parent's type.
|
|
1919
|
+
*/
|
|
1920
|
+
|
|
1921
|
+
|
|
1922
|
+
function validateChildKeys(node, parentType) {
|
|
1923
|
+
if (typeof node !== 'object') {
|
|
1924
|
+
return;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
if (Array.isArray(node)) {
|
|
1928
|
+
for (var i = 0; i < node.length; i++) {
|
|
1929
|
+
var child = node[i];
|
|
1930
|
+
|
|
1931
|
+
if (isValidElement(child)) {
|
|
1932
|
+
validateExplicitKey(child, parentType);
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
} else if (isValidElement(node)) {
|
|
1936
|
+
// This element was passed in a valid location.
|
|
1937
|
+
if (node._store) {
|
|
1938
|
+
node._store.validated = true;
|
|
1939
|
+
}
|
|
1940
|
+
} else if (node) {
|
|
1941
|
+
var iteratorFn = getIteratorFn(node);
|
|
1942
|
+
|
|
1943
|
+
if (typeof iteratorFn === 'function') {
|
|
1944
|
+
// Entry iterators used to provide implicit keys,
|
|
1945
|
+
// but now we print a separate warning for them later.
|
|
1946
|
+
if (iteratorFn !== node.entries) {
|
|
1947
|
+
var iterator = iteratorFn.call(node);
|
|
1948
|
+
var step;
|
|
1949
|
+
|
|
1950
|
+
while (!(step = iterator.next()).done) {
|
|
1951
|
+
if (isValidElement(step.value)) {
|
|
1952
|
+
validateExplicitKey(step.value, parentType);
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Given an element, validate that its props follow the propTypes definition,
|
|
1961
|
+
* provided by the type.
|
|
1962
|
+
*
|
|
1963
|
+
* @param {ReactElement} element
|
|
1964
|
+
*/
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
function validatePropTypes(element) {
|
|
1968
|
+
{
|
|
1969
|
+
var type = element.type;
|
|
1970
|
+
|
|
1971
|
+
if (type === null || type === undefined || typeof type === 'string') {
|
|
1972
|
+
return;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
var name = getComponentName(type);
|
|
1976
|
+
var propTypes;
|
|
1977
|
+
|
|
1978
|
+
if (typeof type === 'function') {
|
|
1979
|
+
propTypes = type.propTypes;
|
|
1980
|
+
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1981
|
+
// Inner props are checked in the reconciler.
|
|
1982
|
+
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1983
|
+
propTypes = type.propTypes;
|
|
1984
|
+
} else {
|
|
1985
|
+
return;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
if (propTypes) {
|
|
1989
|
+
setCurrentlyValidatingElement(element);
|
|
1990
|
+
checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
|
|
1991
|
+
setCurrentlyValidatingElement(null);
|
|
1992
|
+
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
1993
|
+
propTypesMisspellWarningShown = true;
|
|
1994
|
+
|
|
1995
|
+
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
1999
|
+
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
/**
|
|
2004
|
+
* Given a fragment, validate that it can only be provided with fragment props
|
|
2005
|
+
* @param {ReactElement} fragment
|
|
2006
|
+
*/
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
function validateFragmentProps(fragment) {
|
|
2010
|
+
{
|
|
2011
|
+
setCurrentlyValidatingElement(fragment);
|
|
2012
|
+
var keys = Object.keys(fragment.props);
|
|
2013
|
+
|
|
2014
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2015
|
+
var key = keys[i];
|
|
2016
|
+
|
|
2017
|
+
if (key !== 'children' && key !== 'key') {
|
|
2018
|
+
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
2019
|
+
|
|
2020
|
+
break;
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
if (fragment.ref !== null) {
|
|
2025
|
+
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
setCurrentlyValidatingElement(null);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
function createElementWithValidation(type, props, children) {
|
|
2032
|
+
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
2033
|
+
// succeed and there will likely be errors in render.
|
|
2034
|
+
|
|
2035
|
+
if (!validType) {
|
|
2036
|
+
var info = '';
|
|
2037
|
+
|
|
2038
|
+
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2039
|
+
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.";
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
|
|
2043
|
+
|
|
2044
|
+
if (sourceInfo) {
|
|
2045
|
+
info += sourceInfo;
|
|
2046
|
+
} else {
|
|
2047
|
+
info += getDeclarationErrorAddendum();
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
var typeString;
|
|
2051
|
+
|
|
2052
|
+
if (type === null) {
|
|
2053
|
+
typeString = 'null';
|
|
2054
|
+
} else if (Array.isArray(type)) {
|
|
2055
|
+
typeString = 'array';
|
|
2056
|
+
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
2057
|
+
typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
|
|
2058
|
+
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
2059
|
+
} else {
|
|
2060
|
+
typeString = typeof type;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
{
|
|
2064
|
+
error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
|
|
2069
|
+
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
2070
|
+
|
|
2071
|
+
if (element == null) {
|
|
2072
|
+
return element;
|
|
2073
|
+
} // Skip key warning if the type isn't valid since our key validation logic
|
|
2074
|
+
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
2075
|
+
// We don't want exception behavior to differ between dev and prod.
|
|
2076
|
+
// (Rendering will throw with a helpful message and as soon as the type is
|
|
2077
|
+
// fixed, the key warnings will appear.)
|
|
2078
|
+
|
|
2079
|
+
|
|
2080
|
+
if (validType) {
|
|
2081
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
2082
|
+
validateChildKeys(arguments[i], type);
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
2087
|
+
validateFragmentProps(element);
|
|
2088
|
+
} else {
|
|
2089
|
+
validatePropTypes(element);
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
return element;
|
|
2093
|
+
}
|
|
2094
|
+
var didWarnAboutDeprecatedCreateFactory = false;
|
|
2095
|
+
function createFactoryWithValidation(type) {
|
|
2096
|
+
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
2097
|
+
validatedFactory.type = type;
|
|
2098
|
+
|
|
2099
|
+
{
|
|
2100
|
+
if (!didWarnAboutDeprecatedCreateFactory) {
|
|
2101
|
+
didWarnAboutDeprecatedCreateFactory = true;
|
|
2102
|
+
|
|
2103
|
+
warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
|
|
2104
|
+
} // Legacy hook: remove it
|
|
2105
|
+
|
|
2106
|
+
|
|
2107
|
+
Object.defineProperty(validatedFactory, 'type', {
|
|
2108
|
+
enumerable: false,
|
|
2109
|
+
get: function () {
|
|
2110
|
+
warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
|
2111
|
+
|
|
2112
|
+
Object.defineProperty(this, 'type', {
|
|
2113
|
+
value: type
|
|
2114
|
+
});
|
|
2115
|
+
return type;
|
|
2116
|
+
}
|
|
2117
|
+
});
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
return validatedFactory;
|
|
2121
|
+
}
|
|
2122
|
+
function cloneElementWithValidation(element, props, children) {
|
|
2123
|
+
var newElement = cloneElement.apply(this, arguments);
|
|
2124
|
+
|
|
2125
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
2126
|
+
validateChildKeys(arguments[i], newElement.type);
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
validatePropTypes(newElement);
|
|
2130
|
+
return newElement;
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
{
|
|
2134
|
+
|
|
2135
|
+
try {
|
|
2136
|
+
var frozenObject = Object.freeze({});
|
|
2137
|
+
var testMap = new Map([[frozenObject, null]]);
|
|
2138
|
+
var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
|
|
2139
|
+
// https://github.com/rollup/rollup/issues/1771
|
|
2140
|
+
// TODO: we can remove these if Rollup fixes the bug.
|
|
2141
|
+
|
|
2142
|
+
testMap.set(0, 0);
|
|
2143
|
+
testSet.add(0);
|
|
2144
|
+
} catch (e) {
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
var createElement$1 = createElementWithValidation ;
|
|
2149
|
+
var cloneElement$1 = cloneElementWithValidation ;
|
|
2150
|
+
var createFactory = createFactoryWithValidation ;
|
|
2151
|
+
var Children = {
|
|
2152
|
+
map: mapChildren,
|
|
2153
|
+
forEach: forEachChildren,
|
|
2154
|
+
count: countChildren,
|
|
2155
|
+
toArray: toArray,
|
|
2156
|
+
only: onlyChild
|
|
138
2157
|
};
|
|
139
2158
|
|
|
2159
|
+
react_development.Children = Children;
|
|
2160
|
+
react_development.Component = Component;
|
|
2161
|
+
react_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
2162
|
+
react_development.Profiler = REACT_PROFILER_TYPE;
|
|
2163
|
+
react_development.PureComponent = PureComponent;
|
|
2164
|
+
react_development.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
2165
|
+
react_development.Suspense = REACT_SUSPENSE_TYPE;
|
|
2166
|
+
react_development.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
|
2167
|
+
react_development.cloneElement = cloneElement$1;
|
|
2168
|
+
react_development.createContext = createContext;
|
|
2169
|
+
react_development.createElement = createElement$1;
|
|
2170
|
+
react_development.createFactory = createFactory;
|
|
2171
|
+
react_development.createRef = createRef;
|
|
2172
|
+
react_development.forwardRef = forwardRef;
|
|
2173
|
+
react_development.isValidElement = isValidElement;
|
|
2174
|
+
react_development.lazy = lazy;
|
|
2175
|
+
react_development.memo = memo;
|
|
2176
|
+
react_development.useCallback = useCallback;
|
|
2177
|
+
react_development.useContext = useContext;
|
|
2178
|
+
react_development.useDebugValue = useDebugValue;
|
|
2179
|
+
react_development.useEffect = useEffect;
|
|
2180
|
+
react_development.useImperativeHandle = useImperativeHandle;
|
|
2181
|
+
react_development.useLayoutEffect = useLayoutEffect;
|
|
2182
|
+
react_development.useMemo = useMemo;
|
|
2183
|
+
react_development.useReducer = useReducer;
|
|
2184
|
+
react_development.useRef = useRef;
|
|
2185
|
+
react_development.useState = useState;
|
|
2186
|
+
react_development.version = ReactVersion;
|
|
2187
|
+
})();
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2191
|
+
react.exports = react_production_min;
|
|
2192
|
+
} else {
|
|
2193
|
+
react.exports = react_development;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
var React$1 = react.exports;
|
|
2197
|
+
|
|
2198
|
+
var reactDom = {exports: {}};
|
|
2199
|
+
|
|
2200
|
+
var reactDom_production_min = {};
|
|
2201
|
+
|
|
140
2202
|
var scheduler = {exports: {}};
|
|
141
2203
|
|
|
142
2204
|
var scheduler_production_min = {};
|
|
@@ -1037,7 +3099,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
1037
3099
|
* This source code is licensed under the MIT license found in the
|
|
1038
3100
|
* LICENSE file in the root directory of this source tree.
|
|
1039
3101
|
*/
|
|
1040
|
-
var aa=
|
|
3102
|
+
var aa=react.exports,n$1=objectAssign,r$1=scheduler.exports;function u(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(u(227));
|
|
1041
3103
|
function ba(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l);}catch(m){this.onError(m);}}var da=!1,ea=null,fa=!1,ha=null,ia={onError:function(a){da=!0;ea=a;}};function ja(a,b,c,d,e,f,g,h,k){da=!1;ea=null;ba.apply(ia,arguments);}function ka(a,b,c,d,e,f,g,h,k){ja.apply(this,arguments);if(da){if(da){var l=ea;da=!1;ea=null;}else throw Error(u(198));fa||(fa=!0,ha=l);}}var la=null,ma=null,na=null;
|
|
1042
3104
|
function oa(a,b,c){var d=a.type||"unknown-event";a.currentTarget=na(c);ka(d,b,void 0,a);a.currentTarget=null;}var pa=null,qa={};
|
|
1043
3105
|
function ra(){if(pa)for(var a in qa){var b=qa[a],c=pa.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!sa[c]){if(!b.extractEvents)throw Error(u(97,a));sa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(ta.hasOwnProperty(h))throw Error(u(99,h));ta[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ua(k[e],g,h);e=!0;}else f.registrationName?(ua(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}
|
|
@@ -1320,121 +3382,6 @@ reactDom_production_min.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if
|
|
|
1320
3382
|
|
|
1321
3383
|
var reactDom_development = {};
|
|
1322
3384
|
|
|
1323
|
-
/**
|
|
1324
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1325
|
-
*
|
|
1326
|
-
* This source code is licensed under the MIT license found in the
|
|
1327
|
-
* LICENSE file in the root directory of this source tree.
|
|
1328
|
-
*/
|
|
1329
|
-
|
|
1330
|
-
var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
1331
|
-
|
|
1332
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
|
|
1333
|
-
|
|
1334
|
-
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1335
|
-
|
|
1336
|
-
/**
|
|
1337
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1338
|
-
*
|
|
1339
|
-
* This source code is licensed under the MIT license found in the
|
|
1340
|
-
* LICENSE file in the root directory of this source tree.
|
|
1341
|
-
*/
|
|
1342
|
-
|
|
1343
|
-
var printWarning$2 = function() {};
|
|
1344
|
-
|
|
1345
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1346
|
-
var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
|
|
1347
|
-
var loggedTypeFailures = {};
|
|
1348
|
-
var has$1 = has$2;
|
|
1349
|
-
|
|
1350
|
-
printWarning$2 = function(text) {
|
|
1351
|
-
var message = 'Warning: ' + text;
|
|
1352
|
-
if (typeof console !== 'undefined') {
|
|
1353
|
-
console.error(message);
|
|
1354
|
-
}
|
|
1355
|
-
try {
|
|
1356
|
-
// --- Welcome to debugging React ---
|
|
1357
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
1358
|
-
// to find the callsite that caused this warning to fire.
|
|
1359
|
-
throw new Error(message);
|
|
1360
|
-
} catch (x) { /**/ }
|
|
1361
|
-
};
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
/**
|
|
1365
|
-
* Assert that the values match with the type specs.
|
|
1366
|
-
* Error messages are memorized and will only be shown once.
|
|
1367
|
-
*
|
|
1368
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
1369
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
1370
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
1371
|
-
* @param {string} componentName Name of the component for error messages.
|
|
1372
|
-
* @param {?Function} getStack Returns the component stack.
|
|
1373
|
-
* @private
|
|
1374
|
-
*/
|
|
1375
|
-
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
1376
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1377
|
-
for (var typeSpecName in typeSpecs) {
|
|
1378
|
-
if (has$1(typeSpecs, typeSpecName)) {
|
|
1379
|
-
var error;
|
|
1380
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
1381
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
1382
|
-
// After these have been cleaned up, we'll let them throw.
|
|
1383
|
-
try {
|
|
1384
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
1385
|
-
// behavior as without this statement except with a better message.
|
|
1386
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1387
|
-
var err = Error(
|
|
1388
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
1389
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
1390
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
1391
|
-
);
|
|
1392
|
-
err.name = 'Invariant Violation';
|
|
1393
|
-
throw err;
|
|
1394
|
-
}
|
|
1395
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
|
|
1396
|
-
} catch (ex) {
|
|
1397
|
-
error = ex;
|
|
1398
|
-
}
|
|
1399
|
-
if (error && !(error instanceof Error)) {
|
|
1400
|
-
printWarning$2(
|
|
1401
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
1402
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
1403
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
1404
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
1405
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
1406
|
-
'shape all require an argument).'
|
|
1407
|
-
);
|
|
1408
|
-
}
|
|
1409
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1410
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
1411
|
-
// same error.
|
|
1412
|
-
loggedTypeFailures[error.message] = true;
|
|
1413
|
-
|
|
1414
|
-
var stack = getStack ? getStack() : '';
|
|
1415
|
-
|
|
1416
|
-
printWarning$2(
|
|
1417
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
1418
|
-
);
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* Resets warning cache when testing.
|
|
1427
|
-
*
|
|
1428
|
-
* @private
|
|
1429
|
-
*/
|
|
1430
|
-
checkPropTypes$1.resetWarningCache = function() {
|
|
1431
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1432
|
-
loggedTypeFailures = {};
|
|
1433
|
-
}
|
|
1434
|
-
};
|
|
1435
|
-
|
|
1436
|
-
var checkPropTypes_1 = checkPropTypes$1;
|
|
1437
|
-
|
|
1438
3385
|
var tracing = {exports: {}};
|
|
1439
3386
|
|
|
1440
3387
|
var schedulerTracing_production_min = {};
|
|
@@ -1821,7 +3768,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
1821
3768
|
if (process.env.NODE_ENV !== "production") {
|
|
1822
3769
|
(function() {
|
|
1823
3770
|
|
|
1824
|
-
var React =
|
|
3771
|
+
var React = react.exports;
|
|
1825
3772
|
var _assign = objectAssign;
|
|
1826
3773
|
var Scheduler = scheduler.exports;
|
|
1827
3774
|
var checkPropTypes = checkPropTypes_1;
|
|
@@ -34544,7 +36491,7 @@ var _getPrototypeOf2$c = _interopRequireDefault$15(getPrototypeOf$1.exports);
|
|
|
34544
36491
|
|
|
34545
36492
|
var _inherits2$l = _interopRequireDefault$15(inherits.exports);
|
|
34546
36493
|
|
|
34547
|
-
var _react$V = _interopRequireDefault$15(
|
|
36494
|
+
var _react$V = _interopRequireDefault$15(react.exports);
|
|
34548
36495
|
|
|
34549
36496
|
var _propTypes$I = _interopRequireDefault$15(propTypes.exports);
|
|
34550
36497
|
|
|
@@ -35048,7 +36995,7 @@ var _inherits2$k = _interopRequireDefault$12(inherits.exports);
|
|
|
35048
36995
|
|
|
35049
36996
|
var _objectWithoutProperties2$C = _interopRequireDefault$12(objectWithoutProperties.exports);
|
|
35050
36997
|
|
|
35051
|
-
var _react$U = _interopRequireDefault$12(
|
|
36998
|
+
var _react$U = _interopRequireDefault$12(react.exports);
|
|
35052
36999
|
|
|
35053
37000
|
var _propTypes$H = _interopRequireDefault$12(propTypes.exports);
|
|
35054
37001
|
|
|
@@ -35439,7 +37386,7 @@ var _getPrototypeOf2$a = _interopRequireDefault$11(getPrototypeOf$1.exports);
|
|
|
35439
37386
|
|
|
35440
37387
|
var _inherits2$j = _interopRequireDefault$11(inherits.exports);
|
|
35441
37388
|
|
|
35442
|
-
var _react$T = _interopRequireDefault$11(
|
|
37389
|
+
var _react$T = _interopRequireDefault$11(react.exports);
|
|
35443
37390
|
|
|
35444
37391
|
var _propTypes$G = _interopRequireDefault$11(propTypes.exports);
|
|
35445
37392
|
|
|
@@ -35720,7 +37667,7 @@ shouldUpdate$1.default = void 0;
|
|
|
35720
37667
|
|
|
35721
37668
|
var _inheritsLoose2 = _interopRequireDefault$_(inheritsLoose.exports);
|
|
35722
37669
|
|
|
35723
|
-
var _react$S =
|
|
37670
|
+
var _react$S = react.exports;
|
|
35724
37671
|
|
|
35725
37672
|
var _setDisplayName$1 = _interopRequireDefault$_(setDisplayName$1);
|
|
35726
37673
|
|
|
@@ -36032,7 +37979,7 @@ var _defineProperty2$n = _interopRequireDefault$W(defineProperty$4.exports);
|
|
|
36032
37979
|
|
|
36033
37980
|
var _objectWithoutProperties2$A = _interopRequireDefault$W(objectWithoutProperties.exports);
|
|
36034
37981
|
|
|
36035
|
-
var _react$R = _interopRequireDefault$W(
|
|
37982
|
+
var _react$R = _interopRequireDefault$W(react.exports);
|
|
36036
37983
|
|
|
36037
37984
|
var _propTypes$F = _interopRequireDefault$W(propTypes.exports);
|
|
36038
37985
|
|
|
@@ -36226,7 +38173,7 @@ Object.defineProperty(createSvgIcon$1, "__esModule", {
|
|
|
36226
38173
|
});
|
|
36227
38174
|
createSvgIcon$1.default = void 0;
|
|
36228
38175
|
|
|
36229
|
-
var _react$Q = _interopRequireDefault$V(
|
|
38176
|
+
var _react$Q = _interopRequireDefault$V(react.exports);
|
|
36230
38177
|
|
|
36231
38178
|
var _pure$3 = _interopRequireDefault$V(pure$1);
|
|
36232
38179
|
|
|
@@ -36252,7 +38199,7 @@ Object.defineProperty(Add, "__esModule", {
|
|
|
36252
38199
|
});
|
|
36253
38200
|
var default_1$2 = Add.default = void 0;
|
|
36254
38201
|
|
|
36255
|
-
var _react$P = _interopRequireDefault$U(
|
|
38202
|
+
var _react$P = _interopRequireDefault$U(react.exports);
|
|
36256
38203
|
|
|
36257
38204
|
var _createSvgIcon$2 = _interopRequireDefault$U(createSvgIcon$1);
|
|
36258
38205
|
|
|
@@ -36274,7 +38221,7 @@ Object.defineProperty(Remove, "__esModule", {
|
|
|
36274
38221
|
});
|
|
36275
38222
|
var default_1$1 = Remove.default = void 0;
|
|
36276
38223
|
|
|
36277
|
-
var _react$O = _interopRequireDefault$T(
|
|
38224
|
+
var _react$O = _interopRequireDefault$T(react.exports);
|
|
36278
38225
|
|
|
36279
38226
|
var _createSvgIcon$1 = _interopRequireDefault$T(createSvgIcon$1);
|
|
36280
38227
|
|
|
@@ -36970,7 +38917,7 @@ var index = memoize(function (prop) {
|
|
|
36970
38917
|
/* Z+1 */
|
|
36971
38918
|
);
|
|
36972
38919
|
|
|
36973
|
-
function v(){return (v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}var g=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},S=function(t){return null!==t&&"object"==typeof t&&"[object Object]"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!reactIs$1.exports.typeOf(t)},w=Object.freeze([]),E=Object.freeze({});function b(e){return "function"==typeof e}function _$5(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function N(e){return e&&"string"==typeof e.styledComponentId}var A="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",I="undefined"!=typeof window&&"HTMLElement"in window,P=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),R="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",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",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",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",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",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",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",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",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function D(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t);})),e}function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw "production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(D.apply(void 0,[R[e]].concat(n)).trim())}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&j(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0;}for(var i=this.indexOfGroup(e+1),a=0,c=t.length;a<c;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++);},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n);}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+"/*!sc*/\n";return t},e}(),x=new Map,k=new Map,V=1,B=function(e){if(x.has(e))return x.get(e);for(;k.has(V);)V++;var t=V++;return "production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&j(16,""+t),x.set(e,t),k.set(t,e),t},z=function(e){return k.get(e)},M=function(e,t){t>=V&&(V=t+1),x.set(e,t),k.set(t,e);},G="style["+A+'][data-styled-version="5.3.3"]',L=new RegExp("^"+A+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),F=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r);},Y=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(L);if(a){var c=0|parseInt(a[1],10),u=a[2];0!==c&&(M(u,c),F(e,u,a[3]),e.getTag().insertRules(c,r)),r.length=0;}else r.push(i);}}},q=function(){return "undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},H=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(A))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(A,"active"),r.setAttribute("data-styled-version","5.3.3");var i=q();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},$=function(){function e(e){var t=this.element=H(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}j(17);}(t),this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),W=function(){function e(e){var t=this.element=H(e);this.nodes=t.childNodes,this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return !1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),U=function(){function e(e){this.rules=[],this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--;},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),J=I,X={isServer:!I,useCSSOMInjection:!P},Z=function(){function e(e,t,n){void 0===e&&(e=E),void 0===t&&(t={}),this.options=v({},X,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&I&&J&&(J=!1,function(e){for(var t=document.querySelectorAll(G),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(A)&&(Y(e,o),o.parentNode&&o.parentNode.removeChild(o));}}(this));}e.registerId=function(e){return B(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(v({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new U(o):r?new $(o):new W(o),new T(e)));var e,t,n,r,o;},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(B(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(B(e),n);},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},t.clearRules=function(e){this.getTag().clearGroup(B(e)),this.clearNames(e);},t.clearTag=function(){this.tag=void 0;},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var s=z(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var c=A+".g"+o+'[id="'+s+'"]',u="";void 0!==i&&i.forEach((function(e){e.length>0&&(u+=e+",");})),r+=""+a+c+'{content:"'+u+'"}/*!sc*/\n';}}}return r}(this)},e}(),K=/(a)(d)/gi,Q=function(e){return String.fromCharCode(e+(e>25?39:97))};function ee(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Q(t%52)+n;return (Q(t%52)+n).replace(K,"$1-$2")}var te=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ne=function(e){return te(5381,e)};function re(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(b(n)&&!N(n))return !1}return !0}var oe=ne("5.3.3"),se=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&re(e),this.componentId=t,this.baseHash=te(oe,t),this.baseStyle=n,Z.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else {var s=Ne(this.rules,e,t,n).join(""),i=ee(te(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a);}o.push(i),this.staticRulesId=i;}else {for(var c=this.rules.length,u=te(this.baseHash,n.hash),l="",d=0;d<c;d++){var h=this.rules[d];if("string"==typeof h)l+=h,"production"!==process.env.NODE_ENV&&(u=te(u,h+d));else if(h){var p=Ne(h,e,t,n),f=Array.isArray(p)?p.join(""):p;u=te(u,f+d),l+=f;}}if(l){var m=ee(u>>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y);}o.push(m);}}return o.join(" ")},e}(),ie=/^\s*\/\/.*$/gm,ae=[":","[",".","#"];function ce(e){var t,n,r,o,s=void 0===e?E:e,i=s.options,a=void 0===i?E:i,c=s.plugins,u=void 0===c?w:c,l=new stylis_min(a),d=[],h=function(e){function t(t){if(t)try{e(t+"}");}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t);}}}((function(e){d.push(e);})),f=function(e,r,s){return 0===r&&-1!==ae.indexOf(s[n.length])||s.match(o)?e:"."+t};function m(e,s,i,a){void 0===a&&(a="&");var c=e.replace(ie,""),u=s&&i?i+" "+s+" { "+c+" }":c;return t=a,n=s,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),l(i||!s?"":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f));},h,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||j(15),te(e,t.name)}),5381).toString():"",m}var ue=React__default.createContext();ue.Consumer;var de=React__default.createContext(),he=(de.Consumer,new Z),pe=ce();function fe(){return useContext(ue)||he}function me(){return useContext(de)||pe}var ve=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.toString=function(){return j(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t;}return e.prototype.getName=function(e){return void 0===e&&(e=pe),this.name+e.hash},e}(),ge=/([A-Z])/,Se=/([A-Z])/g,we=/^ms-/,Ee=function(e){return "-"+e.toLowerCase()};function be(e){return ge.test(e)?e.replace(Se,Ee).replace(we,"-ms-"):e}var _e=function(e){return null==e||!1===e||""===e};function Ne(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a<c;a+=1)""!==(s=Ne(e[a],n,r,o))&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));return i}if(_e(e))return "";if(N(e))return "."+e.styledComponentId;if(b(e)){if("function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!n)return e;var u=e(n);return "production"!==process.env.NODE_ENV&&reactIs$1.exports.isElement(u)&&console.warn(_$5(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),Ne(u,n,r,o)}var l;return e instanceof ve?r?(e.inject(r,o),e.getName(o)):e:S(e)?function e(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!_e(t[i])&&(Array.isArray(t[i])&&t[i].isCss||b(t[i])?s.push(be(i)+":",t[i],";"):S(t[i])?s.push.apply(s,e(t[i],i)):s.push(be(i)+": "+(r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in unitlessKeys?String(o).trim():o+"px")+";"));return n?[n+" {"].concat(s,["}"]):s}(e):e.toString()}var Ae=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return b(e)||S(e)?Ae(Ne(g(w,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Ae(Ne(g(e,n)))}var Ie=/invalid hook call/i,Pe=new Set,Oe=function(e,t){if("production"!==process.env.NODE_ENV){var n="The component "+e+(t?' with the id of "'+t+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",r=console.error;try{var o=!0;console.error=function(e){if(Ie.test(e))o=!1,Pe.delete(n);else {for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];r.apply(void 0,[e].concat(s));}},useRef(),o&&!Pe.has(n)&&(console.warn(n),Pe.add(n));}catch(e){Ie.test(e.message)&&Pe.delete(n);}finally{console.error=r;}}},Re=function(e,t,n){return void 0===n&&(n=E),e.theme!==n.theme&&e.theme||t||n.theme},De=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function Te(e){return e.replace(De,"-").replace(je,"")}var xe=function(e){return ee(ne(e)>>>0)};function ke(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var Ve=function(e){return "function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Be=function(e){return "__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ze(e,t,n){var r=e[n];Ve(t)&&Ve(r)?Me(r,t):e[n]=t;}function Me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(Ve(i))for(var a in i)Be(a)&&ze(e,i[a],a);}return e}var Ge=React__default.createContext();Ge.Consumer;var Ye={};function qe(e,t,n){var o=N(e),i=!ke(e),a=t.attrs,c=void 0===a?w:a,d=t.componentId,h=void 0===d?function(e,t){var n="string"!=typeof e?"sc":Te(e);Ye[n]=(Ye[n]||0)+1;var r=n+"-"+xe("5.3.3"+n+Ye[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):d,p=t.displayName,f=void 0===p?function(e){return ke(e)?"styled."+e:"Styled("+_$5(e)+")"}(e):p,g=t.displayName&&t.componentId?Te(t.displayName)+"-"+t.componentId:t.componentId||h,S=o&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,A=t.shouldForwardProp;o&&e.shouldForwardProp&&(A=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var C,I=new se(n,g,o?e.componentStyle:void 0),P=I.isStatic&&0===c.length,O=function(e,t){return function(e,t,n,r){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,c=e.foldedComponentIds,d=e.shouldForwardProp,h=e.styledComponentId,p=e.target;"production"!==process.env.NODE_ENV&&useDebugValue(h);var f=function(e,t,n){void 0===e&&(e=E);var r=v({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in b(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],s=i[t],n&&s?n+" "+s:n||s):i[t];})),[r,o]}(Re(t,useContext(Ge),a)||E,t,o),y=f[0],g=f[1],S=function(e,t,n,r){var o=fe(),s=me(),i=t?e.generateAndInjectStyles(E,o,s):e.generateAndInjectStyles(n,o,s);return "production"!==process.env.NODE_ENV&&useDebugValue(i),"production"!==process.env.NODE_ENV&&!t&&r&&r(i),i}(i,r,y,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),w=n,_=g.$as||t.$as||g.as||t.as||p,N=ke(_),A=g!==t?v({},t,{},g):t,C={};for(var I in A)"$"!==I[0]&&"as"!==I&&("forwardedAs"===I?C.as=A[I]:(d?d(I,index,_):!N||index(I))&&(C[I]=A[I]));return t.style&&g.style!==t.style&&(C.style=v({},t.style,{},g.style)),C.className=Array.prototype.concat(c,h,S!==h?S:null,t.className,g.className).filter(Boolean).join(" "),C.ref=w,createElement(_,C)}(C,e,t,P)};return O.displayName=f,(C=React__default.forwardRef(O)).attrs=S,C.componentStyle=I,C.displayName=f,C.shouldForwardProp=A,C.foldedComponentIds=o?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):w,C.styledComponentId=g,C.target=o?e.target:e,C.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return {};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),s=r&&r+"-"+(ke(e)?e:Te(_$5(e)));return qe(e,v({},o,{attrs:S,componentId:s}),n)},Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?Me({},e.defaultProps,t):t;}}),"production"!==process.env.NODE_ENV&&(Oe(f,g),C.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+s+".\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 />"),r=!0,n={};}}}(f,g)),C.toString=function(){return "."+C.styledComponentId},i&&hoistNonReactStatics_cjs(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var He=function(e){return function e(t,r,o){if(void 0===o&&(o=E),!reactIs$1.exports.isValidElementType(r))return j(1,String(r));var s=function(){return t(r,o,Ce.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,v({},o,{},n))},s.attrs=function(n){return e(t,r,v({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(qe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){He[e]=He(e);}));"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&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"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);var styled = He;
|
|
38920
|
+
function v(){return (v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}var g=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},S=function(t){return null!==t&&"object"==typeof t&&"[object Object]"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!reactIs$1.exports.typeOf(t)},w=Object.freeze([]),E=Object.freeze({});function b(e){return "function"==typeof e}function _$5(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function N(e){return e&&"string"==typeof e.styledComponentId}var A="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",I="undefined"!=typeof window&&"HTMLElement"in window,P=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),R="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",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",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",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",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",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",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",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",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function D(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t);})),e}function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw "production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(D.apply(void 0,[R[e]].concat(n)).trim())}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&j(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0;}for(var i=this.indexOfGroup(e+1),a=0,c=t.length;a<c;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++);},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n);}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+"/*!sc*/\n";return t},e}(),x=new Map,k=new Map,V=1,B=function(e){if(x.has(e))return x.get(e);for(;k.has(V);)V++;var t=V++;return "production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&j(16,""+t),x.set(e,t),k.set(t,e),t},z=function(e){return k.get(e)},M=function(e,t){t>=V&&(V=t+1),x.set(e,t),k.set(t,e);},G="style["+A+'][data-styled-version="5.3.3"]',L=new RegExp("^"+A+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),F=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r);},Y=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(L);if(a){var c=0|parseInt(a[1],10),u=a[2];0!==c&&(M(u,c),F(e,u,a[3]),e.getTag().insertRules(c,r)),r.length=0;}else r.push(i);}}},q=function(){return "undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},H=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(A))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(A,"active"),r.setAttribute("data-styled-version","5.3.3");var i=q();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},$=function(){function e(e){var t=this.element=H(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}j(17);}(t),this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),W=function(){function e(e){var t=this.element=H(e);this.nodes=t.childNodes,this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return !1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),U=function(){function e(e){this.rules=[],this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--;},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),J=I,X={isServer:!I,useCSSOMInjection:!P},Z=function(){function e(e,t,n){void 0===e&&(e=E),void 0===t&&(t={}),this.options=v({},X,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&I&&J&&(J=!1,function(e){for(var t=document.querySelectorAll(G),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(A)&&(Y(e,o),o.parentNode&&o.parentNode.removeChild(o));}}(this));}e.registerId=function(e){return B(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(v({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new U(o):r?new $(o):new W(o),new T(e)));var e,t,n,r,o;},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(B(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(B(e),n);},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},t.clearRules=function(e){this.getTag().clearGroup(B(e)),this.clearNames(e);},t.clearTag=function(){this.tag=void 0;},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var s=z(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var c=A+".g"+o+'[id="'+s+'"]',u="";void 0!==i&&i.forEach((function(e){e.length>0&&(u+=e+",");})),r+=""+a+c+'{content:"'+u+'"}/*!sc*/\n';}}}return r}(this)},e}(),K=/(a)(d)/gi,Q=function(e){return String.fromCharCode(e+(e>25?39:97))};function ee(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Q(t%52)+n;return (Q(t%52)+n).replace(K,"$1-$2")}var te=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ne=function(e){return te(5381,e)};function re(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(b(n)&&!N(n))return !1}return !0}var oe=ne("5.3.3"),se=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&re(e),this.componentId=t,this.baseHash=te(oe,t),this.baseStyle=n,Z.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else {var s=Ne(this.rules,e,t,n).join(""),i=ee(te(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a);}o.push(i),this.staticRulesId=i;}else {for(var c=this.rules.length,u=te(this.baseHash,n.hash),l="",d=0;d<c;d++){var h=this.rules[d];if("string"==typeof h)l+=h,"production"!==process.env.NODE_ENV&&(u=te(u,h+d));else if(h){var p=Ne(h,e,t,n),f=Array.isArray(p)?p.join(""):p;u=te(u,f+d),l+=f;}}if(l){var m=ee(u>>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y);}o.push(m);}}return o.join(" ")},e}(),ie=/^\s*\/\/.*$/gm,ae=[":","[",".","#"];function ce(e){var t,n,r,o,s=void 0===e?E:e,i=s.options,a=void 0===i?E:i,c=s.plugins,u=void 0===c?w:c,l=new stylis_min(a),d=[],h=function(e){function t(t){if(t)try{e(t+"}");}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t);}}}((function(e){d.push(e);})),f=function(e,r,s){return 0===r&&-1!==ae.indexOf(s[n.length])||s.match(o)?e:"."+t};function m(e,s,i,a){void 0===a&&(a="&");var c=e.replace(ie,""),u=s&&i?i+" "+s+" { "+c+" }":c;return t=a,n=s,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),l(i||!s?"":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f));},h,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||j(15),te(e,t.name)}),5381).toString():"",m}var ue=React$1.createContext();ue.Consumer;var de=React$1.createContext(),he=(de.Consumer,new Z),pe=ce();function fe(){return react.exports.useContext(ue)||he}function me(){return react.exports.useContext(de)||pe}var ve=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.toString=function(){return j(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t;}return e.prototype.getName=function(e){return void 0===e&&(e=pe),this.name+e.hash},e}(),ge=/([A-Z])/,Se=/([A-Z])/g,we=/^ms-/,Ee=function(e){return "-"+e.toLowerCase()};function be(e){return ge.test(e)?e.replace(Se,Ee).replace(we,"-ms-"):e}var _e=function(e){return null==e||!1===e||""===e};function Ne(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a<c;a+=1)""!==(s=Ne(e[a],n,r,o))&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));return i}if(_e(e))return "";if(N(e))return "."+e.styledComponentId;if(b(e)){if("function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!n)return e;var u=e(n);return "production"!==process.env.NODE_ENV&&reactIs$1.exports.isElement(u)&&console.warn(_$5(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),Ne(u,n,r,o)}var l;return e instanceof ve?r?(e.inject(r,o),e.getName(o)):e:S(e)?function e(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!_e(t[i])&&(Array.isArray(t[i])&&t[i].isCss||b(t[i])?s.push(be(i)+":",t[i],";"):S(t[i])?s.push.apply(s,e(t[i],i)):s.push(be(i)+": "+(r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in unitlessKeys?String(o).trim():o+"px")+";"));return n?[n+" {"].concat(s,["}"]):s}(e):e.toString()}var Ae=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return b(e)||S(e)?Ae(Ne(g(w,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Ae(Ne(g(e,n)))}var Ie=/invalid hook call/i,Pe=new Set,Oe=function(e,t){if("production"!==process.env.NODE_ENV){var n="The component "+e+(t?' with the id of "'+t+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",r=console.error;try{var o=!0;console.error=function(e){if(Ie.test(e))o=!1,Pe.delete(n);else {for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];r.apply(void 0,[e].concat(s));}},react.exports.useRef(),o&&!Pe.has(n)&&(console.warn(n),Pe.add(n));}catch(e){Ie.test(e.message)&&Pe.delete(n);}finally{console.error=r;}}},Re=function(e,t,n){return void 0===n&&(n=E),e.theme!==n.theme&&e.theme||t||n.theme},De=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function Te(e){return e.replace(De,"-").replace(je,"")}var xe=function(e){return ee(ne(e)>>>0)};function ke(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var Ve=function(e){return "function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Be=function(e){return "__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ze(e,t,n){var r=e[n];Ve(t)&&Ve(r)?Me(r,t):e[n]=t;}function Me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(Ve(i))for(var a in i)Be(a)&&ze(e,i[a],a);}return e}var Ge=React$1.createContext();Ge.Consumer;var Ye={};function qe(e,t,n){var o=N(e),i=!ke(e),a=t.attrs,c=void 0===a?w:a,d=t.componentId,h=void 0===d?function(e,t){var n="string"!=typeof e?"sc":Te(e);Ye[n]=(Ye[n]||0)+1;var r=n+"-"+xe("5.3.3"+n+Ye[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):d,p=t.displayName,f=void 0===p?function(e){return ke(e)?"styled."+e:"Styled("+_$5(e)+")"}(e):p,g=t.displayName&&t.componentId?Te(t.displayName)+"-"+t.componentId:t.componentId||h,S=o&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,A=t.shouldForwardProp;o&&e.shouldForwardProp&&(A=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var C,I=new se(n,g,o?e.componentStyle:void 0),P=I.isStatic&&0===c.length,O=function(e,t){return function(e,t,n,r){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,c=e.foldedComponentIds,d=e.shouldForwardProp,h=e.styledComponentId,p=e.target;"production"!==process.env.NODE_ENV&&react.exports.useDebugValue(h);var f=function(e,t,n){void 0===e&&(e=E);var r=v({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in b(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],s=i[t],n&&s?n+" "+s:n||s):i[t];})),[r,o]}(Re(t,react.exports.useContext(Ge),a)||E,t,o),y=f[0],g=f[1],S=function(e,t,n,r){var o=fe(),s=me(),i=t?e.generateAndInjectStyles(E,o,s):e.generateAndInjectStyles(n,o,s);return "production"!==process.env.NODE_ENV&&react.exports.useDebugValue(i),"production"!==process.env.NODE_ENV&&!t&&r&&r(i),i}(i,r,y,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),w=n,_=g.$as||t.$as||g.as||t.as||p,N=ke(_),A=g!==t?v({},t,{},g):t,C={};for(var I in A)"$"!==I[0]&&"as"!==I&&("forwardedAs"===I?C.as=A[I]:(d?d(I,index,_):!N||index(I))&&(C[I]=A[I]));return t.style&&g.style!==t.style&&(C.style=v({},t.style,{},g.style)),C.className=Array.prototype.concat(c,h,S!==h?S:null,t.className,g.className).filter(Boolean).join(" "),C.ref=w,react.exports.createElement(_,C)}(C,e,t,P)};return O.displayName=f,(C=React$1.forwardRef(O)).attrs=S,C.componentStyle=I,C.displayName=f,C.shouldForwardProp=A,C.foldedComponentIds=o?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):w,C.styledComponentId=g,C.target=o?e.target:e,C.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return {};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),s=r&&r+"-"+(ke(e)?e:Te(_$5(e)));return qe(e,v({},o,{attrs:S,componentId:s}),n)},Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?Me({},e.defaultProps,t):t;}}),"production"!==process.env.NODE_ENV&&(Oe(f,g),C.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+s+".\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 />"),r=!0,n={};}}}(f,g)),C.toString=function(){return "."+C.styledComponentId},i&&hoistNonReactStatics_cjs(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var He=function(e){return function e(t,r,o){if(void 0===o&&(o=E),!reactIs$1.exports.isValidElementType(r))return j(1,String(r));var s=function(){return t(r,o,Ce.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,v({},o,{},n))},s.attrs=function(n){return e(t,r,v({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(qe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){He[e]=He(e);}));"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&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"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);var styled = He;
|
|
36974
38921
|
|
|
36975
38922
|
let _$4 = t => t,
|
|
36976
38923
|
_t$4,
|
|
@@ -37040,9 +38987,9 @@ const MatrixColumnsSizeHeaderInput = ({
|
|
|
37040
38987
|
}));
|
|
37041
38988
|
};
|
|
37042
38989
|
|
|
37043
|
-
return /*#__PURE__*/
|
|
38990
|
+
return /*#__PURE__*/React$1.createElement(ColumnsWrapper, null, /*#__PURE__*/React$1.createElement(ColumnsHeader, null, "Matrix Columns"), /*#__PURE__*/React$1.createElement(NumberInputFormGroupWrapper, null, /*#__PURE__*/React$1.createElement(IconWrapper$1, null, /*#__PURE__*/React$1.createElement(default_1$1, {
|
|
37044
38991
|
onClick: onDecrementColumnsSize
|
|
37045
|
-
})), /*#__PURE__*/
|
|
38992
|
+
})), /*#__PURE__*/React$1.createElement("p", null, model.columnLabels.length), /*#__PURE__*/React$1.createElement(IconWrapper$1, null, /*#__PURE__*/React$1.createElement(default_1$2, {
|
|
37046
38993
|
onClick: onIncrementColumnsSize
|
|
37047
38994
|
}))));
|
|
37048
38995
|
};
|
|
@@ -37085,9 +39032,9 @@ const MatrixColumnsRowInput = ({
|
|
|
37085
39032
|
}));
|
|
37086
39033
|
};
|
|
37087
39034
|
|
|
37088
|
-
return /*#__PURE__*/
|
|
39035
|
+
return /*#__PURE__*/React$1.createElement(ColumnsWrapper, null, /*#__PURE__*/React$1.createElement(ColumnsHeader, null, "Matrix Rows"), /*#__PURE__*/React$1.createElement(NumberInputFormGroupWrapper, null, /*#__PURE__*/React$1.createElement(IconWrapper$1, null, /*#__PURE__*/React$1.createElement(default_1$1, {
|
|
37089
39036
|
onClick: onDecrementSize
|
|
37090
|
-
})), /*#__PURE__*/
|
|
39037
|
+
})), /*#__PURE__*/React$1.createElement("p", null, model.rowLabels.length), /*#__PURE__*/React$1.createElement(IconWrapper$1, null, /*#__PURE__*/React$1.createElement(default_1$2, {
|
|
37091
39038
|
onClick: onIncrementSize
|
|
37092
39039
|
}))));
|
|
37093
39040
|
};
|
|
@@ -37114,7 +39061,7 @@ Object.defineProperty(FormControlContext$1, "__esModule", {
|
|
|
37114
39061
|
});
|
|
37115
39062
|
FormControlContext$1.default = void 0;
|
|
37116
39063
|
|
|
37117
|
-
var _react$N = _interopRequireDefault$S(
|
|
39064
|
+
var _react$N = _interopRequireDefault$S(react.exports);
|
|
37118
39065
|
|
|
37119
39066
|
/**
|
|
37120
39067
|
* @ignore - internal component.
|
|
@@ -37133,7 +39080,7 @@ withFormControlContext$1.default = withFormControlContext;
|
|
|
37133
39080
|
|
|
37134
39081
|
var _extends2$z = _interopRequireDefault$R(_extends$2.exports);
|
|
37135
39082
|
|
|
37136
|
-
var _react$M = _interopRequireDefault$R(
|
|
39083
|
+
var _react$M = _interopRequireDefault$R(react.exports);
|
|
37137
39084
|
|
|
37138
39085
|
var _hoistNonReactStatics = _interopRequireDefault$R(hoistNonReactStatics_cjs);
|
|
37139
39086
|
|
|
@@ -37221,7 +39168,7 @@ var _getPrototypeOf3$8 = _interopRequireDefault$P(getPrototypeOf$1.exports);
|
|
|
37221
39168
|
|
|
37222
39169
|
var _inherits2$i = _interopRequireDefault$P(inherits.exports);
|
|
37223
39170
|
|
|
37224
|
-
var _react$L = _interopRequireDefault$P(
|
|
39171
|
+
var _react$L = _interopRequireDefault$P(react.exports);
|
|
37225
39172
|
|
|
37226
39173
|
var _propTypes$E = _interopRequireDefault$P(propTypes.exports);
|
|
37227
39174
|
|
|
@@ -37689,7 +39636,7 @@ ChildMapping.mergeChildMappings = mergeChildMappings;
|
|
|
37689
39636
|
ChildMapping.getInitialChildMapping = getInitialChildMapping;
|
|
37690
39637
|
ChildMapping.getNextChildMapping = getNextChildMapping;
|
|
37691
39638
|
|
|
37692
|
-
var _react$K =
|
|
39639
|
+
var _react$K = react.exports;
|
|
37693
39640
|
|
|
37694
39641
|
/**
|
|
37695
39642
|
* Given `this.props.children`, return an object mapping key to child.
|
|
@@ -37839,7 +39786,7 @@ exports.default = void 0;
|
|
|
37839
39786
|
|
|
37840
39787
|
var _propTypes = _interopRequireDefault(propTypes.exports);
|
|
37841
39788
|
|
|
37842
|
-
var _react = _interopRequireDefault(
|
|
39789
|
+
var _react = _interopRequireDefault(react.exports);
|
|
37843
39790
|
|
|
37844
39791
|
var _reactLifecyclesCompat = require$$3;
|
|
37845
39792
|
|
|
@@ -38080,7 +40027,7 @@ Transition$1.default = Transition$1.EXITING = Transition$1.ENTERED = Transition$
|
|
|
38080
40027
|
|
|
38081
40028
|
var PropTypes$1 = _interopRequireWildcard(propTypes.exports);
|
|
38082
40029
|
|
|
38083
|
-
var _react$J = _interopRequireDefault$M(
|
|
40030
|
+
var _react$J = _interopRequireDefault$M(react.exports);
|
|
38084
40031
|
|
|
38085
40032
|
var _reactDom$9 = _interopRequireDefault$M(reactDom.exports);
|
|
38086
40033
|
|
|
@@ -38706,7 +40653,7 @@ var _getPrototypeOf3$7 = _interopRequireDefault$L(getPrototypeOf$1.exports);
|
|
|
38706
40653
|
|
|
38707
40654
|
var _inherits2$h = _interopRequireDefault$L(inherits.exports);
|
|
38708
40655
|
|
|
38709
|
-
var _react$I = _interopRequireDefault$L(
|
|
40656
|
+
var _react$I = _interopRequireDefault$L(react.exports);
|
|
38710
40657
|
|
|
38711
40658
|
var _propTypes$C = _interopRequireDefault$L(propTypes.exports);
|
|
38712
40659
|
|
|
@@ -38855,7 +40802,7 @@ var _inherits2$g = _interopRequireDefault$K(inherits.exports);
|
|
|
38855
40802
|
|
|
38856
40803
|
var _assertThisInitialized2$2 = _interopRequireDefault$K(assertThisInitialized.exports);
|
|
38857
40804
|
|
|
38858
|
-
var _react$H = _interopRequireDefault$K(
|
|
40805
|
+
var _react$H = _interopRequireDefault$K(react.exports);
|
|
38859
40806
|
|
|
38860
40807
|
var _propTypes$B = _interopRequireDefault$K(propTypes.exports);
|
|
38861
40808
|
|
|
@@ -39271,7 +41218,7 @@ var _inherits2$f = _interopRequireDefault$J(inherits.exports);
|
|
|
39271
41218
|
|
|
39272
41219
|
var _assertThisInitialized2$1 = _interopRequireDefault$J(assertThisInitialized.exports);
|
|
39273
41220
|
|
|
39274
|
-
var _react$G = _interopRequireDefault$J(
|
|
41221
|
+
var _react$G = _interopRequireDefault$J(react.exports);
|
|
39275
41222
|
|
|
39276
41223
|
var _propTypes$A = _interopRequireDefault$J(propTypes.exports);
|
|
39277
41224
|
|
|
@@ -39819,7 +41766,7 @@ var _defineProperty2$k = _interopRequireDefault$I(defineProperty$4.exports);
|
|
|
39819
41766
|
|
|
39820
41767
|
var _objectWithoutProperties2$w = _interopRequireDefault$I(objectWithoutProperties.exports);
|
|
39821
41768
|
|
|
39822
|
-
var _react$F = _interopRequireDefault$I(
|
|
41769
|
+
var _react$F = _interopRequireDefault$I(react.exports);
|
|
39823
41770
|
|
|
39824
41771
|
var _propTypes$z = _interopRequireDefault$I(propTypes.exports);
|
|
39825
41772
|
|
|
@@ -40029,7 +41976,7 @@ var _getPrototypeOf2$9 = _interopRequireDefault$H(getPrototypeOf$1.exports);
|
|
|
40029
41976
|
|
|
40030
41977
|
var _inherits2$e = _interopRequireDefault$H(inherits.exports);
|
|
40031
41978
|
|
|
40032
|
-
var _react$E = _interopRequireDefault$H(
|
|
41979
|
+
var _react$E = _interopRequireDefault$H(react.exports);
|
|
40033
41980
|
|
|
40034
41981
|
var _propTypes$y = _interopRequireDefault$H(propTypes.exports);
|
|
40035
41982
|
|
|
@@ -40334,7 +42281,7 @@ Object.defineProperty(RadioButtonUnchecked$1, "__esModule", {
|
|
|
40334
42281
|
});
|
|
40335
42282
|
RadioButtonUnchecked$1.default = void 0;
|
|
40336
42283
|
|
|
40337
|
-
var _react$D = _interopRequireDefault$G(
|
|
42284
|
+
var _react$D = _interopRequireDefault$G(react.exports);
|
|
40338
42285
|
|
|
40339
42286
|
var _pure$2 = _interopRequireDefault$G(pure$1);
|
|
40340
42287
|
|
|
@@ -40365,7 +42312,7 @@ Object.defineProperty(RadioButtonChecked$1, "__esModule", {
|
|
|
40365
42312
|
});
|
|
40366
42313
|
RadioButtonChecked$1.default = void 0;
|
|
40367
42314
|
|
|
40368
|
-
var _react$C = _interopRequireDefault$F(
|
|
42315
|
+
var _react$C = _interopRequireDefault$F(react.exports);
|
|
40369
42316
|
|
|
40370
42317
|
var _pure$1 = _interopRequireDefault$F(pure$1);
|
|
40371
42318
|
|
|
@@ -40398,7 +42345,7 @@ var _extends2$t = _interopRequireDefault$E(_extends$2.exports);
|
|
|
40398
42345
|
|
|
40399
42346
|
var _objectWithoutProperties2$u = _interopRequireDefault$E(objectWithoutProperties.exports);
|
|
40400
42347
|
|
|
40401
|
-
var _react$B = _interopRequireDefault$E(
|
|
42348
|
+
var _react$B = _interopRequireDefault$E(react.exports);
|
|
40402
42349
|
|
|
40403
42350
|
var _propTypes$x = _interopRequireDefault$E(propTypes.exports);
|
|
40404
42351
|
|
|
@@ -40592,7 +42539,7 @@ var _defineProperty2$i = _interopRequireDefault$D(defineProperty$4.exports);
|
|
|
40592
42539
|
|
|
40593
42540
|
var _objectWithoutProperties2$t = _interopRequireDefault$D(objectWithoutProperties.exports);
|
|
40594
42541
|
|
|
40595
|
-
var _react$A = _interopRequireDefault$D(
|
|
42542
|
+
var _react$A = _interopRequireDefault$D(react.exports);
|
|
40596
42543
|
|
|
40597
42544
|
var _propTypes$w = _interopRequireDefault$D(propTypes.exports);
|
|
40598
42545
|
|
|
@@ -40702,7 +42649,7 @@ var _getPrototypeOf2$8 = _interopRequireDefault$C(getPrototypeOf$1.exports);
|
|
|
40702
42649
|
|
|
40703
42650
|
var _inherits2$d = _interopRequireDefault$C(inherits.exports);
|
|
40704
42651
|
|
|
40705
|
-
var _react$z = _interopRequireDefault$C(
|
|
42652
|
+
var _react$z = _interopRequireDefault$C(react.exports);
|
|
40706
42653
|
|
|
40707
42654
|
var _propTypes$v = _interopRequireDefault$C(propTypes.exports);
|
|
40708
42655
|
|
|
@@ -40893,7 +42840,7 @@ var _defineProperty2$h = _interopRequireDefault$B(defineProperty$4.exports);
|
|
|
40893
42840
|
|
|
40894
42841
|
var _objectWithoutProperties2$r = _interopRequireDefault$B(objectWithoutProperties.exports);
|
|
40895
42842
|
|
|
40896
|
-
var _react$y = _interopRequireDefault$B(
|
|
42843
|
+
var _react$y = _interopRequireDefault$B(react.exports);
|
|
40897
42844
|
|
|
40898
42845
|
var _propTypes$u = _interopRequireDefault$B(propTypes.exports);
|
|
40899
42846
|
|
|
@@ -41267,7 +43214,7 @@ var _defineProperty2$g = _interopRequireDefault$A(defineProperty$4.exports);
|
|
|
41267
43214
|
|
|
41268
43215
|
var _objectWithoutProperties2$q = _interopRequireDefault$A(objectWithoutProperties.exports);
|
|
41269
43216
|
|
|
41270
|
-
var _react$x = _interopRequireDefault$A(
|
|
43217
|
+
var _react$x = _interopRequireDefault$A(react.exports);
|
|
41271
43218
|
|
|
41272
43219
|
var _propTypes$t = _interopRequireDefault$A(propTypes.exports);
|
|
41273
43220
|
|
|
@@ -41551,66 +43498,66 @@ const MatrixLabelTypeHeaderInput = ({
|
|
|
41551
43498
|
};
|
|
41552
43499
|
|
|
41553
43500
|
const isMatrixTypeSelectionEnabled = [3, 5, 7].includes(model.columnLabels.length);
|
|
41554
|
-
return /*#__PURE__*/
|
|
43501
|
+
return /*#__PURE__*/React$1.createElement(ColumnsWrapper, null, /*#__PURE__*/React$1.createElement(ColumnsHeader, null, "Matrix Type"), /*#__PURE__*/React$1.createElement(Flex, null, /*#__PURE__*/React$1.createElement(RadioGroup, {
|
|
41555
43502
|
"aria-label": "matrixLabelType",
|
|
41556
43503
|
name: "matrixLabelType",
|
|
41557
43504
|
value: model.labelType,
|
|
41558
43505
|
onChange: onChangeLabelType
|
|
41559
|
-
}, /*#__PURE__*/
|
|
43506
|
+
}, /*#__PURE__*/React$1.createElement(FormControlLabel, {
|
|
41560
43507
|
disabled: !isMatrixTypeSelectionEnabled,
|
|
41561
43508
|
value: MATRIX_LABEL_TYPE.agreement,
|
|
41562
|
-
control: /*#__PURE__*/
|
|
43509
|
+
control: /*#__PURE__*/React$1.createElement(Radio, {
|
|
41563
43510
|
className: classes.customColor
|
|
41564
43511
|
}),
|
|
41565
43512
|
label: "Agreement"
|
|
41566
|
-
}), /*#__PURE__*/
|
|
43513
|
+
}), /*#__PURE__*/React$1.createElement(FormControlLabel, {
|
|
41567
43514
|
disabled: !isMatrixTypeSelectionEnabled,
|
|
41568
43515
|
value: MATRIX_LABEL_TYPE.frequency,
|
|
41569
|
-
control: /*#__PURE__*/
|
|
43516
|
+
control: /*#__PURE__*/React$1.createElement(Radio, {
|
|
41570
43517
|
className: classes.customColor
|
|
41571
43518
|
}),
|
|
41572
43519
|
label: "Frequency"
|
|
41573
|
-
}), /*#__PURE__*/
|
|
43520
|
+
}), /*#__PURE__*/React$1.createElement(FormControlLabel, {
|
|
41574
43521
|
disabled: !isMatrixTypeSelectionEnabled,
|
|
41575
43522
|
value: MATRIX_LABEL_TYPE.yesNo,
|
|
41576
|
-
control: /*#__PURE__*/
|
|
43523
|
+
control: /*#__PURE__*/React$1.createElement(Radio, {
|
|
41577
43524
|
className: classes.customColor
|
|
41578
43525
|
}),
|
|
41579
43526
|
label: "Yes/No"
|
|
41580
|
-
})), /*#__PURE__*/
|
|
43527
|
+
})), /*#__PURE__*/React$1.createElement(RadioGroup, {
|
|
41581
43528
|
"aria-label": "matrixLabelType",
|
|
41582
43529
|
name: "matrixLabelType",
|
|
41583
43530
|
value: model.labelType,
|
|
41584
43531
|
onChange: onChangeLabelType
|
|
41585
|
-
}, /*#__PURE__*/
|
|
43532
|
+
}, /*#__PURE__*/React$1.createElement(FormControlLabel, {
|
|
41586
43533
|
disabled: !isMatrixTypeSelectionEnabled,
|
|
41587
43534
|
value: MATRIX_LABEL_TYPE.importance,
|
|
41588
|
-
control: /*#__PURE__*/
|
|
43535
|
+
control: /*#__PURE__*/React$1.createElement(Radio, {
|
|
41589
43536
|
className: classes.customColor
|
|
41590
43537
|
}),
|
|
41591
43538
|
label: "Importance"
|
|
41592
|
-
}), /*#__PURE__*/
|
|
43539
|
+
}), /*#__PURE__*/React$1.createElement(FormControlLabel, {
|
|
41593
43540
|
disabled: !isMatrixTypeSelectionEnabled,
|
|
41594
43541
|
value: MATRIX_LABEL_TYPE.likelihood,
|
|
41595
|
-
control: /*#__PURE__*/
|
|
43542
|
+
control: /*#__PURE__*/React$1.createElement(Radio, {
|
|
41596
43543
|
className: classes.customColor
|
|
41597
43544
|
}),
|
|
41598
43545
|
label: "Likelihood"
|
|
41599
|
-
}), /*#__PURE__*/
|
|
43546
|
+
}), /*#__PURE__*/React$1.createElement(FormControlLabel, {
|
|
41600
43547
|
disabled: !isMatrixTypeSelectionEnabled,
|
|
41601
43548
|
value: MATRIX_LABEL_TYPE.like,
|
|
41602
|
-
control: /*#__PURE__*/
|
|
43549
|
+
control: /*#__PURE__*/React$1.createElement(Radio, {
|
|
41603
43550
|
className: classes.customColor
|
|
41604
43551
|
}),
|
|
41605
43552
|
label: "Like"
|
|
41606
|
-
})), /*#__PURE__*/
|
|
43553
|
+
})), /*#__PURE__*/React$1.createElement(RadioGroup, {
|
|
41607
43554
|
"aria-label": "matrixLabelType",
|
|
41608
43555
|
name: "matrixLabelType",
|
|
41609
43556
|
value: model.labelType,
|
|
41610
43557
|
onChange: onChangeLabelType
|
|
41611
|
-
}, /*#__PURE__*/
|
|
43558
|
+
}, /*#__PURE__*/React$1.createElement(FormControlLabel, {
|
|
41612
43559
|
value: MATRIX_LABEL_TYPE.custom,
|
|
41613
|
-
control: /*#__PURE__*/
|
|
43560
|
+
control: /*#__PURE__*/React$1.createElement(Radio, {
|
|
41614
43561
|
className: classes.customColor
|
|
41615
43562
|
}),
|
|
41616
43563
|
label: "Custom"
|
|
@@ -41632,7 +43579,7 @@ Object.defineProperty(KeyboardArrowDown, "__esModule", {
|
|
|
41632
43579
|
});
|
|
41633
43580
|
var default_1 = KeyboardArrowDown.default = void 0;
|
|
41634
43581
|
|
|
41635
|
-
var _react$w = _interopRequireDefault$z(
|
|
43582
|
+
var _react$w = _interopRequireDefault$z(react.exports);
|
|
41636
43583
|
|
|
41637
43584
|
var _createSvgIcon = _interopRequireDefault$z(createSvgIcon$1);
|
|
41638
43585
|
|
|
@@ -41784,7 +43731,7 @@ var _inherits = _interopDefault(inherits.exports);
|
|
|
41784
43731
|
var _typeof = _interopDefault(_typeof$2.exports);
|
|
41785
43732
|
var _objectWithoutProperties = _interopDefault(objectWithoutProperties.exports);
|
|
41786
43733
|
var _extends = _interopDefault(_extends$2.exports);
|
|
41787
|
-
var React = _interopDefault(
|
|
43734
|
+
var React = _interopDefault(react.exports);
|
|
41788
43735
|
var PropTypes = _interopDefault(propTypes.exports);
|
|
41789
43736
|
var warning = _interopDefault(warning_1);
|
|
41790
43737
|
|
|
@@ -41973,7 +43920,7 @@ reactHelpers.cloneChildrenWithClassName = cloneChildrenWithClassName;
|
|
|
41973
43920
|
reactHelpers.isMuiElement = isMuiElement;
|
|
41974
43921
|
reactHelpers.setRef = setRef;
|
|
41975
43922
|
|
|
41976
|
-
var _react$v = _interopRequireDefault$y(
|
|
43923
|
+
var _react$v = _interopRequireDefault$y(react.exports);
|
|
41977
43924
|
|
|
41978
43925
|
var _classnames$i = _interopRequireDefault$y(classnames.exports);
|
|
41979
43926
|
|
|
@@ -42018,7 +43965,7 @@ var _getPrototypeOf2$7 = _interopRequireDefault$x(getPrototypeOf$1.exports);
|
|
|
42018
43965
|
|
|
42019
43966
|
var _inherits2$c = _interopRequireDefault$x(inherits.exports);
|
|
42020
43967
|
|
|
42021
|
-
var _react$u = _interopRequireDefault$x(
|
|
43968
|
+
var _react$u = _interopRequireDefault$x(react.exports);
|
|
42022
43969
|
|
|
42023
43970
|
var _reactDom$6 = _interopRequireDefault$x(reactDom.exports);
|
|
42024
43971
|
|
|
@@ -42161,7 +44108,7 @@ var _getPrototypeOf3$4 = _interopRequireDefault$w(getPrototypeOf$1.exports);
|
|
|
42161
44108
|
|
|
42162
44109
|
var _inherits2$b = _interopRequireDefault$w(inherits.exports);
|
|
42163
44110
|
|
|
42164
|
-
var _react$t = _interopRequireDefault$w(
|
|
44111
|
+
var _react$t = _interopRequireDefault$w(react.exports);
|
|
42165
44112
|
|
|
42166
44113
|
var _reactDom$5 = _interopRequireDefault$w(reactDom.exports);
|
|
42167
44114
|
|
|
@@ -42998,7 +44945,7 @@ var _getPrototypeOf3$3 = _interopRequireDefault$s(getPrototypeOf$1.exports);
|
|
|
42998
44945
|
|
|
42999
44946
|
var _inherits2$a = _interopRequireDefault$s(inherits.exports);
|
|
43000
44947
|
|
|
43001
|
-
var _react$s = _interopRequireDefault$s(
|
|
44948
|
+
var _react$s = _interopRequireDefault$s(react.exports);
|
|
43002
44949
|
|
|
43003
44950
|
var _propTypes$q = _interopRequireDefault$s(propTypes.exports);
|
|
43004
44951
|
|
|
@@ -43181,7 +45128,7 @@ var _defineProperty2$f = _interopRequireDefault$r(defineProperty$4.exports);
|
|
|
43181
45128
|
|
|
43182
45129
|
var _objectWithoutProperties2$o = _interopRequireDefault$r(objectWithoutProperties.exports);
|
|
43183
45130
|
|
|
43184
|
-
var _react$r = _interopRequireDefault$r(
|
|
45131
|
+
var _react$r = _interopRequireDefault$r(react.exports);
|
|
43185
45132
|
|
|
43186
45133
|
var _propTypes$p = _interopRequireDefault$r(propTypes.exports);
|
|
43187
45134
|
|
|
@@ -43314,7 +45261,7 @@ var _inherits2$9 = _interopRequireDefault$q(inherits.exports);
|
|
|
43314
45261
|
|
|
43315
45262
|
var _assertThisInitialized2 = _interopRequireDefault$q(assertThisInitialized.exports);
|
|
43316
45263
|
|
|
43317
|
-
var _react$q = _interopRequireDefault$q(
|
|
45264
|
+
var _react$q = _interopRequireDefault$q(react.exports);
|
|
43318
45265
|
|
|
43319
45266
|
var _reactDom$4 = _interopRequireDefault$q(reactDom.exports);
|
|
43320
45267
|
|
|
@@ -43891,7 +45838,7 @@ var _getPrototypeOf3$2 = _interopRequireDefault$p(getPrototypeOf$1.exports);
|
|
|
43891
45838
|
|
|
43892
45839
|
var _inherits2$8 = _interopRequireDefault$p(inherits.exports);
|
|
43893
45840
|
|
|
43894
|
-
var _react$p = _interopRequireDefault$p(
|
|
45841
|
+
var _react$p = _interopRequireDefault$p(react.exports);
|
|
43895
45842
|
|
|
43896
45843
|
var _propTypes$n = _interopRequireDefault$p(propTypes.exports);
|
|
43897
45844
|
|
|
@@ -44139,7 +46086,7 @@ var _objectWithoutProperties2$l = _interopRequireDefault$o(objectWithoutProperti
|
|
|
44139
46086
|
|
|
44140
46087
|
var _extends2$k = _interopRequireDefault$o(_extends$2.exports);
|
|
44141
46088
|
|
|
44142
|
-
var _react$o = _interopRequireDefault$o(
|
|
46089
|
+
var _react$o = _interopRequireDefault$o(react.exports);
|
|
44143
46090
|
|
|
44144
46091
|
var _propTypes$m = _interopRequireDefault$o(propTypes.exports);
|
|
44145
46092
|
|
|
@@ -44271,7 +46218,7 @@ var _getPrototypeOf2$5 = _interopRequireDefault$n(getPrototypeOf$1.exports);
|
|
|
44271
46218
|
|
|
44272
46219
|
var _inherits2$7 = _interopRequireDefault$n(inherits.exports);
|
|
44273
46220
|
|
|
44274
|
-
var _react$n = _interopRequireDefault$n(
|
|
46221
|
+
var _react$n = _interopRequireDefault$n(react.exports);
|
|
44275
46222
|
|
|
44276
46223
|
var _propTypes$l = _interopRequireDefault$n(propTypes.exports);
|
|
44277
46224
|
|
|
@@ -44871,7 +46818,7 @@ Object.defineProperty(ListContext$1, "__esModule", {
|
|
|
44871
46818
|
});
|
|
44872
46819
|
ListContext$1.default = void 0;
|
|
44873
46820
|
|
|
44874
|
-
var _react$m = _interopRequireDefault$m(
|
|
46821
|
+
var _react$m = _interopRequireDefault$m(react.exports);
|
|
44875
46822
|
|
|
44876
46823
|
/**
|
|
44877
46824
|
* @ignore - internal component.
|
|
@@ -44894,7 +46841,7 @@ var _defineProperty2$c = _interopRequireDefault$l(defineProperty$4.exports);
|
|
|
44894
46841
|
|
|
44895
46842
|
var _objectWithoutProperties2$j = _interopRequireDefault$l(objectWithoutProperties.exports);
|
|
44896
46843
|
|
|
44897
|
-
var _react$l = _interopRequireDefault$l(
|
|
46844
|
+
var _react$l = _interopRequireDefault$l(react.exports);
|
|
44898
46845
|
|
|
44899
46846
|
var _propTypes$k = _interopRequireDefault$l(propTypes.exports);
|
|
44900
46847
|
|
|
@@ -45044,7 +46991,7 @@ var _getPrototypeOf3$1 = _interopRequireDefault$k(getPrototypeOf$1.exports);
|
|
|
45044
46991
|
|
|
45045
46992
|
var _inherits2$6 = _interopRequireDefault$k(inherits.exports);
|
|
45046
46993
|
|
|
45047
|
-
var _react$k = _interopRequireDefault$k(
|
|
46994
|
+
var _react$k = _interopRequireDefault$k(react.exports);
|
|
45048
46995
|
|
|
45049
46996
|
var _propTypes$j = _interopRequireDefault$k(propTypes.exports);
|
|
45050
46997
|
|
|
@@ -45317,7 +47264,7 @@ var _getPrototypeOf3 = _interopRequireDefault$j(getPrototypeOf$1.exports);
|
|
|
45317
47264
|
|
|
45318
47265
|
var _inherits2$5 = _interopRequireDefault$j(inherits.exports);
|
|
45319
47266
|
|
|
45320
|
-
var _react$j = _interopRequireDefault$j(
|
|
47267
|
+
var _react$j = _interopRequireDefault$j(react.exports);
|
|
45321
47268
|
|
|
45322
47269
|
var _propTypes$i = _interopRequireDefault$j(propTypes.exports);
|
|
45323
47270
|
|
|
@@ -45618,7 +47565,7 @@ Object.defineProperty(MergeListContext$1, "__esModule", {
|
|
|
45618
47565
|
});
|
|
45619
47566
|
MergeListContext$1.default = void 0;
|
|
45620
47567
|
|
|
45621
|
-
var _react$i = _interopRequireDefault$i(
|
|
47568
|
+
var _react$i = _interopRequireDefault$i(react.exports);
|
|
45622
47569
|
|
|
45623
47570
|
var _propTypes$h = _interopRequireDefault$i(propTypes.exports);
|
|
45624
47571
|
|
|
@@ -45665,7 +47612,7 @@ var _defineProperty2$b = _interopRequireDefault$h(defineProperty$4.exports);
|
|
|
45665
47612
|
|
|
45666
47613
|
var _objectWithoutProperties2$g = _interopRequireDefault$h(objectWithoutProperties.exports);
|
|
45667
47614
|
|
|
45668
|
-
var _react$h = _interopRequireDefault$h(
|
|
47615
|
+
var _react$h = _interopRequireDefault$h(react.exports);
|
|
45669
47616
|
|
|
45670
47617
|
var _propTypes$g = _interopRequireDefault$h(propTypes.exports);
|
|
45671
47618
|
|
|
@@ -45988,7 +47935,7 @@ var _objectWithoutProperties2$f = _interopRequireDefault$g(objectWithoutProperti
|
|
|
45988
47935
|
|
|
45989
47936
|
var _extends2$e = _interopRequireDefault$g(_extends$2.exports);
|
|
45990
47937
|
|
|
45991
|
-
var _react$g = _interopRequireDefault$g(
|
|
47938
|
+
var _react$g = _interopRequireDefault$g(react.exports);
|
|
45992
47939
|
|
|
45993
47940
|
var _propTypes$f = _interopRequireDefault$g(propTypes.exports);
|
|
45994
47941
|
|
|
@@ -46171,7 +48118,7 @@ var _getPrototypeOf2$4 = _interopRequireDefault$f(getPrototypeOf$1.exports);
|
|
|
46171
48118
|
|
|
46172
48119
|
var _inherits2$4 = _interopRequireDefault$f(inherits.exports);
|
|
46173
48120
|
|
|
46174
|
-
var _react$f = _interopRequireDefault$f(
|
|
48121
|
+
var _react$f = _interopRequireDefault$f(react.exports);
|
|
46175
48122
|
|
|
46176
48123
|
var _propTypes$e = _interopRequireDefault$f(propTypes.exports);
|
|
46177
48124
|
|
|
@@ -46513,7 +48460,7 @@ var _createClass2$3 = _interopRequireDefault$e(createClass.exports);
|
|
|
46513
48460
|
|
|
46514
48461
|
var _inherits2$3 = _interopRequireDefault$e(inherits.exports);
|
|
46515
48462
|
|
|
46516
|
-
var _react$e = _interopRequireDefault$e(
|
|
48463
|
+
var _react$e = _interopRequireDefault$e(react.exports);
|
|
46517
48464
|
|
|
46518
48465
|
var _propTypes$d = _interopRequireDefault$e(propTypes.exports);
|
|
46519
48466
|
|
|
@@ -47210,7 +49157,7 @@ var _extends2$b = _interopRequireDefault$d(_extends$2.exports);
|
|
|
47210
49157
|
|
|
47211
49158
|
var _objectWithoutProperties2$c = _interopRequireDefault$d(objectWithoutProperties.exports);
|
|
47212
49159
|
|
|
47213
|
-
var _react$d = _interopRequireDefault$d(
|
|
49160
|
+
var _react$d = _interopRequireDefault$d(react.exports);
|
|
47214
49161
|
|
|
47215
49162
|
var _propTypes$c = _interopRequireDefault$d(propTypes.exports);
|
|
47216
49163
|
|
|
@@ -47569,7 +49516,7 @@ var _createClass2$2 = _interopRequireDefault$c(createClass.exports);
|
|
|
47569
49516
|
|
|
47570
49517
|
var _inherits2$2 = _interopRequireDefault$c(inherits.exports);
|
|
47571
49518
|
|
|
47572
|
-
var _react$c = _interopRequireDefault$c(
|
|
49519
|
+
var _react$c = _interopRequireDefault$c(react.exports);
|
|
47573
49520
|
|
|
47574
49521
|
var _propTypes$b = _interopRequireDefault$c(propTypes.exports);
|
|
47575
49522
|
|
|
@@ -47866,7 +49813,7 @@ var _defineProperty2$6 = _interopRequireDefault$b(defineProperty$4.exports);
|
|
|
47866
49813
|
|
|
47867
49814
|
var _objectWithoutProperties2$a = _interopRequireDefault$b(objectWithoutProperties.exports);
|
|
47868
49815
|
|
|
47869
|
-
var _react$b = _interopRequireDefault$b(
|
|
49816
|
+
var _react$b = _interopRequireDefault$b(react.exports);
|
|
47870
49817
|
|
|
47871
49818
|
var _propTypes$a = _interopRequireDefault$b(propTypes.exports);
|
|
47872
49819
|
|
|
@@ -48062,7 +50009,7 @@ var _defineProperty2$5 = _interopRequireDefault$a(defineProperty$4.exports);
|
|
|
48062
50009
|
|
|
48063
50010
|
var _objectWithoutProperties2$9 = _interopRequireDefault$a(objectWithoutProperties.exports);
|
|
48064
50011
|
|
|
48065
|
-
var _react$a = _interopRequireDefault$a(
|
|
50012
|
+
var _react$a = _interopRequireDefault$a(react.exports);
|
|
48066
50013
|
|
|
48067
50014
|
var _propTypes$9 = _interopRequireDefault$a(propTypes.exports);
|
|
48068
50015
|
|
|
@@ -48243,7 +50190,7 @@ var _extends2$7 = _interopRequireDefault$9(_extends$2.exports);
|
|
|
48243
50190
|
|
|
48244
50191
|
var _objectWithoutProperties2$8 = _interopRequireDefault$9(objectWithoutProperties.exports);
|
|
48245
50192
|
|
|
48246
|
-
var _react$9 = _interopRequireDefault$9(
|
|
50193
|
+
var _react$9 = _interopRequireDefault$9(react.exports);
|
|
48247
50194
|
|
|
48248
50195
|
var _propTypes$8 = _interopRequireDefault$9(propTypes.exports);
|
|
48249
50196
|
|
|
@@ -48560,7 +50507,7 @@ var _defineProperty2$3 = _interopRequireDefault$8(defineProperty$4.exports);
|
|
|
48560
50507
|
|
|
48561
50508
|
var _objectWithoutProperties2$7 = _interopRequireDefault$8(objectWithoutProperties.exports);
|
|
48562
50509
|
|
|
48563
|
-
var _react$8 = _interopRequireDefault$8(
|
|
50510
|
+
var _react$8 = _interopRequireDefault$8(react.exports);
|
|
48564
50511
|
|
|
48565
50512
|
var _propTypes$7 = _interopRequireDefault$8(propTypes.exports);
|
|
48566
50513
|
|
|
@@ -48810,7 +50757,7 @@ var _defineProperty2$2 = _interopRequireDefault$7(defineProperty$4.exports);
|
|
|
48810
50757
|
|
|
48811
50758
|
var _objectWithoutProperties2$6 = _interopRequireDefault$7(objectWithoutProperties.exports);
|
|
48812
50759
|
|
|
48813
|
-
var _react$7 = _interopRequireDefault$7(
|
|
50760
|
+
var _react$7 = _interopRequireDefault$7(react.exports);
|
|
48814
50761
|
|
|
48815
50762
|
var _propTypes$6 = _interopRequireDefault$7(propTypes.exports);
|
|
48816
50763
|
|
|
@@ -48917,7 +50864,7 @@ Object.defineProperty(ArrowDropDown$1, "__esModule", {
|
|
|
48917
50864
|
});
|
|
48918
50865
|
ArrowDropDown$1.default = void 0;
|
|
48919
50866
|
|
|
48920
|
-
var _react$6 = _interopRequireDefault$6(
|
|
50867
|
+
var _react$6 = _interopRequireDefault$6(react.exports);
|
|
48921
50868
|
|
|
48922
50869
|
var _pure = _interopRequireDefault$6(pure$1);
|
|
48923
50870
|
|
|
@@ -48950,7 +50897,7 @@ var _extends2$4 = _interopRequireDefault$5(_extends$2.exports);
|
|
|
48950
50897
|
|
|
48951
50898
|
var _objectWithoutProperties2$5 = _interopRequireDefault$5(objectWithoutProperties.exports);
|
|
48952
50899
|
|
|
48953
|
-
var _react$5 = _interopRequireDefault$5(
|
|
50900
|
+
var _react$5 = _interopRequireDefault$5(react.exports);
|
|
48954
50901
|
|
|
48955
50902
|
var _propTypes$5 = _interopRequireDefault$5(propTypes.exports);
|
|
48956
50903
|
|
|
@@ -49174,7 +51121,7 @@ var _extends3 = _interopRequireDefault$4(_extends$2.exports);
|
|
|
49174
51121
|
|
|
49175
51122
|
var _objectWithoutProperties2$4 = _interopRequireDefault$4(objectWithoutProperties.exports);
|
|
49176
51123
|
|
|
49177
|
-
var _react$4 = _interopRequireDefault$4(
|
|
51124
|
+
var _react$4 = _interopRequireDefault$4(react.exports);
|
|
49178
51125
|
|
|
49179
51126
|
var _propTypes$4 = _interopRequireDefault$4(propTypes.exports);
|
|
49180
51127
|
|
|
@@ -49312,7 +51259,7 @@ var _extends2$3 = _interopRequireDefault$3(_extends$2.exports);
|
|
|
49312
51259
|
|
|
49313
51260
|
var _objectWithoutProperties2$3 = _interopRequireDefault$3(objectWithoutProperties.exports);
|
|
49314
51261
|
|
|
49315
|
-
var _react$3 = _interopRequireDefault$3(
|
|
51262
|
+
var _react$3 = _interopRequireDefault$3(react.exports);
|
|
49316
51263
|
|
|
49317
51264
|
var _propTypes$3 = _interopRequireDefault$3(propTypes.exports);
|
|
49318
51265
|
|
|
@@ -49645,7 +51592,7 @@ var _inherits2$1 = _interopRequireDefault$2(inherits.exports);
|
|
|
49645
51592
|
|
|
49646
51593
|
var _typeof2 = _interopRequireDefault$2(_typeof$2.exports);
|
|
49647
51594
|
|
|
49648
|
-
var _react$2 = _interopRequireDefault$2(
|
|
51595
|
+
var _react$2 = _interopRequireDefault$2(react.exports);
|
|
49649
51596
|
|
|
49650
51597
|
var _propTypes$2 = _interopRequireDefault$2(propTypes.exports);
|
|
49651
51598
|
|
|
@@ -50165,7 +52112,7 @@ var _extends2$1 = _interopRequireDefault$1(_extends$2.exports);
|
|
|
50165
52112
|
|
|
50166
52113
|
var _objectWithoutProperties2$1 = _interopRequireDefault$1(objectWithoutProperties.exports);
|
|
50167
52114
|
|
|
50168
|
-
var _react$1 = _interopRequireDefault$1(
|
|
52115
|
+
var _react$1 = _interopRequireDefault$1(react.exports);
|
|
50169
52116
|
|
|
50170
52117
|
var _propTypes$1 = _interopRequireDefault$1(propTypes.exports);
|
|
50171
52118
|
|
|
@@ -50419,7 +52366,7 @@ var _getPrototypeOf2 = _interopRequireDefault(getPrototypeOf$1.exports);
|
|
|
50419
52366
|
|
|
50420
52367
|
var _inherits2 = _interopRequireDefault(inherits.exports);
|
|
50421
52368
|
|
|
50422
|
-
var _react = _interopRequireDefault(
|
|
52369
|
+
var _react = _interopRequireDefault(react.exports);
|
|
50423
52370
|
|
|
50424
52371
|
var _reactDom = _interopRequireDefault(reactDom.exports);
|
|
50425
52372
|
|
|
@@ -50832,7 +52779,7 @@ const NumericInput = styles$y.withStyles(styles$1)(props => {
|
|
|
50832
52779
|
onFieldUpdate(e.target.value);
|
|
50833
52780
|
};
|
|
50834
52781
|
|
|
50835
|
-
return /*#__PURE__*/
|
|
52782
|
+
return /*#__PURE__*/react.exports.createElement(InputWrapper$1, null, /*#__PURE__*/react.exports.createElement(TextField, {
|
|
50836
52783
|
name: name,
|
|
50837
52784
|
value: fieldValue.value,
|
|
50838
52785
|
inputProps: {
|
|
@@ -50963,11 +52910,11 @@ const MatrixLabelEditableButton = props => {
|
|
|
50963
52910
|
onAction,
|
|
50964
52911
|
spellCheck
|
|
50965
52912
|
} = props;
|
|
50966
|
-
const [labelValue, setLabelValue] = useState(null);
|
|
50967
|
-
const [scoreValue, setScoreValue] = useState('');
|
|
50968
|
-
const [showInput, setShowInput] = useState(false);
|
|
50969
|
-
const [anchorEl, setAnchorEl] =
|
|
50970
|
-
const [scoresToRef] =
|
|
52913
|
+
const [labelValue, setLabelValue] = react.exports.useState(null);
|
|
52914
|
+
const [scoreValue, setScoreValue] = react.exports.useState('');
|
|
52915
|
+
const [showInput, setShowInput] = react.exports.useState(false);
|
|
52916
|
+
const [anchorEl, setAnchorEl] = React$1.useState(null);
|
|
52917
|
+
const [scoresToRef] = React$1.useState( /*#__PURE__*/React$1.createRef());
|
|
50971
52918
|
const open = Boolean(anchorEl);
|
|
50972
52919
|
|
|
50973
52920
|
const onActionClick = event => {
|
|
@@ -51039,40 +52986,40 @@ const MatrixLabelEditableButton = props => {
|
|
|
51039
52986
|
scoresToRef.current.focus();
|
|
51040
52987
|
};
|
|
51041
52988
|
|
|
51042
|
-
return /*#__PURE__*/
|
|
52989
|
+
return /*#__PURE__*/React$1.createElement(MatrixEditableButtonWrapper, null, /*#__PURE__*/React$1.createElement(MatrixEditableButtonContent, null, showInput ? /*#__PURE__*/React$1.createElement(InputWrapper, {
|
|
51043
52990
|
autoFocus: true,
|
|
51044
52991
|
value: labelValue,
|
|
51045
52992
|
onChange: e => setLabelValue(e.target.value),
|
|
51046
52993
|
onBlur: onBlur,
|
|
51047
52994
|
spellCheck: spellCheck
|
|
51048
|
-
}) : /*#__PURE__*/
|
|
52995
|
+
}) : /*#__PURE__*/React$1.createElement(MatrixEditableButtonText, {
|
|
51049
52996
|
onClick: onShowInput
|
|
51050
|
-
}, value)), /*#__PURE__*/
|
|
52997
|
+
}, value)), /*#__PURE__*/React$1.createElement(MatrixEditableButtonActions, {
|
|
51051
52998
|
onClick: onActionClick
|
|
51052
|
-
}, /*#__PURE__*/
|
|
52999
|
+
}, /*#__PURE__*/React$1.createElement(IconWrapper, null, /*#__PURE__*/React$1.createElement(default_1, {
|
|
51053
53000
|
fontSize: "inherit"
|
|
51054
|
-
})), /*#__PURE__*/
|
|
53001
|
+
})), /*#__PURE__*/React$1.createElement(Menu, {
|
|
51055
53002
|
anchorEl: anchorEl,
|
|
51056
53003
|
open: open,
|
|
51057
53004
|
onClose: handleClose
|
|
51058
|
-
}, /*#__PURE__*/
|
|
53005
|
+
}, /*#__PURE__*/React$1.createElement(MenuItem, {
|
|
51059
53006
|
key: "item1",
|
|
51060
53007
|
selected: false,
|
|
51061
53008
|
onClick: onClearScores
|
|
51062
|
-
}, "Clear Scores"), /*#__PURE__*/
|
|
53009
|
+
}, "Clear Scores"), /*#__PURE__*/React$1.createElement(MenuItem, {
|
|
51063
53010
|
key: "item2",
|
|
51064
53011
|
selected: false,
|
|
51065
53012
|
onClick: onSetScoresAscending
|
|
51066
|
-
}, "Set Scores Ascending"), /*#__PURE__*/
|
|
53013
|
+
}, "Set Scores Ascending"), /*#__PURE__*/React$1.createElement(MenuItem, {
|
|
51067
53014
|
key: "item3",
|
|
51068
53015
|
selected: false,
|
|
51069
53016
|
onClick: onSetScoresDescending
|
|
51070
|
-
}, "Set Scores Descending"), /*#__PURE__*/
|
|
53017
|
+
}, "Set Scores Descending"), /*#__PURE__*/React$1.createElement(MenuItem, {
|
|
51071
53018
|
key: "item4",
|
|
51072
53019
|
selected: false
|
|
51073
|
-
}, /*#__PURE__*/
|
|
53020
|
+
}, /*#__PURE__*/React$1.createElement(SetScoresToWrapper, null, /*#__PURE__*/React$1.createElement("p", {
|
|
51074
53021
|
onClick: onSetScoreToFocus
|
|
51075
|
-
}, "Set Scores To"), /*#__PURE__*/
|
|
53022
|
+
}, "Set Scores To"), /*#__PURE__*/React$1.createElement(SetScoresToInputWrapper, null, /*#__PURE__*/React$1.createElement(NumericInput, {
|
|
51076
53023
|
onFieldUpdate: onSetScores,
|
|
51077
53024
|
name: 'setScoreTo',
|
|
51078
53025
|
placeholder: "#",
|
|
@@ -51276,30 +53223,30 @@ const MatrixValues = props => {
|
|
|
51276
53223
|
}));
|
|
51277
53224
|
};
|
|
51278
53225
|
|
|
51279
|
-
return /*#__PURE__*/
|
|
53226
|
+
return /*#__PURE__*/React$1.createElement(ScoringContainer, null, /*#__PURE__*/React$1.createElement("div", null), /*#__PURE__*/React$1.createElement(GridSeparatorVertical, null), /*#__PURE__*/React$1.createElement(MatrixColumns, null, columnLabels.map((value, columnLabelIndex) => /*#__PURE__*/React$1.createElement(ColumnLabelWrapper, {
|
|
51280
53227
|
key: columnLabelIndex
|
|
51281
|
-
}, /*#__PURE__*/
|
|
53228
|
+
}, /*#__PURE__*/React$1.createElement(MatrixLabelEditableButton, {
|
|
51282
53229
|
resourceIndex: columnLabelIndex,
|
|
51283
53230
|
onAction: onActionByColumn,
|
|
51284
53231
|
value: value,
|
|
51285
53232
|
onLabelUpdate: labelValue => onSetColumnLabel(columnLabelIndex, labelValue),
|
|
51286
53233
|
spellCheck: spellCheckEnabled
|
|
51287
|
-
})))), /*#__PURE__*/
|
|
53234
|
+
})))), /*#__PURE__*/React$1.createElement(GridSeparatorHorizontal, null), /*#__PURE__*/React$1.createElement(GridSeparatorVertical, null), /*#__PURE__*/React$1.createElement(GridSeparatorHorizontal, null), /*#__PURE__*/React$1.createElement(ScoringRows, null, rowLabels.map((value, rowLabelIndex) => /*#__PURE__*/React$1.createElement(RowLabelWrapper, {
|
|
51288
53235
|
key: rowLabelIndex
|
|
51289
|
-
}, /*#__PURE__*/
|
|
53236
|
+
}, /*#__PURE__*/React$1.createElement(MatrixLabelEditableButton, {
|
|
51290
53237
|
resourceIndex: rowLabelIndex,
|
|
51291
53238
|
onAction: onActionByRow,
|
|
51292
53239
|
value: value,
|
|
51293
53240
|
onLabelUpdate: labelValue => onSetRowLabel(rowLabelIndex, labelValue),
|
|
51294
53241
|
spellCheck: spellCheckEnabled
|
|
51295
|
-
})))), /*#__PURE__*/
|
|
51296
|
-
return /*#__PURE__*/
|
|
53242
|
+
})))), /*#__PURE__*/React$1.createElement(GridSeparatorVertical, null), /*#__PURE__*/React$1.createElement(Content, null, rowLabels.map((row, rowIndex) => {
|
|
53243
|
+
return /*#__PURE__*/React$1.createElement(ValueRowWrapper, {
|
|
51297
53244
|
key: rowIndex
|
|
51298
53245
|
}, columnLabels.map((column, entryIndex) => {
|
|
51299
53246
|
const matrixValueIndex = `${rowIndex}-${entryIndex}`;
|
|
51300
|
-
return /*#__PURE__*/
|
|
53247
|
+
return /*#__PURE__*/React$1.createElement(ValueItemWrapper, {
|
|
51301
53248
|
key: entryIndex
|
|
51302
|
-
}, /*#__PURE__*/
|
|
53249
|
+
}, /*#__PURE__*/React$1.createElement(ScoringNumberInputWrapper, null, /*#__PURE__*/React$1.createElement(NumericInput, {
|
|
51303
53250
|
onFieldUpdate: e => onSetMatrixValue(matrixValueIndex, e),
|
|
51304
53251
|
name: matrixValueIndex,
|
|
51305
53252
|
placeholder: "#",
|
|
@@ -51381,11 +53328,11 @@ const Design = styles$y.withStyles(styles)(props => {
|
|
|
51381
53328
|
|
|
51382
53329
|
const getPluginProps = (props = {}) => _extends$3({}, baseInputConfiguration, props);
|
|
51383
53330
|
|
|
51384
|
-
return /*#__PURE__*/
|
|
53331
|
+
return /*#__PURE__*/React$1.createElement(layout.ConfigLayout, {
|
|
51385
53332
|
extraCSSRules: extraCSSRules,
|
|
51386
53333
|
dimensions: contentDimensions,
|
|
51387
53334
|
hideSettings: settingsPanelDisabled,
|
|
51388
|
-
settings: /*#__PURE__*/
|
|
53335
|
+
settings: /*#__PURE__*/React$1.createElement(Panel, {
|
|
51389
53336
|
model: model,
|
|
51390
53337
|
onChangeModel: onChangeModel,
|
|
51391
53338
|
configuration: configuration,
|
|
@@ -51394,10 +53341,10 @@ const Design = styles$y.withStyles(styles)(props => {
|
|
|
51394
53341
|
Properties: panelProperties
|
|
51395
53342
|
}
|
|
51396
53343
|
})
|
|
51397
|
-
}, teacherInstructionsEnabled && /*#__PURE__*/
|
|
53344
|
+
}, teacherInstructionsEnabled && /*#__PURE__*/React$1.createElement(InputContainer, {
|
|
51398
53345
|
label: teacherInstructions.label,
|
|
51399
53346
|
className: classes.promptHolder
|
|
51400
|
-
}, /*#__PURE__*/
|
|
53347
|
+
}, /*#__PURE__*/React$1.createElement(EditableHtml, {
|
|
51401
53348
|
className: classes.prompt,
|
|
51402
53349
|
markup: model.teacherInstructions || '',
|
|
51403
53350
|
onChange: onTeacherInstructionsChanged,
|
|
@@ -51407,12 +53354,12 @@ const Design = styles$y.withStyles(styles)(props => {
|
|
|
51407
53354
|
nonEmpty: false,
|
|
51408
53355
|
spellCheck: spellCheckEnabled,
|
|
51409
53356
|
uploadSoundSupport: uploadSoundSupport
|
|
51410
|
-
}), teacherInstructionsError && /*#__PURE__*/
|
|
53357
|
+
}), teacherInstructionsError && /*#__PURE__*/React$1.createElement("div", {
|
|
51411
53358
|
className: classes.errorText
|
|
51412
|
-
}, teacherInstructionsError)), /*#__PURE__*/
|
|
53359
|
+
}, teacherInstructionsError)), /*#__PURE__*/React$1.createElement(InputContainer, {
|
|
51413
53360
|
label: prompt.label,
|
|
51414
53361
|
className: classes.promptHolder
|
|
51415
|
-
}, /*#__PURE__*/
|
|
53362
|
+
}, /*#__PURE__*/React$1.createElement(EditableHtml, {
|
|
51416
53363
|
className: classes.prompt,
|
|
51417
53364
|
markup: model.prompt,
|
|
51418
53365
|
onChange: onPromptChanged,
|
|
@@ -51423,25 +53370,25 @@ const Design = styles$y.withStyles(styles)(props => {
|
|
|
51423
53370
|
spellCheck: spellCheckEnabled,
|
|
51424
53371
|
uploadSoundSupport: uploadSoundSupport,
|
|
51425
53372
|
disableUnderline: true
|
|
51426
|
-
}), promptError && /*#__PURE__*/
|
|
53373
|
+
}), promptError && /*#__PURE__*/React$1.createElement("div", {
|
|
51427
53374
|
className: classes.errorText
|
|
51428
|
-
}, promptError)), /*#__PURE__*/
|
|
53375
|
+
}, promptError)), /*#__PURE__*/React$1.createElement("div", {
|
|
51429
53376
|
className: classes.matrixHeaderOptionsHolder
|
|
51430
|
-
}, /*#__PURE__*/
|
|
53377
|
+
}, /*#__PURE__*/React$1.createElement(MatrixColumnsRowInput, {
|
|
51431
53378
|
model: model,
|
|
51432
53379
|
onChangeModel: onChangeModel
|
|
51433
|
-
}), /*#__PURE__*/
|
|
53380
|
+
}), /*#__PURE__*/React$1.createElement(MatrixColumnsSizeHeaderInput, {
|
|
51434
53381
|
model: model,
|
|
51435
53382
|
onChangeModel: onChangeModel
|
|
51436
|
-
}), /*#__PURE__*/
|
|
53383
|
+
}), /*#__PURE__*/React$1.createElement(MatrixLabelTypeHeaderInput$1, {
|
|
51437
53384
|
model: model,
|
|
51438
53385
|
onChangeModel: onChangeModel
|
|
51439
|
-
})), /*#__PURE__*/
|
|
53386
|
+
})), /*#__PURE__*/React$1.createElement(MatrixValues, {
|
|
51440
53387
|
model: model,
|
|
51441
53388
|
onChangeModel: onChangeModel
|
|
51442
53389
|
}));
|
|
51443
53390
|
});
|
|
51444
|
-
class Main extends
|
|
53391
|
+
class Main extends React$1.Component {
|
|
51445
53392
|
constructor(...args) {
|
|
51446
53393
|
super(...args);
|
|
51447
53394
|
|
|
@@ -51463,7 +53410,7 @@ class Main extends React__default.Component {
|
|
|
51463
53410
|
}
|
|
51464
53411
|
|
|
51465
53412
|
render() {
|
|
51466
|
-
return /*#__PURE__*/
|
|
53413
|
+
return /*#__PURE__*/React$1.createElement(Design, _extends$3({}, this.props, {
|
|
51467
53414
|
onChangeModel: this.props.onModelChanged,
|
|
51468
53415
|
onPromptChanged: this.onPromptChanged,
|
|
51469
53416
|
onTeacherInstructionsChanged: this.onTeacherInstructionsChanged
|
|
@@ -52914,7 +54861,7 @@ class Matrix extends HTMLElement {
|
|
|
52914
54861
|
|
|
52915
54862
|
_render() {
|
|
52916
54863
|
log('_render');
|
|
52917
|
-
let element = /*#__PURE__*/
|
|
54864
|
+
let element = /*#__PURE__*/React$1.createElement(Styled, {
|
|
52918
54865
|
model: this._model,
|
|
52919
54866
|
configuration: this._configuration,
|
|
52920
54867
|
onModelChanged: this.onModelChanged,
|